Elona Wiki
(→‎NPC Bit flags: filled in the Ingame ID column. Thanks for setting it up, Corak!)
m (Rough temporary comment for latest Elona+ changes. May make this page somewhat redundant for E+ specifically.)
(27 intermediate revisions by 9 users not shown)
Line 1: Line 1:
Bit flags are special traits that can be programmed into NPCs to give them certain abilities. These bits are listed in the help_npc.txt file in the user folder under BitOn, which includes instructions on how to use them in a [[custom NPC]]. The reference to 'bits' is related to how they are set in a programming manner. They are a combination of feats and special actions, but as a combination of the two they are in their own category.
+
'''Bit flags''' are special traits that can be programmed into [[NPC]]s to give them certain abilities. Most of these bits are listed in the help_npc.txt file in the user folder, under BitOn, which includes instructions on how to use them for the creation of [[custom NPC]]s.
   
  +
The game's own original NPCs already have their bit flags hard-coded, but these can still be modified (via [[EloSnack#cdata.s1|EloSnack]] or [[Cheating#Memory_editing|memory editing]]). Values for ingame bit flag modification are listed under the "Ingame ID" column.
==NPC Bit flags==
 
  +
The list starts at 5 as there are no bits that can be set under that number.
 
  +
Note: in Elona+ version 2.08 on, every character's bit flags are now listed in the "Feats and Traits" window. 2 new bit flags not currently on this page were added in that version.
  +
 
==Primary bit flags==
 
