Map Database  •  FAQ  •  RSS  •  Login

Houses.dat

<<

JBSnorro

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 05 Jul 2008, 16:52

Houses.dat

So, we've already got a topic about decoding Unit.dat, and now about Houses.dat too.

I've already got this(I got most of it from Krom though):
The file starts with 30 Animations of pigs and horses.
An Animation contains 30 Int16's, a Int16Count and two integers forming a Point.
then foreach building(Count = 29) the following:

Int16 StoneCost
Int16 WoodCost
Int16 WoodenConstructionMaskTextureIndex
Int16 StoneConstructionMaskTextureIndex
a 4x5 array of Int16's containing the SupplyResourcesIn
a 4x5 array of Int16's containing the SupplyResourcesOut
Then 5 WorkingAnimations
a SmokeAnimation
a FlagPoleAnimation
a InhabitantIsIdleAnimation
3 FlagAnimations
7 FireAnimations
Int16 WoodenConstructionLength
Int16 StoneConstructionLength
3 bytes always zero.
signed-byte DoorLocation. The formula to get the index of the door of a building is BuildingWidth / 2 + this signed byte.
and afterwards there are still 131 Int16's I don't know the meaning of(yet). Is there anyone who does and cares to elaborate? ty
<<

JBSnorro

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 14 Jul 2008, 19:28

@Litude:

Here you said you fixed the bug that the Townhall and VehiclesWorkshop could be built at already occupied places. Can you tell me where in the Houses.Dat this data can be found? Or do you know anything else I don't about this file? ty
<<

Litude

User avatar

King Karolus

Posts: 1233

Joined: 01 May 2006, 22:00

Website: http://www.knightsandmerchants.net

Location: Finland

Post 14 Jul 2008, 21:31

Sure. Don't have anything else than the hex addresses and I've lost my notes so I'll just give the address where my modifications start, but they should point you to the right direction :D
First building $849A (Townhall, you probably want to check yourself though)
Second building $A59C (Vechicles Workshop)
Yeah and thought I'd mention that IIRC 0B hex values ignore the scenery beneath the square, whilst 1B disallows placement above trees and bushes)
<<

JBSnorro

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 15 Jul 2008, 09:01

Ok, I've found those values. Have you got any idea on what hexvalues 08, 0C and 1C might mean?
And after those values there are still 160 bytes of data per building. Do you know what is stored there? I figure some kind of ruin-emplacement could be stored there.
<<

Litude

User avatar

King Karolus

Posts: 1233

Joined: 01 May 2006, 22:00

Website: http://www.knightsandmerchants.net

Location: Finland

Post 15 Jul 2008, 13:11

Can't really remember, but I think either 0C or 1C makes the game place this square on the block on the blueprint when building a building. So I think they should allow you to increase the size of the building (I remember messing something up with the size during my initial edits).

Return to “Other Creations”

Who is online

Users browsing this forum: No registered users and 15 guests