Map Database  •  FAQ  •  RSS  •  Login

[Updated]Unit.dat Editor

<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 12 Jan 2009, 17:43

Now it's very interesting, as this info about work plans can be used in KaM remakes (mine and TKE). :)
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 12 Jan 2009, 18:04

Looks nice. Can it also show the speed of storm-attack? Or is that hardcoded elsewhere?
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 12 Jan 2009, 18:11

Looks nice. Can it also show the speed of storm-attack? Or is that hardcoded elsewhere?
Hmm, I guess that storm-attack has just a multiplicator of 2. So the unit doubles its speed for short time. And I am sure this factor is hardcoded, so we are (yet) not able to change it. I doubt that an individual storm attack speed is possible :(
<<

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 12 Jan 2009, 23:33

Very well done Merchator!
I wouldn't bother improving the GUI or adding more menu icons, it's good enough as is. If you are going to do more work on it then I'd recommend you add more values which can be edited. (e.g. the duration of the work time)
The current UI is fine, and easy to use.

@Litude: Will this be making it onto the fan site?
Lewin.
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 14 Feb 2009, 10:10

Okay, I have just updated my editor.
It now includes:
-> Working time
-> Construction speed

Download: DefEditor V0.6

If you have some translation suggestions, please tell me!
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 14 Feb 2009, 11:28

Options>FullScreen in addition to standard Windows maximize button o_O weird.

How does it work with editing anyway?
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 14 Feb 2009, 11:42

Options>FullScreen in addition to standard Windows maximize button o_O weird.
Hehe, this is an old function. If you use the maximize button at the top right the edit-field won't resize. So I made this function, which resizes the Memo, too.
Today I know that there could have been other ways to solve this. E.g. you ask if the window is maximized and the memo will automatically get its size :D No extra button is needed then.
Maybe I will change this function, maybe not. Why do you need a full screen? The words and values easily fits in the normal size!

Its like:
  Code:
    Form1.Left := 0;     Form1.Top := 0;     Form1.Width := Screen.Width;     Form1.Height := Screen.Height;     RichEdit1.Width := Screen.Width;     RichEdit1.Height := Screen.Height ;     StatusBar1.Width := Screen.Width;     StatusBar1.Top := Screen.Height - StatusBar1.Height;[/quote] Yes, it's a very complex peace of code which is really old. Whenever I made a tool which needed full screen is used this. But knowledge grows with the time :D
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 14 Feb 2009, 12:44

I was wondering why do you need it for anyway :wink:

In Delphi I would assign Memo anchor properties (which control how control is positioned scaled on resize) [apLeft,apRight,apTop,apBottom] is the solution. I guess you can find something alike in your programming app.

Alternatively you could apply Memo resize when form gets resized - OnResize event.

Editing looks very confusing, plain text??
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 14 Feb 2009, 13:27

No, it isn't that hard to edit. You just have to change the values.
First I tought: I need to make another editor. I decided to use plain text for a better overview. Philymaster and me didn't have any problems. Later I released this program, but I have translated it only, nothing else.

Oh, by the way, loading mission works fine, but you shouldn't save them :wink: It's buggy :D
<<

Siegfried

User avatar

Knight

Posts: 494

Joined: 24 Jul 2009, 22:00

Post 25 Jul 2009, 11:47

I wonder about the speed value for the soldiers.
What does speed=24 or speed=39 mean?

How do the units move?
I ask because I did not yet understand how the basic grid is built.
<<

JBSnorro

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 25 Jul 2009, 15:37

the catapult and ballista have 'speed' 39.
Horses 11, and all other units 24. You can see by the values that is does not represend speed, but it respresent something like one over speed. We don't konw how those values are processed ingame.

And about the grid, I think it works like this:
the horses travel a single tile in 6 updates(and kam has 10 updates per second). The units travel a single tile within 11 updates, and I don't know for sure about the vehicles, but it will take them around 20 updates to cross a single tile.
<<

Siegfried

User avatar

Knight

Posts: 494

Joined: 24 Jul 2009, 22:00

Post 25 Jul 2009, 16:58

And about the grid, I think it works like this:
the horses travel a single tile in 6 updates(and kam has 10 updates per second). The units travel a single tile within 11 updates, and I don't know for sure about the vehicles, but it will take them around 20 updates to cross a single tile.
Thats nearly all info I need in one post. Thanks!

IIRC the knights and scouts have 'speed' 39 and the catapult has 12.

I have one more question: do you know if there is a sub-grid which gives the unit's position while it's moving? I supposed so because I think I saw the bowmen aiming in between tiles, too.
So my code atm has a subgrid, but with 6/11 steps I would either need two separate subgrids or one with 66 points, which would be a lot.
<<

JBSnorro

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 25 Jul 2009, 21:48

I've played KaM a lot, and I'm pretty sure the arrows always land on the same spot of the tile(although I'm not exactly sure). But no, a subgrid is not necessary. The option I use in TKE is that the unit keeps track of how far it is on the tile. That number is incremented every update. For normal units, when that number hits 11, it is set to zero, and unit changes its location. The unit is drawn with regards to that number. Suppose a unit is moving from right to left, and if his number is 10, it is drawn at the left side, while if it were 0, the unit would be drawn at the right side. Don't forget to take the heights into account.
Anyway, as you can see, there is no need for a subgrid.
<<

Siegfried

User avatar

Knight

Posts: 494

Joined: 24 Jul 2009, 22:00

Post 25 Jul 2009, 23:12

I started it that way now, too.

There's a very long way until I can care about heights. I'm not sure if I really want to include terrain effects because I guess the effect would be smaller than the codes intrinsic uncertainty. I would have to know the exact game mechanics to get reasonable results.

But it's almost impossible to recreate the AI or the path finding, so I will concentrate on this first.
<<

jemoeder

Post 18 Jul 2010, 11:59

help

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:

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:
The program doesn't work with me , I got the o.6 version and KaM:TPR and opened the unit.dat with it and it said some error in german.. Can you help? I really want to edit the units...
Thanks

Return to “Other Creations”

Who is online

Users browsing this forum: No registered users and 13 guests