Map Database  •  FAQ  •  RSS  •  Login

[Updated]Unit.dat Editor

<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 17 May 2008, 18:53

[Updated]Unit.dat Editor

Hey!
I spent the last time in making this little tool, called Unit.dat Editor. With this Tool you are able to edit every Worker and Soldier's

- Speed
- Look
- Lifes
- Strength (Soldiers only)
- Defense (Soldiers only)
- Strength against Horses (Soldiers only)

Download-Link:
http://rapidshare.com/files/11561496/Uniteditor.exe.html

Well, the design of this tool doesn't look really interesting, but at least you are able to finally edit the Unit.dat easily. Play around with it or create new mods, this tool will help you!
Philymaster and I are actually doing some more decoding stuff on the Unit.dat, because there are some bytes left we don't really know.
Test it, report bugs and tell me, if you could need it!

Merchator
<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 17 May 2008, 19:32

Great! Thanks a lot!

Edit: saving does not work properly.
Edit 2: I found out that every value will be changed automatically to the one of ''Strength''.
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 17 May 2008, 20:21

Well, you dont need to use Main->Save. I haven't done that yet. You just hae to enter a value and press enter. Then the value will be saved :wink:

2. What do you mean with this? If you enter "255" at Lifes, Strength will be 255, too?

Mabye going to add:
Edit Houses.dat
With it you can edit
Needed Timber
Needed Stone
Health of building,
how much items the worker make per "shift".

But i need a coding break till then 8)
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3822

Joined: 16 Sep 2007, 22:00

KaM Skill Level: Skilled

ICQ: 269127056

Website: http://lewin.hodgman.id.au

Yahoo Messenger: lewinlewinhodgman

Location: Australia

Post 17 May 2008, 23:48

