Author Topic: Best practice for translated EMBEDDED game (RunGame)  (Read 129 times)

Monsieur OUXX

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
AGS 3.4.1 Patch 1

Short version : How to run an embedded AGS game, when the parent and the child don't necessarily have the same languages (apart from English) ?


Imagine this :
  • You have an AGS game that you compile into a .EXE game.
  • That game has two translations : "English" and "German". They appear as .TRA files alongside the .EXE file.
  • You have another game that you compile into a .AGS file, and that you then place into the folder of the .EXE file
  • That second game has two translations: "English" and "ITA". You put ITA.TRA in the same folder as all other files (.EXE, .AGS, .TRA) and you don't care about English.TRA (As there's also a file named English.TRA that belongs to the first game). The game's default language is English anyway.

Your goal :
  • You run the setup program of the first game and select language "German", then "Save and run".
  • You prepare the call to the child game by doing Game.ChangeTranslation("English") -- so that the child game starts with a translation that is shared by both
  • You do RunGame("secondgame.ags")
  • Inside of the child game you do Game.ChangeTranslation("ITA")

On the paper I thought this would work.

But when I try, this happens :
  • Game.ChangeTranslation("English") works (returns true)
  • RunGame("secondgame.ags") works
  • But then I have an error message telling me that seconggame doesn't support "German". I don't understand why it complains as I forced it to start with "English"?


What am I doing wrong? Is there a better practice?

I'm trying to keep manual maintenance to a minimum, that's why I don't merge the translation files of the first and second game (apart from English).
 

Monsieur OUXX

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
Re: Best practice for translated EMBEDDED game (RunGame)
« Reply #1 on: 04 Feb 2020, 09:46 »
Bump