Patcher for GOG Rayman 1 to make it honour language setting

Discuss tools to aid in the modification and running of Rayman games.

Moderators: English moderators, Modding and utilities team

Post Reply
PluMGMK
Ambre Écueil
Posts: 32139
Joined: Fri Jul 31, 2009 9:00 pm
Location: An tír ina labhraítear (beagán ar fad) an teanga ina bhfuil sé seo scríofa
Contact:
Tings: 6075

Patcher for GOG Rayman 1 to make it honour language setting

Post by PluMGMK »

Hey all, PluM here with another Rayman 1 hack! This time, it's a small tool to make the version of Rayman 1 from GOG honour the user-chosen language setting instead of forcing it to English.

If you're on Windows (either 32- or 64-bit), you can just download the tool, put it in the same folder as RAYMAN.EXE and then drag the latter file onto it. You can also invoke it from the command line, if you prefer.

If you're nervous about downloading an EXE, you can take a look at the source code (in Rust) and see that it doesn't do anything sketchy.

Now, if you have the GOG version of Rayman Forever, you can use Rayman Control Panel to set the language to "French" or "German", and it won't magically reset itself to "English" when you run the game! I'm not actually sure how many people have access to only this version, and need to play in another language, but here it is just in case!

Thanks to RayCarrot for helping me get my bearings with disassembling and patching Rayman 1 and related EXEs, and understanding how the game does things in general!
RayCarrot
Uglette
Posts: 2134
Joined: Sat Jan 11, 2014 5:46 pm
Contact:
Tings: 29129

Re: Patcher for GOG Rayman 1 to make it honour language setting

Post by RayCarrot »

Really nice work! :D I've always found it odd how they made several single-langage releases of the PC version, but still retained the full translation for all languages (the GOG version even has Japanese and Chinese, but the font sprites are missing so they can't be used). I guess they did it as a fail-safe in case the installer didn't correctly set the language in the config (which brings up another question: why didn't they just allow the language to be changed after installation :P).
Image
PluMGMK
Ambre Écueil
Posts: 32139
Joined: Fri Jul 31, 2009 9:00 pm
Location: An tír ina labhraítear (beagán ar fad) an teanga ina bhfuil sé seo scríofa
Contact:
Tings: 6075

Re: Patcher for GOG Rayman 1 to make it honour language setting

Post by PluMGMK »

Thanks! I didn't actually realize that about the Japanese and Chinese – there's no way to hack in the sprites, is there? It's very weird that they didn't make language adjustable after installation all right, when they did have SETSOUND to handle most of the configuration. I guess someone didn't realize until too late that it would be a good idea, and they were so busy moving onto EDU and KIT that they didn't bother making any major changes to the tools – just a few language-hardcodes here and there! :hap: It would've been nice if they'd at least shipped an unlocked version on GOG, but at least this tool now takes care of that!
Steo
Globox Origins
Posts: 30342
Joined: Sun Feb 25, 2018 3:57 pm
Location: Le Village des Globox
Tings: 226580

Re: Patcher for GOG Rayman 1 to make it honour language setting

Post by Steo »

Oh, nice work Plum! I'll try this out soon if it works on Linux. :hap:
Image
FC: 40210 | CF: 103059 | BOM: 94388 | LOTLD: 120486 | DOTK: 110450 | LS: 40810 | SBTC: 99693 | HH: 100028 | TOTL: 100563

TOTAL: 809687
RayCarrot
Uglette
Posts: 2134
Joined: Sat Jan 11, 2014 5:46 pm
Contact:
Tings: 29129

Re: Patcher for GOG Rayman 1 to make it honour language setting

Post by RayCarrot »

PluMGMK wrote: Sun Sep 20, 2020 9:55 pm Thanks! I didn't actually realize that about the Japanese and Chinese – there's no way to hack in the sprites, is there?
That would be pretty difficult yeah. They added an extra DES in allfix, which means that they also edited every single level file to increase the DES index by 1 for the events. The DES in allfix also have their pointers hard-coded in the exe I believe (I haven't looked into it too much, but I did try modifying a DES and everything got offset wrong, unlike when you edit the world files).
An interesting thing about the Japanese and Chinese translations is that the text for them uses sprite indexes instead, and then each sprite is one of the sentences in the game.
Image
PluMGMK
Ambre Écueil
Posts: 32139
Joined: Fri Jul 31, 2009 9:00 pm
Location: An tír ina labhraítear (beagán ar fad) an teanga ina bhfuil sé seo scríofa
Contact:
Tings: 6075

Re: Patcher for GOG Rayman 1 to make it honour language setting

Post by PluMGMK »

Steo wrote: Mon Sep 21, 2020 6:15 am Oh, nice work Plum! I'll try this out soon if it works on Linux. :hap:
It definitely does, as that's the only place I've actually tried it! :hap: I haven't actually tried dragging a file onto it on Windows, but everything I've heard assures me that'll do the trick. :P
I actually did try it in a Windows 98 VM, but it looks like even the MinGW runtime needs a bunch of DLLs that exist only on NT (possibly only since XP). So don't try this on a retro gaming PC! XD
RayCarrot wrote: Mon Sep 21, 2020 7:27 am
PluMGMK wrote: Sun Sep 20, 2020 9:55 pm Thanks! I didn't actually realize that about the Japanese and Chinese – there's no way to hack in the sprites, is there?
That would be pretty difficult yeah. They added an extra DES in allfix, which means that they also edited every single level file to increase the DES index by 1 for the events. The DES in allfix also have their pointers hard-coded in the exe I believe (I haven't looked into it too much, but I did try modifying a DES and everything got offset wrong, unlike when you edit the world files).
Figures! I guess it's probably possible, but it would take such a huge amount of work that it's probably not worth it in the grand scheme of things...
An interesting thing about the Japanese and Chinese translations is that the text for them uses sprite indexes instead, and then each sprite is one of the sentences in the game.
Ah, I see, the text of the translations per se isn't there. That makes sense, since I'd imagine there are far fewer sentences in the game than hanzi/kanji/kana needed to represent them!

UPDATE: So I was a bit too clever by adding those nops. I've just released a new version that doesn't do that, which you should use instead of the old one. I think the old one causes undefined behaviour in the game (i.e. may crash it) by relying on the three upper bytes of the edx register being zero, when there's no guarantee of that.

So if you patched your game with the first version, and it crashes on startup, please try restoring the backup and using the new version.
Steo
Globox Origins
Posts: 30342
Joined: Sun Feb 25, 2018 3:57 pm
Location: Le Village des Globox
Tings: 226580

Re: Patcher for GOG Rayman 1 to make it honour language setting

Post by Steo »

I haven't tried it myself yet, but I'll test it out later and let you know!
Image
FC: 40210 | CF: 103059 | BOM: 94388 | LOTLD: 120486 | DOTK: 110450 | LS: 40810 | SBTC: 99693 | HH: 100028 | TOTL: 100563

TOTAL: 809687
PluMGMK
Ambre Écueil
Posts: 32139
Joined: Fri Jul 31, 2009 9:00 pm
Location: An tír ina labhraítear (beagán ar fad) an teanga ina bhfuil sé seo scríofa
Contact:
Tings: 6075

Re: Patcher for GOG Rayman 1 to make it honour language setting

Post by PluMGMK »

I mean, version 0.1.0 never caused the game to crash for me, but I only tested it a few times, and I don't know if someone else's config could cause something different to appear in the edx register to mine at that particular point in the code…
Post Reply