Weapon Mod

Updated for version 3.38.

This page is missing some information.

Module Definition

The module is inherited from ItemModuleBase. So base parameters can be found there.

This modules let's you add weapon aprts.

Module name

The name of the module you use as the meta of the module definition is 'WeaponMod' or 'WeaponModModule' if _force_search is set to true in the module definition.

XML Structure

<WeaponMod id based_on type .../>

<WeaponMod ...>

And any other tweakdata value. There are more that are not listed here yet.

The icon

The icon will be stored in guis/dlcs/mods/textures/pd2/blackmarket/icons/mods and will be named id.texture then add it using AddFiles.

Example

This example is what you would put inside your main node within your mod config

<WeaponMod id="wpn_part_YOUR_PART_NAME" based_on="wpn_fps_saw_m_blade_sharp" type="magazine" ver="2">
    <weapons>
        <value_node value="wpn_fps_saw"/>
        <value_node value="wpn_fps_saw_secondary"/>
    </weapons>
</WeaponMod>

This will add another saw blade to the saw. Based on an existing saw blade. You will still need to localize the title of the part. In this case bm_wp_wpn_part_YOUR_PART_NAME will need to be localized using LocalizationModule. And add unit, object, material_config, textures and icon through AddFiles Thankfully shortcuts make it easier:

<AddFiles directory="assets">
    <texture path="guis/dlcs/mods/textures/pd2/blackmarket/icons/mods/wpn_part_YOUR_PART_NAME"/>    
    <unit_cc path="units/mods/weapons/wpn_part_YOUR_PART_NAME/wpn_part_YOUR_PART_NAME"/>
</AddFiles>

Template

Download template (sight) here

Last updated