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

EE Scenario Design & Modding
Moderated by Soty

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: My Hex guide
« Previous Page  1 ··· 6 7 8  Next Page »
posted 11-02-12 03:01 AM EDT (US)   
Check my guide pdf file
With A total of 8 files
http://www.mediafire.com/?k5jv1obbr42bzl4
I will continue when i have a time
The Bytes I Did not understand in all files is what i called it Game ID which is existing in all db files!!
Check it out if u can figure it out!! it is very weird
Making it being Zero will let game working without any crash so what use of it?

Dbbutton.dat Hex File,I knew all bits of it

Of course this is the same for other bits
Dbtechtree.dat
I knew mostly all bits except 4 bits!FB01

_____________________________________
If You Need Help in Hexing or you have something to share
Contact me realforce212@gmail.com
______________

[This message has been edited by alfrqan (edited 01-12-2013 @ 05:41 AM).]

Replies:
posted 01-17-16 07:34 PM EDT (US)     176 / 190  
Ok, while most of the dbobject.dat is parsed, we still don't know the other ones.
Here's what I'm doing in the free time: dbfamily.dat
I colored the fields by unit type: human, siege, air, sea, space, building


All values are percent multipliers of damage received from that unit family (64 hex = 100 dec = 100% damage).
An example: Human sword family (Clubman, Maceman, Short sword, Long sword) receive 4B0 hex = 1200 dec = 1200% = 12x damage from crossbows family's attacks (one hit, one kill).

IMPORTANT: if a value is 0, this family can't be attacked at all by that family! (Human sword can't be attacked by submarines because its multiplier is 0). This means the ability to attack doesn't depend on the dbobject "Attack mode" but depends on these ones! I tested it with battleships, which can now attack submarines and helicopter which can now attack aircrafts!
I start to think AttackMode just define which family to use when attacking. But the multipliers are here!

I'm slowly finding more values. If you want to help, just make 2 units fight each other and notice the damage they take.
Don't forget there's also the multiplier defined in dbweapontohid.dat: pierce units deal 150% damage to shock units, shock units deal 150% damage to arrow units and arrow units deal 150% damage to pierce units. No other bonus is applied (gun, laser and missile have all multipliers at 100%).

The final damage is calculated as following:
Damage = attack * weaponToHit mult * family mult - armor
Yes: armor is calculated last in the formula.

Crossbow Vs Long sword:
Attacker's attack = 40
weaponToHit mult = 100%
family mult = 1200%
Target's Armor = 6
Damage = 40 * 100% * 1200% - 6 = 480 - 6 = 474
A fully upgraded long sword may barely survive. But if crossbow upgrade his attack just once it will kill any fully upgraded infantry (if we exclude the morale multiplier: -10% for every morale point)

WHAT IS DONE, IS DONE

[This message has been edited by Forlins (edited 01-19-2016 @ 06:28 PM).]

posted 01-18-16 08:58 PM EDT (US)     177 / 190  
Go Forlins go! Shieldwolf23 says i'm an asset in this community, well now I say that you and Andrew103 are! Knowing some of these values in dbfamily.dat and thanks to your explanation a bit, I may be able to fix the bug in my mod where the Warrington & Juggernaut Frigates can only attack certain families, FINALLY! Thanks a bunch, will test this when I get the chance.

Try out my realism mod! An attempt to make EE AOC 100% realistic in every way! Been working on it since September 2011, presumed time frame of completion = 2020 - 2030:
http://ee.heavengames.com/downloads/showfile.php?fileid=3072
posted 01-19-16 10:39 AM EDT (US)     178 / 190  
Agree, it is a great find!

My Profile in Empire Earth || Latest Submissions Two Flags: Battle for Africa ||Jun 2023
My Profile in Age of Kings || Latest Submission Shadows of Betrayal || August 2012
AOK Designer of the Year 2012
Core Team Member & Site Co-Administrator,Empire Creations
posted 01-19-16 06:17 PM EDT (US)     179 / 190  
Be careful: the same multiplier can be used by more families (like Fighter and Cruiser, Frigate and Machine Gun).

WHAT IS DONE, IS DONE
posted 01-20-16 07:24 AM EDT (US)     180 / 190  
CRITICAL HIT!!! I discovered what "Attack mode" in dbobject.dat actually is!!

It's the index of the multiplier in the dbfamily table!!!
Take the Stinger or Missile trooper unit: they have AttackMode 07 00 00 00.
Now go to the table I'm building, go to the first multiplier (just right of family ID) and count from 0. The number 7 is... their multiplier!!
Repeat with Sampson/Ram: their attack mode is 13 00 00 00 (19 in decimal). Go to the 19th multiplier in the dbfamily table... yes, that's right!

