Skip to content

Commit

Permalink
Investigate adventure and arena mode features.
Browse files Browse the repository at this point in the history
- Companion links in the nemesis info.
- Arena combat side in the unit structure.
- Quest list in world.
- Arena creature spawn related object in world.
  • Loading branch information
angavrilov committed Feb 25, 2012
1 parent c1ea369 commit 104f113
Show file tree
Hide file tree
Showing 11 changed files with 289 additions and 84 deletions.
3 changes: 3 additions & 0 deletions df-code.lisp
Expand Up @@ -122,3 +122,6 @@
($PANTS $defs.pants)
($FOOD $defs.food))))
$table[subtype]))

(defun name-has-substring? (name substring)
(some @$(search substring $) (describe-obj name)))
159 changes: 159 additions & 0 deletions df.advmode.xml
@@ -0,0 +1,159 @@
<data-definition>
<enum-type type-name='ui_advmode_menu' base-type='int16_t'>
<enum-item name='Default' value='0'/>
<enum-item name='Look'/>
<enum-item name='Talk'/>
<enum-item name='Inventory'/>
<enum-item name='Drop'/>

<enum-item name='ThrowItem'/>
<enum-item name='Wear'/>
<enum-item name='Remove'/>
<enum-item name='Interact'/>
<enum-item name='Put'/>

<enum-item name='Unk10'/>
<enum-item name='Eat'/>
<enum-item name='ThrowAim'/>
<enum-item name='Unk13'/>
<enum-item name='Get'/>

<enum-item name='Fire'/>
<enum-item name='CombatPrefs'/>
<enum-item name='Companions'/>
<enum-item name='Unk18'/>
<enum-item name='Unk19'/>

<enum-item name='Unk20'/>
<enum-item name='Announcements'/>
<enum-item name='Attack'/>
<enum-item name='UseBuilding'/>
<enum-item name='Travel'/>
</enum-type>

<struct-type type-name='ui_advmode'>
<enum base-type='int16_t' name='menu' type-name='ui_advmode_menu'/>

<int16_t/>
<int32_t/>
<int32_t/>
<int16_t/>
<int16_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>

<stl-vector/>
<stl-vector/>
<stl-vector/>
<stl-vector/>

<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>

<stl-vector>
<int32_t ref-target='world_site'/>
</stl-vector>
<stl-vector>
<int32_t/>
</stl-vector>
<stl-vector>
<int32_t/>
</stl-vector>

<int16_t/>
<int16_t/>
<int16_t/>
<int16_t/>
<int32_t name='player_id' ref-target='nemesis_record'/>

<stl-vector/>
<stl-vector name='talks'/>

<int32_t name="unk_e0"/>
<int8_t name="unk_e4"/>
<int32_t name="unk_e8"/>
<int32_t name="unk_ec"/>
<int32_t name="unk_f0"/>
<int32_t name="unk_f4"/>
<int32_t name="unk_f8"/>
<int16_t name="unk_fc"/>
<int32_t name="unk_100"/>
<int32_t name="unk_104"/>
<int32_t name="unk_108"/>
<int32_t name="unk_10c"/>

<stl-vector/>
<stl-vector/>
<stl-vector/>
<stl-vector name='actions'>
<pointer type-name='adventure_movement_option'/>
</stl-vector>

<int32_t/>
<int16_t/>
<int16_t/>
<int32_t/>
<int32_t/>

<compound name='companions'>
<stl-vector name='unit'>
<pointer type-name='unit'/>
</stl-vector>
<stl-bit-vector name='unit_visible'/>
<compound name='unit_position' type-name='coord_path'/>

<stl-vector name='all_histfigs' comment='includes dead'>
<int32_t ref-target='historical_figure'/>
</stl-vector>
</compound>

<stl-vector/>
<stl-vector/>

<int32_t name="unk_1e4"/>
<int32_t name="unk_1e8"/>
<int32_t name="unk_1ec"/>
<int32_t name="unk_1f0"/>
<int32_t name="unk_1f4"/>
<int32_t name="unk_1f8"/>
<int32_t name="unk_1fc"/>
<int32_t name="unk_200"/>

<stl-string/>

<int32_t name="unk_220"/>
<int32_t name="unk_224"/>
</struct-type>

<struct-type type-name='quest_list_link'>
<code-helper name='describe'>(describe-obj $.item)</code-helper>
<pointer name='item' type-name='adv_task'/>
<pointer name='prev' type-name='quest_list_link'/>
<pointer name='next' type-name='quest_list_link'/>
</struct-type>

<class-type type-name='adv_task' original-name='taskst'>
...
</class-type>

<class-type type-name='adventure_movement_option'
original-name='adventure_movement_optionst'>
...
</class-type>
</data-definition>

<!--
Local Variables:
indent-tabs-mode: nil
nxml-child-indent: 4
End:
-->
2 changes: 1 addition & 1 deletion df.jobs.xml
Expand Up @@ -57,7 +57,7 @@
</bitfield-type>

<struct-type type-name='job_list_link'>
<code-helper name='describe'>(describe-obj $.job)</code-helper>
<code-helper name='describe'>(describe-obj $.item)</code-helper>
<pointer name='item' type-name='job'/>
<pointer name='prev' type-name='job_list_link'/>
<pointer name='next' type-name='job_list_link'/>
Expand Down
7 changes: 5 additions & 2 deletions df.legends.xml
Expand Up @@ -65,8 +65,11 @@
(describe-obj $.figure)
</code-helper>

