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

Another question about localization.txt! Does the key at the top actually determine anything or is it just a reminder?

FramFramson

Surviver
I have a couple mods with some guns which have no descriptions and I just wanted to add these in. I was able to add one to one mod but not another and it seems like somehow they use slightly different formatting?

Also one of the mods uses a schematic and the schematic's description adds a huge amount of text that is a longer-than-normal version of the schematic text (the usual line about "this lets you build the thing" is followed by lengthy examples), and I have no idea why.

 
I have a couple mods with some guns which have no descriptions and I just wanted to add these in. I was able to add one to one mod but not another and it seems like somehow they use slightly different formatting?

Also one of the mods uses a schematic and the schematic's description adds a huge amount of text that is a longer-than-normal version of the schematic text (the usual line about "this lets you build the thing" is followed by lengthy examples), and I have no idea why.


Make sure the item has the following property

        <property name="DescriptionKey" value="NewGun1" />




That should cause the game to look in the localization file to find this value and add it to the description.

Regarding the second one, it sounds like the mod creator got a bit wordy in their description.

 
Last edited by a moderator:
Just an FYI, you don't need the DescriptionKey bit, the game will automatically find it in the loc file if it matches an item name with Desc at the end. The exception is if an item extends from an item with a DescriptionKey property, then you need to set it otherwise it will just use whatever is set in the property on the original item.

The key at the top sets the formatting for that particular loc.txt. Key,English works fine, the main thing is each entry follows the header with the amount of commas used as that is how it is read by the game.

 
Just an FYI, you don't need the DescriptionKey bit, the game will automatically find it in the loc file if it matches an item name with Desc at the end. The exception is if an item extends from an item with a DescriptionKey property, then you need to set it otherwise it will just use whatever is set in the property on the original item.

The key at the top sets the formatting for that particular loc.txt. Key,English works fine, the main thing is each entry follows the header with the amount of commas used as that is how it is read by the game.


Yes, that's exactly what happened. In one case I was able to add a second line to the localization which added the ~Desc suffix, but with others it did not work. At least now I know why!

Will test this later and see if I can get them all working.

 
Back
Top