Note: You are not logged in.
Tutorial: Adding custom damage types and creature types for 5E

by Kelrugem

0 Avg. rating

Forum Thread
Total Subscribers: 406


For bug reports:
How to activate: This is an extension for 5E; download it from the forge using the update button in the Fantasy Grounds Unity launcher after subscribing to this item using this website; afterwards, before you launch your campaign, turn on Custom Damage Types in the extension list of your campaign.

This is a tutorial providing a dummy extension which the user can edit to add custom damage and NPC types.

Important: Download the dummy extension, go to /extensions, search for its file called Custom Damage Types.ext, and either change this extension's name or turn off the updates from the forge to avoid that your custom changes will be overwritten (in case I ever upload a new build which will get downloaded from the forge and may overwrite your version; this is very unlikely, but to be on the safe side... :) ). In case you already use the version uploaded in the forum, then you do not need to subscribe to this version (doing so, may overwrite your existing version if your existing version still has the same file name).

New damage types

Change the file type of the extention from .ext to .zip, unzip it, and go to /scripts/data_common2.lua which you should open with some text editor (I recommend Notepad++ which is free). Then you see the following:
function onInit()
table.insert(DataCommon.dmgtypes, "ballistic");
table.insert(DataCommon.dmgtypes, "laser");
table.insert(DataCommon.dmgtypes, "electric");
table.insert(DataCommon.dmgtypes, "radiation");
You now probably see the structure; you can simply replace the listed damage type and/or add additional lines with the same structure. Just replace the damage type of that new line then. Then zip the extension again (inside its first layer of folder), then rename to .ext.

New creature types

If you want to have a new creature type, then use

table.insert(DataCommon.creaturetype, "new type");
and replace new type with your custom types.

You can also use creaturesubtype instead of creaturetype, but that is just for sorting purposes, the automation is the same.

You want more?

The tutorial for custom damage types only works for the standard damage types; there is also the critical damage type with some special properties. Such things are of course a little bit more complicated to code, but one thing is easy to add: The critical damage added as an effect as in DMG: d6 critical does not only trigger on crits but the d6 will also carry all the other native damage types from your weapon, it won't just have the type critical. If you want that your custom damage type behaves similarly (i.e. if used in such effects, then the native damage types shall be inherited and additionally added), then additionally add the following line in the code above:

table.insert(DataCommon.specialdmgtypes, "ballistic");
(ballistic is just again an example of course)

Changing the extension's name

There is an extension.xml file before you click on the /scripts folder. Open this file, and you should be able to find the name of the extension at the top between some name tags. Change this string to whatever name you would like to have.

Source of extension logo:

By Bmos, thanks :)

UUID 2e064d56-d5ec-11eb-8c52-0050562be458