Przejdź do treści
Gothic MultiplayerMultiplayer
Gothic MP Wiki

Constants (gmp.enum)

Shared constants: hit types, equipment slots, item types, object types, relations, controls and skills.

All constants taken and returned by the API live in gmp.enum - shared: the same names and values in client-side and server-side scripts. Always use the names, never the raw numbers - new values are only ever added at the end, so existing numbers never change.

local E = gmp.enum
attacker:hit(victim, E.HitType.MeleeHeavy)
ch:grantSkill(E.Skill.Ranged_Bow_Master)

HitType

Kind of a hit.

NameValueDescription
gmp.enum.HitType.Fists0A punch.
gmp.enum.HitType.Melee1A light swing with the attacker's equipped melee weapon (short stagger).
gmp.enum.HitType.MeleeHeavy2A heavy swing: knocks the victim down.
gmp.enum.HitType.MeleeMedium3A medium swing: a stronger stagger without a knockdown.
gmp.enum.HitType.Arrow4A projectile (arrow or bolt) from the attacker's equipped bow or crossbow; no knockdown.
gmp.enum.HitType.Spell5A spell projectile (spell projectile definition class as the weapon).
gmp.enum.HitType.Tick6Damage without a weapon: damage over time, burning, a fall.

EquipSlot

Where an item is equipped.

