Skip to main content

Daedalus Constants

This page lists the most important constants defined in the Gothic II scripts (Constants.d, AI_Constants.d). They are used across NPC definitions, items, dialogs, and AI configuration.

Attributes (ATR_)

Used with attribute[] array in C_NPC.

ConstantValueDescription
ATR_HITPOINTS0Current health
ATR_HITPOINTS_MAX1Maximum health
ATR_MANA2Current mana
ATR_MANA_MAX3Maximum mana
ATR_STRENGTH4Strength
ATR_DEXTERITY5Dexterity
ATR_REGENERATEHP6HP regeneration
ATR_REGENERATEMANA7Mana regeneration
ATR_INDEX_MAX8Total attributes

Item Categories (ITEM_KAT_)

Used in the mainflag field of C_Item.

ConstantValueDescription
ITEM_KAT_NONE1Other (keys, gold, misc)
ITEM_KAT_NF2Melee weapon
ITEM_KAT_FF4Ranged weapon
ITEM_KAT_MUN8Ammunition
ITEM_KAT_ARMOR16Armor
ITEM_KAT_FOOD32Food
ITEM_KAT_DOCS64Documents
ITEM_KAT_POTIONS128Potions
ITEM_KAT_LIGHT256Light sources
ITEM_KAT_RUNE512Runes and scrolls
ITEM_KAT_MAGIC1 << 31Magic items
ITEM_KAT_KEYS1Keys (same as NONE)

Item Flags (ITEM_)

Used in the flags field of C_Item. Can be combined with bitwise OR.

Weapon Types

ConstantBitDescription
ITEM_DAG1 << 13Dagger
ITEM_SWD1 << 141H sword
ITEM_AXE1 << 151H axe
ITEM_2HD_SWD1 << 162H sword
ITEM_2HD_AXE1 << 172H axe
ITEM_SHIELD1 << 18Shield
ITEM_BOW1 << 19Bow
ITEM_CROSSBOW1 << 20Crossbow

Accessories

ConstantBitDescription
ITEM_RING1 << 11Ring
ITEM_AMULET1 << 22Amulet
ITEM_BELT1 << 24Belt

Behavior Flags

ConstantBitDescription
ITEM_DROPPED1 << 10Item was dropped in world
ITEM_MISSION1 << 12Mission item (cannot sell or drop)
ITEM_MULTI1 << 21Stackable
ITEM_NFOCUS1 << 23Not focusable
ITEM_CREATEAMMO1 << 25Auto-creates ammo (bow/crossbow)
ITEM_NSPLIT1 << 26Cannot be split from stack
ITEM_DRINK1 << 27Drink
ITEM_TORCH1 << 28Torch
ITEM_THROW1 << 29Throwable
ITEM_ACTIVE1 << 30Active (usable item)

Damage Types (DAM_)

Used in the damagetype field. Can be combined with bitwise OR.

ConstantValueIndexDescription
DAM_BARRIER10Barrier damage
DAM_BLUNT21Blunt damage
DAM_EDGE42Edge (slash)
DAM_FIRE83Fire damage
DAM_FLY164Knockback
DAM_MAGIC325Magic damage
DAM_POINT646Point (pierce)
DAM_FALL1287Fall damage

Protection Types (PROT_)

Used with protection[] array. Indices correspond to DAM_INDEX_*.

ConstantIndexDescription
PROT_BARRIER0Barrier protection
PROT_BLUNT1Blunt protection
PROT_EDGE2Edge protection
PROT_FIRE3Fire protection
PROT_FLY4Knockback resist
PROT_MAGIC5Magic protection
PROT_POINT6Point protection
PROT_FALL7Fall protection

Use IMMUNE (-1) to make an NPC completely immune to a damage type.

Guilds (GIL_)

Used in the guild field of C_NPC.

Human Guilds

