You must be logged in to post messages.
Please login or register

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Step by step guide to data editing - Part 1
posted 01-20-08 05:12 AM CT (US)   

Step by step guide to data editing



Part 1- units and graphics



    Data editing by now is barely anything new. It is at over two years old and various expansions and modifications have been introduced into it. Yet it is not very popular, and I think one of the main reasons is because it is a littledifficult to get started into it. This tutorial is meant to give you a thorough idea of data editing and it's uses in scenario designing. When I learnt this thing I had to figure out most of the things myself and ask a few other people,which was not very efficient. Hopefully this will make it much easier for anyone who wants to take the plunge into data editing. The problem is that map design, triggers etc. is not too hard to figure out and even AokTS and Genied2 are somewhat self explanatory. However it is quite difficult to find stuff related to Genied1 data editing and I hope this will really come of use to those who want to make their custom data files.

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 here.



The .dat file



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..



It is also recommended that you have a look at Rennaissance expansion byoliver.



Some definitions which I'll be using throughout.



Unit



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, deadbodies, 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.



Graphic slot, or graphic



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 fileslocated in graphics.drs , terrain.drs , interfac.drs etc.



Research and techage slot



Contains the technology tree and research related data.



SLP



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 PackStudio.



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.



Changing the data file



Hex editing



A very good guide to hex editing by oliver can be found here.



Hex editing is quite a pain compared to Genied1 though possibly more powerful. For the remainder of the guide, I will focus on Genied1



Genied1



The help section of Genied1 should give you all the information you need to get you started, but I'll repeat it here anyway.

  1. Start up Genied1
  2. 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.
  3. 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.
  4. 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.
  5. Convert data to text. Then the data file is converted into text files located in the text folder of ged_data.
  6. Make changes in the patch file ( will be the real subject of discussion )
  7. 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. Even so,the basic concepts would remain the same. 



Units



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:



Threadby Trisolo
Guideby qaz123tfg



Some things in Genied2 which people have not been using very much: 



Projectile displacement: You can see this effect with the necromancer of Renaissance. It's projectile displacement 3 value is 33. According to Aok's isometric system that means the height from the anchor point of the unit firing the projectile.



Multiple projectiles: This is only there in the latest version of Genied. It is called secondary missile and secondary missile duplication. By judiciously modifying these and the projectile inaccuracy you can create units that spew multiple projectiles, eg. the volcano of Reniassance.



There are only a few things that cannot be done in Genied2:



Adding a new unit: Scenario_t_c 's straightforward guide tells you howto add a new unit. I have included the file patches_dock.txt which adds the juggernaut ship. Note the lines:



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 Advanced Genie editorwe can expect this to be obsolete as well.



Modifying some of the 'unknown' data: If you look at the civ data for any unit, say fishing ship, you'll see a lot of "unknown" values. For example:



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 terrain changers template by scenario_t_c here and a great example where this is used, The old man and the sea by matty12345



There are many such unknowns whose function is not yet known. Modify them to suit your unit.



GRAPHICS



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 graphics_other.txt , also in graphics_head.txt and graphics_koh.txt



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 nothing to do withthe internal name, which also happens to be ARCHR. You could rename it to anything you like and it wouldn't matter. This is basically for identification purposes, so that you know what the graphic slot it.



_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 thread gives many examples of how to creatively use Genied1.



If you don't want to edit a graphic slot but add an entirely new graphics slot, masterjoab's threadtells you how to do it. Examples are in patches_graphics.txt



Continued in part 2



 


,
Jatayu O===|¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯/
`
Battle of Saraighat, 1671|Atlantis, the Lost Realm|AOE Roman Modpack|My profile
ि
StormWind Studios

[This message has been edited by Jatayu (edited 01-20-2008 @ 08:32 AM).]

Replies:
posted 01-20-08 05:13 AM CT (US)     1 / 6  
Nice guide, you might also want to give a link to StSB77's new genied programme once it is uploaded in to the BS.
posted 01-20-08 08:34 AM CT (US)     2 / 6  
Man, the forum really screws up my html. Anyhow I managed to get it right, but there are plenty of additional blank lines. That doesn't hurt anyone.

And Epic, I did mention his tool.

,
Jatayu O===|¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯/
`
Battle of Saraighat, 1671|Atlantis, the Lost Realm|AOE Roman Modpack|My profile
ि
StormWind Studios
posted 01-20-08 08:48 AM CT (US)     3 / 6  
Nice guide, but why did you make 2 parts insead of one?
posted 01-20-08 08:41 PM CT (US)     4 / 6  
Man, the forum really screws up my html
*rubs Firefox on your face*
Nice guide, but why did you make 2 parts insead of one?
I was gonna say the same.
posted 01-20-08 10:10 PM CT (US)     5 / 6  
Did anyone actually read or try out anything rather than saying 'nice guide' *why do I bother *

,
Jatayu O===|¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯/
`
Battle of Saraighat, 1671|Atlantis, the Lost Realm|AOE Roman Modpack|My profile
ि
StormWind Studios
posted 01-20-08 11:40 PM CT (US)     6 / 6  
i am tryign to learn data editing, so i put ur guide in microsoft word, and im gonna look at it when i am modding next time

-trys to make jatayu feel better-

Itachi_Uchiha--May Itachi rule the Uchiha clan!
Kublai's invasions of Japan-----45% DISBANDED FOR NOW______FF3: Final Battles-----3.2(upgrade soon)
Black Forest Design Team
Dantares IV: Itachi you've got problems.
Rule Life ... Rule Death ... be a DeathLord.---------Click here to join!!
Age of Kings Heaven » Forums » Scenario Design and Discussion » Step by step guide to data editing - Part 1
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames