Map Database  •  FAQ  •  RSS  •  Login

[Updated]Unit.dat Editor

<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 01 Aug 2008, 22:39

Yes, but I thing I'll write a small guide in the next days, so you can edit it manually. Maybe I make a remake one day, but I'm not very sure about that. Worked about 5 days on it (Okay, now I know the issues, so it would maybe just last 3 days).

Sorry @ all.
<<

Nick

Crossbowman

Posts: 240

Joined: 09 Jan 2007, 23:00

Post 02 Aug 2008, 15:50

that guide will do fine if u can... i dont mind changing it manually.
IN fact, i prefer todo it manual :lol:
<<

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 03 Aug 2008, 06:31

Yes, I guide is quite important now. This will allow other people to make better editors in the futures.
Lewin.
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 03 Aug 2008, 10:27

Hm, yea, and in fact unit.dat is pretty simple (well, at least the stats/attributes). And I'm also pretty sure that someone else could make a better editor than mine basical one.
Bad thing is, I don't have much time for re-writing an editor (it's summer, and then I don't want to be inside).

So, here is a small guide (or at least my notes in english):



Just open unit.dat in "/data/defines/" and change this things manually.
(Offsets are decimal).

Units

Offset Typ

00015680: Serf
00086762: Laborer
00023578: Woodcutter
00055170: Carpenter
00094660: Stonemason
00047272: Farmer
00063068: Baker
00039374: Animal breeder
00070966: Butcher
00078864: Fisherman
00118354: Recruit
00031476: Mine worker
00110456: Metallurgist
00102558: Blacksmith


Military units

Offset Typ

00126252: Militia
00134150: Axe fighter
00142048: Sword fighter
00149946: Bowman
00157844: Crossbowman
00165742: Lance carrier
00173640: Pikeman
00181538: Scout
00189436: Knight
00197334: Barbarian
00205232: Rebel
00213130: Rogue
00221028: Warrior
00228926: Vagabond
00236824: Catapult
00244722: Ballista



Now lets take a look at a swordfighter:

Offset 00142048
  Code:
03 00 37 00 00 00 00 00 03 00 18 00 0D 00 09[/quote] 1st byte: Hitpoints 3rd byte: Strenght 5th byte: Strenght against horses (pikes) 7th byte: unknown 9th byte: Defence 11th byte: Speed 13th byte: unknown 15th byte: Look Instance Please remember that between each "important" byte a "00" is. Unit.dat include also animations, as far as I know, but I don't know exactly which value means which animation/picture. Ah, and by the way, Philymaster got the most of this stuff here. I helped him out a bit, made a tool and wrote this document.
<<

Nick

Crossbowman

Posts: 240

Joined: 09 Jan 2007, 23:00

Post 03 Aug 2008, 13:19

txs for the info...
i'm quite interested in what those 2 unknow bytes do...
gonna test after my exams in 4 weeks :p
<<

JBSnorro

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 03 Aug 2008, 14:11

There isn't much to test :P
The value of the 7th byte is always 0, the value of the 13th byte is always 0 or 13, and after those 15 bytes there still are some values, but 90 % is -1 and I didn't notice any differences in gameplay when I altered the other 10 %.
<<

Nick

Crossbowman

Posts: 240

Joined: 09 Jan 2007, 23:00

Post 11 Jan 2009, 10:08

how do u open the .dat?
Tryd with text editor but didnt rly work...
Which program u used to display the values properly?
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 11 Jan 2009, 10:43

I like using Windows edit.com
Run>: edit.com /72 FILE_NAME
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
<<

Nick

Crossbowman

Posts: 240

Joined: 09 Jan 2007, 23:00

Post 11 Jan 2009, 17:42

doesnt work :S i get all kinds of strange symbols
<<

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 11 Jan 2009, 23:50

@Nick: Try this program: (PSPad)
http://www.pspad.com/
If you open the files, on the left will be displayed Hexadecimal, (e.g. 01 00 02 etc.) and on the right will be strange symbols. Look at the stuff on the left, it will make more sense.

Click Search -> Go to line (Ctrl+G) to go to the values Merchator wrote about. (e.g. 00015680 for serf) Then the cursor will be placed at the correct byte. You can type in different numbers there. Remember that it is hex, so after 09 it stops being normal. (10 is actually 16)

Let me know if that works,
Lewin.
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 12 Jan 2009, 12:27

Okay folks, i'll now release my new editor! First I made it for own purposes only. But this is senceless, isn't it?

As I made the tool just for me first, it is text-based. But no worries! It's simple to use. You just have to change the values you see and save them again. Easy, huh? There isn't much to tell...

Download link:
Defines Editor V 0.5

I have just translated it yet, so I will improve the GUI later
(it looks truly boring), if you want. Report bugs, I can fix them this time! :D

@ Lewin: Thanks for your offer, but I already translated it yesterday :wink:
<<

Nick

Crossbowman

Posts: 240

Joined: 09 Jan 2007, 23:00

Post 12 Jan 2009, 16:45

txs for the fast response & release!

rapidshare mirror:
http://rapidshare.com/files/182487407/defeditor.exe

(merchator, if u want my mirror removed just say...)
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 12 Jan 2009, 16:49

txs for the fast response & release!

rapidshare mirror:
http://rapidshare.com/files/182487407/defeditor.exe

(merchator, if u want my mirror removed just say...)
No problem! I just copied your rapidshare link into my post, I had to use another hoster because rapidshare hasn't loaded, somehow. But now it works again :)
Write back if you encounter some bugs!
<<

Nick

Crossbowman

Posts: 240

Joined: 09 Jan 2007, 23:00

Post 12 Jan 2009, 16:51

i will :)
program seems nice! very simple to use...

btw, whats the worker rest time in houses? never heard of it
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 12 Jan 2009, 17:20

"Worker rest time" is the time of his "break" between each working period. E.g. a animal breeder gets 2xcorn. Once he get it he starts to feed the pigs. After this he takes a short break, I call it "Worker rest time". I have also found out the duration of each production process, I just have to search for my notes (if I find them).

In fact it is simple to use :D A bad GUI, but you can change the values faster with this editor than with my old one.
Maybe I'll add some more menue-Icons and a help-file (if needed).

Return to “Other Creations”

Who is online

Users browsing this forum: No registered users and 6 guests