ConstantValueDescription
GIL_NONE0No guild
GIL_PAL1Paladins (= GIL_HUMAN)
GIL_MIL2Militia
GIL_VLK3Citizens (Volk)
GIL_KDF4Fire Mages (Kreis des Feuers)
GIL_NOV5Novices
GIL_DJG6Dragon Hunters (Drachenjäger)
GIL_SLD7Mercenaries (Söldner)
GIL_BAU8Farmers (Bauer)
GIL_BDT9Bandits
GIL_STRF10Prisoners (Sträfling)
GIL_DMT11Dementors
GIL_OUT12Guildless (Outsider)
GIL_PIR13Pirates
GIL_KDW14Water Mages (Kreis des Wassers)
GIL_PUBLIC15Public / generic

Monster Guilds

ConstantValueDescription
GIL_MEATBUG17Meatbug
GIL_SHEEP18Sheep
GIL_GOBBO19Goblin
GIL_SCAVENGER22Scavenger
GIL_GIANT_RAT23Giant rat
GIL_GIANT_BUG24Giant bug
GIL_BLOODFLY25Bloodfly
GIL_WARAN26Waran (lizard)
GIL_WOLF27Wolf
GIL_MINECRAWLER29Minecrawler
GIL_LURKER30Lurker
GIL_SKELETON31Skeleton
GIL_ZOMBIE34Zombie
GIL_SNAPPER35Snapper
GIL_SHADOWBEAST36Shadowbeast
GIL_HARPY38Harpy
GIL_STONEGOLEM39Stone golem
GIL_FIREGOLEM40Fire golem
GIL_ICEGOLEM41Ice golem
GIL_DEMON43Demon
GIL_TROLL45Troll
GIL_SWAMPSHARK46Swamp shark
GIL_DRAGON47Dragon
GIL_MOLERAT48Molerat
GIL_ALLIGATOR49Alligator
GIL_SWAMPGOLEM50Swamp golem
GIL_STONEGUARDIAN51Stone guardian
GIL_GARGOYLE52Gargoyle

Orc Guilds

ConstantValueDescription
GIL_ORC59Orc
GIL_FRIENDLY_ORC60Friendly orc
GIL_UNDEADORC61Undead orc
GIL_DRACONIAN62Draconian

NPC Flags (NPC_FLAG_)

Used in the flags field of C_NPC.

ConstantValueDescription
NPC_FLAG_FRIEND1Friendly NPC
NPC_FLAG_IMMORTAL2Immortal NPC
NPC_FLAG_GHOST4Ghost (transparent)

NPC Types (NPCTYPE_)

Used in the npctype field of C_NPC.

ConstantValueDescription
NPCTYPE_AMBIENT0Background NPC
NPCTYPE_MAIN1Main/important NPC
NPCTYPE_FRIEND2Player's friend
NPCTYPE_OCAMBIENT3Old Camp ambient (Gothic I)
NPCTYPE_OCMAIN4Old Camp main (Gothic I)
NPCTYPE_BL_AMBIENT5Bandit camp ambient
NPCTYPE_TAL_AMBIENT6Valley ambient
NPCTYPE_BL_MAIN7Bandit camp main

Fight Tactics (FAI_)

Used in the fight_tactic field of C_NPC.

Human

ConstantValueDescription
FAI_HUMAN_COWARD2Flees from combat
FAI_HUMAN_NORMAL42Standard combat behavior
FAI_HUMAN_STRONG3Aggressive, uses combos
FAI_HUMAN_MASTER4Expert fighter, optimal moves

Monster

ConstantValueDescription
FAI_NAILED1Stationary
FAI_MONSTER_COWARD10Monster flees
FAI_GOBBO7Goblin
FAI_SCAVENGER15Scavenger
FAI_GIANT_RAT11Giant rat
FAI_GIANT_BUG31Giant bug
FAI_BLOODFLY24Bloodfly
FAI_WARAN21Waran
FAI_WOLF22Wolf
FAI_MINECRAWLER5Minecrawler
FAI_LURKER9Lurker
FAI_ZOMBIE23Zombie
FAI_SNAPPER18Snapper
FAI_SHADOWBEAST16Shadowbeast
FAI_HARPY36Harpy
FAI_STONEGOLEM8Stone golem
FAI_DEMON6Demon
FAI_TROLL20Troll
FAI_SWAMPSHARK19Swamp shark
FAI_DRAGON39Dragon
FAI_MOLERAT40Molerat
FAI_ORC12Orc
FAI_DRACONIAN41Draconian
FAI_ALLIGATOR43Alligator
FAI_GARGOYLE44Gargoyle
FAI_BEAR45Bear
FAI_STONEGUARDIAN46Stone guardian

