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.

Difference between revisions of "40d:Memory hacking/v0.27.169.33a"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
Line 942: Line 942:
  
 
|-
 
|-
| <code>0x438</code>
+
| <code>0x0438</code>
 
| 16
 
| 16
 
| vector of pointer to [[#Like Structure|like struct]]
 
| vector of pointer to [[#Like Structure|like struct]]
 
| Likes
 
| Likes
 +
|
 +
 +
|-
 +
| <code>0x0448</code>
 +
| 16
 +
| vector of pointer to [[#448 Structure|448 struct]]
 +
|
 
|  
 
|  
  
Line 959: Line 966:
 
| 4
 
| 4
 
|  
 
|  
 +
|
 +
|
 +
 +
|-
 +
| <code>0x04C4</code>
 +
| 16
 +
| vector of pointer to [[#4C4 Structure|4C4 struct]]
 
|  
 
|  
 
|  
 
|  
Line 966: Line 980:
 
| 16
 
| 16
 
| [[Memory hacking#Vector|vector]] of longs
 
| [[Memory hacking#Vector|vector]] of longs
 +
|
 +
|
 +
 +
|-
 +
| <code>0x04E4</code>
 +
| 16
 +
| vector of pointer to [[#4E4 Structure|4E4 struct]]
 +
|
 +
|
 +
 +
|-
 +
| <code>0x04F4</code>
 +
| 16
 +
| vector of pointer to [[#4F4 Structure|4F4 struct]]
 
|  
 
|  
 
|  
 
|  
Line 980: Line 1,008:
 
| 2
 
| 2
 
|  
 
|  
 +
|
 +
|
 +
 +
|-
 +
| <code>0x050C</code>
 +
| 16
 +
| vector of pointer to [[#50C Structure|50C struct]]
 +
|
 +
|
 +
 +
|-
 +
| <code>0x051C</code>
 +
| 16
 +
| vector of pointer to [[#51C Structure|51C struct]]
 +
|
 +
|
 +
 +
|-
 +
| <code>0x052C</code>
 +
| 16
 +
| vector of pointer to [[#52C Structure|52C struct]]
 +
|
 +
|
 +
 +
|-
 +
| <code>0x053C</code>
 +
| 16
 +
| vector of pointer to [[#53C Structure|53C struct]]
 
|  
 
|  
 
|  
 
|  
Line 1,085: Line 1,141:
 
| 4
 
| 4
 
|  
 
|  
 +
|
 +
|
 +
 +
|-
 +
| <code>0x05A0</code>
 +
| 16
 +
| vector of pointer to [[#5A0 Structure|5A0 struct]]
 
|  
 
|  
 
|  
 
|  
Line 1,172: Line 1,235:
 
| 4
 
| 4
 
| long
 
| long
 +
|
 +
|
 +
 +
|}
 +
 +
=== 448 Structure ===
 +
{| border="1" cellpadding="2" width="100%"
 +
! width="10%" | Offset
 +
! width="5%" | Size
 +
! width="10%" | Type
 +
! width="20%" | Name
 +
! width="55%" | Notes
 +
 +
|-
 +
| <code>0x0000</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0002</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0004</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0006</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0008</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x000A</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x000C</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0010</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|}
 +
 +
=== 4C4 Structure ===
 +
{| border="1" cellpadding="2" width="100%"
 +
! width="10%" | Offset
 +
! width="5%" | Size
 +
! width="10%" | Type
 +
! width="20%" | Name
 +
! width="55%" | Notes
 +
 +
|-
 +
| <code>0x0000</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0004</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0008</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x000C</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0010</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0014</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0018</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x001C</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0020</code>
 +
| 1
 +
| byte
 +
|
 +
|
 +
 +
|}
 +
 +
=== 4E4 Structure ===
 +
{| border="1" cellpadding="2" width="100%"
 +
! width="10%" | Offset
 +
! width="5%" | Size
 +
! width="10%" | Type
 +
! width="20%" | Name
 +
! width="55%" | Notes
 +
 +
|-
 +
| <code>0x0000</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0004</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0008</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x000C</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|}
 +
 +
=== 4F4 Structure ===
 +
{| border="1" cellpadding="2" width="100%"
 +
! width="10%" | Offset
 +
! width="5%" | Size
 +
! width="10%" | Type
 +
! width="20%" | Name
 +
! width="55%" | Notes
 +
 +
|-
 +
| <code>0x0000</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0004</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0008</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x000C</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|}
 +
 +
=== 50C Structure ===
 +
{| border="1" cellpadding="2" width="100%"
 +
! width="10%" | Offset
 +
! width="5%" | Size
 +
! width="10%" | Type
 +
! width="20%" | Name
 +
! width="55%" | Notes
 +
 +
|-
 +
| <code>0x0000</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0002</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0004</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|}
 +
 +
=== 51C Structure ===
 +
{| border="1" cellpadding="2" width="100%"
 +
! width="10%" | Offset
 +
! width="5%" | Size
 +
! width="10%" | Type
 +
! width="20%" | Name
 +
! width="55%" | Notes
 +
 +
|-
 +
| <code>0x0000</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0002</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0004</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|}
 +
 +
=== 52C Structure ===
 +
{| border="1" cellpadding="2" width="100%"
 +
! width="10%" | Offset
 +
! width="5%" | Size
 +
! width="10%" | Type
 +
! width="20%" | Name
 +
! width="55%" | Notes
 +
 +
|-
 +
| <code>0x0000</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0004</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0008</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x000C</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|}
 +
 +
=== 53C Structure ===
 +
{| border="1" cellpadding="2" width="100%"
 +
! width="10%" | Offset
 +
! width="5%" | Size
 +
! width="10%" | Type
 +
! width="20%" | Name
 +
! width="55%" | Notes
 +
 +
|-
 +
| <code>0x0000</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0004</code>
 +
| 4
 +
| long
 +
|
 +
|
 +
 +
|}
 +
 +
=== 5A0 Structure ===
 +
{| border="1" cellpadding="2" width="100%"
 +
! width="10%" | Offset
 +
! width="5%" | Size
 +
! width="10%" | Type
 +
! width="20%" | Name
 +
! width="55%" | Notes
 +
 +
|-
 +
| <code>0x0000</code>
 +
| 2
 +
| short
 +
|
 +
|
 +
 +
|-
 +
| <code>0x0002</code>
 +
| 2
 +
| short
 
|  
 
|  
 
|  
 
|  
  
 
|}
 
|}

Revision as of 06:29, 8 November 2007

Addresses

Name Size Type Notes Offset
Art defacement malus 4 long normally -1000 (18 FC FF FF) 0x0079DC2F
Current unit focus 4 long Indexes into the full creature list. 0x00C2F548
Current year 0x00C34378
Map menu state 4 long The current state of the menu when viewing the map normally in Dwarf Fortress. 0x16 when in 'View Units' mode, other values unknown. 0x123B65C
Dwarf race ID As in the race identifier in the creature structure. 0x01237AD0 (probably)
Creature vector 16 vector of pointers There are actually multiple creature vectors, but this has all of them. 0x01416A38
Next creature ID 4 long 0x00C079F4
Another creature vector 16 vector of pointers This is the creature list that 'Current unit focus' indexes into, unlike previously stated. 0x01416A48
Yet another creature vector 16 vector of pointers This one is used when saving creatures when saving game. 0x01416A88

Game Structures

Creature Structure

Offset Size Type Name Notes
0x0000 28 string First name
0x001C 28 string Nickname
0x0038 28 Not a string, just a coincidence.
0x0054 14
0x0064 4
0x0068 2
0x006A 1 byte Seems to denote wether or not this creature has a custom nickname/profession name? Something like that.
0x006C 28 string Custom profession name
0x0088 2 short Type ID #1 Dwarf types. 0x88 is the original dwarf type, 0x8a is the current dwarf type (I'm told Toady stores the original dwarf type for legends). The key is in the "Type ID" table, woefully incomplete.
0x008A 2 short Type ID #2
0x008C 4 long Creature race 0xA6 is the dwarf default (this may be different if the user has a mod installed)
0x0090 2
0x0092 2
0x0094 2
0x0096 2
0x0098 2
0x009A 2
0x009C 2
0x009E 2
0x00A0 4
0x00A4 2
0x00A8 4
0x00AC 2 short X coordinate
0x00AE 2 short Y coordinate
0x00B0 2 short Z coordinate
0x00B2 2
0x00B4 16 vector of shorts
0x00C4 16 vector of shorts
0x00D4 16 vector of shorts
0x00E4 4 ulong Flags (1 << 1) Unclear. It is set on dead things. Also, when a merchant caravan arrives, merchants and guards are added to the entity list slightly before they are added to the "u" list - during this period, this bit is set.
0x00E8 4 ulong Flags (1 << 7) Appears to be whether or not the creature is dead.

(1 << 17) if creature is ready for slaughter

0x00EC 1
0x00EE 2
0x00F0 2
0x00F2 1
0x00F4 4 long Creature ID When a new creature is added to the creature vector at 0x01416A38, it is assigned the value of the next creature ID and the next creature ID value is then increased by 1. This value most likely does NOT persist between loading games (eg, saving then loading your game and creatures will have different IDs).
0x00F8 2
0x00FC 4
0x0100 4
0x0104 16 vector of shorts
0x0114 16 vector of shorts
0x0124 16 vector of shorts
0x0134 4
0x0138 16 vector of ...something...
0x01C4 1
0x01C5 1
0x01C8 4
0x01CC 4
0x01D0 4
0x01D4 2
0x01D6 2
0x01D8 2
0x01DC 4
0x01E0 2 + 2 + 2 + 4 + 4 Unknown structure.
0x01F0 4
0x01F4 4
0x01F8 2 short Strange mood 0xFFFF means no mood
0x01FA 2
0x01FC 4
0x0200 4
0x0204 4
0x0208 4
0x0210 36
0x0234 2
0x0236 2
0x0288 16 vector of longs
0x0298 4
0x029C 4
0x02A8 2
0x02AA 2
0x02AC 2
0x02AE 2
0x02B0 2
0x02B8 16 vector of shorts
0x02C8 16 vector of shorts
0x02D8 16 vector of shorts
0x02E8 16 vector of shorts
0x02F8 2
0x02FC 4
0x0300 4
0x0304 16 vector of shorts Bodypart Health A list to body part health, the list of ushorts, values range 0 to 15 from what i've seen. 15 being white, 0 being red.
0x0314 16 vector of longs
0x0328 2
0x032C 4
0x0330 4
0x0334 4
0x0338 4
0x033C 4
0x0340 4
0x0344 4
0x0348 4
0x034C 2
0x034E 2
0x0350 2
0x0352 2
0x0354 2
0x0356 2
0x0358 2
0x035A 2
0x035C 12
0x0368 2
0x036A 2
0x036C 4
0x0370 4
0x0374 4
0x0378 4
0x037C 4
0x0380 4
0x03A4 4
0x03A8 4
0x03AC 1
0x041C 4 Strength
Value Name
0 Nothing
1 Strong
2 Very Strong
3 Extremely Strong
4 Mighty
5 Ultra-Mighty
0x0420 4 Agility
Value Name
0 Nothing
1 Agile
2 Very Agile
3 Extremely Agile
4 Unbelievably Agile
5 Perfectly Agile
0x0424 4 Toughness
Value Name
0 Nothing
1 Tough
2 Very Tough
3 Extremely Tough
4 Unbelievably Tough
5 Superdwarvenly Tough
0x042C 4 Skill Start Ptr Start of skill list
0x0430 4 Skill End Ptr End of skill list
0x0438 16 vector of pointer to like struct Likes
0x0448 16 vector of pointer to 448 struct
0x0458 102 bytes Labor preferences 102 1 byte values, corresponding to the profession list. Mostly bools, with notable exceptions of shieldtype,armortype, and weaponnum. "Weaponnum" may be the number of weapons wielded (i.e. 2 for a dual-wielding character.)
0x04C0 4
0x04C4 16 vector of pointer to 4C4 struct
0x04D4 16 vector of longs
0x04E4 16 vector of pointer to 4E4 struct
0x04F4 16 vector of pointer to 4F4 struct
0x0504 4 Happiness level 0 = miserable, >149 = ecstatic
0x0508 2
0x050C 16 vector of pointer to 50C struct
0x051C 16 vector of pointer to 51C struct
0x052C 16 vector of pointer to 52C struct
0x053C 16 vector of pointer to 53C struct
0x054C 2
0x0550 4
0x0554 4
0x0558 4
0x055C 16 vector of longs
0x056C 16 vector of longs
0x057C 16 vector of longs
0x058C 4
0x0590 2
0x0592 2
0x0594 2
0x0596 2
0x0598 2
0x059A 2
0x059C 4
0x05A0 16 vector of pointer to 5A0 struct
0x05B0 4
0x05B4 60
0x05F0 4
0x05F4 1

Like Structure

Offset Size Type Name Notes
0x0000 2 short
0x0002 2 short
0x0004 2 short
0x0006 2 short
0x0008 2 short
0x000A 1 byte
0x000C 4 long

448 Structure

Offset Size Type Name Notes
0x0000 2 short
0x0002 2 short
0x0004 2 short
0x0006 2 short
0x0008 2 short
0x000A 2 short
0x000C 4 long
0x0010 4 long

4C4 Structure

Offset Size Type Name Notes
0x0000 4 long
0x0004 4 long
0x0008 4 long
0x000C 4 long
0x0010 4 long
0x0014 4 long
0x0018 4 long
0x001C 2 short
0x0020 1 byte

4E4 Structure

Offset Size Type Name Notes
0x0000 2 short
0x0004 4 long
0x0008 2 short
0x000C 4 long

4F4 Structure

Offset Size Type Name Notes
0x0000 2 short
0x0004 4 long
0x0008 2 short
0x000C 4 long

50C Structure

Offset Size Type Name Notes
0x0000 2 short
0x0002 2 short
0x0004 4 long

51C Structure

Offset Size Type Name Notes
0x0000 2 short
0x0002 2 short
0x0004 2 short

52C Structure

Offset Size Type Name Notes
0x0000 4 long
0x0004 4 long
0x0008 4 long
0x000C 4 long

53C Structure

Offset Size Type Name Notes
0x0000 4 long
0x0004 4 long

5A0 Structure

Offset Size Type Name Notes
0x0000 2 short
0x0002 2 short