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.

Difference between revisions of "Creature flags in DF memory"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(add note)
(Cleanup -Nexii)
Line 5: Line 5:
  
 
===Flags Word 0 (32 bits)===
 
===Flags Word 0 (32 bits)===
* bit 0 - can the dwarf move or are they waiting for their movement timer
+
* 0 - can the dwarf move or are they waiting for their movement timer
* bit 1 - dead (might also be set for incoming/leaving critters that are alive)
+
* 1 - dead (might also be set for incoming/leaving critters that are alive)
* bit 2 - currently in mood
+
* 2 - currently in mood
* bit 3 - had a mood
+
* 3 - had a mood
* bit 4 - "marauder" -- wide class of invader/inside creature attackers
+
* 4 - "marauder" -- wide class of invader/inside creature attackers
* bit 5 - drowning
+
* 5 - drowning
* bit 6 - active merchant
+
* 6 - active merchant
* bit 7 - "forest" (used for units no longer linked to merchant/diplomacy,
+
* 7 - "forest" (used for units no longer linked to merchant/diplomacy,
 
they just try to leave mostly)
 
they just try to leave mostly)
 
+
* 8 - left (left the map)
* bit 8 - left (left the map)
+
* 9 - rider
* bit 9 - rider
+
* 10 - incoming
* bit 10 - incoming
+
* 11 - diplomat
> > bit 11 - unknown (usually set if unit is friendly)
+
* 12 - zombie
* bit 11 - diplomat
+
* 13 - skeleton
> > bit 12 - zombie
+
* 14 - can swap tiles during movement (prevents multiple swaps)
* bit 12 - zombie
+
* 15 - on the ground (can be conscious)
> > bit 13 - skeleton
+
* 16 - projectile
* bit 13 - skeleton
+
* 17 - active invader (for organized ones)
> > bit 14 - unknown (possibly initial dwarves and friendly units only, i.e
+
* 18 - hidden in ambush
> > things which were born off map?)
+
* 19 - invader origin (could be inactive and fleeing)
* can swap tiles during movement (prevents multiple swaps)
+
* 20 - will flee if invasion turns around
> > bit 15 - unconscious
+
* 21 - active marauder/invader moving inward
* on the ground (can be conscious)
+
* 22 - marauder resident/invader moving in all the way
> > bit 16 - unknown (unit isn't visible, caged maybe?)
+
* 23 - check against flows next time you get a chance
* projectile
+
* 24 - ridden
> > bit 17 - invader? (of some sort?)
+
* 25 - caged
* active invader (for organized ones)
+
* 26 - tame
> > bit 18 - unknown (unit isn't listed among dwarves?)
+
* 27 - chained
* hidden in ambush
+
* 28 - royal guard
> > bit 19 - invader? (of some sort?)
+
* 29 - fortress guard
* invader origin (could be inactive and fleeing)
+
* 30 - suppress wield for beatings/etc
> > bit 20 - unknown
+
* 31 - is an important historical figure
* will flee if invasion turns around
 
> > bit 21 - hidden ambusher
 
* active marauder/invader moving inward
 
> > bit 22 - unknown
 
* marauder resident/invader moving in all the way
 
> > bit 23 - unknown
 
* check against flows next time you get a chance
 
> > bit 24 - unknown
 
* ridden
 
> > bit 25 - unknown (invisble, hidden?)
 
* caged
 
> > bit 26 - tame
 
* tame
 
> > bit 27 - unknown
 
* chained
 
> > bit 28 - royal guard
 
* royal guard
 
> > bit 29 - fortress guard
 
* fortress guard
 
> > bit 30 - unknown
 
* suppress wield for beatings/etc
 
> > bit 31 - unknown
 
* is an important historical figure
 
  
 
===Flags Word 1 (32 bits)===
 
===Flags Word 1 (32 bits)===
> > bits 0 thru 6 - unknown
+
* 0 - swimming
* swimming
+
* 1 - play combat for sparring
* play combat for sparring
+
* 2 - do not notify about level gains (for embark etc)
* do not notify about level gains (for embark etc)
+
* 3 - unused
* unused
+
* 4 - nerves calculated
* nerves calculated
+
* 5 - body part info calculated
* body part info calculated
+
* 6 - is important historical figure (slight variation)
* is important historical figure (slight variation)
+
* 7 - has been killed by kill function (slightly different from dead, not
> > bit 7 - dead? (why are there two dead bits? is there a difference?)
 
* has been killed by kill function (slightly different from dead, not
 
 
necessarily violent death)
 
necessarily violent death)
> > bits 8 thru 14 - unknown
+
* 8 - must be forgotten by forget function (just cleanup)
* must be forgotten by forget function (just cleanup)
+
* 9 - must be deleted (cleanup)
* must be deleted (cleanup)
+
* 10 - recently forgotten (cleanup)
* recently forgotten (cleanup)
+
* 11 - offered for trade
* offered for trade
+
* 12 - trade resolved
* trade resolved
+
* 13 - has breaks
* has breaks
+
* 14 - gutted
* gutted
+
* 15 - circulatory spray
> > bit 15 - on ground?
+
* 16 - locked in for trading (it's a projectile on the other set of flags,
* circulatory spray
 
> > bit 16 - flying
 
* locked in for trading (it's a projectile on the other set of flags,
 
 
might be what the flying was)
 
might be what the flying was)
> > bit 17 - marked for slaughter
+
* 17 - marked for slaughter
* marked for slaughter
+
* 18 - underworld creature
> > bit 18 - underworld creature?
+
* 19 - current resident
* underworld creature
+
* 20 - marked for special cleanup as unused load from unit block on disk
> > bits 19 thru 23 - unknown
+
* 21 - insulation from clothing calculated
* current resident
+
* 22 - uninvited guest
* marked for special cleanup as unused load from unit block on disk
+
* 23 - visitor
* insulation from clothing calculated
+
* 24 - inventory order calculated
* uninvited guest
+
* 25 - vision -- have good part
* visitor
+
* 26 - vision -- have damaged part
> > bits 24 thru 31 - unknown
+
* 27 - vision -- have missing part
* inventory order calculated
+
* 28 - breathing -- have good part
* vision -- have good part
+
* 29 - breathing -- having a problem
* vision -- have damaged part
+
* 30 - roaming wilderness population source
* vision -- have missing part
+
* 31 - roaming wilderness population source -- not a map feature
* breathing -- have good part
 
* breathing -- having a problem
 
* roaming wilderness population source
 
* roaming wilderness population source -- not a map feature
 

Revision as of 11:57, 29 October 2009

Creature or Unit flags

Thanks to ToadyOne for explaining what these bits do.

=Stuff with > > was (or wasn't) known by dfhack authors, will be removed when i have time Lord Nightmare 11:51, 29 October 2009 (UTC)

Flags Word 0 (32 bits)

  • 0 - can the dwarf move or are they waiting for their movement timer
  • 1 - dead (might also be set for incoming/leaving critters that are alive)
  • 2 - currently in mood
  • 3 - had a mood
  • 4 - "marauder" -- wide class of invader/inside creature attackers
  • 5 - drowning
  • 6 - active merchant
  • 7 - "forest" (used for units no longer linked to merchant/diplomacy,

they just try to leave mostly)

  • 8 - left (left the map)
  • 9 - rider
  • 10 - incoming
  • 11 - diplomat
  • 12 - zombie
  • 13 - skeleton
  • 14 - can swap tiles during movement (prevents multiple swaps)
  • 15 - on the ground (can be conscious)
  • 16 - projectile
  • 17 - active invader (for organized ones)
  • 18 - hidden in ambush
  • 19 - invader origin (could be inactive and fleeing)
  • 20 - will flee if invasion turns around
  • 21 - active marauder/invader moving inward
  • 22 - marauder resident/invader moving in all the way
  • 23 - check against flows next time you get a chance
  • 24 - ridden
  • 25 - caged
  • 26 - tame
  • 27 - chained
  • 28 - royal guard
  • 29 - fortress guard
  • 30 - suppress wield for beatings/etc
  • 31 - is an important historical figure

Flags Word 1 (32 bits)

  • 0 - swimming
  • 1 - play combat for sparring
  • 2 - do not notify about level gains (for embark etc)
  • 3 - unused
  • 4 - nerves calculated
  • 5 - body part info calculated
  • 6 - is important historical figure (slight variation)
  • 7 - has been killed by kill function (slightly different from dead, not

necessarily violent death)

  • 8 - must be forgotten by forget function (just cleanup)
  • 9 - must be deleted (cleanup)
  • 10 - recently forgotten (cleanup)
  • 11 - offered for trade
  • 12 - trade resolved
  • 13 - has breaks
  • 14 - gutted
  • 15 - circulatory spray
  • 16 - locked in for trading (it's a projectile on the other set of flags,

might be what the flying was)

  • 17 - marked for slaughter
  • 18 - underworld creature
  • 19 - current resident
  • 20 - marked for special cleanup as unused load from unit block on disk
  • 21 - insulation from clothing calculated
  • 22 - uninvited guest
  • 23 - visitor
  • 24 - inventory order calculated
  • 25 - vision -- have good part
  • 26 - vision -- have damaged part
  • 27 - vision -- have missing part
  • 28 - breathing -- have good part
  • 29 - breathing -- having a problem
  • 30 - roaming wilderness population source
  • 31 - roaming wilderness population source -- not a map feature