playday3008 / AC.Rogue-PatchFix

AC:Rogue Fixes
MIT License
0 stars 0 forks source link

AC: Rogue Patch

Known bugs

That's the list of known problems with that patch, feel free to contribute with the solutions

Description / Theory

tl;dr

Patch for the AC: Rogue to force change the language of the game, remove black bars on non 16:9 resolutions, changable FOV.

Theory

AC: Rogue has a region lock for the language. It means that you can't change the language of the game to the one that is not supported by your region.

Examples:

localization.lang

Structure of the localization.lang was unknown (at least publicly), until now. So it wasn't easy to add missing languages to the game.

Simplified structure of the localization.lang:

struct LocalizationLang
{
  char    language[4];                // "LANG"
  byte    preffered_subtitle_index;   // 0x1
  int32_t subtitle_language_bitfield; // 0b...0110 Means English and French is supported
  int32_t audio_language_bitfield;    // 0b...0010 Means English is supported
  byte    preffered_audio_index;      // 0x1
};

Check tools\LocLangGenerator\localization.lang.struct.hexpat for the complete structure. (Use ImHex to view and use the file)

Inner Logic

Game utilizes the localization.lang file to determine the language of the game. But depends on inner logic, it can also change game id.

Here's that inner logic:

int GetGameId(void)
{  
  if (DoesHaveRussian()) {
    return 0x4a2 + IsSteam(); // 0x4a2 + 0x1 = 0x4a3
  }

  if (DoesHaveKorean()) {
    if (DoesHaveChinese()) {
      return 0x67d + IsSteam(); // 0x67d + 0x1 = 0x67e
    }
  }

  // WorldWide
  if (IsSteam()) {
    return 0x3a6;
  } else {
    return 0x37f;
  }
}

Conclusion

As we can see, game can report 6 different game ids, but probably you only own one version of the game, so, that's the problem. Patch allows to report the desired game id, so you can change the language to the desired one.

Usage / Installation

Just take ACRoguePatcher.dll, rename it to version.dll, then copy it and patch_config.ini to the game directory. Change Region field in the patch_config.ini to the desired region.

Also you can use loc-lang-gen.exe, to enable/disable particular localization. Just load localization.lang change stuff and save it.

Don't forget to download language files used by chosen language (audio and video files). You can find them in the internet.

Credits