Page 1 of 1

Houses.dat

PostPosted: 05 Jul 2008, 16:52
by JBSnorro
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

PostPosted: 14 Jul 2008, 19:28
by JBSnorro
@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

PostPosted: 14 Jul 2008, 21:31
by Litude
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)

PostPosted: 15 Jul 2008, 09:01
by JBSnorro
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.

PostPosted: 15 Jul 2008, 13:11
by Litude
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).