Map Database  •  FAQ  •  RSS  •  Login

The "training hall" in-game

<<

Litude

User avatar

King Karolus

Posts: 1233

Joined: 01 May 2006, 22:00

Website: http://www.knightsandmerchants.net

Location: Finland

Post 04 Sep 2008, 21:14

The "training hall" in-game

When looking for something completely different in the game exe, I accidentally stumbled upon the build menu. What was my first though? Find out what that building with the ID 26 really was. Turns out my guess was correct, it was indeed the training hall. Unfortunately, all data of the building has been completely removed and this is all that remained :(.
<<

Krom

User avatar

Knights Province Developer

Posts: 3281

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 05 Sep 2008, 05:52

How interesting, what was purpose of it?
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
<<

Litude

User avatar

King Karolus

Posts: 1233

Joined: 01 May 2006, 22:00

Website: http://www.knightsandmerchants.net

Location: Finland

Post 05 Sep 2008, 10:13

Originally soldiers gained experience points whilst fighting. Apparently, the training hall was an alternate method to increase the experience of soldiers that weren't fighting.
<<

Thunderwolf

User avatar

Crossbowman

Posts: 233

Joined: 22 Jan 2008, 23:00

Website: http://thunderwolf.freehost10.com/KaMMissionBuilder/index.php

Location: Netherlands

Post 05 Sep 2008, 12:04

If experience could be gained, would it mean that a militia could actually gain enough experience to kill a swordsman or barbarian ??? :shock:
~old sig
MissionBuilder v0.9f2 UPDATED!!
Defend The Outer Colony. fight for your king and uncover the secrets of this land.
Temporary version at
http://thunderwolf.x10hosting.com/index.php
"You can't defeat me, I've played Knights and Merchants"
<<

kuba11100

Sword Fighter

Posts: 286

Joined: 16 Jul 2008, 22:00

Location: Poland

Post 05 Sep 2008, 13:43

@Thunderwolf: remember that militia doesn't have any armor.
@Litude: was it able to do something with the building, or it was just the useless button to click? Anyway, if you're interested in trying another removed buildings, try with replacing one with 6, 18 or 23 in TSK engine.

I remember when I placed fisherman's hut in TSK mission - it crashed. When I set also its damage to 1000, trace after the building was shown (what didn't appeared when placed destroyed town hall, vehicle workshop or removed training hall - just nothing). Interesting is also that the crashing buildings are shown on the minimap (if the camera is away from them, the game won't crash).

The training hall text in Polish version is removed (nothing in the field), but House appears on fisherman's hut place, Bow workshop on Town hall place and Forester's (? there's two times Lesniczowka - Woodcutter's in English game) on wehicle workshop place. Two times Drwal (Woodcutter) in the text, there's "nothing" on the removed unit description place (who crashed, too).

Also - thank you! I found new spelling error when browsing that file!
<<

Krom

User avatar

Knights Province Developer

Posts: 3281

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 05 Sep 2008, 14:55

Experience points for units, that's interesting. I liked this in C&C series, certainly added some depth to fighting.
I shall keep that in mind for KaM Remake :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
<<

Nick

Crossbowman

Posts: 240

Joined: 09 Jan 2007, 23:00

Post 05 Sep 2008, 19:10

u still working on that? :O great :)
<<

Michailoff

Laborer

Posts: 10

Joined: 30 Aug 2008, 22:00

Location: Poland

Post 06 Sep 2008, 16:04

Litude, you could say where specifically made this change? I am referring specific line (where it is located, whatever). I invent it rather strange idea, but that would be needed me know exactly where all these values to enter, and the data on where the building could be transferred to the houses.dat (to put there, let's assume that the sawmill or armory workshop)...
<<

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 07 Sep 2008, 02:31

Hi,
I hope Litude won't mind me telling you. (I can't see why he would)
The data is hard coded into the EXE. Open it up in a hex editor then go to this location:
$C0378
As you can see, the first byte is a 0D (13). 13 is the code for the school, and the school is the top left building. Next one is 27, meaning the inn. Next is 14, or the quarry. You should be able to work it out from there. :wink:
Let us know if you find anything interesting.
I did suggest to Litude that we try adding a new building (just for fun) such as the outpost image from the alpha version, but he's away for the weekend.
Lewin.
<<

kuba11100

Sword Fighter

Posts: 286

Joined: 16 Jul 2008, 22:00

Location: Poland

Post 07 Sep 2008, 10:13

I tried using the "wrong" numbers in TSK 1.32.
6 (fisherman's hut in TPR) - Ugly house icon, I was able to see the planning position (!), but when laborer finished digging the place, it crashed
18 (town hall) - Bowmaker's with the monastery (cross) icon - can't see the planning position, after placing laborer go to the clicked place and crash
23 (siege workshop) - Forester's with the tree icon (that added to the woodcutter's in SR2)
26 - absolutely nothing in Polish version - only the red X visible
29 - storehouse icon - crashes when mouse pointer is on it
30 - weapons workshop - as above
higher - empty place

I tried it also in 0.73, but !RELEASE_ALL_HOUSES doesn't seem to work there, and the buildings were unavaiable.
<<

Michailoff

Laborer

Posts: 10

Joined: 30 Aug 2008, 22:00

Location: Poland

Post 07 Sep 2008, 15:21

I have some idea - Litude, you may able to adjust the image of a building and the addition of these images? If so - try to put an image fisherman's hut proceeds of TPR (the former home of our graphics) to the appropriate file (unless houses.rx), and then try to set this image in the home from a file houses.dat. Let's see whether anything will change. For the time being - the game hangs at the end of digging the foundations of the house.

