Map Database  •  FAQ  •  RSS  •  Login

Houses.dat Guide

<<

kamfan

Laborer

Posts: 13

Joined: 22 Feb 2007, 23:00

Location: Germany

Post 12 Feb 2009, 22:24

Houses.dat Guide

first, sorry for my bad english xD

This List contains all my knowledge, i've tested all that stuff ingame.
In Merchators object editor some of that isnt included.

one thing you should care of is that offset is decimal, use the hex workshop for it.

if you have any type of questions, feel free to ask or pm me.

Houses.dat - - - - - - - - - - - - - - - - - - - - - - -

Offset Buildings

00003508: Sawmill
00005196: Iron smithy
00006884: Weapon smithy
00008572: Coal mine
00010260: Iron mine
00011948: Gold mine
00013636: Fisher house
00015324: Bakery
00017012: Farm
00018700: Woodcutter house
00020388: Armor smithy
00022076: Store house
00023764: Stable
00025452: School
00027140: Quarry
00028828: Gold smithy
00030516: Swine farm
00032204: Watchtower
00033892: Town hall
00035580: Weapon workshop
00037268: Armor workshop
00038956: Barrack
00040644: Mill
00042332: Siege workshop
00044020: Butcher
00045708: Tannery
00049084: Inn
00050772: Winery

Optionen:

+ 10 = // How long they took for wood construction
+ 11 = // How long they took between the construction steps
+ 12 = // How long they took for stone construction
+ 18 = // The way the units enter and exit any building, X axis
+ 19 = // The way the units enter and exit any building, Y axis
+ 120 = // How much wood is needed
+ 121 = // How much stone is needed
+ 226 = // How long shall the unit work
-- 227 ~
+ 228 = // Waiting time between work
-- 229 ~
+ 230 = // Which ware the type unit has stored (Wares IDs)
-- 231 ~
-- 232 ~
-- 233 ~
+ 234 = // Which wares shut be produced (Wares IDs)
-- 235 ~
-- 236 ~
-- 237 ~
+ 238 = // Which amount should be produced
+ 239 = // How much life bar (1x Stone = 50, 1x wood = 50)
-- 240 ~
+ 241 = // The explor radius of the building
-- 242 ~
+ 243 = // Which unit is needed for the building (Unit IDs)
<<

Nick

Crossbowman

Posts: 240

Joined: 09 Jan 2007, 23:00

Post 13 Feb 2009, 13:08

interesting!
I hope merchators will update his proggie. I like the "+ 226 = // How long shall the unit work " and "+ 11 = // How long they took between the construction steps "

I could rly use the working time of unit for the fisherman in my MOD
well done
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 13 Feb 2009, 14:34

Okay, I am just updating my editor with those 2 values nick want to have added in. But those values somehow are strange. Seems like we are using different Offsets. So just give me some time to figure out the positions, won't last that long.
Maybe new editor will be finished this weekend!

"How long they took between the construction steps"...I need a word for this or 2. My english isn't good enough to figure out a good one. Any suggestions?
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 13 Feb 2009, 15:29

Construction speed?
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 14 Feb 2009, 09:21

Okay, finished so far. But somehow this "Costruction speed" value is 0 all the time, when I see it in my editor. I am using different offsets, so I had to use a calculator (yea, I am lazy) to figure out this value. However, it always says "Construction speed: 0". I'll check that in the future.

My 1st byte is the byte which tells you how much stone is needed. So I have to substract 109 bytes to get to the right one. Any mistakes?

(Its 10' am here in germany, and I'm still a little bit tired :D)

Edit: 0 seems to be correct, so updated editor can be downloaded here:
Defines Editor V 0.6
Please upload it to another mirror, rapdishare says that you can just download it 10 times!
<<

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:20

Each house info starts with indexes of wood and stone pics with their palettes. You should know that.

Here's my version of it:
  Code:
