Merge export-dt-ini changes from splintermind/Dwarf-Therapist

develop
lethosor 2015-12-28 15:46:42 -05:00
parent 2ef24a3daf
commit 39086acf64
2 changed files with 63 additions and 33 deletions

@ -1 +1 @@
Subproject commit c8f486bf79ee456ef7a9ed5ed938263fd3703466 Subproject commit 1017578b0e32257aefa39bcc2444b8830100ff74

@ -1,10 +1,8 @@
-- Exports an ini file for Dwarf Therapist. -- Exports an ini file for Dwarf Therapist.
--[[=begin --[[=begin
devel/export-dt-ini devel/export-dt-ini
=================== ===================
Exports an ini file containing memory addresses for Dwarf Therapist. Exports an ini file containing memory addresses for Dwarf Therapist.
=end]] =end]]
local utils = require 'utils' local utils = require 'utils'
@ -66,22 +64,39 @@ end
-- List of actual values -- List of actual values
header('addresses') header('addresses')
address('translation_vector',globals,'world','raws','language','translations')
address('language_vector',globals,'world','raws','language','words')
address('creature_vector',globals,'world','units','all')
address('active_creature_vector',globals,'world','units','active')
address('dwarf_race_index',globals,'ui','race_id')
address('squad_vector',globals,'world','squads','all')
address('current_year',globals,'cur_year')
address('cur_year_tick',globals,'cur_year_tick') address('cur_year_tick',globals,'cur_year_tick')
address('current_year',globals,'cur_year')
address('dwarf_civ_index',globals,'ui','civ_id') address('dwarf_civ_index',globals,'ui','civ_id')
address('races_vector',globals,'world','raws','creatures','all') address('dwarf_race_index',globals,'ui','race_id')
address('reactions_vector',globals,'world','raws','reactions')
address('events_vector',globals,'world','history','events')
address('historical_figures_vector',globals,'world','history','figures')
address('fake_identities_vector',globals,'world','identities','all')
address('fortress_entity',globals,'ui','main','fortress_entity') address('fortress_entity',globals,'ui','main','fortress_entity')
address('historical_entities_vector',globals,'world','entities','all') address('historical_entities_vector',globals,'world','entities','all')
address('creature_vector',globals,'world','units','all')
address('active_creature_vector',globals,'world','units','active')
address('weapons_vector',globals,'world','items','other','WEAPON')
address('shields_vector',globals,'world','items','other', 'SHIELD')
address('quivers_vector',globals,'world','items','other', 'QUIVER')
address('crutches_vector',globals,'world','items','other', 'CRUTCH')
address('backpacks_vector',globals,'world','items','other', 'BACKPACK')
address('ammo_vector',globals,'world','items','other', 'AMMO')
address('flasks_vector',globals,'world','items','other', 'FLASK')
address('pants_vector',globals,'world','items','other', 'PANTS')
address('armor_vector',globals,'world','items','other', 'ARMOR')
address('shoes_vector',globals,'world','items','other', 'SHOES')
address('helms_vector',globals,'world','items','other', 'HELM')
address('gloves_vector',globals,'world','items','other', 'GLOVES')
address('artifacts_vector',globals,'world','artifacts','all')
address('squad_vector',globals,'world','squads','all')
address('activities_vector',globals,'world','activities','all')
address('fake_identities_vector',globals,'world','identities','all')
address('poetic_forms_vector',globals,'world','poetic_forms','all')
address('musical_forms_vector',globals,'world','musical_forms','all')
address('dance_forms_vector',globals,'world','dance_forms','all')
address('occupations_vector',globals,'world','occupations','all')
address('world_data',globals,'world','world_data')
address('material_templates_vector',globals,'world','raws','material_templates')
address('inorganics_vector',globals,'world','raws','inorganics')
address('plants_vector',globals,'world','raws','plants','all')
address('races_vector',globals,'world','raws','creatures','all')
address('itemdef_weapons_vector',globals,'world','raws','itemdefs','weapons') address('itemdef_weapons_vector',globals,'world','raws','itemdefs','weapons')
address('itemdef_trap_vector',globals,'world','raws','itemdefs','trapcomps') address('itemdef_trap_vector',globals,'world','raws','itemdefs','trapcomps')
address('itemdef_toy_vector',globals,'world','raws','itemdefs','toys') address('itemdef_toy_vector',globals,'world','raws','itemdefs','toys')
@ -96,29 +111,17 @@ address('itemdef_shield_vector',globals,'world','raws','itemdefs','shields')
address('itemdef_helm_vector',globals,'world','raws','itemdefs','helms') address('itemdef_helm_vector',globals,'world','raws','itemdefs','helms')
address('itemdef_pant_vector',globals,'world','raws','itemdefs','pants') address('itemdef_pant_vector',globals,'world','raws','itemdefs','pants')
address('itemdef_food_vector',globals,'world','raws','itemdefs','food') address('itemdef_food_vector',globals,'world','raws','itemdefs','food')
address('language_vector',globals,'world','raws','language','words')
address('translation_vector',globals,'world','raws','language','translations')
address('colors_vector',globals,'world','raws','language','colors') address('colors_vector',globals,'world','raws','language','colors')
address('shapes_vector',globals,'world','raws','language','shapes') address('shapes_vector',globals,'world','raws','language','shapes')
address('reactions_vector',globals,'world','raws','reactions')
address('base_materials',globals,'world','raws','mat_table','builtin') address('base_materials',globals,'world','raws','mat_table','builtin')
address('inorganics_vector',globals,'world','raws','inorganics')
address('plants_vector',globals,'world','raws','plants','all')
address('material_templates_vector',globals,'world','raws','material_templates')
address('all_syndromes_vector',globals,'world','raws','syndromes','all') address('all_syndromes_vector',globals,'world','raws','syndromes','all')
address('world_data',globals,'world','world_data') address('events_vector',globals,'world','history','events')
address('active_sites_vector',df.world_data,'active_site') address('historical_figures_vector',globals,'world','history','figures')
address('world_site_type',df.world_site,'type') address('world_site_type',df.world_site,'type')
address('weapons_vector',globals,'world','items','other','WEAPON') address('active_sites_vector',df.world_data,'active_site')
address('shields_vector',globals,'world','items','other', 'SHIELD')
address('quivers_vector',globals,'world','items','other', 'QUIVER')
address('crutches_vector',globals,'world','items','other', 'CRUTCH')
address('backpacks_vector',globals,'world','items','other', 'BACKPACK')
address('ammo_vector',globals,'world','items','other', 'AMMO')
address('flasks_vector',globals,'world','items','other', 'FLASK')
address('pants_vector',globals,'world','items','other', 'PANTS')
address('armor_vector',globals,'world','items','other', 'ARMOR')
address('shoes_vector',globals,'world','items','other', 'SHOES')
address('helms_vector',globals,'world','items','other', 'HELM')
address('gloves_vector',globals,'world','items','other', 'GLOVES')
address('artifacts_vector',globals,'world','artifacts','all')
header('offsets') header('offsets')
address('word_table',df.language_translation,'words') address('word_table',df.language_translation,'words')
@ -220,6 +223,7 @@ address('stack_size',df.item_actual,'stack_size')
address('wear',df.item_actual,'wear') address('wear',df.item_actual,'wear')
address('mat_type',df.item_crafted,'mat_type') address('mat_type',df.item_crafted,'mat_type')
address('mat_index',df.item_crafted,'mat_index') address('mat_index',df.item_crafted,'mat_index')
address('maker_race',df.item_crafted,'maker_race')
address('quality',df.item_crafted,'quality') address('quality',df.item_crafted,'quality')
header('item_subtype_offsets') header('item_subtype_offsets')
@ -400,9 +404,20 @@ address('id',df.squad,'id')
address('name',df.squad,'name') address('name',df.squad,'name')
address('alias',df.squad,'alias') address('alias',df.squad,'alias')
address('members',df.squad,'positions') address('members',df.squad,'positions')
address('orders',df.squad,'orders')
address('schedules',df.squad,'schedule')
if os_type ~= 'windows' then --squad_schedule_entry size
value('sched_size',0x20)
else
value('sched_size',0x40)
end
address('sched_orders',df.squad_schedule_entry,'orders')
address('sched_assign',df.squad_schedule_entry,'order_assignments')
address('alert',df.squad,'cur_alert_idx')
address('carry_food',df.squad,'carry_food') address('carry_food',df.squad,'carry_food')
address('carry_water',df.squad,'carry_water') address('carry_water',df.squad,'carry_water')
address('ammunition',df.squad,'ammunition') address('ammunition',df.squad,'ammunition')
address('ammunition_qty',df.squad_ammo_spec,'amount')
address('quiver',df.squad_position,'quiver') address('quiver',df.squad_position,'quiver')
address('backpack',df.squad_position,'backpack') address('backpack',df.squad_position,'backpack')
address('flask',df.squad_position,'flask') address('flask',df.squad_position,'flask')
@ -416,6 +431,21 @@ address('weapon_vector',df.squad_position,'uniform','weapon')
address('uniform_item_filter',df.squad_uniform_spec,'item_filter') address('uniform_item_filter',df.squad_uniform_spec,'item_filter')
address('uniform_indiv_choice',df.squad_uniform_spec,'indiv_choice') address('uniform_indiv_choice',df.squad_uniform_spec,'indiv_choice')
header('activity_offsets')
address('activity_type',df.activity_entry,'id')
address('events',df.activity_entry,'events')
address('participants',df.activity_event_combat_trainingst,'participants')
address('sq_lead',df.activity_event_skill_demonstrationst,'hist_figure_id')
address('sq_skill',df.activity_event_skill_demonstrationst,'skill')
address('sq_train_rounds',df.activity_event_skill_demonstrationst,'train_rounds')
address('pray_deity',df.activity_event_prayerst,'histfig_id')
address('pray_sphere',df.activity_event_prayerst,'topic')
address('knowledge_category',df.activity_event_ponder_topicst,'knowledge_category')
address('knowledge_flag',df.activity_event_ponder_topicst,'knowledge_flag')
address('perf_type',df.activity_event_performancest,'type')
address('perf_participants',df.activity_event_performancest,'activity_event_performancest::anon2')
address('perf_histfig',df.activity_event_performancest::anon2,'histfig_id')
-- Final creation of the file -- Final creation of the file
local out = io.open('therapist.ini', 'w') local out = io.open('therapist.ini', 'w')