Edit Rayman 1 text strings

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

Moderators: English moderators, Modding and utilities team

Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
Post Reply
DavidSosa
Ptizêtre Ninja
Posts: 219
Joined: Sun Apr 18, 2021 12:17 am
Location: Lima, Peru
Contact:
Tings: 3455

Edit Rayman 1 text strings

Post by DavidSosa »

How can i edit rayman 1 text strings?, i wanna translate the game to swedish, please!1
i hate myself
ItzalDrake
Reflux
Posts: 631
Joined: Tue Nov 01, 2016 6:44 pm
Location: Somewhere in the pizza-pasta country
Contact:
Tings: 8658

Re: Edit Rayman 1 text strings

Post by ItzalDrake »

Hi! :)
You can use Rayman Control Panel to edit Rayman 1 localization file (RAY.LNG).
Go to Utilities > Decoders > Rayman 1 language files (.lng), select the version of the game and decode the file!

The output file has the same name and file extension as the original one, but you can open and edit it with any text editor you prefer! (just don't delete the slashes and commas of course) :D
Hello! Image
☭ CrazyKyoto ☭
Aurora
Posts: 203
Joined: Tue Aug 27, 2019 7:31 pm
Location: Nizhny Novgorod, Russia (eariler Mariupol, Ukraine)
Contact:
Tings: 15618

Re: Edit Rayman 1 text strings

Post by ☭ CrazyKyoto ☭ »

ItzalDrake wrote: Sat Sep 18, 2021 1:16 am Hi! :)
You can use Rayman Control Panel to edit Rayman 1 localization file (RAY.LNG).
Go to Utilities > Decoders > Rayman 1 language files (.lng), select the version of the game and decode the file!

The output file has the same name and file extension as the original one, but you can open and edit it with any text editor you prefer! (just don't delete the slashes and commas of course) :D
Greetings here, comrades! I wanna translate Rayman 1 PC version to Russian, and I tried to do this by Rayman Control Panel (version 11.0.0.3) where I decode RAY.LNG file and edit some text for test, then after I encode my edited in Notepad ++ file and put it to Rayman Forever directory, where was original game.

So... That method does'nt work. Game after intro with Rayman just crashed. I don't delete slahes and commas and know for what they needed. I worked with Playstation 1 localization, so I know what I must do for text modification. Now I have come to the conclusion that the game does not allow in any way to replace the text. I even checked how well the .lng file decoder works. For that I decode RAY.LNG file, and after encode that without text edit. Game after that does'nt crash. And I tried to do that with Rayman Forever GOG version (Rayman 1 in that edition have ver. 1.21.) and with original Rayman from old-games.ru site. The result was exactly same.

Therefore, I want to ask the users of RPC. Why game does not allow to replace the text and for what reason?
LEADER OF "RAYMAN FAN UNION" (VKONTAKTE)
Image

БЕТИЛЛА САМАЯ ЛУЧШАЯ ВАЙФУ НА СВЕТЕ!!!
Chacanger
Ptizêtre en or
Posts: 159
Joined: Tue Aug 10, 2010 9:55 pm
Tings: 895

Re: Edit Rayman 1 text strings

Post by Chacanger »

☭ CrazyKyoto ☭ wrote: Sun Nov 06, 2022 4:23 pm
ItzalDrake wrote: Sat Sep 18, 2021 1:16 am Hi! :)
You can use Rayman Control Panel to edit Rayman 1 localization file (RAY.LNG).
Go to Utilities > Decoders > Rayman 1 language files (.lng), select the version of the game and decode the file!