HouseDAT:array[1..HOUSE_COUNT] of packed record   StonePic,WoodPic,WoodPal,StonePal:smallint;   SupplyIn:array[1..4,1..5]of smallint;   SupplyOut:array[1..4,1..5]of smallint;   Anim:array[1..19] of record     Step:array[1..30]of smallint;     Count:smallint;     MoveX,MoveY:integer;   end;   WoodPicSteps,StonePicSteps:word;   a1:smallint;   EntranceOffsetX,EntranceOffsetY:shortint;   EntranceOffsetXpx,EntranceOffsetYpx:shortint;   BuildArea:array[1..10,1..10]of shortint;   WoodCost,StoneCost:byte;   BuildSupply:array[1..12] of record MoveX,MoveY:integer; end;   a5,SizeArea:smallint;   SizeX,SizeY,sx2,sy2:shortint;   WorkerWork,WorkerRest:smallint;   ResInput,ResOutput:array[1..4]of shortint;   ResProductionX:shortint;   MaxHealth,Sight:smallint;   OwnerType:shortint;   Foot:array[1..36]of shortint; end;[/quote] shortint = 1byte signed byte = 1byte unsigned smallint = 2bytes signed word = 2bytes unsigned integer 4byte signed a# values are unknown. Foot values are unknown as well I hope all other values names are self-explained. If anything - ask me.
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:48

Yea, sure, but when we found out the values we didn't know that much. I tought the first information are the needed amount of wood and stone. I could change the offsets, but then I also had to change all the values. Okay, would be possible, but it is not necessary right now :wink:

Is this an extract of your KaM remake?
<<

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:38

Yes, thats direct copy from my source code. I had to process houses.dat file, thus I had to make offset-correct structures.
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
<<

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 16 Feb 2009, 02:22

@Merchator: I think you should allow you editor to edit other values too.
The resource input/output could be interesting, and so could changing unit types, view radius, work/rest time, etc. (some of those you already have though, but I haven't downloaded your tool for a while)

Good work though!
Lewin.
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 16 Feb 2009, 13:26

@ Lewin: Yeah, I easily could add some more functions, but all you listed are already content of my tool.

Im just missing "+10, "+12, "+18, "+19" (too lazy to type more :wink:)
<<

Nick

Crossbowman

Posts: 240

Joined: 09 Jan 2007, 23:00

Post 16 Feb 2009, 15:40

ok i uploaded it on my premium account. U can post link on other forums... dont care
http://rapidshare.com/files/198808370/DefEditor.exe
<<

Merchator

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 16 Feb 2009, 16:25

ok i uploaded it on my premium account. U can post link on other forums... dont care
http://rapidshare.com/files/198808370/DefEditor.exe
Thanks very much for your effort, nick :D
I'll now change the links!
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 16 Feb 2009, 17:53

There should be one more value in Houses.dat, but I can't find it - house entrance offset in pixels. Look close on serf entering farm - he goes slightly to the left and when entering quary - to the right.

EDIT: Okay, found it it's right next to EntranceOffset. And it seems to be used same way for X and Y. Base X number is 20. Anything less is to the left (e.g. Stables 20px to left), anything more - to right (e.g. Tannery 8px to right). Y number seems to control how soon unit goes inside.
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
<<

JBSnorro

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 11 May 2009, 21:27

Well I solved the rest of the puzzle....
Didn't even take over an hour XD
anyways, the value a1 Krom uses is always zero, so that's not unknown :P although it's representation is....
the value a5 is the size of the area defined as the tiles beneath or nextto the building. This unfortunately doesn't apply to the barracks, but is does for every other building. So the barracks part may be a random variable, like the random Inhabitant-Work-AnimationLength of the storehouse(which is 184 :? :P).
Anyways, the a5 probably isn't of great importance, in contrary to the "footer":

It contains 12 signed bytes and 12 shorts(or smallint in Kroms definition). Each byte corresponds to a short.
The byte represents the index of the sound played when the textureindex contained by the short is displayed.

This beautifully explains why some of the textures in the RX files are identical. At one texture, the sound should be played, whilst not for the other identical texture.

So does this make the houses.dat officially 100 % decoded? :P

But I don't know everything, I don't know what the BuildSupply contains exactly, nor do I know what the two sizes (SizeX, SizeY, sx2, sy2) contain. Krom, could you please clarify?
<<

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 May 2009, 07:14

Oh man! And just when I had nearly finished MANUALLY setting the sound effects. :wink:
Still, this will be better because I could have made a few mistakes.

Is there a footer like this for units.dat? It would make sense, because units make sound effects too.

@Krom: Could you please implement the loading of this data? (file loading is your area...) I guess we will have to rethink our house sound effect system so it is based off the texture being displayed rather than hard coded values. I wonder if this includes pig/horse noises too?
Lewin.

Return to “Other Creations”

Who is online

Users browsing this forum: No registered users and 6 guests