Elona Wiki
Advertisement

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. Bits 0 through 4 are reserved for temporary in-memory operations. The first 32 of these are stored at offset 1800 in cdata.s1, and the next 32 begin at offset 1804.

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, unless inflicted by insanity.
cResBlind 9 Any 512
Immunity to blindness, unless inflicted by insanity.
cResFear 10 Any 1024
Immunity to fear, unless inflicted by insanity.
cResSleep 11 Any 2048
Immunity to sleep, unless inflicted by insanity.
cResParalyze 12 Any 4096
Immunity to paralyzation, unless inflicted by insanity.
cResPoison 13 Any 8192
Immunity to poison, unless inflicted by insanity.
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) 1
Activates a self-buff that causes the character to take more damage in exchange for doing more damage.
cArmour 33 Elona+ (Any version) 2
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.
cSlinger 34 Elona+ 4
Character can retaliate to ranged attacks with Marksman-based damage.

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
LIVESTOCK 0 Any 1
On ranch.
CHARA_BIT_MARRIED 1 Any 2
Married to PC.
CHARA_BIT_MAKE_GENE 2 Any 4
Has made gene.
CHARA_BIT_BODYGUARD 3 Any 8
TBD.
CHARA_BIT_SUMMONED 4 Any 16
Drops nothing on kill, stealing actions replaced with normal attack, will despawn after a few days.
CHARA_BIT_SHUT_UP 5 Any 32
TBD.
CHARA_BIT_STETHOSCOPE 6 Any 64
Display health bar.
CHARA_BIT_PCC 7 Any 128
Use PCC instead of a static sprite from character.bmp.
CHARA_BIT_LEASHED 8 Any 256
Teleport to PC if range is too great.
CHARA_BIT_HIRED 9 Any 512
Adventurer currently employed.
CHARA_BIT_QUEST_TARGET 10 Any 1024
Has active quest.
CHARA_BIT_GUARD_TEMP 11 Any 2048
Set on the puppy in the Puppy Cave.
CHARA_BIT_SUICIDE_SWITCH 12 Any 4096
Immediately self-destruct and clear bit.
CHARA_BIT_DEATH_COUNT 13 Any 8192
TBD.
CHARA_BIT_EXCLUSIVE_SKILL_CHARGE 14 Any 16384
TBD.
CHARA_BIT_RIDE 15 Any 32768
Is mounted.
CHARA_BIT_PRECIOUS 16 Any 65536
TBD.
CHARA_BIT_HAS_NAME 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.
CHARA_BIT_PREGNANT 18 Any 262144
TBD.
CHARA_BIT_NO_TARGET 19 Any 524288
TBD.
CHARA_BIT_CONTINGENCY 20 Any 1048576
Contingency effect is currently active.
CHARA_BIT_REFRESH 21 Any 2097152
TBD.
CHARA_BIT_EVENT_TALK 22 Any 4194304
TBD.
CHARA_BIT_STONE_BLOOD 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.
CHARA_BIT_TOKEN_FRIEND 24 Any 16777216
TBD.
CHARA_BIT_SANDBAG 25 Any 33554432
Hanging in a Sand Bag.
CHARA_BIT_ANOREXIA 26 Any 67108864
Has the Anorexia status and will vomit when eating.
CHARA_BIT_POISON_FLAG 27 Any 134217728
TBD.
CHARA_BIT_AI_SAVE_MANA 28 Any 268435456
TBD.
CHARA_BIT_MSG_FILE 29 Any 536870912
TBD.
CHARA_BIT_NO_GOD 30 Any 1073741824
TBD.
CHARA_BIT_FESTIVAL 31 Any 2147483648
Temporary NPC at Noyel Festival of Jure or Ludus Rain Festival.

These are stored at offset 1924 in cdata.s1.