Standard bit flags, available to both original and custom NPCs. The list starts at 5 as there are no bits that can be set under that number.
   
 
{| class="article-table"
 
{| class="article-table"
Line 10: Line 14:
 
!style="width:25%; background-color:#7077C0; text-align:center;"|Game version
 
!style="width:25%; background-color:#7077C0; text-align:center;"|Game version
 
!style="width:25%; background-color:#7077C0; text-align:center;"|Ingame ID
 
!style="width:25%; background-color:#7077C0; text-align:center;"|Ingame ID
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cFloat"
 
|
 
|
=====<code>cFloat</code>=====
+
<code>cFloat</code>
 
|5
 
|5
 
|Any
 
|Any
Line 18: Line 22:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Floats the NPC. Among other things, it saves them from acid pools, deaths when drinking from wells, and triggering traps.
 
|colspan="4"|Floats the NPC. Among other things, it saves them from acid pools, deaths when drinking from wells, and triggering traps.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cInvisi"
 
|<code>cInvisi</code>
|
 
=====<code>cInvisi</code>=====
 
 
|6
 
|6
 
|Any
 
|Any
Line 26: Line 29:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|The NPC is invisible. They can only be seen by the player when they are wet, or when the player has an item that lets them see invisible creatures equipped. NPCs with the cSeeInvisi bit can still see them. A pet that is invisible will still be seen by NPCs, regardless of the NPCs' ability to see invisible creatures.
 
|colspan="4"|The NPC is invisible. They can only be seen by the player when they are wet, or when the player has an item that lets them see invisible creatures equipped. NPCs with the cSeeInvisi bit can still see them. A pet that is invisible will still be seen by NPCs, regardless of the NPCs' ability to see invisible creatures.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cSeeInvisi"
 
|<code>cSeeInvisi</code>
|
 
=====<code>cSeeInvisi</code>=====
 
 
|7
 
|7
 
|Any
 
|Any
Line 34: Line 36:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|The NPC can see invisible creatures.
 
|colspan="4"|The NPC can see invisible creatures.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cResConfuse"
 
|<code>cResConfuse</code>
|
 
=====<code>cResConfuse</code>=====
 
 
|8
 
|8
 
|Any
 
|Any
Line 42: Line 43:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Immunity to confusion. But, it does not stop insanity from inflicting the status effect.
 
|colspan="4"|Immunity to confusion. But, it does not stop insanity from inflicting the status effect.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cResBlind"
 
|<code>cResBlind</code>
|
 
=====<code>cResBlind</code>=====
 
 
|9
 
|9
 
|Any
 
|Any
Line 50: Line 50:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Immunity to blindness. But, it does not stop insanity from inflicting the status effect.
 
|colspan="4"|Immunity to blindness. But, it does not stop insanity from inflicting the status effect.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cResFear"
 
|<code>cResFear</code>
|
 
=====<code>cResFear</code>=====
 
 
|10
 
|10
 
|Any
 
|Any
Line 58: Line 57:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Immunity to fear. But, it does not stop insanity from inflicting the status effect.
 
|colspan="4"|Immunity to fear. But, it does not stop insanity from inflicting the status effect.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cResSleep"
 
|<code>cResSleep</code>
|
 
=====<code>cResSleep</code>=====
 
 
|11
 
|11
 
|Any
 
|Any
Line 66: Line 64:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Immunity to sleep. But, it does not stop insanity from inflicting the status effect.
 
|colspan="4"|Immunity to sleep. But, it does not stop insanity from inflicting the status effect.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cResParalyze"
 
|<code>cResParalyze</code>
|
 
=====<code>cResParalyze</code>=====
 
 
|12
 
|12
 
|Any
 
|Any
Line 74: Line 71:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Immunity to paralyzation. But, it does not stop insanity from inflicting the status effect.
 
|colspan="4"|Immunity to paralyzation. But, it does not stop insanity from inflicting the status effect.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cResPoison"
 
|<code>cResPoison</code>
|
 
=====<code>cResPoison</code>=====
 
 
|13
 
|13
 
|Any
 
|Any
Line 82: Line 78:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Immunity to poison. But, it does not stop insanity from inflicting the status effect.
 
|colspan="4"|Immunity to poison. But, it does not stop insanity from inflicting the status effect.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cEater"
 
|<code>cEater</code>
|
 
=====<code>cEater</code>=====
 
 
|14
 
|14
 
|Any
 
|Any
Line 90: Line 85:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Able to eat rotten food without triggering any of its negative effects.
 
|colspan="4"|Able to eat rotten food without triggering any of its negative effects.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cResSteal"
 
|<code>cResSteal</code>
|
 
=====<code>cResSteal</code>=====
 
 
|15
 
|15
 
|Any
 
|Any
Line 98: Line 92:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Resists Suspicious Hand events.
 
|colspan="4"|Resists Suspicious Hand events.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cIncognito"
 
|<code>cIncognito</code>
|
 
=====<code>cIncognito</code>=====
 
 
|16
 
|16
 
|Any
 
|Any
Line 106: Line 99:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Possibly causes the NPC to not be targeted automatically by hostile monsters.
 
|colspan="4"|Possibly causes the NPC to not be targeted automatically by hostile monsters.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cDropGold"
 
|<code>cDropGold</code>
|
 
=====<code>cDropGold</code>=====
 
 
|17
 
|17
 
|Any
 
|Any
Line 114: Line 106:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|When killed, automatically drops all gold held at the time of death.
 
|colspan="4"|When killed, automatically drops all gold held at the time of death.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cSuicide"
 
|<code>cSuicide</code>
|
 
=====<code>cSuicide</code>=====
 
 
|18
 
|18
 
|Any
 
|Any
 
|262144
 
|262144
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
|colspan="4"|Has a chance to trigger the Suicide attack special action, when hit.
+
|colspan="4"|Has a chance to trigger the Suicide attack special action.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cDeathMaster"
 
|<code>cDeathMaster</code>
|
 
=====<code>cDeathMaster</code>=====
 
 
|19
 
|19
 
|Any
 
|Any
 
|524288
 
|524288
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
|colspan="4"|Auto-triggers the [[Word of Death]] special action. The effect cancels out when the casting NPC is killed.
+
|colspan="4"|Auto-triggers the [[Word of Death]] special action. The effect cancels out when the casting NPC is killed. Used by [[Executioner]], [[Messenger of death]], [[Demon's soul]], [[Death armor]].
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cRapidMagic"
 
|<code>cRapidMagic</code>
|
 
=====<code>cRapidMagic</code>=====
 
 
|20
 
|20
 
|Any
 
|Any
Line 138: Line 127:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Allows for multiple casting of dart-type spells in a single turn. This can be observed on the [[Exile]] servant.
 
|colspan="4"|Allows for multiple casting of dart-type spells in a single turn. This can be observed on the [[Exile]] servant.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cLayHand"
 
|<code>cLayHand</code>
|
 
=====<code>cLayHand</code>=====
 
 
|21
 
|21
 
|Any
 
|Any
Line 146: Line 134:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|The NPC can cast a major healing spell on heavily damaged allies. This can be observed on the [[Defender]] servant.
 
|colspan="4"|The NPC can cast a major healing spell on heavily damaged allies. This can be observed on the [[Defender]] servant.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cHorse"
 
|<code>cHorse</code>
|
 
=====<code>cHorse</code>=====
 
 
|22
 
|22
 
|Any
 
|Any
 
|4194304
 
|4194304
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
|colspan="4"|The NPC works well with the [[riding]] skill. It gives the message "You feel comfortable" when ridden.
+
|colspan="4"|The NPC works well with the [[riding]] skill. It gives the message "You feel comfortable" when ridden. See [[Riding#NPCs_with_the_mount_bonus_or_penalty|this list of all NPCs having this bit flag]].
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cSplit"
 
|<code>cSplit</code>
|
 
=====<code>cSplit</code>=====
 
 
|23
 
|23
 
|Any
 
|Any
Line 162: Line 148:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|The first version of the split ability. The NPC can create a copy when any damage is taken. Copies of the NPC will keep the status effects inflicted on the one that spawned them.
 
|colspan="4"|The first version of the split ability. The NPC can create a copy when any damage is taken. Copies of the NPC will keep the status effects inflicted on the one that spawned them.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cEncCurse"
 
|<code>cEncCurse</code>
|
 
  +
|24
=====<code>cEncCurse</code>=====
 
|23
 
 
|Any
 
|Any
 
|16777216
 
|16777216
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
  +
| colspan="4"|Possibly makes the NPC resistant to curses, but this may not be accurate.
| colspan="4"|???
 
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cNoHorse"
 
|<code>cNoHorse</code>
|
 
=====<code>cNoHorse</code>=====
 
 
|25
 
|25
 
|Any
 
|Any
 
|33554432
 
|33554432
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
|colspan="4"|The NPC works very poorly with the [[riding]] skill, resulting in a severe speed penalty when ridden.
+
|colspan="4"|The NPC works very poorly with the [[riding]] skill, resulting in a severe speed penalty when ridden. See [[Riding#NPCs_with_the_mount_bonus_or_penalty|this list of all NPCs having this bit flag]].
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cResEle"
 
|<code>cResEle</code>
|
 
=====<code>cResEle</code>=====
 
 
|26
 
|26
 
|Any
 
|Any
Line 186: Line 169:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
| colspan="4"|The NPC has near immunity to elemental attacks, except pure magic. This is observable with [[cube]]s.
 
| colspan="4"|The NPC has near immunity to elemental attacks, except pure magic. This is observable with [[cube]]s.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cSplit2"
 
|<code>cSplit2</code>
|
 
=====<code>cSplit2</code>=====
 
 
|27
 
|27
 
|Any
 
|Any
Line 194: Line 176:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|The second type of split ability. The NPC can create a copy when any damage is taken. The copies do not have the status effects inflicted on the original.
 
|colspan="4"|The second type of split ability. The NPC can create a copy when any damage is taken. The copies do not have the status effects inflicted on the original.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cMetal"
 
|<code>cMetal</code>
|
 
=====<code>cMetal</code>=====
 
 
|28
 
|28
 
|Any
 
|Any
 
|268435456
 
|268435456
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
| colspan="4" style="text-align:left"|Any damage inflicted on the NPC with this is severely reduced. Observable with bell-type monsters such as the [[gold bell]].
+
| style="text-align:left" colspan="4" |Damage inflicted on the NPC is reduced by 90%. Observable with bell-type monsters such as the [[gold bell]]. Stacks with cArmour for 97.5% damage reduction. Elona+ changes it entirely to dealing with physical damage.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cCureBleeding"
 
|<code>cCureBleeding</code>
|
 
=====<code>cCureBleeding</code>=====
 
 
|29
 
|29
 
|Any
 
|Any
 
|536870912
 
|536870912
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
| colspan="4" style="text-align:left"|???
+
| colspan="4" style="text-align:left"|The NPC very quickly heals the bleeding status caused by cut damage.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cPowerBash"
 
|<code>cPowerBash</code>
|
 
=====<code>cPowerBash</code>=====
 
 
|30
 
|30
 
|Any
 
|Any
Line 218: Line 197:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Allows the NPC to break walls, similar to the PC's bash command. Bosses and uniques use this.
 
|colspan="4"|Allows the NPC to break walls, similar to the PC's bash command. Bosses and uniques use this.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cImmuneMine"
 
|<code>cImmuneMine</code>
|
 
=====<code>cImmuneMine</code>=====
 
 
|31
 
|31
 
|Any
 
|Any
 
|2147483648
 
|2147483648
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
| colspan="4"|Prevents triggering of mines by the character. Used by mine layers such as the [[mine dog]] to prevent it setting off its own traps.
+
| colspan="4"|Prevents triggering of mines by the character. Used by mine layers such as the [[mine dog]] and [[Claymoai]] to prevent it setting off its own traps.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cTemper"
 
|<code>cTemper</code>
|
 
=====<code>cTemper</code>=====
 
 
|32
 
|32
 
|Elona beta (after 1.16)
 
|Elona beta (after 1.16)
Line 234: Line 211:
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
 
|colspan="4"|Activates a self-buff that causes the character to take more damage in exchange for doing more damage.
 
|colspan="4"|Activates a self-buff that causes the character to take more damage in exchange for doing more damage.
|- style="font-weight:bold; text-align:center;"
+
|- style="font-weight:bold; text-align:center;" id="cArmour"
 
|<code>cArmour</code>
|
 
=====<code>cArmour</code>=====
 
 
|33
 
|33
|Elona Plus (Any version)
+
|Elona+ (Any version)
 
|8589934592
 
|8589934592
 
|- style="border-bottom:2px solid #7077C0"
 
|- style="border-bottom:2px solid #7077C0"
|colspan="4"|Damage inflicted on the NPC is reduced. Less effective than the cMetal flag.
+
| colspan="4" |Physical damage inflicted on the NPC is reduced by 75%. Less effective than the cMetal flag. Stacks with cMetal for 97.5% physical damage reduction.
 
|}
  +
  +
==Secondary bit flags==
  +
Special bit flags not available to custom NPCs. These are stored at a second bit flag address in game memory (1920 offset in cdata.s1).
  +
{| class="article-table"
  +
|- style="color:#fff;"
  +
!style="width:25%; background-color:#7077C0; text-align:center;"|Name
  +
!style="width:25%; background-color:#7077C0; text-align:center;"|Number
  +
!style="width:25%; background-color:#7077C0; text-align:center;"|Game version
  +
!style="width:25%; background-color:#7077C0; text-align:center;"|Ingame ID
  +
|- style="font-weight:bold; text-align:center;" id="Married?"
  +
|<code>Married?</code>
 
|2
  +
|Any
 
|2
  +
|- style="border-bottom:2px solid #7077C0"
  +
| colspan="4" |Marked when marrying a NPC.
  +
|- style="font-weight:bold; text-align:center;" id="Health Bar"
  +
|<code>Health Bar</code>
 
|7
  +
|Any
  +
|64
  +
|- style="border-bottom:2px solid #7077C0"
  +
| colspan="4" |Toggled by using the stethoscope.
  +
|- style="font-weight:bold; text-align:center;" id="Leashed"
  +
|<code>Leashed</code>
 
|9
  +
|Any
  +
|256
  +
|- style="border-bottom:2px solid #7077C0"
  +
| colspan="4" |Toggled by using a leash, Teleports the pet to you when they move too far away from you.
  +
|- style="font-weight:bold; text-align:center;" id="cExplode"
  +
|<code>cExplode</code>
  +
|12
  +
|Any
  +
|4096
  +
|- style="border-bottom:2px solid #7077C0"
  +
| colspan="4" |Executes a cSuicide-like effect immediately, disregarding other characters' turns. The only bit flag known to be automatically removed upon execution.
  +
|- style="font-weight:bold; text-align:center;" id="cMount"
  +
|<code>cMount</code>
  +
|15
  +
|Any
  +
|32768
  +
|- style="border-bottom:2px solid #7077C0"
  +
| colspan="4" |NPCs automatically get this bit flag when mounted. The bit flag is turned off upon dismounting.
  +
|- style="font-weight:bold; text-align:center;" id="cName"
  +
|<code>cName</code>
  +
|17
  +
|Any
  +
|131072
  +
|- style="border-bottom:2px solid #7077C0"
  +
| colspan="4" |Named NPCs automatically carry this bit flag. Otherwise, it's turned on when the player names the NPC via the {{key|I}}nteract>>Name menu.
  +
|- style="font-weight:bold; text-align:center;" id="cSurvive"
  +
|<code>cSurvive</code>
  +
|20
  +
|Any
  +
|1048576
  +
|- style="border-bottom:2px solid #7077C0"
  +
| colspan="4" |This flag is always turned on upon receiving [[Spells#Contingency|Contingency]], regardless of its source.
  +
|- style="font-weight:bold; text-align:center;" id="cDebris"
  +
|<code>cDebris</code>
 
|23
  +
|Any
  +
|8388608
  +
|- style="border-bottom:2px solid #7077C0"
  +
| colspan="4" |Enables the "debris-fall" death animation common to most rock- and metal-type artificial constructs. With this bit flag off, the death animation is standard blood splatter.
  +
|- style="font-weight:bold; text-align:center;" id="cSandbag"
  +
|<code>cSandbag</code>
  +
|25
  +
|Any
  +
|33554432
  +
|- style="border-bottom:2px solid #7077C0"
  +
| colspan="4" |NPCs get this bit flag when a [[Sand bag]] is used on them. Conversely, turning the bit flag on via memory editing inflicts the sandbagged status on the target NPC.
  +
|- style="font-weight:bold; text-align:center;" id="cAnorex"
  +
|<code>cAnorex</code>
  +
|26
  +
|Any
  +
|67108864
  +
|- style="border-bottom:2px solid #7077C0"
  +
| colspan="4" |Causes [[Status effects|anorexia]].
  +
|- style="font-weight:bold; text-align:center;" id="cAwaken"
  +
|<code>cAwaken</code>
  +
|44
  +
|Elona+
  +
|17592186044416
  +
|- style="border-bottom:2px solid #7077C0"
  +
| colspan="4" |NPCs in [[Black_gemstone_of_Wake_up_of_nefia|Awakened]] dungeons carry this bit flag. Its effects are currently unknown.
 
|}
 
|}
[[Category:Elona+]]
+
[[Category:Content]]
[[Category:Article stubs]]
 

Revision as of 18:29, 26 December 2021

Bit flags are special traits that can be programmed into NPCs to give them certain abilities. Most of these bits are listed in the help_npc.txt file in the user folder, under BitOn, which includes instructions on how to use them for the creation of custom NPCs.

The game's own original NPCs already have their bit flags hard-coded, but these can still be modified (via EloSnack or memory editing). Values for ingame bit flag modification are listed under the "Ingame ID" column.

Note: in Elona+ version 2.08 on, every character's bit flags are now listed in the "Feats and Traits" window. 2 new bit flags not currently on this page were added in that version.

Primary bit flags

Standard bit flags, available to both original and custom NPCs. The list starts at 5 as there are no bits that can be set under that number.

Name Number Game version Ingame ID

cFloat

5 Any 32
Floats the NPC. Among other things, it saves them from acid pools, deaths when drinking from wells, and triggering traps.
cInvisi 6 Any 64
The NPC is invisible. They can only be seen by the player when they are wet, or when the player has an item that lets them see invisible creatures equipped. NPCs with the cSeeInvisi bit can still see them. A pet that is invisible will still be seen by NPCs, regardless of the NPCs' ability to see invisible creatures.
cSeeInvisi 7 Any 128
The NPC can see invisible creatures.
cResConfuse 8 Any 256
Immunity to confusion. But, it does not stop insanity from inflicting the status effect.
cResBlind 9 Any 512
Immunity to blindness. But, it does not stop insanity from inflicting the status effect.
cResFear 10 Any 1024
Immunity to fear. But, it does not stop insanity from inflicting the status effect.
cResSleep 11 Any 2048
Immunity to sleep. But, it does not stop insanity from inflicting the status effect.
cResParalyze 12 Any 4096
Immunity to paralyzation. But, it does not stop insanity from inflicting the status effect.
cResPoison 13 Any 8192
Immunity to poison. But, it does not stop insanity from inflicting the status effect.
cEater 14 Any 16384
Able to eat rotten food without triggering any of its negative effects.
cResSteal 15 Any 32768
Resists Suspicious Hand events.
cIncognito 16 Any 65536
Possibly causes the NPC to not be targeted automatically by hostile monsters.
cDropGold 17 Any 131072
When killed, automatically drops all gold held at the time of death.
cSuicide 18 Any 262144
Has a chance to trigger the Suicide attack special action.
cDeathMaster 19 Any 524288
Auto-triggers the Word of Death special action. The effect cancels out when the casting NPC is killed. Used by Executioner, Messenger of death, Demon's soul, Death armor.
cRapidMagic 20 Any 1048576
Allows for multiple casting of dart-type spells in a single turn. This can be observed on the Exile servant.
cLayHand 21 Any 2097152
The NPC can cast a major healing spell on heavily damaged allies. This can be observed on the Defender servant.
cHorse 22 Any 4194304
The NPC works well with the riding skill. It gives the message "You feel comfortable" when ridden. See this list of all NPCs having this bit flag.
cSplit 23 Any 8388608
The first version of the split ability. The NPC can create a copy when any damage is taken. Copies of the NPC will keep the status effects inflicted on the one that spawned them.
cEncCurse 24 Any 16777216
Possibly makes the NPC resistant to curses, but this may not be accurate.
cNoHorse 25 Any 33554432
The NPC works very poorly with the riding skill, resulting in a severe speed penalty when ridden. See this list of all NPCs having this bit flag.
cResEle 26 Any 67108864
The NPC has near immunity to elemental attacks, except pure magic. This is observable with cubes.
cSplit2 27 Any 134217728
The second type of split ability. The NPC can create a copy when any damage is taken. The copies do not have the status effects inflicted on the original.
cMetal 28 Any 268435456
Damage inflicted on the NPC is reduced by 90%. Observable with bell-type monsters such as the gold bell. Stacks with cArmour for 97.5% damage reduction. Elona+ changes it entirely to dealing with physical damage.
cCureBleeding 29 Any 536870912
The NPC very quickly heals the bleeding status caused by cut damage.
cPowerBash 30 Any 1073741824
Allows the NPC to break walls, similar to the PC's bash command. Bosses and uniques use this.
cImmuneMine 31 Any 2147483648
Prevents triggering of mines by the character. Used by mine layers such as the mine dog and Claymoai to prevent it setting off its own traps.
cTemper 32 Elona beta (after 1.16) 4294967296
Activates a self-buff that causes the character to take more damage in exchange for doing more damage.
cArmour 33 Elona+ (Any version) 8589934592
Physical damage inflicted on the NPC is reduced by 75%. Less effective than the cMetal flag. Stacks with cMetal for 97.5% physical damage reduction.

Secondary bit flags

Special bit flags not available to custom NPCs. These are stored at a second bit flag address in game memory (1920 offset in cdata.s1).

Name Number Game version Ingame ID
Married? 2 Any 2
Marked when marrying a NPC.
Health Bar 7 Any 64
Toggled by using the stethoscope.
Leashed 9 Any 256
Toggled by using a leash, Teleports the pet to you when they move too far away from you.
cExplode 12 Any 4096
Executes a cSuicide-like effect immediately, disregarding other characters' turns. The only bit flag known to be automatically removed upon execution.
cMount 15 Any 32768
NPCs automatically get this bit flag when mounted. The bit flag is turned off upon dismounting.
cName 17 Any 131072
Named NPCs automatically carry this bit flag. Otherwise, it's turned on when the player names the NPC via the Interact>>Name menu.
cSurvive 20 Any 1048576
This flag is always turned on upon receiving Contingency, regardless of its source.
cDebris 23 Any 8388608
Enables the "debris-fall" death animation common to most rock- and metal-type artificial constructs. With this bit flag off, the death animation is standard blood splatter.
cSandbag 25 Any 33554432
NPCs get this bit flag when a Sand bag is used on them. Conversely, turning the bit flag on via memory editing inflicts the sandbagged status on the target NPC.
cAnorex 26 Any 67108864
Causes anorexia.
cAwaken 44 Elona+ 17592186044416
NPCs in Awakened dungeons carry this bit flag. Its effects are currently unknown.