Oh cool!!!
That's really nice, I had no idea we knew so much about the decoding of that file, I thought it was almost unknown!
I have a few suggestions:
- Look instance is a bit unclear. I finally worked it out when I saw scouts had more of it. You should name it something easier to understand, like View Radius.
- Where is "Range" for archers?
- If I load a TSK units.dat then it gets really confused. You should tell the difference between them and only write/read the TSK stuff.
- Could you show us the documentation (or write it) for the units.dat file? I am interested. I am going to do this for the LIB files once I've finished the editor.
- "Others won't make much sense" What others? I think you should display all of the values for each unit, even the advanced ones like image indexes. Put them in an advanced section if you like but I think you really should let us edit everything
- I think you should only save the file when you click save, otherwise if you make a mistake how to you correct it? Also, a backup should be made automatically (if it hasn't already) every time you load a file.

There are a few incorrect names, so if your trying to make it an English program then you should change:
- Axeman to Axe fighter
- Swordman to Sword fighter
- Thief to rouge
- Pig n Horse-Man to Animal breeder
- Fisher to Fisherman
- Smith to Blacksmith
- Rekruit to Recruit

With this I might be able to make something I've been thinking about for a while: A tower defense map like in Warcraft III. Lots of enemies try to destroy your storehouse and you build towers to stop them.

How long have you been working on this? I guess that not only Krom has his secrets. :wink:
Great work! We have nearly all the files editable now!
Lewin.
<<

The Dark Lord

User avatar

King Karolus Servant

Posts: 2154

Joined: 29 Aug 2007, 22:00

KaM Skill Level: Veteran

Location: In his dark thunderstormy castle

Post 18 May 2008, 06:09

I actually did use enter to save. The following happened:

- I tried to set the strength of a barbarian to 250.
- I pressed enter.
- I changed to ''Knight'' and back to ''Barbarian'' to see if it really was saved. It was.
- I changed his lifes to 50.
- I pressed enter.
- I changed to ''Knight'' and back to ''Barbarian'' to see if it really was saved. It was not. It became 250 as well.

So what I had to do was this:

- Set the strength of the barbarian to 50 (and press enter).
- Set his lifes to 50 (and press enter).
- Set the strenght back to 250 (and press enter).

So eventually I had what I wanted, and that will be very usefull in the future. :twisted:
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 18 May 2008, 07:15

Thanks for your feedback!
@ lewin: We already got an not finished documention (it's in german), but we are going to translate it and then add it to this editor. That should be ono problem. For sure, some words are rally weird, I was to lazy to look for better ones. It was late, too, when I write this :wink:
But I should change it, you'r right.
Archer's range isn't added yet, because we haven't get out everything about it yet. The last day we spended our time into the houses.dat, soo.
"Others won't make much sense" What others? I think you should display all of the values for each unit, even the advanced ones like image indexes. Put them in an advanced section if you like but I think you really should let us edit everything
Well, Serfs can't fight. I don't know if you change the value serfs will fight, too. So I left this out at first, cause I thought that other things are more interesting right now. It's version 0.3 :wink: I'll change alot of more things the next time, IF I have enough time, school is very hard the last days.
Oh, yes, we have found the image indexes, too. But there are some things that are still confusing and unclear.
- I think you should only save the file when you click save, otherwise if you make a mistake how to you correct it? Also, a backup should be made automatically (if it hasn't already) every time you load a file.
Yeah, that's annoying, you'r right. Fixing that would tkae me much time, unfortunately. I try to (sure, I'm not a pro but I'm able to do this), but at least we could be happy because of the fact that we can edit the unit.dat :wink:
- I tried to set the strength of a barbarian to 250.
- I pressed enter.
- I changed to ''Knight'' and back to ''Barbarian'' to see if it really was saved. It was.
- I changed his lifes to 50.
- I pressed enter.
- I changed to ''Knight'' and back to ''Barbarian'' to see if it really was saved. It was not. It became 250 as well.
Oh, no good news! I think I have to fix it the next days, no worries :wink:
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 18 May 2008, 10:20

Hello Merchator, congratulations on dat decoding! :)

I'm aswell into decoding KaM files and interested in format description. I did successfull attempts to decode it from graphics end (image indexes). I think we can ajoin our knowledge for mutual advance :)
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 18 May 2008, 14:27

I would do that gladly :wink:
So that means you are decoding it, too? Good to hear :)
I actually don't know that much about image indexes, just that they are for the graphics. Means: I changed a few bytes, and after that I saw serfs sliding over the ground.
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 18 May 2008, 15:51

You must have changed animation steps count to 0.

First comes info about serf:
  Code:
SerfCarry:array[1..28] of record //type   Dir:array[1..8]of record //moving direction     Step:array[1..30]of smallint; //these are graphic indexes       Count:smallint; //count of steps       MoveX,MoveY:integer; //offset   end; end;[/quote] Then all units: [code]UnitStat:record x1,Attack,AttackHorseBonus,x4,HitPoints,Speed,x7,Sight{?},x9,x10,x11:smallint; end; UnitSprite:packed record   Act:array[1..14]of packed record     Dir:array[1..8]of packed record       Step:array[1..30]of smallint;       Count:smallint;       MoveX,MoveY:integer;     end;   end; end;[/quote] Act is an action type (e.g. Eat, Move, Work, etc..). Each unit has different set of available actions, in common all units can Die and Walk, if action is unavailable it's Count=0 And stats again: (no idea what is in there) [code]UnitStat2:array[1..18]of smallint;[/quote] Post info you know :)
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 18 May 2008, 17:32

  Code:
UnitStat:record x1,Attack,AttackHorseBonus,x4,HitPoints,Speed,x7,Sight{?},x9,x10,x11:smallint; end; [/quote] In my opinion it's this [code]UnitStat:record Hitpoints, Attack,  AttackHorseBonus ,x4, Defence, Speed, x7, Sight{I am pretty sure about that :-) },x9,x10,x11:smallint; end; [/quote] [code] UnitStat2:array[1..18]of smallint; [/quote] Can you give me an Offset-Example for serf? Oh, no, I found it! What you found out about the image index is very nice :D Haven't worked that much with it till now. Now we need to know which Hex-Value means which move. My Sourcecode looks odd, I made it very simple, so I had much coding work. Already 3700 Lines of code :roll: Ah, new version, bugs you told me were fixed + translation fixes Download link Version 0.3.1: [url=http://rapidshare.com/files/115844187/Uniteditor.exe.html]Unit.dat (TPR) Editor[/url] Changed the Version, 0.8 was definately to high :D
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 18 May 2008, 17:43

Unit action types are:
  Code:
  TUnitActionType = (ua_Walk=1, ua_Work=2, ua_Spec=3, ua_Die=4, ua_Work1=5,                      ua_Work2=6, ua_WorkEnd=7, ua_Eat=8, ua_WalkArm=9, ua_WalkTool=10,                      ua_WalkBooty=11, ua_WalkTool2=12, ua_WalkBooty2=13);[/quote] where: - ua_Spec means special action (throw/shoot) - ua_WorkEnd only used by fisherman what about UnitStat2 ? Did you tried decoding houses.dat yet? I'm especially interested in Stat data
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 18 May 2008, 18:20

I don't know UnitStat 2, but I'll take a look at it.

About houses.dat we know:
-Needed Wood
-Needed Stone
-Size of the building
-How much items a worker make per "shift"
-How long his break is between shifts
-Maximum energy
-View Radius

->Going to find out more.
I'll give you more information about points I listed over here the next days, I don't have enough time to translate my notices into english :D

A question, why do you write this in pascal-language? Why not normal english? I understand it, ut others maybe don't (maybe they shouldn't, I dont know).
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 18 May 2008, 19:49

Good, I'm waiting for more info from you :)

Reason I write pascal is that I'm copy/pasting it right from my code - thats a lot easier than rewriting everything, besides everyone interested knows how to handle it. Those who don't understand it are end users of your tool anyway :wink:
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

merchant_992

Pikeman

Posts: 162

Joined: 11 Nov 2006, 23:00

Location: Rinsumageest, Nederland

Post 19 May 2008, 17:54

Looks promicing. So how we gonna call the first version 0.3?
And would it be possible to download the other 7? earlier versions? you know we are interested in all versions.

but what is there still needed to be decoded from the graphics?
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 19 May 2008, 19:12

Sorry, there are only those two ones :wink:

Now there is an editor for ALMOST everything of KaM. Next big step would be adding features and fixing bugs.

I'm currently working on Version 0.4.
It'll included advanced worker options like defence etc. and houses.dat-editing.
I guess there will be "some" happy "people" :wink:

Return to “Other Creations”

Who is online

Users browsing this forum: No registered users and 10 guests