top of page

MODDING

ancre_modding

RockNRor allows you to create/use any kind of mods for AOE/ROR. This is compatible with 4 versions of the game : AOE1.0b, AOE1.0c, ROR1.0 and ROR1.0a.

Use a custom empires.dat file

Empires.dat file contains all setup about units, technologies, etc. Mods generally use a custom version of empires.dat, developed using AGE3 tool.

With RockNRor, you can change the DAT file to use at any moment, just write the relative file path in RockNRor.xml config file. Original file (data2/empires.dat) will remain unchanged.

In RockNRor.xml file : <empiresDat filename="RockNRor\empires.dat"/>

The path must be relative to AOE root directory (installation directory).

Use custom DRS files

DRS files contain resources for the game : graphics, sounds, etc.

The best way to create mods is to add your graphics/sounds/etc in dedicated (new) DRS files, so the original DRS files remain unchanged.

RockNRor allows you to make AOE/ROR game to load DRS files in addition to standard DRS files.

Example: in RockNRor.xml config file : <drsFile folder="RockNRor" filename="RockNRor.drs"/>

You can add more than 1 DRS file !

The folder must be relative to AOE root directory.

Customize language files

In standard game, localized strings are stored in DLL files (language*.dll). You should not try to modify those files directly.

RockNRor proposes a much more practical solution : write localized strings in a text-formatted file.

  • If the string already exists in standard game, it will be replaced by the one from "language text file".

  • If the string does not exist in standard game, it will be added

  • Original language files remain unchanged !

Example: in RockNRor.xml config file : <languageTxtFile filename="RockNRor\RockNRorStrings.txt"/>

The folder must be relative to AOE root directory.

 

The text format is very simple: declare the string ID in a line between brackets (like [12345]). This line should not contain spaces or any other character. In next line, write the text that should correspond to this ID. refer to provided files to see an example.

​

You can create 1 text file per language : then, in RockNRor.xml config file, include the one that corresponds to the language you want to use.

Add custom executable code in ROR

Although few mods actually do this (because it is much more complicated than changing values using AGE3 !), it is possible to patch AOE/ROR executable file to add custom treatments/fixes, etc.

For many reasons, trying to modify directly empiresx.exe (or empires.exe) is a very bad idea. For example, the file would suffer compatibility issues and could not be used with other mods.

RockNRor provides an API that allow any mod to execute custom code in ROR process. Please note that this API allows more than 1 mod to execute custom code ! It is possible to use several mods at once. Of course, the mods must be programmed safely so that they are compatible with each other.

The system that allows this is named ROR_API.

Please have a look to provided documentation + header files or contact the author to use this.

Additional civilizations

RockNRor allows the game to support up to 255 civilizations.

The file RockNRor_civs.xml allows you to configure additional civilizations.

Moreover, the automatic strategy generation feature makes AI players compatible with custom civilizations ! (original game wouldn't know which strategy to use).

Add custom tilesets

RockNRor allows the game to support additional tilesets (original game is limited to standard tilesets = 5 tilesets).

The file RockNRor_tilesets.xml allows you to configure additional tilesets.

Mod data quality

RockNRor provides a tool that detects errors and warnings in empires.dat file.
In game screen, use the chat box and write "dat check". A popup window (messages window) will open and display all the issues that were detected in the empires.dat file you are currently using to play.

Don't panic if the list is huge: original file already contains hundreds of issues !

But it is very strongly advised not adding more issues in custom DAT files, because it may have lots of consequences, like compatibility issues with other mods, with game code itself, and in particular AI may not work properly.

Please read RockNRor documentation (in .doc format - provided in download archive) to get more explanations and the list of possible messages/issues.

​

Unfortunately, the system will not detect all the issues. For example, it will not detect if a technology has negative impacts. Please make sure that the technologies you add do not have negative impacts, because it may have dramatic impact on AI player decisions.
For example, in original game, Jihad (reduces greatly gathering ability) and ballistics (reduces greatly arrows precision/efficiency) have negative impacts, which is bad !

​

Here are some good practices to respect :

  • Always use unit class IDs, not "hardcoded" unit IDs (in Technologies, unit Tasks, etc). For example, use Priest class (18), never priest unit ID (125). There must not be any rule that apply on a specific unit. Many game issues are caused by hardcoded unit IDs in the code or in empires.dat !

  • Avoid trying to customize unit classes and use them in the way they are supposed to. Eg. don't set class=4 (civilian) to combat units, don't use class 6 (infantry) for archers, etc...

  • Avoid adding unit classes (if possible). Yes, the game wouldn't support it, especially AI.

  • If you customize map generation data, make sure it does not affect the "map type". If you transform "small islands" into a no-water map type, AI player will still try to build boats, etc !

  • Avoid hardcoded values in technology effects : do not use "set", please try to use "add" or "multiply" (best choice) instead. The changes must be relative (add 1 or multiply by a given factor). Otherwise there is no way to calculate for sure the exact effect (may depend on the order you apply techs !!!), you may event get techs that have negative effects. Moreover, this is the main cause for many configuration errors (when you change base value from 1 to 2, a tech that doubles (*2) the value will still work, whereas a "set to 2" wouldn't work anymore). Ensemble Studios themselves made dozens of bugs just because of this bad practice !

  • Refer to .doc file for more...

  • As explained above, use your own DRS files/languages (text) files, etc. Leave all game files unchanged, if possible.

​

bottom of page