Editing key strings won't work

:arrow_forward: GAME INFORMATION

  • Build: sorry, I dont know how to see it and google isnt very helpful, the game exe says: 101.101.39515.0
  • Platform: Steam
  • Operating System: Windows 10
  • Gamertag: Stitch3s712
    I’m trying to make a mod in which I need to edit unit names, their descriptions, etc. In Advanced Genie Editor everything seemed to work fine after saving the key strings modded file. Names and cescriptions of the units were there. But when I started the game, and launched a match with my mod active, the strings didn’t work. The stats I changed of the units changed, but not the strings.

Here’s how to reproduce the issue:

  1. In User/Games/Age of Empires 2 DE/(some long number)/mods/local create a folder with the name of the mod you want to make (in this case something like test, idk), in that folder create a folder called resources, in that “en”, in that “strings”, and in that “key-value”. then, in “resources” create another path like this: _common/dat
  2. go to your AoE2 DE Steam folder (I think you should know how to do that), go to resources/en/strings/key-value. there are 2 text files there. you copy the one called “key-value-modded-strings-utf8.txt” into the key-value folder of the test mod folder you created before. then you go back to the steam game directory and go to resources/_common/dat. there you will find a file called “empires2_x2_p1.dat”. you copy that into the dat folder you created in your test mod folder.
  3. in the text file you just copied you create a new line like this:
    5083 “I dont know how to breathe”, then save the text file
  4. open advanced genie editor
  5. where it says “language x1 file location”, on the right of that you click “browse”, go to the folder where the text file is, click it once to select it, and click “open”
  6. where it says “compressed data set”, on the right of it click “browse”, go to the folder where the empires.dat file is, click on it once to select it and click open
  7. now click “open” on the advanced genie editor window.
  8. in advanced genie editor, in units search “archer”
  9. where it says “language file name” (above one of the green boxes with the number 5083 in it), under the green box it should now say “I dont know how to breathe”
  10. just close advanced genie editor and open the game
  11. start a single player match with the mod you created enabled
  12. create an archer and you should see that his name hasn’t changed

:arrow_forward: IMAGE & ATTACHMENTS

:question: Attach a SCREENSHOT, VIDEO, DXDIAG .TXT FILE, or CRASH/GAME LOGS (if relevant).

Don’t edit with Windows notepad, it might change your encode into UTF-8-BOM, which can’t be loaded by DE. Try to edit with some other text editors, such as notepad++, vscode, ultraedit.

In addition, avoid opening the [Write language files *] option, otherwise AGE might output some unexpected results.
image

According to this reply data and text mod need to be separate. I have also seen some mod authors keep text mod separate.

2 Likes

yep they need to be separated, with it’s own folder path as a separate UI mod

3 Likes

Why cant they make it work non separate
Devs pls make modding enjoyable again as it was in HD

3 Likes

so how do I mark this as solved? is it marked as solved because i reacted to one reply as “Solution”? do i delete this topic? that would be stupid because others could search for a solution and not find my topic anymore so they need to create another thread.

To modify the game’s strigns, I found only one way to do it. I’ll explain in detail how to do this, but if you don’t understand you can subscribe to the mod “AOE2_Golden_DE (Strings)” to see how I did it.

Important information: You must separate the “dat” mod from the “strings” mod, as mentioned above.

1 - Then create a “strings” mod. Go to the Age of Empires 2 DE / (steam account number) / mods / local folder. In that folder create a folder with the name of your mod. Then open the folder you created and create a folder with the name “resources” and below this same folder create 2 files; one with the name “install.txt” and the other with the name “uninstall.txt”.

2 -After having created these files open the folder “resources” and inside that folder create a new folder with the name “en” (if it is descriptions in English); open the folder “en” create a new folder inside the folder with the name “strings”, then open the folder “strings” and create a new folder with the name “key-value” and inside that folder create a file with the name “key-value-modded-strings-utf8”.

3 -Open that file and put all the numbers to change the texts in that file and save that file. Then don’t forget to open your mod file “dat” and also save the file “key-value-modded-strings-utf8” that you created, using the “Advanced Genie Editor 2020.10.2” program or in a newer version.

