The 3rd Age

Last Alliance Battle Mod

Last Alliance Battle Mod

The final battle between the Alliance of Men and Elves and Mordor.

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!


Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

Macro Renamer

Download for Battle for Middle-earth BFME, Battle for Middle-earth II BFME 2, Battle for Middle-earth II: Rise of the Witch-king ROTWK

Avatar of Bart


Category: Software
Created: Monday March 26, 2007 - 12:38
Updated: Sunday July 26, 2009 - 2:04
Views: 4134
Summary: A tool to rename all macros in gamedata.ini, and edit all references to them


Staff says


Members say




6 votes

As you know, for some strange reason, when you use the -mod command to make your modifications to BFME, changes in gamedata.ini don't get read. Now, unfortunately that's just the file that contains all the unit data such as health and stuff. There are two things you can do:
1. Change all options directly in the appropriate files. In the end this will result in an unmanagable gibberish.
2. Move the macros (#define BLABLA) somewhere else. Unfortunately, you can't give them the same name, so you have to rename them. However, then you have to update all the references in all the ini files to your new macros, which you had to do by hand...

But not anymore!

This tool I made does that for you

Here's how it works:
- Download the rar file and extract it in 'X:\somefolder'
- Put a copy of your INI files in 'X:\somefolder\old' (so you will have, for example, 'X:\somefolder\old\commandbutton.ini' and 'X:\somefolder\old\object\goodfaction\units\men\aragorn.ini')
- Make a new .bat file, with these codes (save it in 'X:\somefolder')
java -jar MacroRenamer_1.4.jar M_ old new

- Run the bat file by double clicking
- Let it run (this will take a long while, but it will report what it's doing)

What it will do:
- Load all macros in gamedata.ini
- Rename them all, by putting a prefix before them (which, in the .bat file above, is 'M_'. change it if you want something else*).
- Update all files to reference the new macros, and store them in a new folder

* = the prefix can only contain numbers, letters and the underscore. IT MUST NOT begin with a number

Now, when it's done, all you have to do is:
- move all the macros in 'gamedata.ini' to 'default\water.ini'
- move the GameData block in 'gamedata.ini' to a new file 'object\gamedata.ini'
- and of course put the new INI files at the appropriate place in your mod smile.gif

- I've programmed this tool not to alter the original files. However, bugs can of course always be present, so have a backup!
- You need the Java Runtime Environment for this to work. I've programmed it on version 6 (or 1.6, if you like), but maybe it will work on 5 as well (but get 6 anyway)
- If there are files that you are 100% sure, don't contain any references to a macro, delete them before starting, because the program will go trough them anyway, which is a waste of time.

Preconverted INI packages
If you are just starting your mod, you can download already converted INI packages below.

Links / Downloads

Forum Topic968March 26, 2007 - 12:45
Preconverted INI packages3812March 26, 2007 - 12:44
Macro Renamer 1.41624March 26, 2007 - 12:39


Display order: Newest first

druchii22 - Saturday September 6, 2008 - 2:57

I tried it, it almost worked without gamecrash (I had to move "" into the "default" folder, because of the "includes" that I didn't move). You should say here to don't take this line with others macros when you move them to "water.ini". But it has been very useful to me, I avoid a lot of work, thank you! I gave you a 4 because the time it takes (almost twenty hours, but I forgot the files without macros).

Go to top


"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."