NameValueDescription
gmp.enum.EquipSlot.MeleeWeapon0Melee weapon slot (can also hold a rune or scroll).
gmp.enum.EquipSlot.RangedWeapon1Ranged weapon slot (can also hold a rune or scroll).
gmp.enum.EquipSlot.Armor2Armor.
gmp.enum.EquipSlot.RingLeft3Ring on the left hand.
gmp.enum.EquipSlot.RingRight4Ring on the right hand.
gmp.enum.EquipSlot.Amulet5Amulet.
gmp.enum.EquipSlot.QuickBar6Quick-access bar (the entry's index is the position on the bar).
gmp.enum.EquipSlot.Torch7Torch slot.

ItemType

What an item is.

NameValueDescription
gmp.enum.ItemType.Other0Any other item (ores, herbs, miscellaneous items).
gmp.enum.ItemType.MeleeWeapon1One- or two-handed melee weapon.
gmp.enum.ItemType.Bow2Bow.
gmp.enum.ItemType.Crossbow3Crossbow.
gmp.enum.ItemType.Ammo4Ammunition (arrows, bolts).
gmp.enum.ItemType.Torch5Torch.
gmp.enum.ItemType.Armor6Armor.
gmp.enum.ItemType.Ring7Ring.
gmp.enum.ItemType.Amulet8Amulet.
gmp.enum.ItemType.Rune9Rune.
gmp.enum.ItemType.Scroll10Spell scroll.
gmp.enum.ItemType.Potion11Potion.
gmp.enum.ItemType.Food12Food or drink.
gmp.enum.ItemType.Writing13Written item (book, letter, map).
gmp.enum.ItemType.Key14Key.

ObjectType

Kind of an interactive world object.

NameValueDescription
gmp.enum.ObjectType.Seat0Bench or chair.
gmp.enum.ObjectType.Ladder1Ladder.
gmp.enum.ObjectType.Torch2Object with a fire that can be lit or extinguished: roadside torch, fire basket.
gmp.enum.ObjectType.Other3Any other interactive object (door, chest, crafting table, bed...). Reported in events only; not searchable.

Relation

How a character treats another character (one-way).

NameValueDescription
gmp.enum.Relation.Unknown0Unknown or not set.
gmp.enum.Relation.Enemy1Enemy.
gmp.enum.Relation.Hostile2Hostile.
gmp.enum.Relation.Angry3Angered (e.g. after being hit).
gmp.enum.Relation.Neutral4Neutral.
gmp.enum.Relation.Friend5Friend.

Control

Control "keys" of a character. Directions are relative to the character's camera angle.

NameValueDescription
gmp.enum.Control.Forward0Move forward.
gmp.enum.Control.Backward1Move backward.
gmp.enum.Control.Left2Move left.
gmp.enum.Control.Right3Move right.
gmp.enum.Control.Walk4Walk instead of running.
gmp.enum.Control.Sprint5Sprint.
gmp.enum.Control.Jump6Jump (on press; to jump again release and press it again).
gmp.enum.Control.Sneak7Sneak (while held).

Skill

Skills and their levels. The levels of one skill replace each other (Untrained -> Trained -> Master; for thievery and mining: Untrained -> Skilled -> Master).

Melee combat

NameValueDescription
gmp.enum.Skill.Melee_Fists_Untrained0
gmp.enum.Skill.Melee_Fists_Trained1
gmp.enum.Skill.Melee_Fists_Master2
gmp.enum.Skill.Melee_OneHanded_Untrained3
gmp.enum.Skill.Melee_OneHanded_Trained4
gmp.enum.Skill.Melee_OneHanded_Master5
gmp.enum.Skill.Melee_Orc_Untrained6Orc weapons.
gmp.enum.Skill.Melee_Orc_Trained7
gmp.enum.Skill.Melee_Orc_Master8
gmp.enum.Skill.Melee_TwoHanded_Untrained9
gmp.enum.Skill.Melee_TwoHanded_Trained10
gmp.enum.Skill.Melee_TwoHanded_Master11

Ranged combat

NameValueDescription
gmp.enum.Skill.Ranged_Bow_Untrained12
gmp.enum.Skill.Ranged_Bow_Trained13
gmp.enum.Skill.Ranged_Bow_Master14
gmp.enum.Skill.Ranged_Crossbow_Untrained15
gmp.enum.Skill.Ranged_Crossbow_Trained16
gmp.enum.Skill.Ranged_Crossbow_Master17

Magic circles (also set the circle level used by runes and scrolls)

NameValueDescription
gmp.enum.Skill.Mage_Circle_Untrained18
gmp.enum.Skill.Mage_Circle_Amateur19
gmp.enum.Skill.Mage_Circle_120
gmp.enum.Skill.Mage_Circle_221
gmp.enum.Skill.Mage_Circle_322
gmp.enum.Skill.Mage_Circle_423
gmp.enum.Skill.Mage_Circle_524
gmp.enum.Skill.Mage_Circle_625

Thievery

NameValueDescription
gmp.enum.Skill.Picklock_Untrained26
gmp.enum.Skill.Picklock_Skilled27
gmp.enum.Skill.Picklock_Master28
gmp.enum.Skill.Pickpocket_Untrained29
gmp.enum.Skill.Pickpocket_Skilled30
gmp.enum.Skill.Pickpocket_Master31
gmp.enum.Skill.Sneak32

Crafting and mining

NameValueDescription
gmp.enum.Skill.Crafting_Alchemy33
gmp.enum.Skill.Crafting_Blacksmith_Untrained34
gmp.enum.Skill.Crafting_Blacksmith_Trained35
gmp.enum.Skill.Crafting_Blacksmith_Master36
gmp.enum.Skill.Crafting_Inscription37Writing scrolls.
gmp.enum.Skill.Mining_Untrained38
gmp.enum.Skill.Mining_Skilled39
gmp.enum.Skill.Mining_Master40

Hunting (taking trophies from animals)

NameValueDescription
gmp.enum.Skill.Hunting_Claw_Trained41
gmp.enum.Skill.Hunting_Fins_Trained42
gmp.enum.Skill.Hunting_Fur_Trained43
gmp.enum.Skill.Hunting_MandibleMineCrawler_Trained44
gmp.enum.Skill.Hunting_MCPlate_Trained45Minecrawler plates.
gmp.enum.Skill.Hunting_Organ_Trained46
gmp.enum.Skill.Hunting_Reptiles_Trained47
gmp.enum.Skill.Hunting_Scutes_Trained48
gmp.enum.Skill.Hunting_Scutes_Master49
gmp.enum.Skill.Hunting_Secretion_Trained50
gmp.enum.Skill.Hunting_ShadowbeastHorn_Trained51
gmp.enum.Skill.Hunting_Skin_Trained52
gmp.enum.Skill.Hunting_SkinSwampshark_Trained53
gmp.enum.Skill.Hunting_SkullArmor_Trained54
gmp.enum.Skill.Hunting_Spines_Trained55
gmp.enum.Skill.Hunting_Stings_Trained56
gmp.enum.Skill.Hunting_StingsBloodfly_Trained57
gmp.enum.Skill.Hunting_Teeth_Trained58
gmp.enum.Skill.Hunting_TeethSwampshark_Trained59
gmp.enum.Skill.Hunting_TongueOfFire_Trained60
gmp.enum.Skill.Hunting_TrollHorn_Trained61
gmp.enum.Skill.Hunting_UluMulu_Trained62

Other

NameValueDescription
gmp.enum.Skill.Acrobatics63
gmp.enum.Skill.Diving64
gmp.enum.Skill.Orcish_Untrained65Orcish language.
gmp.enum.Skill.Orcish_Skilled66
gmp.enum.Skill.Orcish_Master67
gmp.enum.Skill.Riding68
gmp.enum.Skill.Scavenging69
gmp.enum.Skill.Wallclimbing70