Essentially, when a unit is attacked, the game compare the attacker "attack mode" with the target "family".
Example: a Spearman hit a Clubman. Spearman has attack mode 35 (53 in decimal) and Clubman belong to the "Human Sword" family, so the game open dbfamily, go to "Human Sword" and take the 53th multiplier!

Also, the game apply the "weaponToHit" multiplier by comparing the attacker WeaponHit ID with the target one.
Spearman has WeaponHit ID 02 00 00 00, while Clubman has WeaponHit ID 00 00 00 00, so the game open dbweapontohit.dat, go to the attacker table 02 (Pierce) and take the target multiplier 00 (Shock).


PS 1: yes, in dbweapontohit.dat there are N tables, each one with N multipliers. This also means you can't add new tables without altering all existing ones by adding new multipliers (and the game may not accept this change).

PS 2: the same is not true for dbfamily. There are 3C = 60 families, each one with 68 multipliers.

WHAT IS DONE, IS DONE
posted 01-20-16 10:51 AM EDT (US)     181 / 190  
Enough of this! I'm trying to create a new editor for EE db files! I will use Java, as it's my first language and it seems to work as expected. Also I can quickly create a GUI with it.

For now (early development), I'm successfully parsing the dbfamily.dat


I only need to build a GUI, and make it save the changes.

When dbfamily will be done, I'll go with dbobject, dbtechtree, dbupgrade, dbareaeffect, (and whatever other db we fully/partially parsed).

WHAT IS DONE, IS DONE

[This message has been edited by Forlins (edited 01-20-2016 @ 07:17 PM).]

posted 01-22-16 06:38 PM EDT (US)     182 / 190  
ANOTHER CRITICAL HIT!!!
Ok, I'm an idiot: you know the range, area and similar values we discussed so much about their odd exponential formula?

Well... while building the program, I encountered the same problem:
in the dbtechtree.dat there's a similar value (00 00 80 3F).

How to parse it? I tried to parse it as an integer, and it gave and incredible big value.
So I tried to parse it as float... do you want to know the result? "1.0"...
Ok, I'm totally dumb for not thinking about them as float before...

This means there's no easy and quick way to parse them like integer values without a program (the program I'm currently building...).

WHAT IS DONE, IS DONE

[This message has been edited by Forlins (edited 01-22-2016 @ 07:36 PM).]

posted 01-22-16 07:28 PM EDT (US)     183 / 190  
THIRD CRITICAL HIT!!! Probably this is the BIGGEST ONE OF ALL!!!!
dbtechtree.dat secrets and problems unveiled!!!!!!!!!!!!!!!


Has everyone noticed the dbtechtree.dat define not only one but 15 "Num entries"?

One is at the very beginning (the first four bytes):
A1 03 00 00, followed by Epoch Paleo
if you scroll down the file, you'll find another 14 ones:
37 00 00 00, followed by Epoch Stone
C9 00 00 00, followed by Epoch Copper
6F 00 00 00, followed by Epoch Bronze
...
<up to Epoch Space>

So, the number of elements is always followed by the Epoch tech, and it define how many techs/objects exists in that epoch. When the game read the file:
1) it read the counter ("there are N techs")
2) it read N techs and assign them to that epoch
3) there's something more to read? if yes: go to 1) and loop.


This lead me to 2 hypothesis:
FIRST HYPOTHESIS:
All our attempts to add a new tech failed (resulting in CTD) because we were increasing the first counter (which is the "Paleo" counter), then added the new tech at the bottom (in the Epoch Space area). Actually this give the game 2 reasons to CTD:
1) The Paleo counter is increased by one, so the game try to load another tech (load 272 more bytes + 4 extra bytes for every tech builder), but there's not a tech! First, there are the next 4 bytes of the Epoch Stone counter! Obviously, it read the counter (4) bytes and a part of the Epoch Stone tech (268 bytes), and obtain something it can't parse. CTD...
2) The Space counter is 39, but you added a new tech in the Space area, so the game read all 39 tech and find out there's something more to read so, basing on the above loop, he think "another epoch, another counter!" and it read the next 4 bytes as a counter for a non existent "Post-Space" Epoch. The real problem is: the next 4 bytes are not a counter! They are the characters of your new tech's name! The game parse it as an integer without problem, but it find itself with a big number of techs to read. But there is less than a tech left to read!! CTD...

SECOND HYPOTHESIS:
The starting epoch (we were searching this for many years!!!!) of a tech/object is simply defined... by putting it in the right epoch "area"! Increase the tech's counter by one and put a new tech in this area (before the next epoch)

WHAT IS DONE, IS DONE

[This message has been edited by Forlins (edited 01-22-2016 @ 07:33 PM).]

