• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Creating new Item Mods

I'm trying to add new item mods, like weapon mods. I'm having some trouble getting a weapon mod to work the way I want, though.

The localization doesn't seem to work right, even though I think I'm doing it right. Two problems: One, the name is always showing the internal name, even though I have a line added to my mod's Localization.txt and I'm fairly certain it's correct. Two, I don't see where other weapon mods are having their description applied. I ran a search for the string "modGunTriggerGroupAutomaticDesc" for example (which is the description in the game's localization) and the only place it was showing was Localization, not being assigned within the item's node in item_modifiers.xml - yet the descriptions do show up on the items fine.

Am I missing something here? Here's my one line in the Localization.txt for my mod:

Code:
modGunTriggerGroupBurst2,item_modifiers,mod,,Binary Trigger System,,,,,
 
For one, make sure you have a line like this in the item_modifiers.xml for your item:

Code:
<property name="DescriptionKey" value="modLongShotgunBarrelDesc"/>
Vanilla items don't have to use it. It may be like icons where if the name matches exactly it doesn't need the key. Not 100% on that.

Then for the localization.txt, I have this:

Code:
modLongShotgunBarrel,item_modifiers,mod,New,Long Shotgun Barrel (Pipe Shotgun),,,,,
modLongShotgunBarrelDesc,item_modifiers,mod,New,Can be installed on a Pipe Shotgun to increase range at a small cost to handling.,,,,,
And my txt file has this as it's header. You'd need to tweak it depending on how you have yours set up.

Code:
Key,Source,Context,Changes,English
 
Thanks! Yeah, it was the header I was missing. I didn't need the DescriptionKey line either, just having the same name with Desc on the end seems to be good enough for the game to know what to use.

 
Back
Top