According to this thread, (http://"http://www.adventuregamestudio.co.uk/yabb/index.php?topic=34796.0") a game will only ever use one winsetup file, even if you use RunGASGame. Which raises issues with translations. Let's say I have the following files (created with 2.72):
game1.exe
game1inFrench.tra
game2.exe
game2inFrench.tra
Now let's say I start game1, using game1inFrench.tra. Now I use RunAGSGame to run game2. AGS will still be using game1inFrench.tra, right?
So the only way to use translations with RunAGSGame is to create one giant translation file that includes both games:
allgamesinFrench.tra
Would that work? Or is there an easier way?
And if I had a hundred games and a humungously giant .tra file, would this slow the game down?
Too bad you're using 2.72, otherwise you could run Game.ChangeTranslation in the game_start for each game. Not a very helpful response, sorry. My guess is yes, it would work to have one huge file, and yes, it would slow the game down (because AGS searches through all Strings in the translation file until it finds the right one). If I remember correctly, your game uses its own internal storage of multiple Strings in a single line - and this may in fact speed it up a bit, because you have less Strings to run through. But for actual performance there doesn't seem to be any way to find out short of testing it.
Edit: Also, doesn't your cross-game code need to know the translations for all the games at all times? If you changed translation files between games, any words in the history list that didn't have a translation in the current game would appear in English.
Thanks. Can I just confirm that the whole of the translation file is loaded into memory at the start? If it's read from disk each time then I could just rename the file between each game. But somehow I don't think that would work.
And regarding passing translated strings between games, I haven't tested that yet, but I imagine I can translate it before it's sent across.
Edit: My long term goal is to have 100 stories. The .tra file could be over 50 MB! I may have to seriously consider using 3.0. My main reason for being a Luddite is that 2.72 has better Linux compatibility. But for me, translations are even more important than Linux (the OS is just a tool, after all). What a dilemma.
Yes, you'd have to combine them into one huge translation file.
Performance wouldn't necessarily be an issue, as AGS uses a fairly efficient binary tree structure for storing the translations; and translated lines are not generally something that it looks up every game cycle, but only when some text needs to be displayed.
But if the translation file size reached 50 MB then, yes you might start having performance problems.
Thanks. I am feeling the inexorable force of destiny dragging me out of the dark ages and toward 3.x...