The 3rd Age

Broken Sword: Expansion Pack

Broken Sword: Expansion Pack

New Heroes, new Factions, new Maps,... a new world is waiting.

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

Bart

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

Rating

Staff says

4.0

Members say

3.3

Average

3.7/5.0

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')
              
Code
java -jar MacroRenamer_1.4.jar M_ old new
pause

- 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

Notes:
- 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

 HitsAdded
Forum Topic1733March 26, 2007 - 10:45
Preconverted INI packages5071March 26, 2007 - 10:44
Macro Renamer 1.42348March 26, 2007 - 10:39

Comments

Display order: Newest first

druchii22 - Saturday September 6, 2008 - 0:57

I tried it, it almost worked without gamecrash (I had to move "createaherodata.inc" 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."

 
17:04:39