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)
m (unversioned)
 
(8 intermediate revisions by 5 users not shown)
Line 2: Line 2:
 
Thanks to ToadyOne for explaining what these bits do.
 
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 [[User:Lord Nightmare|Lord Nightmare]] 11:51, 29 October 2009 (UTC)====
+
Checkbox labels
  
 
===Flags Word 0 (32 bits)===
 
===Flags Word 0 (32 bits)===
* bit 0 - can the dwarf move or are they waiting for their movement timer
+
{| class="wikitable"
* bit 1 - dead (might also be set for incoming/leaving critters that are alive)
+
! Bit
* bit 2 - currently in mood
+
! Integer Value (hex)
* bit 3 - had a mood
+
! [[User:Bartavelle/DwarfCompanion|DwarfCompanion]]
* bit 4 - "marauder" -- wide class of invader/inside creature attackers
+
! Meaning
* bit 5 - drowning
+
|-
* bit 6 - active merchant
+
!0
* bit 7 - "forest" (used for units no longer linked to merchant/diplomacy,
+
| 0x00000001
they just try to leave mostly)
+
| 0x1
 +
| Can the dwarf move or are they waiting for their movement timer
 +
|-
 +
!1
 +
| 0x00000002
 +
| dead?
 +
| Dead (might also be set for incoming/leaving critters that are alive)
 +
|-
 +
!2
 +
| 0x00000004
 +
| 0x4
 +
| Currently in mood
 +
|-
 +
!3
 +
| 0x00000008
 +
| artifact
 +
| Had a mood
 +
|-
 +
!4
 +
| 0x00000010
 +
| 0x10
 +
| "marauder" -- wide class of invader/inside creature attackers
 +
|-
 +
!5
 +
| 0x00000020
 +
| 0x20
 +
| Drowning
 +
|-
 +
!6
 +
| 0x00000040
 +
| merch1?
 +
| Active merchant
 +
|-
 +
!7
 +
| 0x00000080
 +
| caravan guard?
 +
| "forest" (used for units no longer linked to merchant/diplomacy, they just try to leave mostly)
 +
|-
 +
!8
 +
| 0x00000100
 +
| 0x100
 +
| Left (left the map)
 +
|-
 +
!9
 +
| 0x00000200
 +
| 0x200
 +
| Rider
 +
|-
 +
!10
 +
| 0x00000400
 +
| !unitlist
 +
| Incoming
 +
|-
 +
!11
 +
| 0x00000800
 +
| liaison?
 +
| Diplomat
 +
|-
 +
!12
 +
| 0x00001000
 +
| zombie
 +
| Zombie
 +
|-
 +
!13
 +
| 0x00002000
 +
| skel
 +
| Skeleton
 +
|-
 +
!14
 +
| 0x00004000
 +
| working?
 +
| Can swap tiles during movement (prevents multiple swaps)
 +
|-
 +
!15
 +
| 0x00008000
 +
| prone
 +
| On the ground (can be conscious)
 +
|-
 +
!16
 +
| 0x00010000
 +
| 0x1.4
 +
| Projectile
 +
|-
 +
!17
 +
| 0x00020000
 +
| inv1
 +
| Active invader (for organized ones)
 +
|-
 +
!18
 +
| 0x00040000
 +
| hidden
 +
| Hidden in ambush
 +
|-
 +
!19
 +
| 0x00080000
 +
| inv2
 +
| Invader origin (could be inactive and fleeing)
 +
|-
 +
!20
 +
| 0x00100000
 +
| 0x1.5
 +
| Will flee if invasion turns around
 +
|-
 +
!21
 +
| 0x00200000
 +
| 0x2.5
 +
| Active marauder/invader moving inward
 +
|-
 +
!22
 +
| 0x00400000
 +
| 0x4.5
 +
| Marauder resident/invader moving in all the way
 +
|-
 +
!23
 +
| 0x00800000
 +
| 0x8.5
 +
| Check against flows next time you get a chance
 +
|-
 +
!24
 +
| 0x01000000
 +
| 0x1.6
 +
| Ridden
 +
|-
 +
!25
 +
| 0x02000000
 +
| 0x2.6
 +
| Caged
 +
|-
 +
!26
 +
| 0x04000000
 +
| tame
 +
| Tame
 +
|-
 +
!27
 +
| 0x08000000
 +
| 0x8.6
 +
| Chained
 +
|-
 +
!28
 +
| 0x10000000
 +
| r.guard
 +
| Royal guard
 +
|-
 +
!29
 +
| 0x20000000
 +
| f.guard
 +
| Fortress guard
 +
|-
 +
!30
 +
| 0x40000000
 +
| 0x4.7
 +
| Suppress wield for beatings/etc
 +
|-
 +
!31
 +
| 0x80000000
 +
| 0x8.7
 +
| Is an important historical figure
 +
|}
  
