Opened 11 months ago

Last modified 11 months ago

#13659 new defect

AGS: Default "Game language" option in ScummVM does not override .cfg file

Reported by: tag2015 Owned by:
Priority: normal Component: Engine: AGS
Version: Keywords: ags, language
Cc: Game:


The "game language" setting in the game options tab for AGS games should work like this:

  • When <default> is selected, use the game built-in language (most often english);
  • When another language is selected, use the specified .tra file

Instead, with the default selection ScummVM always uses the language that is specified in the acsetup.cfg file.

Steps to reproduce, using Maniac Mansion Deluxe

  • Run winsetup and pick a random language
  • Run the game in scummvm. Now there's no way to go back to english besides running winsetup again or deleting the cfg file.

Win10 ScummVM 2.7.0git1305-gfcf0a79709b

Change History (1)

comment:1 by criezy, 11 months ago

This is a known issue because I implemented it that way on purpose. The idea was that when a game is distributed with a cfg file that already specifies a language, or if the user runs win setup to select a language, in ScummVM we should use that language by default if the user does not go to the game options in ScummVM to change it.

However I agree that it is not optimal, since as you noticed, if a language is specified in the cfg file we have no easy way in ScummVM to indicate we don't want to use any translation.

The root of the issue lies in the use of two config files. The game one (acsetup.cfg) and the ScummVM one (typically scummvm.ini). The game options dialog uses the latter, so does not know what is defined in the game settings file, nor does it change it. When selecting "<default>" language in the game options that removes the setting from the ScummVM config file (and this is thus what we have by default if the user never goes into the options).

One solution could be to indeed use "<default>" as meaning that no translation file should be used, but synchronise the game options dialog with the game cfg file instead of using the scummvm config file. Using the cfg file parsing from the ags engine could be an issue (e.g. if the engine is built as a plugin). ScummVM does have code in Common::ConfigManager to read those as file (since we use the same format) but it is not easily reusable. So we would either have to duplicate some code and refactor some existing code.

Another simpler solution could be to add an additional entry in the language selection in ScummVM, and have separate <use default game language> and <use language from acsetup.cfg file> options. I am now sure what would be good names for those however.

Finally we could also forget the attempt to use by default the language from acsetup.cfg, and always ignore it. In that case we would just have to change the meaning of <default> to mean "do not use any translation file".

Last edited 11 months ago by criezy (previous) (diff)
Note: See TracTickets for help on using tickets.