Elona Wiki

NPC bit flags

1,851pages on
this wiki
Add New Page
Comments29 Share

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.

Primary bit flagsEdit

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
5 Any 32
Floats the NPC. Among other things, it saves them from acid pools, deaths when drinking from wells, and triggering traps.
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.
7 Any 128
The NPC can see invisible creatures.
8 Any 256
Immunity to confusion. But, it does not stop insanity from inflicting the status effect.
9 Any 512
Immunity to blindness. But, it does not stop insanity from inflicting the status effect.
10 Any 1024
Immunity to fear. But, it does not stop insanity from inflicting the status effect.
11 Any 2048
Immunity to sleep. But, it does not stop insanity from inflicting the status effect.
12 Any 4096
Immunity to paralyzation. But, it does not stop insanity from inflicting the status effect.
13 Any 8192
Immunity to poison. But, it does not stop insanity from inflicting the status effect.
14 Any 16384
Able to eat rotten food without triggering any of its negative effects.
15 Any 32768
Resists Suspicious Hand events.
16 Any 65536
Possibly causes the NPC to not be targeted automatically by hostile monsters.
17 Any 131072
When killed, automatically drops all gold held at the time of death.
18 Any 262144
Has a chance to trigger the Suicide attack special action.
19 Any 524288
Auto-triggers the Word of Death special action. The effect cancels out when the casting NPC is killed.
20 Any 1048576
Allows for multiple casting of dart-type spells in a single turn. This can be observed on the Exile servant.
21 Any 2097152
The NPC can cast a major healing spell on heavily damaged allies. This can be observed on the Defender servant.
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 bitflag.
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.
24 Any 16777216
Possibly makes the NPC resistant to curses, but this may not be accurate.
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 bitflag.
26 Any 67108864
The NPC has near immunity to elemental attacks, except pure magic. This is observable with cubes.
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.
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.
29 Any 536870912
The NPC very quickly heals the bleeding status caused by cut damage.
30 Any 1073741824
Allows the NPC to break walls, similar to the PC's bash command. Bosses and uniques use this.
31 Any 2147483648
Prevents triggering of mines by the character. Used by mine layers such as the mine dog to prevent it setting off its own traps.
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.
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 flagsEdit

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

Name Number Game version Ingame ID
2 Any 2
Marked when marrying a NPC.
Health BarEdit
7 Any 64
Toggled by using the stethoscope.
9 Any 256
Toggled by using a leash, Teleports the pet to you when they move too far away from you.
12 Any 4096
Executes a cSuicide-like effect immediately, disregarding other characters' turns. The only bitflag known to be automatically removed upon execution.
15 Any 32768
NPCs automatically get this bit flag when mounted. The bit flag is turned off upon dismounting.
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.
20 Any 1048576
This flag is always turned on upon receiving Contingency, regardless of its source.
23 Any 8388608
Enables the "debris-fall" death animation common to most rock- and metal-type artificial constructs. With this bitflag off, the death animation is standard blood splatter.
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.
26 Any 67108864
Causes anorexia.
44 Elona+ 17592186044416
NPCs in Awakened dungeons carry this bit flag. Its effects are currently unknown.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.