4 -Then open the file “install.txt” and place the following code:
@ECHO OFF
:: CHANGE THIS TO YOUR STEAM INSTALLATION FOLDER
SET “steamExeFolder = C: \ Program Files (x86) \ Steam”
:: DO NOT TOUCH ANYTHING ELSE
SET “modFolder =% cd%”
SET “goldenStrings =% modFolder% \ resources \ en \ strings \ key-value \ key-value-modded-strings-utf8.txt”
SET “original =% steamExeFolder% \ steamapps \ common \ AoE2DE \ resources \ en \ strings \ key-value \ key-value-strings-utf8.txt”
SET “stringsCopy =% steamExeFolder% \ steamapps \ common \ AoE2DE \ resources \ en \ strings \ key-value \ key-value-strings-utf8-original.txt”
ECHO “Closing game… Press Enter to proceed or close terminal to cancel!”
pause
“% SteamExeFolder% \ steamapps \ common \ AoE2DE” CD
TASKKILL / F / IM “AoE2DE_s.exe”
ECHO “ "
ECHO “Saving original strings file…”
COPY “% original%” “% stringsCopy%”
ECHO "

ECHO “Turning mod strings on…”
TYPE “% goldenStrings%” >> “% original%”
ECHO “ "
ECHO “Opening game…”
“% SteamExeFolder%” CD
steam.exe -applaunch 813780
ECHO "

ECHO “Waiting for game to open before resetting back to original file …”
ECHO “If the game does not open or terminal is closed early,”
ECHO “Use the uninstall.bat file to remove the strings mod!”
timeout / t 35 / nobreak
“% ModFolder% \ uninstall.bat”
exit

Now pay attention some paths indicated here are from my mod, you probably need to change them.
In the code SET 'steamExeFolder =. At the front, you will replace the STANDARD text C: \ Program Files (x86) \ Steam (currently the default steam installation folder) with REAL Path for your steam installation folder (only if different).

5 -Then save the file in the path of your mod and change the format to “bat” (for example the name of the file can be “install.bat”)

This file is used so that whenever you want to open the game with your mod, you will need to use the file created install.bat. I recommend that you send a shortcut of that file to the desktop. The terminal window will open the game for you and install your mod in the background. Don’t close. If you wrote the code correctly, the file automatically closes when the game loads and restores the game files, which means that the next time you run the game normally (original version), it will work without having to uninstall manually this mod.

6 - Now open the file “uninstall.txt” and enter the following code:

@ECHO OFF

:: CHANGE THIS TO YOUR STEAM INSTALLATION FOLDER
SET “steamExeFolder = C: \ Program Files (x86) \ Steam”
:: DO NOT TOUCH ANYTHING ELSE
SET “original =% steamExeFolder% \ steamapps \ common \ AoE2DE \ resources \ en \ strings \ key-value \ key-value-strings-utf8.txt”
SET “stringsCopy =% steamExeFolder% \ steamapps \ common \ AoE2DE \ resources \ en \ strings \ key-value \ key-value-strings-utf8-original.txt”
ECHO “Resetting back to original files …”
COPY “% stringsCopy%” “% original%”
ECHO “***********************************”
ECHO "Successfully uninstalled! This window will automatically close in 5 seconds … "
timeout / t 5 / nobreak
exit


This file serves to uninstall the mod “strings” and will automatically reset the file “key-value-strings-utf8.txt” (original). Almost always the “install” file already does this service, but it turns out that if you open this file and do not connect to your steam account it will only open the game with its “strings” mod and will not reset the "key- value-strings-utf8 "(original). So in that case the “unnistall” file is used to reset the “key-value-strings-utf8” file (original), but you will have to open it manually, after you have finished playing.

Now pay attention some paths indicated here are from my mod, you probably need to change them.

After all this, your mod is probably already installed and you don’t need to touch the original file.

Attention you to publish the mod “strings” the install and uninstall files must have the format “.txt”