.. _structures.units:
#####
units
#####
.. _structures.units.unit_flags1:
units.unit_flags1
=================
.. code-block:: xml
Can the dwarf move or are they waiting for their movement timer
Dead (might also be set for incoming/leaving critters that are
alive)
Currently in mood
Had a mood already
wide class of invader/inside creature attackers
Is currently drowning
An active merchant
used for units no longer linked to merchant/diplomacy, they just
try to leave mostly
left the map
Is riding an another creature
Can swap tiles during movement (prevents multiple swaps)
The creature is laying on the floor, can be conscious
Launched into the air? Funny.
Active invader (for organized ones)
Invader origin (could be inactive and fleeing)
Will flee if invasion turns around
Active marauder/invader moving inward?
Marauder resident/invader moving in all the way
Check against flows next time you get a chance
Is an important historical figure
.. _structures.units.unit_flags2:
units.unit_flags2
=================
.. code-block:: xml
Do not notify about level gains (for embark etc)
Is important historical figure (slight variation)
Has been killed by kill function (slightly different from dead,
not necessarily violent death)
Must be forgotten by forget function (just cleanup)
Must be deleted (cleanup)
Recently forgotten (cleanup)
Offered for trade
Locked in for trading (it's a projectile on the other set of
flags, might be what the flying was)
marked for slaughter
Underworld creature
Current resident
Marked for special cleanup as unused load from unit block on disk
Insulation from clothing calculated
Uninvited guest
Inventory order calculated
Vision -- have good part
Vision -- have damaged part
Vision -- have missing part
Breathing -- have good part
Breathing -- having a problem
.. _structures.units.unit_flags3:
units.unit_flags3
=================
.. code-block:: xml
cleared if removing StuckIn item to recompute wound flags.
causes the health structure to be created or updated
Announces creature like an FB or titan.
Is set to 1 every tick for non-dead creatures.
Blocks all kind of things until tile is revealed.
Scuttle creature: causes creature to be killed, leaving a behind
corpse and generating negative thoughts like a real kill.
dropped when znew >= zold
something to do with werewolves?
for active_invaders
trapavoid
trapavoid
v0.40.01
.. _structures.units.unit_flags4:
units.unit_flags4
=================
.. code-block:: xml
.. _structures.units.value_type:
units.value_type
================
.. code-block:: xml
.. _structures.units.goal_type:
units.goal_type
===============
.. code-block:: xml
.. _structures.units.personality_facet_type:
units.personality_facet_type
============================
.. code-block:: xml
.. _structures.units.physical_attribute_type:
units.physical_attribute_type
=============================
.. code-block:: xml
.. _structures.units.mental_attribute_type:
units.mental_attribute_type
===========================
.. code-block:: xml
.. _structures.units.mood_type:
units.mood_type
===============
.. code-block:: xml
.. _structures.units.ghost_type:
units.ghost_type
================
.. code-block:: xml
.. _structures.units.animal_training_level:
units.animal_training_level
===========================
.. code-block:: xml
Seems to be used as default when not flags1.tame
.. _structures.units.unit_report_type:
units.unit_report_type
======================
.. code-block:: xml
.. _structures.units.skill_rating:
units.skill_rating
==================
.. code-block:: xml
.. _structures.units.unit_relationship_type:
units.unit_relationship_type
============================
.. code-block:: xml
-- Can be checked through viewscreen_layer_unit_relationshipst
Used in unit.relations
.. _structures.units.need_type:
units.need_type
===============
.. code-block:: xml
.. _structures.units.unit:
units.unit
==========
.. code-block:: xml
E.g. for a dead miner, holds the place where he was likely hanging
around when he got the command to mine in an aquifer.
-1 n/a, 0 female, 1 male
v0.34.01
v0.40.01
used by necromancers for corpse locations, siegers etc
from 23a
v0.34.06
v0.40.01
v0.40.01
once 0, it heads for the edge and leaves
once 0, it vanishes in a puff of smoke
This was used by a vampire scared of cave creatures and doing
FleeFromOpponent panic
v0.40.01
v0.40.01
v0.40.01
genes from mate
caste of mate
copied from mood type upon entering strange mood
v0.34.01
v0.34.01
v0.34.01
v0.34.01
v0.34.01
could there be a death of old age time??
invalid unless following
0 = riding, 1 = being carried, 2/3 = wagon horses, 4 = wagon
merchant
v0.34.08
items brought to trade depot
entries remain even when items are destroyed
amount earned recently for jobs
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.14
df_job
counts down from 50000, insanity upon reaching zero
GETS_INFECTIONS_FROM_ROT sets; DISEASE_RESISTANCE reduces; >=300
causes bleeding
product of all H/B/LENGTH body modifiers, in %
description uses bp_modifiers[style_list_idx[index]]
dec per job_counter reroll, can_swap if 0
counts up while winded, results in death
plus a random amount
moved from end of counters in 0.43.05
v0.34.01
v0.34.01
v0.34.01
v0.34.01
v0.34.01
v0.34.01
v0.34.01
v0.34.01
v0.34.01; guess!
v0.34.01
v0.34.01
v0.34.01
v0.34.01
v0.42.01
v0.34.01
v0.34.01
v0.34.01
v0.34.01
v0.34.01
v0.34.01
blocks nausea causing vomit
hunger leads to death only when 0
for wagons
used for ghost in AttackedByDead thought
pathing flags to OR, set to 0 after move
v0.34.01
-- Sorted by type:
Contains worn clothes, armor, weapons, arrows fired by archers
v0.34.01
v0.43.01
v0.43.01
v0.34.01
v0.34.01
0 accuses, 1 corpse
bit 0 accuses
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.24
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.42.01
v0.40.01
with modifiers
1e-6
v0.42.01
from physical descriptions for use in adv
.. _structures.units.ghost_goal:
units.ghost_goal
================
.. code-block:: xml
.. _structures.units.unit_ghost_info:
units.unit_ghost_info
=====================
.. code-block:: xml
seems to have same value as type
time since last action
in tiles, global to world
.. _structures.units.unit_genes:
units.unit_genes
================
.. code-block:: xml
length matches body_appearance_modifiers +
tissue_appearance_modifiers
two items per color modifier
.. _structures.units.unit_inventory_item:
units.unit_inventory_item
=========================
.. code-block:: xml
also shield, crutch
quiver
attached to clothing
e.g. bandage
string descr like Worn
Left shoulder, right shoulder, or head, selected randomly using
pet_seed
RNG seed for Pet mode
-1 unless suture
.. _structures.units.unit_attribute:
units.unit_attribute
====================
.. code-block:: xml
effective = value - soft_demotion
counts to PHYS_ATT_RATES improve cost; then value++
counts to PHYS_ATT_RATES unused rate; then rust_counter++
0-100; when not 0 blocks improve_counter
counts to PHYS_ATT_RATES rust; then demotion_counter++
counts to PHYS_ATT_RATES demotion; then value--; soft_demotion++
.. _structures.units.unit_syndrome:
units.unit_syndrome
===================
.. code-block:: xml
refers to unit_wound by id
from spatter size
for SIZE_DELAYS
if PROB roll fails, or all symptoms expire
set from unit.reinfection_count[i]++
cause rq_diagnosis:
causes health.flags.needs_healthcare
less sick? fever: 5-19 low, 20-* full
.. _structures.units.wound_effect_type:
units.wound_effect_type
=======================
.. code-block:: xml
.. _structures.units.wound_damage_flags1:
units.wound_damage_flags1
=========================
.. code-block:: xml
straight scar
huge dent
?
jagged scar
huge dent
jagged scar
jagged scar
.. _structures.units.wound_damage_flags2:
units.wound_damage_flags2
=========================
.. code-block:: xml
.. _structures.units.unit_wound:
units.unit_wound
================
.. code-block:: xml
v0.42.01
v0.42.01
v0.42.01
in compound fracture
v0.40.06
v0.42.01
v0.42.01
.. _structures.units.curse_attr_change:
units.curse_attr_change
=======================
.. code-block:: xml
.. _structures.units.wound_curse_info:
units.wound_curse_info
======================
.. code-block:: xml
v0.40.01
v0.42.01
v0.42.01
.. _structures.units.misc_trait_type:
units.misc_trait_type
=====================
.. code-block:: xml
auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
upon reaching zero, resident creature gets named
auto-decrement
auto-decrement
auto-decrement
auto-increment to 403200
auto-decrement
auto-decrement
auto-decrement
auto-decrement
0-20, 200 on failed path, auto-decrement
auto-decrement
auto-decrement
created at 200, blocks repath?, auto-decrement
triggered by BEACH_FREQUENCY, auto-decrement
auto-decrement
auto-decrement
auto-decrement
0-2000, auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement, set military pickup flag upon reaching zero
auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
one trigger => --training_level, auto-decrement
auto-decrement
auto-decrement
auto-decrement
auto-decrement
.. _structures.units.unit_misc_trait:
units.unit_misc_trait
=====================
.. code-block:: xml
.. _structures.units.unit_item_wrestle:
units.unit_item_wrestle
=======================
.. code-block:: xml
1 grabs, -1 grabbed
.. _structures.units.unit_item_use:
units.unit_item_use
===================
.. code-block:: xml
min 50 for attached, 1000 for name
.. _structures.units.unit_health_flags:
units.unit_health_flags
=======================
.. code-block:: xml
needs diagnosis but cannot walk
???; set when rq_diagnosis is, and not blocked by having a
diagnosis
.. _structures.units.unit_bp_health_flags:
units.unit_bp_health_flags
==========================
.. code-block:: xml
used to remove once not needed
used to remove once not needed
.. _structures.units.unit_health_info:
units.unit_health_info
======================
.. code-block:: xml
.. _structures.units.orientation_flags:
units.orientation_flags
=======================
.. code-block:: xml
only seen on adventurers
.. _structures.units.unit_soul:
units.unit_soul
===============
.. code-block:: xml
-1 n/a, 0 female, 1 male
v0.34.01
v0.34.01
v0.34.01
v0.34.01
v0.40.01
v0.42.01
.. _structures.units.unit_instrument_skill:
units.unit_instrument_skill
===========================
.. code-block:: xml
.. _structures.units.unit_poetic_skill:
units.unit_poetic_skill
=======================
.. code-block:: xml
.. _structures.units.unit_musical_skill:
units.unit_musical_skill
========================
.. code-block:: xml
.. _structures.units.unit_dance_skill:
units.unit_dance_skill
======================
.. code-block:: xml
.. _structures.units.unit_personality:
units.unit_personality
======================
.. code-block:: xml
v0.40.01
v0.40.01
for certain thoughts
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.01
v0.40.14
v0.40.14
v0.40.17-19
v0.40.17-19
for pray need
goes to 400 when unit satisfies need
how fast focus_level decreases when it below 0
v0.42.01
focus_level is below -999 for at least one need
v0.42.01
sum of inebriation or so personality changing effects
v0.42.01
v0.42.01
weighted sum of needs focus_level-s
usually number of needs multiplied by 4
.. _structures.units.unit_action_type:
units.unit_action_type
======================
.. code-block:: xml
.. _structures.units.unit_action:
units.unit_action
=================
.. code-block:: xml
cannot put bitfields inside unions
0=wrestle, 1=grab
refers to weapon_attack or caste_attack
cannot put bitfields inside unions
prepare
recover
this fails
because codegen generates a constructor for entity_event
.. _structures.units.unit_skill:
units.unit_skill
================
.. code-block:: xml
.. _structures.units.unit_preference:
units.unit_preference
=====================
.. code-block:: xml
holdover from 40d and earlier
feeds into a simple RNG to choose which prefstring to use
.. _structures.units.unit_complaint:
units.unit_complaint
====================
.. code-block:: xml
no longer used
.. _structures.units.unit_request:
units.unit_request
==================
.. code-block:: xml
.. _structures.units.unit_coin_debt:
units.unit_coin_debt
====================
.. code-block:: xml
.. _structures.units.unit_chunk:
units.unit_chunk
================
.. code-block:: xml
unit_*.dat