posted 01-23-16 03:01 AM EDT (US)     184 / 190  
This is really great! I hope you don't mind, but I want to give you a sort of "bonus", if ever you develop an editor that will quickly edit all important values (like a combination of EE Unit 1 and 2). Just a thank you and a support to what you are doing. I know you will still do this for free, but let me make it more worthwhile. I hope you are okay with this (give me a ring at shieldwolf23@yahoo.com).

My Profile in Empire Earth || Latest Submissions Two Flags: Battle for Africa ||Jun 2023
My Profile in Age of Kings || Latest Submission Shadows of Betrayal || August 2012
AOK Designer of the Year 2012
Core Team Member & Site Co-Administrator,Empire Creations
posted 01-23-16 06:40 AM EDT (US)     185 / 190  
Don't worry shieldwolf23, it will be totally free and open source, and I ask nothing. The dream to see this game reborn is strong enough to push me to the end of the program development. I can say it's already at a good point, as it can now parse dbfamily.dat and dbtechtree.dat, and adding new ones is as simple as telling it what's the structure: name: 100 bytes (char), sequence number: 4 bytes (int), ID: 4 bytes(int), ... max range: 4 bytes (float), ... unknown: 4 bytes (?), ... show shock armor: 1 byte (flag), ...
Eventually, some dat files may have odd structures, but it should be simple enough to parse them as well (with some little changes).
It may be difficult to parse dbworld.dat, as we know just few values in that sea of data.

I will even make you able to "teach" the program the new values without having to update the program code (thanks to this editor, it should be much faster to find them!)

The dbtechtree.dat contains many many many unused entries, which can be used at will (even if they are empty, they are still considered in the epoch tech counter, which means you can add new tech by just edit one of them and don't touch the relative epoch counter).


Anyway, I hit the target: now I can parse the dbtechtree.dat and I confirm the tech starting epoch depends on the "epoch area" which contains the tech.

Look at where the bamboo gate is:



EDIT: OH! It seems the 35th and 36th unknown values are float as well!

EDIT: Both "1.0" as expected!

WHAT IS DONE, IS DONE

[This message has been edited by Forlins (edited 01-23-2016 @ 07:01 AM).]

posted 01-23-16 09:33 AM EDT (US)     186 / 190  
Thank you, then, from the bottom of my heart!

There's a lot of things you've been discovering, and its really exciting. Can't wait to see the full product of this labor of love!

My Profile in Empire Earth || Latest Submissions Two Flags: Battle for Africa ||Jun 2023
My Profile in Age of Kings || Latest Submission Shadows of Betrayal || August 2012
AOK Designer of the Year 2012
Core Team Member & Site Co-Administrator,Empire Creations
posted 01-23-16 03:06 PM EDT (US)     187 / 190  
The program will be more advanced than old EE editors, as it will allow you to edit all values, even unknown ones, and will support all db files, if we parse them (even partially).
For now, you can put any value everywhere, but I will provide a restriction for some specific fields (example: the buttons fields in a objects have predefined sets of values, and you can't put new ones).

I will also provide support for adding/removing fields (the dbtechtree entries end with a list of "builders", dbobjects entries end with a list of units/techs it can build...) and to add/remove entries and also sorting them (especially useful in dbtechtree, as it define the starting epoch).

Of course, you can search for specific entries by name or ID number in the search box.

WHAT IS DONE, IS DONE

[This message has been edited by Forlins (edited 01-23-2016 @ 03:08 PM).]

posted 01-24-16 10:34 AM EDT (US)     188 / 190  
The EE DB Editor deserve its own thread: http://ee.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=3,38362,0,365

WHAT IS DONE, IS DONE
posted 01-24-16 11:52 AM EDT (US)     189 / 190  
agree! will continue following up.

My Profile in Empire Earth || Latest Submissions Two Flags: Battle for Africa ||Jun 2023
My Profile in Age of Kings || Latest Submission Shadows of Betrayal || August 2012
AOK Designer of the Year 2012
Core Team Member & Site Co-Administrator,Empire Creations
posted 01-31-16 07:23 PM EDT (US)     190 / 190  
I'm trying to parse the "dbsounds.dat" but it's very strange:
it seems every entry is composed by:
- a 4 bytes number/counter
- a string of length (100 + the above counter) chars
- 8x 4 bytes integer fields

Seriously... the string of length (100 + counter) chars... whoever made this was very sick! And I saw a similar pattern in few other dat files...

WHAT IS DONE, IS DONE
« Previous Page  1 ··· 6 7 8  Next Page »
Empire Earth Heaven » Forums » EE Scenario Design & Modding » My Hex guide
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Empire Earth Heaven | HeavenGames