XXX4Fans
senkou kaitori from patreon
senkou kaitori

patreon


Structure of ThingDef for ModularWeapons add-on mod

    This is a ThingDef in XML file of PDW addon. I've underlined the important points in red;

    A good way to get started is to copy-paste from the base game weapon XML, and modify some of it. If so, here's what you should change:

1. Set parent of ThingDef to "BaseModularWeapon".


2. Change <graphicData> node.

    <graphicClass> node MUST be "ModularWeapons.Graphic_Modular".

    <texPath> node specifies the path of the AssetBundle and the path of the default image (such as in the crafting screen) at the same time. 


3. Empty the <tools> node.

   <tools> node is for setting the attack method for melee attacks. In ModularWeapons, this is specified on the part side, so leave this blank.


4. Set the comp of modular parts.

    This is the most important point for modular weapon.

<partKinds> node indicates the kind of parts that can be attached.

<majorKinds> node indicates the kind of parts that cannot be removed.

<defaultParts> indicates the parts that are originally attached at the time of manufacture. One of parts set in <majorKinds> must be included in <defaultParts>.


In the next post, I will explain the "ModularPartDef" that sets the parts.


Related Creators