Materials (MAT_)

Used in the material field of C_Item. Affects pickup, drop, and hit sounds.

ConstantValueDescription
MAT_WOOD0Wood
MAT_STONE1Stone
MAT_METAL2Metal
MAT_LEATHER3Leather
MAT_CLAY4Clay
MAT_GLAS5Glass

Senses (SENSE_)

Used in the senses field of C_NPC. Can be combined with bitwise OR.

ConstantValueDescription
SENSE_SEE1NPC can see
SENSE_HEAR2NPC can hear
SENSE_SMELL4NPC can smell

Talents (NPC_TALENT_)

Used with HitChance[] and Npc_GetTalent()/Npc_SetTalent().

ConstantValueDescription
NPC_TALENT_UNKNOWN0Unknown
NPC_TALENT_1H1One-handed weapon
NPC_TALENT_2H2Two-handed weapon
NPC_TALENT_BOW3Bow
NPC_TALENT_CROSSBOW4Crossbow
NPC_TALENT_PICKLOCK5Lockpicking
NPC_TALENT_MAGE7Magic circle
NPC_TALENT_SNEAK8Sneaking
NPC_TALENT_REGENERATE9Regeneration
NPC_TALENT_FIREMASTER10Fire mastery
NPC_TALENT_ACROBAT11Acrobatics
NPC_TALENT_PICKPOCKET12Pickpocket
NPC_TALENT_SMITH13Smithing
NPC_TALENT_RUNES14Rune crafting
NPC_TALENT_ALCHEMY15Alchemy
NPC_TALENT_TAKEANIMALTROPHY16Skinning/trophy
NPC_TALENT_FOREIGNLANGUAGE17Foreign language
NPC_TALENT_WISPDETECTOR18Wisp detector

Quest Log

ConstantValueDescription
LOG_RUNNING1Quest in progress
LOG_SUCCESS2Quest succeeded
LOG_FAILED3Quest failed
LOG_OBSOLETE4Quest obsolete
LOG_MISSION0Mission entry type
LOG_NOTE1Note entry type

Attitudes (ATT_)

ConstantValueDescription
ATT_FRIENDLY3Friendly
ATT_NEUTRAL2Neutral
ATT_ANGRY1Angry
ATT_HOSTILE0Hostile

Wear Slots

Used in the wear field of C_Item.

ConstantValueDescription
WEAR_TORSO1Torso slot
WEAR_HEAD2Head slot
WEAR_EFFECT16Effect slot

Inventory Categories (INV_)

ConstantValueDescription
INV_WEAPON1Weapons
INV_ARMOR2Armors
INV_RUNE3Runes
INV_MAGIC4Magic items
INV_FOOD5Food
INV_POTION6Potions
INV_DOC7Documents
INV_MISC8Misc items

Perception Distances

ConstantValueDescription
PERC_DIST_ACTIVE_MAX2000Default max range
PERC_DIST_INTERMEDIAT1000Intermediate range
PERC_DIST_DIALOG500Dialog range
PERC_DIST_MONSTER_ACTIVE_MAX1500Monster max range
PERC_DIST_ORC_ACTIVE_MAX2500Orc max range
PERC_DIST_DRAGON_ACTIVE_MAX3500Dragon max range
PERC_DIST_SUMMONED_ACTIVE_MAX2000Summoned creature range

Movement Modes

ConstantValueDescription
NPC_RUN0Running
NPC_WALK1Walking
NPC_SNEAK2Sneaking
NPC_RUN_WEAPON128Running with weapon
NPC_WALK_WEAPON129Walking with weapon
NPC_SNEAK_WEAPON130Sneaking with weapon

Fight Modes

ConstantValueDescription
FMODE_NONE0No weapon
FMODE_FIST1Fists
FMODE_MELEE2Melee weapon
FMODE_FAR5Ranged weapon
FMODE_MAGIC7Magic