v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
User:Bpuk
Jump to navigation
Jump to search
Initial passes of a couple of memory structures. This should all be taken as low confidence until at least another pass has been run over them.
I'm going to cross check some of the values found here against the raws and see if they match up. I'll come back to the building structure once I've had a quick look at the job and item structures.
Building Structure
Found at the addresses found by Mithaldu. See User:Jifodus/Memory research
The building structure is 248 bytes in length
Offset | Size | Type | Name | Notes |
---|---|---|---|---|
0000h
|
2 | Short | Unknown | Always 0x0097 on the saves I've tested to date. Possibly a race ID? |
02h
|
2 | Short | Building Type | Multiple building 'types' seem to share the same designation. For example all workshops are 0x0E10C. Changing this type often results in the building 'dissapearing' |
04h
|
4 | long | X co-ordinate (left) | This, and the following co-ords, could be shorts. I've yet to see a value that isn't 0x00XX |
08h
|
4 | long | Y co-ordinate (top) | |
0Ch
|
4 | long | X co-ordinate (centre) | |
10h
|
4 | long | X co-ordinate (right) | |
14h
|
4 | long | Y co-ordinate (bottom) | |
18h
|
4 | long | Y co-ordinate (centre) | |
1Ch
|
4 | long | Z co-ordinate | |
20h
|
4 | long | Built | Could simply be a boolean padded to 4 bytes. |
24h
|
4 | long | Material? | Workshops built out of the same type of wood have the save value. Values for furniture match those for workshops |
28h
|
4 | long | Unknown | Usually 0 for workshops and furniture. Stockpiles appear to have a pointer |
2Ch
|
4*4 | long*4 | Stockpile dimensions | Top left co-ord, width, height |
3Ch
|
4 | long | Unknown | Varies while the game is unpaused. Part of AI? |
40h
|
4 | long | Building ID? | This is a counter, each building has a unique value. Values do not appear to be reused. |
44h
|
4 | long | Unknown | Only appears to be defined for stockpiles. |
48h
|
16 | vector | List of jobs | Remove building appears to be classed as a 'job'. Vector increases/decreases as jobs are added to workshops. Has values for some farm plots, workshops, stockpiles. |
58h
|
16 | vector | Unknown | Seen once on a chair. The chair was defining a throne room, which had items in it. It was also overlapped with a dining room. |
68h
|
16 | vector? | Unknown | |
78h
|
4 | long/pointer | Defines Room? | For furniture the lowest bit is 0/1 if that building is defining a room. Also often looks like a pointer. |
7Ch
|
16 | vector? | Unknown | |
8Ch
|
16 | vector? | Unknown | |
9Ch
|
4 | pointer | Owner? | Only seen on furniture allocated as a room with an owner. |
A0h
|
16 | vector? | Unknown | |
B0h
|
4 | long | Unknown | Appears to be a bitfield for stockpile storage settings. |
B4h
|
16 | vector | Items | Seems to be a list of items contained within the building (T). Doesn't seem to be relevant for stockpiles or ropes. |
C4h
|
4 | pointer? | Unknown | Seen on trade depot and an archery target |
C8h
|
4 | long | Unknown/Part of stockpile profile? | |
CCh
|
16 | vector | Profile/Part of stockpile profile | Seems to contain workshop profile, or part of the stockpile profile if it is a stockpile. Untested on furniture |
DCh
|
4 | long | Minimum skill level | For workshops this details the minimum skill level. For stockpiles it seems to be part of the stockpile settings |
E0h
|
4 | long | Maximum skill level | For workshops this details the maximum skill level. Dabbling is 0. Grand Master is 14. Legendary is 3 million. |
E4h
|
6*4 | long[6] | Unknown | Some of these appear to have useful values for workshops. Generally seem to be part of stockpile profiles. |
Building Job Structure
Appears to be 128 bytes long. Haven't looked at this yet.
Building Types
This table lists the known building ID's (at offset 2) to date. This is likely to be incomplete
B50C | Door |
E10C | Workshop |
B0EC | Cabinet |
DCEC | Farm Plot |
D1EC | Bed |
DE4C | Animal Trap |
9FE4 | Stockpile |
E26C | Trade Depot |
C00C | Trap? |
D4AC | Chair |
D34C | Table |
D8CC | Statue |
CF2C | Cage |
9D34 | Rope |
B3AC | Armour Stand |
C84C | Archery Target |
AF8C | Coffer |
E3CC | Wagon |