* bit 8 - left (left the map)
+
===Flags Word 1 (32 bits)===
* bit 9 - rider
+
{| class="wikitable"
* bit 10 - incoming
+
! Bit
> > bit 11 - unknown (usually set if unit is friendly)
+
! Integer Value (hex)
* bit 11 - diplomat
+
! [[User:Bartavelle/DwarfCompanion|DwarfCompanion]]
> > bit 12 - zombie
+
! Meaning
* bit 12 - zombie
+
|-
> > bit 13 - skeleton
+
!0
* bit 13 - skeleton
+
| 0x00000001
> > bit 14 - unknown (possibly initial dwarves and friendly units only, i.e
+
| 0x1b
> > things which were born off map?)
+
| Swimming
* can swap tiles during movement (prevents multiple swaps)
+
|-
> > bit 15 - unconscious
+
!1
* on the ground (can be conscious)
+
| 0x00000002
> > bit 16 - unknown (unit isn't visible, caged maybe?)
+
| 0x2b
* projectile
+
| Play combat for sparring
> > bit 17 - invader? (of some sort?)
+
|-
* active invader (for organized ones)
+
!2
> > bit 18 - unknown (unit isn't listed among dwarves?)
+
| 0x00000004
* hidden in ambush
+
| 0x4b
> > bit 19 - invader? (of some sort?)
+
| Do not notify about level gains (for embark etc)
* invader origin (could be inactive and fleeing)
+
|-
> > bit 20 - unknown
+
!3
* will flee if invasion turns around
+
| 0x00000008
> > bit 21 - hidden ambusher
+
| 0x8b
* active marauder/invader moving inward
+
| Unused
> > bit 22 - unknown
+
|-
* marauder resident/invader moving in all the way
+
!4
> > bit 23 - unknown
+
| 0x00000010
* check against flows next time you get a chance
+
| 0x10b
> > bit 24 - unknown
+
| Nerves calculated
* ridden
+
|-
> > bit 25 - unknown (invisble, hidden?)
+
!5
* caged
+
| 0x00000020
> > bit 26 - tame
+
| 0x20b
* tame
+
| Body part info calculated
> > bit 27 - unknown
+
|-
* chained
+
!6
> > bit 28 - royal guard
+
| 0x00000040
* royal guard
+
| 0x4b
> > bit 29 - fortress guard
+
| Is important historical figure (slight variation)
* fortress guard
+
|-
> > bit 30 - unknown
+
!7
* suppress wield for beatings/etc
+
| 0x00000080
> > bit 31 - unknown
+
| dead
* is an important historical figure
+
| Has been killed by kill function (slightly different from dead, not necessarily violent death)
 +
|-
 +
!8
 +
| 0x00000100
 +
| vanish
 +
| Must be forgotten by forget function (just cleanup)
 +
|-
 +
!9
 +
| 0x00000200
 +
| 0x200b
 +
| Must be deleted (cleanup)
 +
|-
 +
!10
 +
| 0x00000400
 +
| 0x400b
 +
| Recently forgotten (cleanup)
 +
|-
 +
!11
 +
| 0x00000800
 +
| 0x800b
 +
| Offered for trade
 +
|-
 +
!12
 +
| 0x00001000
 +
| 0x1000b
 +
| Trade resolved
 +
|-
 +
!13
 +
| 0x00002000
 +
| winded?
 +
| Has breaks
 +
|-
 +
!14
 +
| 0x00004000
 +
| 0x4000b
 +
| Gutted
 +
|-
 +
!15
 +
| 0x00008000
 +
| ground
 +
| Circulatory spray
 +
|-
 +
!16
 +
| 0x00010000
 +
| flying
 +
| Locked in for trading (it's a projectile on the other set of flags, might be what the flying was)
 +
|-
 +
!17
 +
| 0x00020000
 +
| slaughter
 +
| Marked for slaughter
 +
|-
 +
!18
 +
| 0x00040000
 +
| underwrld
 +
| Underworld creature
 +
|-
 +
!19
 +
| 0x00080000
 +
| can't eat
 +
| Current resident
 +
|-
 +
!20
 +
| 0x00100000
 +
| 0x1.5b
 +
| Marked for special cleanup as unused load from unit block on disk
 +
|-
 +
!21
 +
| 0x00200000
 +
| 0x2.5b
 +
| Insulation from clothing calculated
 +
|-
 +
!22
 +
| 0x00400000
 +
| 0x4.5b
 +
| Uninvited guest
 +
|-
 +
!23
 +
| 0x00800000
 +
| visitor?
 +
| Visitor
 +
|-
 +
!24
 +
| 0x01000000
 +
| 0x1.6b
 +
| Inventory order calculated
 +
|-
 +
!25
 +
| 0x02000000
 +
| 0x2.6b
 +
| Vision -- have good part
 +
|-
 +
!26
 +
| 0x04000000
 +
| 0x4.6b
 +
| Vision -- have damaged part
 +
|-
 +
!27
 +
| 0x08000000
 +
| 0x8.6b
 +
| Vision -- have missing part
 +
|-
 +
!28
 +
| 0x10000000
 +
| 0x1.7b
 +
| Breathing -- have good part
 +
|-
 +
!29
 +
| 0x20000000
 +
| winded?
 +
| Breathing -- having a problem
 +
|-
 +
!30
 +
| 0x40000000
 +
| 0x4.7b
 +
| Roaming wilderness population source
 +
|-
 +
!31
 +
| 0x80000000
 +
| tame2
 +
| Roaming wilderness population source -- not a map feature
 +
|}
  
===Flags Word 1 (32 bits)===
+
[[Category:Hacking]]
> > bits 0 thru 6 - unknown
+
{{unversioned}}
* swimming
 
* play combat for sparring
 
* do not notify about level gains (for embark etc)
 
* unused
 
* nerves calculated
 
* body part info calculated
 
* is important historical figure (slight variation)
 
> > 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)
 
> > bits 8 thru 14 - unknown
 
* must be forgotten by forget function (just cleanup)
 
* must be deleted (cleanup)
 
* recently forgotten (cleanup)
 
* offered for trade
 
* trade resolved
 
* has breaks
 
* gutted
 
> > bit 15 - on ground?
 
* 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)
 
> > bit 17 - marked for slaughter
 
* marked for slaughter
 
> > bit 18 - underworld creature?
 
* underworld creature
 
> > bits 19 thru 23 - unknown
 
* current resident
 
* marked for special cleanup as unused load from unit block on disk
 
* insulation from clothing calculated
 
* uninvited guest
 
* visitor
 
> > bits 24 thru 31 - unknown
 
* inventory order calculated
 
* vision -- have good part
 
* vision -- have damaged part
 
* vision -- have missing part
 
* breathing -- have good part
 
* breathing -- having a problem
 
* roaming wilderness population source
 
* roaming wilderness population source -- not a map feature
 

Latest revision as of 17:28, 21 July 2019

Creature or Unit flags[edit]

Thanks to ToadyOne for explaining what these bits do.

Checkbox labels

Flags Word 0 (32 bits)[edit]

Bit Integer Value (hex) DwarfCompanion Meaning
0 0x00000001 0x1 Can the dwarf move or are they waiting for their movement timer
1 0x00000002 dead? Dead (might also be set for incoming/leaving critters that are alive)
2 0x00000004 0x4 Currently in mood
3 0x00000008 artifact Had a mood
4 0x00000010 0x10 "marauder" -- wide class of invader/inside creature attackers
5 0x00000020 0x20 Drowning
6 0x00000040 merch1? Active merchant
7 0x00000080 caravan guard? "forest" (used for units no longer linked to merchant/diplomacy, they just try to leave mostly)
8 0x00000100 0x100 Left (left the map)
9 0x00000200 0x200 Rider
10 0x00000400 !unitlist Incoming
11 0x00000800 liaison? Diplomat
12 0x00001000 zombie Zombie
13 0x00002000 skel Skeleton
14 0x00004000 working? Can swap tiles during movement (prevents multiple swaps)
15 0x00008000 prone On the ground (can be conscious)
16 0x00010000 0x1.4 Projectile
17 0x00020000 inv1 Active invader (for organized ones)
18 0x00040000 hidden Hidden in ambush
19 0x00080000 inv2 Invader origin (could be inactive and fleeing)
20 0x00100000 0x1.5 Will flee if invasion turns around
21 0x00200000 0x2.5 Active marauder/invader moving inward
22 0x00400000 0x4.5 Marauder resident/invader moving in all the way
23 0x00800000 0x8.5 Check against flows next time you get a chance
24 0x01000000 0x1.6 Ridden
25 0x02000000 0x2.6 Caged
26 0x04000000 tame Tame
27 0x08000000 0x8.6 Chained
28 0x10000000 r.guard Royal guard
29 0x20000000 f.guard Fortress guard
30 0x40000000 0x4.7 Suppress wield for beatings/etc
31 0x80000000 0x8.7 Is an important historical figure

Flags Word 1 (32 bits)[edit]

Bit Integer Value (hex) DwarfCompanion Meaning
0 0x00000001 0x1b Swimming
1 0x00000002 0x2b Play combat for sparring
2 0x00000004 0x4b Do not notify about level gains (for embark etc)
3 0x00000008 0x8b Unused
4 0x00000010 0x10b Nerves calculated
5 0x00000020 0x20b Body part info calculated
6 0x00000040 0x4b Is important historical figure (slight variation)
7 0x00000080 dead Has been killed by kill function (slightly different from dead, not necessarily violent death)
8 0x00000100 vanish Must be forgotten by forget function (just cleanup)
9 0x00000200 0x200b Must be deleted (cleanup)
10 0x00000400 0x400b Recently forgotten (cleanup)
11 0x00000800 0x800b Offered for trade
12 0x00001000 0x1000b Trade resolved
13 0x00002000 winded? Has breaks
14 0x00004000 0x4000b Gutted
15 0x00008000 ground Circulatory spray
16 0x00010000 flying Locked in for trading (it's a projectile on the other set of flags, might be what the flying was)
17 0x00020000 slaughter Marked for slaughter
18 0x00040000 underwrld Underworld creature
19 0x00080000 can't eat Current resident
20 0x00100000 0x1.5b Marked for special cleanup as unused load from unit block on disk
21 0x00200000 0x2.5b Insulation from clothing calculated
22 0x00400000 0x4.5b Uninvited guest
23 0x00800000 visitor? Visitor
24 0x01000000 0x1.6b Inventory order calculated
25 0x02000000 0x2.6b Vision -- have good part
26 0x04000000 0x4.6b Vision -- have damaged part
27 0x08000000 0x8.6b Vision -- have missing part
28 0x10000000 0x1.7b Breathing -- have good part
29 0x20000000 winded? Breathing -- having a problem
30 0x40000000 0x4.7b Roaming wilderness population source
31 0x80000000 tame2 Roaming wilderness population source -- not a map feature