Fandom

Elona Wiki

NPC bit flags

1,865pages 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
cFloatEdit
5 Any 32
Floats the NPC. Among other things, it saves them from acid pools, deaths when drinking from wells, and triggering traps.
cInvisiEdit
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.
cSeeInvisiEdit
7 Any 128
The NPC can see invisible creatures.
cResConfuseEdit
8 Any 256
Immunity to confusion. But, it does not stop insanity from inflicting the status effect.
cResBlindEdit
9 Any 512
Immunity to blindness. But, it does not stop insanity from inflicting the status effect.
cResFearEdit
10 Any 1024
Immunity to fear. But, it does not stop insanity from inflicting the status effect.
cResSleepEdit
11 Any 2048
Immunity to sleep. But, it does not stop insanity from inflicting the status effect.
cResParalyzeEdit
12 Any 4096
Immunity to paralyzation. But, it does not stop insanity from inflicting the status effect.
cResPoisonEdit
13 Any 8192
Immunity to poison. But, it does not stop insanity from inflicting the status effect.
cEaterEdit
14 Any 16384
Able to eat rotten food without triggering any of its negative effects.
cResStealEdit
15 Any 32768
Resists Suspicious Hand events.
cIncognitoEdit
16 Any 65536
Possibly causes the NPC to not be targeted automatically by hostile monsters.
cDropGoldEdit
17 Any 131072
When killed, automatically drops all gold held at the time of death.
cSuicideEdit
18 Any 262144
Has a chance to trigger the Suicide attack special action.
cDeathMasterEdit
19 Any 524288
Auto-triggers the Word of Death special action. The effect cancels out when the casting NPC is killed.
cRapidMagicEdit
20 Any 1048576
Allows for multiple casting of dart-type spells in a single turn. This can be observed on the Exile servant.
cLayHandEdit
21 Any 2097152
The NPC can cast a major healing spell on heavily damaged allies. This can be observed on the Defender servant.
cHorseEdit
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.
cSplitEdit
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.
cEncCurseEdit
24 Any 16777216
Possibly makes the NPC resistant to curses, but this may not be accurate.
cNoHorseEdit
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.
cResEleEdit
26 Any 67108864
The NPC has near immunity to elemental attacks, except pure magic. This is observable with cubes.
cSplit2Edit
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.
cMetalEdit
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.
cCureBleedingEdit
29 Any 536870912
The NPC very quickly heals the bleeding status caused by cut damage.
cPowerBashEdit
30 Any 1073741824
Allows the NPC to break walls, similar to the PC's bash command. Bosses and uniques use this.
cImmuneMineEdit
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.
cTemperEdit
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.
cArmourEdit
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 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?Edit
2 Any 2
Marked when marrying a NPC.
Health BarEdit
7 Any 64
Toggled by using the stethoscope.
LeashedEdit
9 Any 256
Toggled by using a leash, Teleports the pet to you when they move too far away from you.
cExplodeEdit
12 Any 4096
Executes a cSuicide-like effect immediately, disregarding other characters' turns. The only bit flag known to be automatically removed upon execution.
cMountEdit
15 Any 32768
NPCs automatically get this bit flag when mounted. The bit flag is turned off upon dismounting.
cNameEdit
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.
cSurviveEdit
20 Any 1048576
This flag is always turned on upon receiving Contingency, regardless of its source.
cDebrisEdit
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.
cSandbagEdit
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.
cAnorexEdit
26 Any 67108864
Causes anorexia.
cAwakenEdit
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.