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.

Editing User:Rick/Memory research

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
__TOC__
 
__TOC__
=Other memory research resources=
+
=v0.27.169.32a=
* [[Memory hacking|Main memory hacking research]]
 
* [[User:AzureLightning/Memory research|AzureLightning's memory research]]
 
* [[User:Iluxan/Memory research|Iluxan's memory research]]
 
 
 
=v0.27.169.33a=
 
 
==Useful Offsets==
 
==Useful Offsets==
 
{| border="1" cellpadding="2" width="100%"
 
{| border="1" cellpadding="2" width="100%"
Line 15: Line 10:
  
 
|-
 
|-
| Mineral types vector
+
| Min Save Version
|  
+
| 4
| [[Memory hacking#Vector|vector]]
+
| long
|  
+
| Minimum save version that can be loaded.
| <code>0x01459EF8</code>
+
| <code>00C35188</code>
  
 
|-
 
|-
| Item vector
+
| Max Save Version
|  
+
| 4
| [[Memory hacking#Vector|vector]]
+
| long
| Also used during embarking.
+
| Maximum save version that can be loaded.
| <code>0x01416AD8</code>
+
| <code>00C06084</code>
  
 
|-
 
|-
| Next item id
+
| Map X Count
 
| 4
 
| 4
 
| long
 
| long
| When a new item is added to the item vector, it is assigned this value. This value is then increased by 1.
+
| This represents the number of X ''blocks'', not total X tiles.
| <code>0x00BDDCB4</code>
+
| <code>01457538</code>
 
 
|}
 
 
 
==Classes==
 
===Item===
 
{| border="1" cellpadding="2" width="100%"
 
! width="15%" | Name
 
! width="15%" | Parent
 
! width="50%" | Notes
 
! width="10%" | Object Size
 
! width="10%" | VTable Offset
 
  
 
|-
 
|-
| Item
+
| Map Y Count
|  
+
| 4
|  
+
| long
|  
+
| This represents the number of Y ''blocks'', not total Y tiles.
| <code>0x008AD7B4</code>
+
| <code>0145753C</code>
  
 
|-
 
|-
| <code>0x00888D74</code>
+
| Map Z Count
| Item
+
| 4
 +
| long
 
|  
 
|  
|
+
| <code>01457540</code>
| <code>0x00888D74</code>
 
  
 
|-
 
|-
| <code>0x00892464</code>
+
| Map Data
| <code>0x00888D74</code>
+
| 4
 +
| pointer
 
|  
 
|  
|
+
| <code>01457520</code>
| <code>0x00892464</code>
 
  
 
|-
 
|-
| Weapon
+
| View X
| <code>0x00892464</code>
+
| 4
|  
+
| long
| <code>0x7C</code>
+
| Set to 0xFFFF8AD0 (-30000) when not in a 'Look Around' mode.
| <code>0x00894F0C</code>
+
| <code>008F4288</code>
  
 
|-
 
|-
| Ammo
+
| View Y
| <code>0x00892464</code>
+
| 4
 +
| long
 
|  
 
|  
| <code>0x7C</code>
+
| <code>008F428C</code>
| <code>0x008962BC</code>
 
  
 
|-
 
|-
| Anvil
+
| View Z
| <code>0x00892464</code>
+
| 4
 +
| long
 
|  
 
|  
| <code>0x78</code>
+
| <code>008F4290</code>
| <code>0x008B5814</code>
 
  
 
|-
 
|-
| Seed
+
| Screen X
| <code>0x00888D74</code>
+
| 4
|  
+
| long
| <code>0x64</code>
 
| <code>0x0089CA0C</code>
 
 
 
|-
 
| Bag
 
| <code>0x00892464</code>
 
|
 
| <code>0x78</code>
 
| <code>0x00895FEC</code>
 
 
 
|-
 
| Leather
 
| <code>0x00888D74</code>
 
|
 
| <code>0x60</code>
 
| <code>0x008AFE0C</code>
 
 
 
|-
 
| Cloth
 
| <code>0x00892464</code>
 
|
 
| <code>0x78</code>
 
| <code>0x008B0EF4</code>
 
 
 
|-
 
| Thread
 
| Item
 
|
 
| <code>0x6C</code>
 
| <code>0x0089D54C</code>
 
 
 
|-
 
| Rope
 
| <code>0x00892464</code>
 
|
 
| <code>0x78</code>
 
| <code>0x00897C3C</code>
 
 
 
|-
 
| Hat
 
| <code>0x00892464</code>
 
|
 
| <code>0x7C</code>
 
| <code>0x00895A4C</code>
 
 
 
|-
 
| Shirt
 
| <code>0x00892464</code>
 
|
 
| <code>0x7C</code>
 
| <code>0x008951DC</code>
 
 
 
|-
 
| Pants
 
| <code>0x00892464</code>
 
|
 
| <code>0x7C</code>
 
| <code>0x0089658C</code>
 
 
 
|-
 
| Gloves
 
| <code>0x00892464</code>
 
|
 
| <code>0x84?</code>
 
| <code>0x00895D1C</code>
 
 
 
|-
 
| Shoes
 
| <code>0x00892464</code>
 
|
 
| <code>0x7C</code>
 
| <code>0x008954AC</code>
 
 
 
|-
 
| Shield
 
| <code>0x00892464</code>
 
|
 
| <code>0x7C</code>
 
| <code>0x0089577C</code>
 
 
 
|-
 
| Amulet
 
| <code>0x00892464</code>
 
|
 
| <code>0x78</code>
 
| <code>0x008B4464</code>
 
 
 
|-
 
| Bracelet
 
| <code>0x00892464</code>
 
|
 
| <code>0x78</code>
 
| <code>0x008B5274</code>
 
 
 
|-
 
| Earring
 
| <code>0x00892464</code>
 
|
 
| <code>0x78</code>
 
| <code>0x008B4FA4</code>
 
 
 
|-
 
| Scepter
 
| <code>0x00892464</code>
 
|
 
| <code>0x78</code>
 
| <code>0x008B4734</code>
 
 
 
|-
 
| Crown
 
| <code>0x00892464</code>
 
|
 
| <code>0x78</code>
 
| <code>0x008B4A04</code>
 
 
 
|-
 
| Idol
 
| <code>0x00892464</code>
 
|
 
| <code>0x78</code>
 
| <code>0x008B4194</code>
 
 
 
|-
 
| Ring
 
| <code>0x00892464</code>
 
|
 
| <code>0x78</code>
 
| <code>0x008B4CD4</code>
 
 
 
|-
 
| Barrel
 
| <code>0x00892464</code>
 
|
 
| <code>0x80</code>
 
| <code>0x0089496C</code>
 
 
 
|-
 
| Log
 
| <code>0x00888D74</code>
 
|
 
| <code>0x5C</code>
 
| <code>0x008AED2C</code>
 
 
 
|-
 
| Lye
 
| <code>0x00888D74</code>
 
|
 
| <code>0x60</code>
 
| <code>0x00889044</code>
 
 
 
|-
 
| Charcoal
 
| <code>0x00888D74</code>
 
 
|  
 
|  
| <code>0x60</code>
+
| <code>00BF2480</code>
| <code>0x008ADC4C</code>
 
  
 
|-
 
|-
| Char
+
| Screen Y
| <code>0x00888D74</code>
 
|
 
| <code>0x60</code>
 
| <code>0x00893B5C</code>
 
 
 
|-
 
| Cage
 
| <code>0x00892464</code>
 
|
 
| <code>0x78</code>
 
| <code>0x00897F0C</code>
 
 
 
|}
 
 
 
===Block Event===
 
{| border="1" cellpadding="2" width="100%"
 
! width="15%" | Name
 
! width="15%" | Parent
 
! width="50%" | Notes
 
! width="10%" | Object Size
 
! width="10%" | VTable Offset
 
 
 
|-
 
| <code>Mineral Event</code>
 
|
 
| See [[#Mineral Event|structure information]].
 
| <code>0x2C</code>
 
| <code>0x00887ED4</code>
 
 
 
|}
 
 
 
=Structures=
 
==Classes==
 
===Item===
 
{| border="1" cellpadding="2" width="100%"
 
! width="5%" | Offset
 
! width="10%" | Size
 
! width="10%" | Type
 
! width="20%" | Name
 
! width="55%" | Notes
 
 
 
|-
 
| <code>0x00</code>
 
 
| 4
 
| 4
| pointer
+
| long
| VTable
 
|
 
 
 
|-
 
| <code>0x04</code>
 
| 2
 
| short
 
| X
 
 
 
|-
 
| <code>0x06</code>
 
| 2
 
| short
 
| Y
 
 
 
|-
 
| <code>0x08</code>
 
| 2
 
| short
 
| Z
 
 
 
|-
 
| <code>0x0C</code>
 
| 4
 
| ulong
 
| Flags
 
 
|  
 
|  
{| border="1" cellpadding="2" width="100%"
+
| <code>00C1ACBC</code>
! width="30%" colspan="2" | Flag
 
! width="70%" | Description
 
 
 
|-
 
| width="15%" | 0x1
 
| width="15%" | 1 << 0
 
| Lying on the ground
 
 
 
|-
 
| 0x2
 
| 1 << 1
 
| Used in job (?) (seen on beds in use, items marked for melting and one corpse piece that was carried away already)
 
 
 
|-
 
| 0x4
 
| 1 << 2
 
| ?
 
 
 
|-
 
| 0x8
 
| 1 << 3
 
| In inventory (bin, creature)
 
 
 
|-
 
| 0x10
 
| 1 << 4
 
| Only seems to occur when not on ground
 
 
 
|-
 
| 0x20
 
| 1 << 5
 
| In inventory (workshop)
 
 
 
|-
 
| 0x40
 
| 1 << 6
 
| Only seems to occur when not on ground
 
 
 
|-
 
| 0x80
 
| 1 << 7
 
| Only seems to occur when not on ground
 
 
 
|-
 
| 0x100
 
| 1 << 8
 
| Rotten
 
 
 
|-
 
| 0x200
 
| 1 << 9
 
| ?
 
 
 
|-
 
| 0x400
 
| 1 << 10
 
| Only seems to occur when not on ground
 
 
 
|-
 
| 0x800
 
| 1 << 11
 
| ?
 
 
 
|-
 
| 0x1000
 
| 1 << 12
 
| Only seems to occur when not on ground
 
 
 
|-
 
| 0x2000
 
| 1 << 13
 
| ?
 
 
 
|-
 
| 0x4000
 
| 1 << 14
 
| Narrow
 
 
 
|-
 
| 0x8000
 
| 1 << 15
 
| Not produced on-site, does not count towards wealth
 
 
 
|-
 
| 0x10000
 
| 1 << 16
 
| Item shows wear
 
 
 
|-
 
| 0x20000
 
| 1 << 17
 
| ?
 
  
 
|-
 
|-
| 0x40000
+
| Screen Z
| 1 << 18
 
| Only seems to occur when not on ground
 
 
 
|-
 
| 0x80000
 
| 1 << 19
 
| Forbid
 
 
 
|-
 
| 0x100000
 
| 1 << 20
 
| ?
 
 
 
|-
 
| 0x200000
 
| 1 << 21
 
| Dump
 
 
 
|-
 
| 0x400000
 
| 1 << 22
 
| On fire
 
 
 
|-
 
| 0x800000
 
| 1 << 23
 
| Melt
 
 
 
|-
 
| 0x1000000
 
| 1 << 24
 
| Hidden
 
 
 
|-
 
| 0x2000000
 
| 1 << 25
 
| Only seems to occur when not on ground
 
 
 
|}
 
 
 
|-
 
| <code>0x14</code>
 
 
| 4
 
| 4
 
| long
 
| long
| Item ID
+
|  
 +
| <code>00C1AC98</code>
  
 
|}
 
|}
  
==Map==
+
==Map Block==
===Tile Block===
 
 
{| border="1" cellpadding="2" width="100%"
 
{| border="1" cellpadding="2" width="100%"
 
! width="5%" | Offset
 
! width="5%" | Offset
Line 477: Line 104:
  
 
|-
 
|-
| <code>0x0000</code>
+
| <code>0000h</code>
 
| 4
 
| 4
 
| pointer
 
| pointer
|  
+
| Unknown
|  
+
|
  
 
|-
 
|-
| <code>0x0008</code>
+
| <code>005Eh</code>
|
 
| [[Memory hacking#Vector|vector]]
 
| Events
 
|
 
 
 
|-
 
| <code>0x0054</code>
 
| 2
 
| short
 
| Map X
 
| In tiles, not blocks.
 
 
 
|-
 
| <code>0x0056</code>
 
| 2
 
| short
 
| Map Y
 
| In tiles, not blocks.
 
 
 
|-
 
| <code>0x0058</code>
 
| 2
 
| short
 
| Map Z?
 
| In tiles, not blocks.
 
 
 
|-
 
| <code>0x005A</code>
 
| 2
 
| short
 
| Region X
 
| This doesn't account for the selected area in the local area it seems.
 
 
 
|-
 
| <code>0x005C</code>
 
| 2
 
| short
 
| Region Y
 
| This doesn't account for the selected area in the local area it seems.
 
 
 
|-
 
| <code>0x005E</code>
 
 
| 2 * 16 * 16
 
| 2 * 16 * 16
 
| list of shorts
 
| list of shorts
| Type
+
| Unknown
| [[User:Mithaldu/Tile_types_in_DF_memory|tile types (work in progress)]]
+
|  
  
 
|-
 
|-
| <code>0x0260</code>
+
| <code>0260h</code>
 
| 4 * 16 * 16
 
| 4 * 16 * 16
 
| list of longs
 
| list of longs
 
| Designation
 
| Designation
| [[User:Mithaldu/Designation flags in DF memory|designation flags (work in progress)]]
+
|  
 
{| border="1" cellpadding="2" width="100%"
 
{| border="1" cellpadding="2" width="100%"
 
! width="30%" colspan="2" | Flag
 
! width="30%" colspan="2" | Flag
Line 543: Line 128:
  
 
|-
 
|-
| width="30%" colspan="2" | <code>0x7</code>
+
| width="15%" | 200h
| Flow size (not a flag)
 
 
 
|-
 
| width="15%" | <code>0x200</code>
 
 
| width="15%" | 1 << 9
 
| width="15%" | 1 << 9
 
| Hidden
 
| Hidden
  
 
|-
 
|-
| colspan="2" | <code>0x3C00</code>
+
| 400000h
| Soil / Rock Layer ID (not a flag)
 
 
 
|-
 
| <code>0x4000</code>
 
| 1 << 14
 
| Light (Dark when unset)
 
 
 
|-
 
| <code>0x8000</code>
 
| 1 << 15
 
| Subterranean (Above Ground when unset)
 
 
 
|-
 
| <code>0x10000</code>
 
| 1 << 16
 
| Outside (Inside when unset)
 
 
 
|-
 
| colspan="2" | <code>0x1E0000</code>
 
| Unknown ID (not a flag)
 
 
 
|-
 
| <code>0x400000</code>
 
 
| 1 << 22
 
| 1 << 22
 
| Damp?
 
| Damp?
  
 
|-
 
|-
| <code>0x10000000</code>
+
| 10000000h
 
| 1 << 28
 
| 1 << 28
 
| Mossy
 
| Mossy
Line 587: Line 145:
  
 
|-
 
|-
| <code>0x0660</code>
+
| <code>0660h</code>
 
| 4 * 16 * 16
 
| 4 * 16 * 16
 
| list of longs
 
| list of longs
| Occupancy
+
| Unknown
 
|  
 
|  
 +
Is probably flags?
 
{| border="1" cellpadding="2" width="100%"
 
{| border="1" cellpadding="2" width="100%"
 
! width="30%" colspan="2" | Flag
 
! width="30%" colspan="2" | Flag
Line 597: Line 156:
  
 
|-
 
|-
| width="15%" | <code>0x40</code>
+
| width="15%" | 40h
 
| width="15%" | 1 << 6
 
| width="15%" | 1 << 6
 
| Muddy
 
| Muddy
  
 
|-
 
|-
| <code>0x80000000</code>
+
| 80000000h
 
| 1 << 31
 
| 1 << 31
 
| Snow-covered
 
| Snow-covered
Line 609: Line 168:
  
 
|-
 
|-
| <code>0x0A60</code>
+
| <code>0A60h</code>
 
| 1 * 16 * 16
 
| 1 * 16 * 16
 
| list of bytes
 
| list of bytes
|  
+
| Unknown
 
|  
 
|  
  
 
|-
 
|-
| <code>0x0B60</code>
+
| <code>0B60h</code>
 
| 4 * 16 * 16
 
| 4 * 16 * 16
 
| list of longs
 
| list of longs
Line 623: Line 182:
  
 
|-
 
|-
| <code>0x1160</code>
+
| <code>1160h</code>
 
| 2 * 16 * 16
 
| 2 * 16 * 16
 
| list of shorts
 
| list of shorts
|  
+
| Unknown
 
|  
 
|  
  
 
|-
 
|-
| <code>0x1360</code>
+
| <code>1360h</code>
 
| 2 * 16 * 16
 
| 2 * 16 * 16
 
| list of shorts
 
| list of shorts
|  
+
| Unknown
 
|  
 
|  
  
 
|-
 
|-
| <code>0x1560</code>
+
| <code>1560h</code>
 
| 2 * 16 * 16
 
| 2 * 16 * 16
 
| list of shorts
 
| list of shorts
Line 644: Line 203:
  
 
|-
 
|-
| <code>0x1760</code>
+
| <code>1760h</code>
 
| 2 * 16 * 16
 
| 2 * 16 * 16
 
| list of shorts
 
| list of shorts
Line 651: Line 210:
  
 
|-
 
|-
| <code>0x1960</code>
+
| <code>1960h</code>
 
| 2 * 16 * 16
 
| 2 * 16 * 16
 
| list of shorts
 
| list of shorts
|  
+
| Unknown
 
|  
 
|  
  
 
|-
 
|-
| <code>0x1B60</code>
+
| <code>1B60h</code>
 
| 2 * 16 * 16
 
| 2 * 16 * 16
 
| list of shorts
 
| list of shorts
|  
+
| Unknown
|
 
 
 
|-
 
| <code>0x1D60</code>
 
| 9 bytes
 
|
 
|
 
 
|  
 
|  
  
 
|}
 
|}
 
===Mineral Event===
 
''0x2C bytes.''
 
{| border="1" cellpadding="2" width="100%"
 
! width="5%" | Offset
 
! width="10%" | Size
 
! width="10%" | Type
 
! width="20%" | Name
 
! width="55%" | Notes
 
 
|-
 
| <code>0x00</code>
 
| 4
 
| pointer
 
| VTable
 
|
 
 
|-
 
| <code>0x04</code>
 
| 2
 
| short
 
| Type
 
| Includes gems, ore.
 
 
|-
 
| <code>0x06</code>
 
| 4
 
| ulong
 
| Tile Bitmask #1
 
| 0,0 to 15,1
 
 
|-
 
| <code>0x0A</code>
 
| 4
 
| ulong
 
| Tile Bitmask #2
 
| 0,2 to 15,3
 
 
|-
 
| <code>0x0E</code>
 
| 4
 
| ulong
 
| Tile Bitmask #3
 
| 0,4 to 15,5
 
|-
 
| <code>0x12</code>
 
| 4
 
| ulong
 
| Tile Bitmask #4
 
| 0,6 to 15,7
 
 
|-
 
| <code>0x16</code>
 
| 4
 
| ulong
 
| Tile Bitmask #5
 
| 0,8 to 15,9
 
 
|-
 
| <code>0x1A</code>
 
| 4
 
| ulong
 
| Tile Bitmask #6
 
| 0,10 to 15,11
 
 
|-
 
| <code>0x1E</code>
 
| 4
 
| ulong
 
| Tile Bitmask #7
 
| 0,12 to 15,13
 
 
|-
 
| <code>0x22</code>
 
| 4
 
| ulong
 
| Tile Bitmask #8
 
| 0,14 to 15,15
 
 
|-
 
| <code>0x28</code>
 
| 4
 
| ulong
 
| Flags
 
|
 
{| border="1" cellpadding="2" width="100%"
 
! width="30%" colspan="2" | Flag
 
! width="70%" | Description
 
 
|-
 
| width="15%" | 0x1
 
| width="15%" | 1 << 0
 
| Discovered
 
 
|}
 
 
|}
 
 
[[Category:Hacking|Memory research]]
 

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)