The output file has the same name and file extension as the original one, but you can open and edit it with any text editor you prefer! (just don't delete the slashes and commas of course) :D
Greetings here, comrades! I wanna translate Rayman 1 PC version to Russian, and I tried to do this by Rayman Control Panel (version 11.0.0.3) where I decode RAY.LNG file and edit some text for test, then after I encode my edited in Notepad ++ file and put it to Rayman Forever directory, where was original game.

So... That method does'nt work. Game after intro with Rayman just crashed. I don't delete slahes and commas and know for what they needed. I worked with Playstation 1 localization, so I know what I must do for text modification. Now I have come to the conclusion that the game does not allow in any way to replace the text. I even checked how well the .lng file decoder works. For that I decode RAY.LNG file, and after encode that without text edit. Game after that does'nt crash. And I tried to do that with Rayman Forever GOG version (Rayman 1 in that edition have ver. 1.21.) and with original Rayman from old-games.ru site. The result was exactly same.

Therefore, I want to ask the users of RPC. Why game does not allow to replace the text and for what reason?
Funnily enough that's what I was going to look at doing this week with my project seeing as I'm working on the DOS version, I've seen roughly how this works but never properly got it working yet. If I manage to do it before you I'll let you know.
RayCarrot
Tily
Posts: 2278
Joined: Sat Jan 11, 2014 5:46 pm
Tings: 36217

Re: Edit Rayman 1 text strings

Post by RayCarrot »

The reason I removed the decoder is because the game makes editing the text really complicated. The .lng file itself is basically just a comma-separated text file for each language. However it's encrypted and on top of that there's a checksum of each file hard-coded in the exe. This is why the game crashes if you edit it - the checksum doesn't match anymore.
Now you can edit the checksum in the exe to match what you edit, and you can also make it easier for yourself by removing the encryption (set the xor byte to 0) and increasing the file size, but that gets complicated as the exe is compressed (so you'll first need to decompress it) and then there are so many releases of R1 on PC that finding where it is will be different for each version! So since I couldn't have a reliable way of having RCP handle this I decided to remove it. You can already view all the data these .lng files contain on ray1map.
☭ CrazyKyoto ☭
Aurora
Posts: 203
Joined: Tue Aug 27, 2019 7:31 pm
Location: Nizhny Novgorod, Russia (eariler Mariupol, Ukraine)
Contact:
Tings: 15618

Re: Edit Rayman 1 text strings

Post by ☭ CrazyKyoto ☭ »

Chacanger wrote: Sun Nov 06, 2022 6:09 pm Funnily enough that's what I was going to look at doing this week with my project seeing as I'm working on the DOS version, I've seen roughly how this works but never properly got it working yet. If I manage to do it before you I'll let you know.
Well... I just interested about that idea after work with Playstation version and all what I did here is just fortunate happenstance. I think if I don't find more simple ROM of game, where I can easily edit it by hex-editor - maybe I would most likely be left with only one created game intro. Now if I have some chances - I can do a full translation of PC version. But for that I will need to edit font to cirillic letters and only after work with text. Also some voice sounds I can edit. Alike when Rayman breaks the fourth wall and tell to player "Hey you!" and "See you!" and simmilar things in game.

Oh and yes. I want to ask, if you will. You are also working on Russian localization of that game? Or over another language? Or do you want to do something else?
RayCarrot wrote: Sun Nov 06, 2022 6:26 pm The reason I removed the decoder is because the game makes editing the text really complicated. The .lng file itself is basically just a comma-separated text file for each language. However it's encrypted and on top of that there's a checksum of each file hard-coded in the exe. This is why the game crashes if you edit it - the checksum doesn't match anymore.
Now you can edit the checksum in the exe to match what you edit, and you can also make it easier for yourself by removing the encryption (set the xor byte to 0) and increasing the file size, but that gets complicated as the exe is compressed (so you'll first need to decompress it) and then there are so many releases of R1 on PC that finding where it is will be different for each version! So since I couldn't have a reliable way of having RCP handle this I decided to remove it. You can already view all the data these .lng files contain on ray1map.
Wow! RayCarrot himself answered me! I really like your projects! I even made an article about the Rayman Control Panel in my VK community... True, you need to somehow update it by filling in information about new versions.

Well now I understand why decoder was removed. And how I understood I must work also with exe file... Well just try to do some experiments alike Alexander Pushnoy in Galileo before I really can go and work with that projects. And... Also I plan to do another big project with dublating of one Rayman stuff.
LEADER OF "RAYMAN FAN UNION" (VKONTAKTE)
Image

БЕТИЛЛА САМАЯ ЛУЧШАЯ ВАЙФУ НА СВЕТЕ!!!
PluMGMK
Aline Louïa
Posts: 37010
Joined: Fri Jul 31, 2009 9:00 pm
Location: https://www.youtube.com/watch?v=cErgMJSgpv0
Contact:
Tings: 102745

Re: Edit Rayman 1 text strings

Post by PluMGMK »

I wonder if it would make sense to add a PMODE/W codec implementation to Ray1Map so it can edit the EXE files directly. I'm sure there are heuristics that can be used to determine the version it's looking at and edit the appropriate locations in the objects accordingly…
RayCarrot
Tily
Posts: 2278
Joined: Sat Jan 11, 2014 5:46 pm
Tings: 36217

Re: Edit Rayman 1 text strings

Post by RayCarrot »

Implementing the codec for that would be great! :) I don't have any experience with it myself though.
With that maybe we could set up some proper archive editing tools for Rayman 1... The vignette (has the backgrounds), sound and language files all use the same archive format where their headers are hard-coded in the exe. That's been the only thing preventing them from easily being edited. In later games (like Designer) they instead opted for including the headers in the archive files themselves which makes it much easier (and is how you can edit them in RCP there).

I should also include the structure for the archive data here if anyone wants to manually attempt this in the meantime:

Code: Select all

4 bytes: file offset
4 bytes: file size
1 byte: xor key
1 byte: checksum
2 bytes: padding
There's an array of these structures in the exe for each archive file. Sadly there are no file names like in later games. Instead they're indexed.

While on the topic of languages, if anyone eventually wants to add more letters to the Rayman 1 font the language files seem to support using any available sprite by specifying its index. This was used for the Japanese translation as an example where they opted for having each sentence be a separate sprite rather than using a reusable font. Of course editing Rayman 1 sprites is a whole other complication though... It has been done with ray1map, but it's rather complicated due to how the palettes and transparency are handled.
Chacanger
Ptizêtre en or
Posts: 159
Joined: Tue Aug 10, 2010 9:55 pm
Tings: 895

Re: Edit Rayman 1 text strings

Post by Chacanger »

☭ CrazyKyoto ☭ wrote: Sun Nov 06, 2022 7:36 pm Oh and yes. I want to ask, if you will. You are also working on Russian localization of that game? Or over another language? Or do you want to do something else?
At the moment it'll just be the 3 standard languages that you can install, but I was thinking about whether people would like to translate it later on like the aforementioned Russian translation mod; I think there was a Swedish translation mod someone was working on too.
Post Reply