<int32_t name='unk6' comment='-1'/>
<stl-vector name='unk7' type-name='pointer' comment='empty'/>
<int32_t name='group_leader_id' ref-target='nemesis_record'/>
<stl-vector name='companions'>
<int32_t ref-target='nemesis_record'/>
</stl-vector>

<int16_t name='unk10' comment='-1'/>
<int32_t name='unk11' comment='-1'/>
<int32_t name='unk12' comment='-1'/>
Expand Down
57 changes: 0 additions & 57 deletions df.ui.xml
Expand Up @@ -492,63 +492,6 @@

<padding size='4'/>
</struct-type>

<struct-type type-name='ui_advmode'>
<padding size='48'/>

<stl-vector/>
<stl-vector/>
<stl-vector/>
<stl-vector/>

<padding size='20'/>

<stl-vector>
<int32_t/>
</stl-vector>
<stl-vector>
<int32_t/>
</stl-vector>
<stl-vector>
<int32_t/>
</stl-vector>

<int16_t/>
<int16_t/>
<int16_t/>
<int16_t/>
<int32_t name='player_id' ref-target='nemesis_record'/>

<stl-vector/>
<stl-vector name='talks'/>

<padding size='48'/>

<stl-vector/>
<stl-vector/>
<stl-vector/>
<stl-vector name='actions'/>

<padding size='16'/>

<compound name='companions'>
<stl-vector name='unit'>
<pointer type-name='unit'/>
</stl-vector>
<stl-bit-vector name='unit_visible'/>
<compound name='unit_position' type-name='coord_path'/>

<stl-vector name='all_histfigs' comment='includes dead'>
<int32_t ref-target='historical_figure'/>
</stl-vector>
</compound>

<stl-vector/>
<stl-vector/>
<padding size='32'/>
<stl-string/>
<padding size='8'/>
</struct-type>
</data-definition>

<!--
Expand Down
5 changes: 3 additions & 2 deletions df.units.xml
Expand Up @@ -352,7 +352,8 @@
<int32_t name='mother_id' ref-target='unit'/>
<int32_t name='father_id' ref-target='unit'/>
<int32_t name='last_attacker_id' ref-target='unit'/>
<int32_t name='enemy_group_leader_id' ref-target='unit'/>
<int32_t name='group_leader_id' ref-target='unit'
comment='used by goblins, adv mode companions etc'/>
<int32_t name='unk_254'/>
<int32_t name='unk_258'/>
<int32_t name='rider_mount_id' ref-target='unit'/>
Expand Down Expand Up @@ -715,7 +716,7 @@
<int32_t ref-target='burrow'/>
</stl-vector>

<uint32_t name='unk_93c'/>
<int32_t name='combat_side_id'/>
</struct-type>

<struct-type type-name='unit_ghost_info'>
Expand Down
41 changes: 41 additions & 0 deletions df.viewscreen.xml
Expand Up @@ -167,6 +167,47 @@
<bool name='want_quantity'/>
</class-type>

<class-type type-name='viewscreen_layer_arena_creaturest' inherits-from='viewscreen'>
<stl-vector name="interface_objects">
<pointer/>
</stl-vector>
<int8_t name="unk_1c"/>
<int16_t name="unk_1e"/>
<padding name="unk_20" size="8"/>
<int32_t name="cur_side"/>
<int32_t name="cur_interaction" refers-to='$global.world.arena_spawn.interactions[$]'/>
</class-type>

<class-type type-name='viewscreen_dungeonmodest' inherits-from='viewscreen'>
<int32_t name="x"/>
<int32_t name="y"/>
<int32_t name="z"/>
<int32_t name="unk_1c"/>
<int32_t name="unk_20"/>
<int8_t name="unk_24"/>
</class-type>

<class-type type-name='viewscreen_dungeon_monsterstatusst'
inherits-from='viewscreen'>
<pointer name="unit" type-name="unit"/>

<int32_t name="inventory_cursor"/>
<int32_t name="body_part_cursor"/>

<stl-vector name="body_part">
<int16_t refers-to='$$._global.unit.body.body_plan.body_parts[$]'/>
</stl-vector>

<bool name="view_skills"/>

<stl-vector name="inventory">
<pointer type-name="unit_inventory_item"/>
</stl-vector>
<stl-vector name="spatters">
<pointer type-name="unit_spatter"/>
</stl-vector>
</class-type>

<enum-type type-name='embark_finder_option'>
<enum-item name='DimensionX'/>
<enum-item name='DimensionY'/>
Expand Down
4 changes: 3 additions & 1 deletion df.world-data.xml
Expand Up @@ -88,6 +88,8 @@
<int32_t name="count"/>
<int32_t name="race" ref-target='creature_raw'/>
<int32_t name="unk_8"/>
<int32_t name="unk_c" ref-target='historical_entity'/>
<int32_t name="unk_10"/>
</pointer>
</stl-vector>

Expand Down Expand Up @@ -146,7 +148,7 @@

<compound name='unk_178' type-name='coord'/>

<int32_t name="unk_180"/>
<pointer name="unk_180"/>

<pointer name="unk_184">
<int32_t name="unk_0"/>
Expand Down

0 comments on commit 104f113

Please sign in to comment.