Name Number Game version Ingame ID
CHARA_BIT_NECRO 0 Elona+ 1
TBD.
CHARA_BIT_AWAKE_INSULT 1 Elona+ 2
Has learned the AP special action Insult.
CHARA_BIT_AWAKE_CRYSTAL_SPEAR 2 Elona+ 4
Has learned the AP spell Crystal Spear.
CHARA_BIT_AWAKE_TACTICAL_HEAL 3 Elona+ 8
Has learned the AP spells Healing Rain, Regeneration and Heal Critical, and the special action Harvest Mana.
CHARA_BIT_AWAKE_DIMENSIONAL_MOVE 4 Elona+ 16
Has learned the AP special action Dimensional Move.
CHARA_BIT_AWAKE_TACTICAL_ATTACK 5 Elona+ 32
Has learned the AP special action Shadow Step and can invoke Decapitate on an enemy with at most 1/10th health.
CHARA_BIT_AWAKE_TACTICAL_MARTIAL_ARTS 6 Elona+ 64
Has learned the AP special actions BakuretuKen, Clear Mind, and Attribute.
CHARA_BIT_AWAKE_CHARGE_ATTACK 7 Elona+ 128
Has learned the AP special action Charge Attack.
CHARA_BIT_AWAKE_PROXIMITY_ATTACK 8 Elona+ 256
Has learned the AP battle style Increased frequency of melee.
CHARA_BIT_AWAKE_RANGED_ATTACK 9 Elona+ 512
Has learned the AP battle style Increased frequency of ranged.
CHARA_BIT_AWAKE_DIM_ATTACKER 10 Elona+ 1024
Has learned the AP feat TraitCharm (Beguile).
CHARA_BIT_AWAKE_NEAR_DEATH_EVASION 11 Elona+ 2048
Has learned the AP feat TraitObstinate (Stubborn Will).
CHARA_BIT_AWAKE_NEAR_DEATH_DAMAGE 12 Elona+ 4096
Has learned the AP feat TraitBrave (Courage).
CHARA_BIT_AWAKE_MP_BARRIER 13 Elona+ 8192
Has learned the AP feat TraitBarrier (Barrier).
CHARA_BIT_AWAKE_PROVOKE 14 Elona+ 16384
Has learned the AP special action Provoke.
CHARA_BIT_AWAKE_TACTICAL_CURSE 15 Elona+ 32768
Has learned the AP spell routine Slow, Mist of Silence, Element Scar, Nightmare, Mist of Frailness.
CHARA_BIT_AWAKE_VARIABLE_BREATH 16 Elona+ 65536
Has learned the AP special action Variable Breath.
CHARA_BIT_AWAKE_VARIABLE_STORM 17 Elona+ 131072
Has learned the AP spell Variable Storm.
CHARA_BIT_UNKNOWN_1010 18 Elona+ 262144
Appears to be related to a deprecated Awaken Point ability.
CHARA_BIT_ALTERED_LIMBS 19 Elona+ 524288
TBD.
CHARA_BIT_BRUSHED 20 Elona+ 1048576
Brushed today.
CHARA_BIT_AWAKE_ZERO_SHOOT 21 Elona+ 2097152
Has learned the AP special action Zero Shoot.
CHARA_BIT_AWAKE_TACTICAL_THROW 22 Elona+ 4194304
Has learned the AP special actions Power Item, OverLimit-Throw, Struck Out, and Shining Throw.
CHARA_BIT_CRADLE_15TH 23 Elona+ 8388608
TBD.
CHARA_BIT_AWAKE_MAGIC_ATTACK 24 Elona+ 16777216
Has learned the AP feat .
CHARA_BIT_BLUE_SPIRIT 25 Elona+ 33554432
Empowered special action GHAND effect?.
CHARA_BIT_SQUEEZED 26 Elona+ 67108864
TBD.
CHARA_BIT_GUEST 27 Any? 134217728
TBD.
CHARA_BIT_SHOP_ELEGANCE 28 Elona+ 268435456
TBD.
CHARA_BIT_SHOP_AESTHETIC_SENSE 29 Elona+ 536870912
TBD.
CHARA_BIT_SHOP_SALES_ROUTE 30 Elona+ 1073741824
TBD.
CHARA_BIT_SHOP_STRONG_ALLY 31 Elona+ 2147483648
TBD.

These are stored at offset 1928 in cdata.s1.

Name Number Game version Ingame ID
CHARA_BIT_SHOP_BUSINESS_SMILE 0 Elona+ 1
TBD.
CHARA_BIT_MARK_ITEM 1 Elona+ 2
TBD.
CHARA_BIT_LITERAL_BIRTH_YEAR 2 Elona+ 4
TBD.
CHARA_BIT_HAS_BEEN_CONFESSED_TO 3 Elona+ 8
TBD.
CHARA_BIT_VINDALIAN_JIUJITSU_ACTIVE 4 Elona+ 16
TBD.
CHARA_BIT_MAGNETISM_S_POLE 5 Elona+ 32
TBD.
CHARA_BIT_MAGNETISM_N_POLE 6 Elona+ 64
TBD.
CHARA_BIT_UPLIFTED_WHILE_CASTING 7 Elona+ 128
Gains 5% extra gauge when casting a spell.
PROHIBIT_PICKING_UP_ITEMS 8 Elona+ 256
TBD.
CHARA_BIT_PROHIBIT_EATING_FROM_GROUND 9 Elona+ 512
TBD.
CHARA_BIT_BIRTHED_CHILD 10 Elona+ 1024
TBD.
Advertisement