Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: sychron on August 24, 2007, 03:39:56 AM

Title: item caption translation problem
Post by: sychron on August 24, 2007, 03:39:56 AM
Hello,

I'm doing a translation for a game. This game uses different string tables for everything including the item captions, for example:

 CAPTION = "/ITEMIS0001/Axe"

Theese Strings are defined in each string table. The string table used is selected at startup in a language selection screen.
After language selection, the game takes every string from the new string table, exept for the item names, which still come from the original string.tab.

I checked this -- changing the names in string.tab does affect the game, changing them in other languages does not.

The code for loading the new string table is:

Game.LoadStringTable(LangFile,true);
Game.LoadItems("items\items.items",false);

So the LoadItems function should load the new item captions, but it doesn't.

How can I fix this? Or is this an engine bug?
Title: Re: item caption translation problem
Post by: sychron on August 24, 2007, 04:01:53 AM
/UPDATE: Problem fixed. It did work, but only for new games. It seems not to affect item names in saved games.

Well, maybe that's a bug ;-)
Title: Re: item caption translation problem
Post by: Mnemonic on August 24, 2007, 03:09:01 PM
Not a bug, it is expected behavior. The item captions are localized at startup, so the saved games contain the already translated texts.
Title: Re: item caption translation problem
Post by: sychron on August 24, 2007, 09:51:26 PM
Hmm ... Ok ... makes testing a bit more difficult and may confuse players, who add a language pack after having played for a while ...

Would'n it be a good Idea to store the item NAMES in the savegame and localize the captions while loading them?
Title: Re: item caption translation problem
Post by: Mnemonic on August 25, 2007, 05:25:58 PM
Would'n it be a good Idea to store the item NAMES in the savegame and localize the captions while loading them?
WME stores an image of the entire object in the saved game, including all its properties (since they can change at runtime anytime). That's also why the captions are localized when they're assigned, not every time they're used (for performance reasons). So, I'm afraid this is a concept thing, not easy to change.
Title: Re: item caption translation problem
Post by: sychron on August 26, 2007, 12:21:36 PM
Hmm ... ok, makes sense.

Well, I tracked down the bug, now I've got german item names and I'm happy, so -- this can be closed.