I made this originally in html so some things will be a little peculiar like sentences jointed together, however it is coherent enough. The original documents, along with my custom data file and example scenario, can be downloaded
The .dat file ( either empires2_x1.dat or empires2_x1_p1.dat ) stores the data that the game engine makes use of. By modifying this file, you can literally convert your Aok into something entirely different. Note that this file does not store graphical or sound data- it just references them. All yourdata files can be found in the Aok Data directory. For eg. C:\Games\AOE \Data\
First of all, back up ALL your graphics data. If you mod or hack a lot,accidents will happen and you need to create multiple backups. Otherwise you will need to reinstall to get your data files back.
Now before we go further, you will need..
Genied1 by Ykkrosh adapted by Trisolo ( scenario_t_c ) - A document listing the SLP's in the drs files, either
this one or this one. - DRS_Aok by Ykkrosh
or Mod Pack Studio Genied2 or Genied2 enhanced version3 by Trisolo. - My .dat file and various patches text files. I will be referring to them to explain how I did some particular thing.
It is also recommended that you have a look at
Some definitions which I'll be using throughout.
A unit is an object that appears in the units window in the map editor (provided it's unlocked ). The standard Aok data file has 866 units, which can be unlocked using Genied. Most of the stuff that appears in the game- arrows, dead bodies, plants etc. are actually units even though they are not selectable. That does not mean everything you see is a unit. Terrains , splashes , water trails behind ships etc. are not units. Their graphics can be brought into a unit,which I'll discuss later on.
A graphic slot is a slot referenced by a unit and contains information abouthow it will look. It does NOT contain the images itself. It references SLP files located in graphics.drs , terrain.drs , interfac.drs etc.
Contains the technology tree and research related data.
The files that contain the images of Aok are called slp's . They are located in DRS files. They can be modified or extracted using DRSbuild or Mod Pack Studio.
The data file contains unit data, graphic data , research data and a few other stuff.
The drs files graphics.drs , terrain.drs and interfac.drs contain slps. The other drs files you'll find in your Data folder contain other stuff, for eg.gamedata_x1.drs contains Random maps, sounds.drs contains sound etc.
A very good guide to hex editing by oliver can be found
Hex editing is quite a pain compared to Genied1 though possibly more powerful. For the remainder of the guide, I will focus on Genied1
With the release of AGE ( advanced genie editor ), a lot of things have gotten much simpler, especially adding new units. However it is still not a replacement to genied1 and in many ways working with a script is a lot easier than point-clicking. Anyone who wants to go really deep into heavy .dat editing will definitely want to learn Genied1, whereas those just looking for adding a couple of units should learn AGE.
The help section of Genied1 should give you all the information you need to get you started, but I'll repeat it here anyway.
- Start up Genied1
- Go to Edit Settings. In SWGB location, type the name of the file you want
( empires2_x1.dat ). This file should be located in the same directory. - Select Decompress Genie. This command decompresses the data file with the name you entered, under the folder directed in "
AoK Location" setting. Afterwards, a new file called " genie.unz" would be created in the " ged_data" folder. - Select Read data .This command would tell GeniEd to read the data from the decompressed *.dat file "
genie.unz" . You must do the " Decompress Genie" task at least once before attempting to run this command. - Convert data to text. Then the data file is converted into text files located in the text folder of ged_data.
- Make changes in the patch file ( will be the real subject of discussion )
- Finally, when you are ready with your patch file, select create new genie file. This file will be named genie.dat in your ged_data folder. Rename to empires2_x1.dat and replace in your Aok data directory.
Genied1 is not really so much of a pain and a hassle as it is sometimes made out to be. It has been the mainstay of advanced data editing for a while, and is likely to remain so until someone comes up with a much better program. (In fact there already is one, called AGE, but Genied1 is still important.)
The unit data is located in the files civ0units.txt -- civ18units.txt and units.txt .
Most of it is in civ*units.txt ( * = 0 to 18 )
For example, you can find the line
civ_0_unit_74_hit_points: 40
in civ0units.txt
This says that unit 74 has 40 hit points. Unit 74 happens to be militia ( checkup with Genied2). Now if we want to give the militia 100 Hp, just write in patches.txt (note: Do NOT make changes in civ0units.txt ):
civ_0_unit_74_hit_points: 100
To make this change for all civilizations, use a variable patch
civ_*_unit_74_hit_points: 100
Important note - variable patches take much longer ( at least 10 times ) to compile compared to fixed patches. If you want to use fixed patches, you would have to copy out the line 18 times like this
civ_0_unit_74_hit_points: 100
civ_1_unit_74_hit_points: 100
...
civ_18_unit_74_hit_points: 100
And then create the new genie file etc.
Now as most of you must be knowing, it is a whole lot easier to do this inGenied2 enhanced versions. In fact almost every aspect of unit data can be modified using Genied2. I won't be discussing Genied2 here, these threads give you a lot of information:
Some things in Genied2 which people have not been using very much:
There are only a few things that cannot be done in Genied2:
civ_*_unit_868_name_length: 11
civ_*_unit_868_name: Juggernaut
which change the new unit's name to Juggernaut. The rest of it is copied from the dock data. The ship is later made movable using Genied2 and given different graphics.
However with the release of
civ_*_unit_13_unknown22: 45 0 -1 -1
With a little bit of intelligent guessing and testing, I figured this meant that the fishing ship deposits fish at the dock (unit 45). I cloned a 'trawler' using the fishing ship data with this modification.
civ_*_unit_869_unknown22: 87 0 -1 -1
The trawler deposits at the archery range ( id 87 ).
Another example is modifying terrain left behind. Eg. outpost ( unit 598 )
civ_0_unit_598_terrain: 27
Means that on being created, it changes the terrain to terrain 27. You can look this up in terrains.txt . Changing this to 26 ( Ice ) would mean formation of ice terrain when outpost is created. You can find
There are many such unknowns whose function is not yet known. Modify them to suit your unit.
Now we come to the important part - graphic slot editing. This is not addressed AT ALL by Genied2 versions. Graphics data is located in mostly in
Open up graphics_other.txt . Let's look at the attacking archer's graphics lot, which happens to be 627. ( you can look this up in Genied2 )
graphic_627_name1: ARCHR_AN
graphic_627_name2: ARCHR_AN
graphic_627_slp: 2
graphic_627_unknown01a: 00 00 00 01 14
graphic_627_unknown01b: -1
graphic_627_replay: 1
graphic_627_unknown01c: 00 00 00 00 00 00 00 00
graphic_627_delta_count: 3
graphic_627_sound: -1
graphic_627_extras: 1
graphic_627_numframes: 10
graphic_627_angles: 8
graphic_627_unknown02: 0 0.07 0
graphic_627_unknown03: 3
graphic_627_id: 627
graphic_627_type: 6
graphic_627_delta_000: 2256 0 0 0 0 0 -1 0
graphic_627_delta_001: -1 0 0 0 0 0 -1 0
graphic_627_delta_002: 626 0 0 0 0 0 -1 0
graphic_627_extra: 5 312 7 314 -1 -1 5 312 7 314 -1 -1 5 312 7 314 -1 -1 5 312 7314 -1 -1 5 312 7 314 -1 -1 5 312 7 314 -1 -1 5 312 7 314 -1 -1 5 312 7 314 -1-1
Now let's look at these lines carefully.
name1 and name2 - a name to identify the graphic. This has
_slp: This number is the slp referred to in graphics.drs . Open up graphics.drs in MPS or DRS_Aok and find resource #2. It is an attacking archer.
Changing the SLP of the graphic slot is a way to find many good tricks.Suppose we want to change the archer to a longbowman, let us replace it with the slp of the longbowman, which is 702 ( look up MPS )
graphic_627_slp: 702
matty12345's
If you don't want to edit a graphic slot but add an entirely new graphics slot, masterjoab's
Continued in
Jatayu O===|
`
Battle of Saraighat, 1671|Atlantis, the Lost Realm|AOE Roman Modpack|My profile
कर्मण्ये वाधिकरसत मा फलेषु कदाचन
StormWind Studios
[This message has been edited by Leif Ericson (edited 10-16-2010 @ 02:46 AM).]