Jump to content

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


FramFramson

Recommended Posts

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.

Link to comment
Share on other sites

6 hours ago, FramFramson said:

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.

 

Edited by BFT2020 (see edit history)
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

3 hours ago, bdubyah said:

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...