P.S. Litude, i have such a request - it seems to me that the tab "decoding" is out of date (in the end - are enormous progress, for example, we have a fairly strong decoded file KaM TPR.exe I do not know, however, as with other files, although I think that is just). Could you update it, we all have a preview on current events?
<<

Litude

User avatar

King Karolus

Posts: 1233

Joined: 01 May 2006, 22:00

Website: http://www.knightsandmerchants.net

Location: Finland

Post 09 Sep 2008, 08:24

I'll have to see about adding one of the alpha buildings in the place of the removed ones. Might be more of a mod than a patch but I guess they could give some nice possibilities for scenario design.
@Michailoff: You're right, a lot of decoding progress has been made but I don't think I'll update it before the 1.60 patch has been released.
<<

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 10 Sep 2008, 01:19

I'll have to see about adding one of the alpha buildings in the place of the removed ones. Might be more of a mod than a patch but I guess they could give some nice possibilities for scenario design.
Well, it depends on what you do to whether it's a mod or a patch. Just adding something to see what happens is a mod, but if we can think of a useful alpha building to add, that doesn't require any difficult coding then it is more of a patch.
Here are some ideas I had:
- Outpost, with a recruit working in it. Once built it will have a huge explore radius that will reveal a very large amount of the map. (e.g. a 50+ tile radius) Might be useful because you could explore part of the enemy base in some missions. Could be bad because it would reveal too much.

- Alternative watchtower. If we just copy the watch tower code from houses.dat and then change the image to be the one with the grey roof, we can have two different watchtowers. Also, we could change the amount of stones they can hold. We could make one hold say 8 stones but cost more to build, to balance it out.

Does anybody know if the instructions for what the building does are contained in houses.dat? I mean stuff like the quarry would say that the occupant will go and collect stone, then come back and chop it up, and then produce 3 rocks. And that the GUI for the weapons workshop has buttons to order weapons. Are the instructions and image indexes for all these things contained in the DAT files? There seems to be a large amount of data for each item, including sequences that could be animation indexes.
@Michailoff: You're right, a lot of decoding progress has been made but I don't think I'll update it before the 1.60 patch has been released.
Yeah, well I was thinking of making a document with indexes to all the know useful things in the EXE. Other things that need updating:
- Houses/Units.dat Merchator knows quite a lot and you must know a bit of extra stuff as well.
- Font files. I see that you've written some instructions for how to add the &NBS; but some full decoding info would be great.
- RX files. Only have some simple information that is in need of an update.
- Save files. We know very little, but we might as well document everything that we do know.

It's a good idea to wait until the patch is released before attempting these things though.
Lewin.
<<

Litude

User avatar

King Karolus

Posts: 1233

Joined: 01 May 2006, 22:00

Website: http://www.knightsandmerchants.net

Location: Finland

Post 10 Sep 2008, 05:30

- Outpost, with a recruit working in it. Once built it will have a huge explore radius that will reveal a very large amount of the map. (e.g. a 50+ tile radius) Might be useful because you could explore part of the enemy base in some missions. Could be bad because it would reveal too much.
Well if it's not buildable it shouldn't really matter if it has a 50+ radius, but a smaller one would do just fine. There are still a lot of graphics missing though.
- Alternative watchtower. If we just copy the watch tower code from houses.dat and then change the image to be the one with the grey roof, we can have two different watchtowers. Also, we could change the amount of stones they can hold. We could make one hold say 8 stones but cost more to build, to balance it out.
I don't think this is possible. The game most likely has a hardcoded limit that serfs never take wares to buildings that already have five of it.
Does anybody know if the instructions for what the building does are contained in houses.dat? I mean stuff like the quarry would say that the occupant will go and collect stone, then come back and chop it up, and then produce 3 rocks. And that the GUI for the weapons workshop has buttons to order weapons. Are the instructions and image indexes for all these things contained in the DAT files? There seems to be a large amount of data for each item, including sequences that could be animation indexes.
Well, you can change the occupant (making a fisherman mine looks weird :twisted:) and you can change what ware and the quantity of the ware the building produces. Also the stuff that is needed for production.
As for the special GUIs, these are all hardcoded into the EXE (afaik) as I couldn't locate the town hall GUI at all.
- Houses/Units.dat Merchator knows quite a lot and you must know a bit of extra stuff as well.
I think that JBSnorro and Krom also know some stuff about these files we don't.
- Font files. I see that you've written some instructions for how to add the &NBS; but some full decoding info would be great.
Yeah.
- RX files. Only have some simple information that is in need of an update.
Don't know anything about them.
- Save files. We know very little, but we might as well document everything that we do know.
Yeah, this could prove a bit troublesome though as there are more than one save format.
<<

Thunderwolf

User avatar

Crossbowman

Posts: 233

Joined: 22 Jan 2008, 23:00

Website: http://thunderwolf.freehost10.com/KaMMissionBuilder/index.php

Location: Netherlands

Post 10 Sep 2008, 08:54

I don't think this is possible. The game most likely has a hardcoded limit that serfs never take wares to buildings that already have five of it.
With the school six is possible. first, load it up to 5, then start training a character. in the meanwhile, a serf will go and get gold. now, cancel training and the serf will bring in the 6th chest. :roll:
~old sig
MissionBuilder v0.9f2 UPDATED!!
Defend The Outer Colony. fight for your king and uncover the secrets of this land.
Temporary version at
http://thunderwolf.x10hosting.com/index.php
"You can't defeat me, I've played Knights and Merchants"

Return to “General Talk”

Who is online

Users browsing this forum: No registered users and 3 guests