Since I added auto-update English localization to the game, which overwrites any edits with new ones, there was a need to be able to add localization to bypass this. (An example mod will be at the end)
In this guide, I will cover not only how to make a custom language but also how to make mods in general.
1. Go to the folder with game data (On android “…/Android/data/com.keyneed.obsession/files/”).
2. If you ran the game before, there should be a folder “workshop”, if it is not there create it.
3. Make inside the last folder one more folder, we will do a test localization for Russian. The name must be unique otherwise it may conflict with other mods, for example in my case I will name the folder not just “russian”, but for example “russianbykeyneed”, it is important to use only numbers and Latin letters.
4. Go to our new folder and create a new document called “info.json”. This is the main file where all the main processes with the mod take place.
5. In it we write this code:
{
“workId”: “russianbykeyneed”,
“workName”: “Русский”,
“workVersion”: “0.1”,
“workType”: “localization”,
“workDescription”: “Тестовый русский перевод игры.”,
“workFiles”: [
{
“type”: “ui”,
“path”: “main.json”
},
{
“type”: “names”,
“path”: “names.json”
},
{
“type”: “opys”,
“path”: “opys.json”
},
{
“type”: “uni”,
“path”: “uni.json”
}
]
}
Where “workId” the name repeats the name of your folder, in my case it is “russianbykeyneed” since the folder is named that. “workName” the name of the mod, which will be displayed in the list of mods, in the case of translation should specify just the name of the language, as it will be displayed in the list of game languages.
“workVersion” version of the mod.
“workType” mod type, a very important thing because thanks to it the game knows what is responsible for the mod and how to read it, if we do localization, then so and write “localization”.
“workDescription” description of the mod.
“workFiles” array with links to the necessary files for the mod and basically all those files that the game should read and depending on the type of mod to process them.
The array element contains data “type” is the type of file or rather its tag on which the game can identify and process it and “path” is directly the path to the file.
In the array we write exactly these types, because this way the game will be able to determine which file is responsible for translating the names of items, and which one is for translating the game interface.
6. In order to simplify our task, we simply take that translation, which already has the game in the root folder “translation” and transfer them to the folder of our mod.
7. Do a translation of the game in each of the files. {0}, {1} etc. are system tags that are replaced by context-dependent data. They can be adapted to the text, but never replaced or removed.
8. Go into Erythros and into the mods tab. If we see our mod there, it means that it works (obviously) and we can activate it.
9. Go into the settings and click on the “language” button.
10. There we see our new language and click on it, after restarting the game the new language will be applied.
And here is a link to our test mod with localization current as of 18.12.2023
Download: russianbykeyneed mod file