Elona Wiki
m (added npcs)
Tag: Source edit
m (Rough temporary comment for latest Elona+ changes. May make this page somewhat redundant for E+ specifically.)
Line 2: Line 2:
   
 
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.
 
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.
  +
  +
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==
 
==Primary bit flags==

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.