Page 1 of 1

Unkown key error.

Posted: Sun Nov 06, 2016 3:47 pm
by funCrafter
Hello.

Im starting to create a mod and I got some cool Ideas I wanna get in the game.
everything is working the recepies... but one thing is not working the names for my items and stuff.
everytime the game is just calling my items or entitys unkown-key:... and I cant fix it or I dont know how to.
I tried to just copy stuff from other mods Im not gonna publish this but even when i copy stuff im getting an unkown key.
any ideas how to fix it?

Re: Unkown key error.

Posted: Sun Nov 06, 2016 4:47 pm
by aubergine18
It sounds like you're missing the locale strings.

Create a folder /locale/en/ and then put a .cfg file in there (best to copy one from another mod and just edit it).

Then put the key, followed by =, followed by the text you want displayed.

For example, I have an item in one of my mods called "wood-bridge". Each item has two locale keys - a name and a description, so I put this in my mods locale/en/bridge.cfg (the name of the file is not relevant, just as long as it's in correct folder and ends with .cfg, it will be detected by the game).

Code: Select all

[item-name]
wood-bridge = Wooden Bridge

[item-description]
wood-bridge = Pedestrian bridge for crossing short-stretches (max 16 tiles) of water.

Re: Unkown key error.

Posted: Sun Nov 06, 2016 8:20 pm
by funCrafter
Oh thx for your help I had no idea that i need this