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.

40d:Memory hacking/v0.28.181.40d17

From Dwarf Fortress Wiki
Jump to navigation Jump to search

Addresses[edit]

Windows[edit]

I included the search string I used in IDA to get the offsets in d16 and d17, hopefully some of these will remain constant across more versions, if not at least you have a starting point :)

buildings			None Yet							0x015F3260
constructions			8B 0D ? ? ? ? 8B 04 B1 0F B7 54 24 20 66 01 10  		0x015DEEC8
creatures			83 E4 F8 8B 0D ? ? ? ? A1 ? ? ? ? 53				0x015F28B4
current_cursor_creature 	2B 0D ? ? ? ? C6 44 24 20 00 C1 F9 02				0x0178C990
cursor	 			83 3D ? ? ? ? 00 C7 05 ? ? ? ? D0 8A FF FF			0x0099AC88
hotkey_start			83 C4 04 BE ? ? ? ? BF 10 00 00 00   				0x014240DC
items	 			FF 24 8D ? ? ? ? A1 ? ? ? ? 8B 0D ? ? ? ?			0x015F29A8
language_vector			83 7D 44 FF 74 6D A1 ? ? ? ? 2B 05 ? ? ? ?			0x01638B5C
menu_state 			C7 05 ? ? ? ? 25 00						0x0099AE0C
map_data			83 3D ? ? ? ? 00 89 4C 24 28 89 5C 24 24			0x016367DC
matgloss			F7 C3 00 20 00 00 74 20 A1 ? ? ? ? 2B 05 ? ? ? ?		0x0163894C
notes 				8B 1D ? ? ? ? 2B FB C1 FF 02 83 EF 01 89 7C 24 20		0x014240A4
pause_state			C0 E8 06 24 01 0F 84 DD 06 00 00 C6 05 ? ? ? ? 01		0x01410CC1
region_x			66 2B 05 ? ? ? ? 66 6B C9 30 66 6B C0 30			0x01636814
region_y			region_x + 4							0x01636818
region_z			region_z + 4							0x0163681C
translation_vector		83 FB FF 75 51 8B 35 ? ? ? ? 2B 35 ? ? ? ? C1 FE 02 83 FE 01	0x01638B8C
vegetation			C7 44 24 58 00 00 00 00 E8 ? ? ? ? 8B 0D ? ? ? ?		0x015F9434
view_screen			51 83 3D ? ? ? ? 00 53 56					0x014243C4
window_dims			A1 ? ? ? ? 83 F8 01 BA 07 00 00 00				0x0177B8F0
world				B9 ? ? ? ? E8 ? ? ? ? 83 C0 E5 83 F8 02				0x01637E14

Concatenate the search strings on these to find the offsets, I split them to show which locations corresponded to the offsets of interest

	 			B8 D0 8A FF FF 33 D2 66 89 15 ? ? ? ? 8B 15 ? ? ? ? A3 ? ? ? ? A3 ? ? ? ? A3 ? ? ? ? A1 ? ? ? ? 
window_x			A3 ? ? ? ?  							0x00DD4FEC
window_y			89 0D ? ? ? ? 							0x00E03098
window_z			89 15 ? ? ? ? E9						0x00E03074

				88 1D ? ? ? ? 89 1D ? ? ? ? 
x_count				89 1D ? ? ? ?							0x016367FC
y_count				89 1D ? ? ? ? 							0x01636800
z_count				89 1D ? ? ? ?							0x01636804

All Addresses are 0x40000 based, this is what we use in DFHack

Linux[edit]

Positions

cursor_xyz             == 0x878c340
window_x               == 0x8947d54
window_y               == 0x8947d58
window_z               == 0x8947d5c
window_dims            == 0x91b35fc

State

pause_state            == 0x8f3d960

Map data

map_data               == 0x08FA2D3C
x_count                == 0x8FA2D50
y_count                == 0x8FA2D54
z_count                == 0x8FA2D58
world                  == 0x08FA4368
region_x               == 0x8FA2D68
region_y               == 0x8FA2D6C
region_z               == 0x8FA2D70

Matgloss

matgloss               == 0x08FA4C04 (wood vector)
       

All 0-based