The .gdb Object
Ok, here comes quite possibly the most complicated part of creating your monster.
Alright, .gdb objects in Anachronox take care of quite a few things, including items, weapons, quests and treasure, they also take care of enemys!
Located in the directory 'anoxdata\objects\monsters\' are many, many .gdb files, each containing the individual characteristics for an enemy. See the section on GDB for more information about creating .GDBs.
Ok, Im not sure about you but I learn best from example so lets take a look at an existing monster.
Open up 'anoxdata\objects\monsters\mutant.gdb'.
Now, lets take a look at the contents and see if we can make any sense of it.
classname string "monster_mutant"
desc string "Toxic mutant in Ballotine."
battle_drop string "50%HealGrease Plus;money=600~700"
battle_icon string "MEDbiped"
// level int 25
level_adjust int 0
maxhp int 300
maxenergy int 0
// xp int 60
damage string "hp=40"
range_damage string "hp=40"
aiscript file "battle/ai/Mutant.txt"
ai_magic int 1
usecamera int 1
rangescript string "monster_mutant_atak2a_none"
rangeeffect string "tohit=20;hp=80"
It looks rather simple as each variable has a descritive name, but lets go through each one and describe it (well, my understanding of what it does).
Ok, the first code block is the #monster segement. What I think you stick in here is all the descriptive data for your monster.
#monster Mutant = The classname of your monster
classname string "monster_mutant" = The entity.dat name that links a model to this monster. See Models for more information
desc string "Toxic mutant in Ballotine." = A description of your monster.
battle_drop string "50%HealGrease Plus;money=600~700" = The items/money that your monster can drop.
battle_icon string "MEDbiped" = The battle icon (the thing you click to target the monster).
// level int 25 = This line is commented out.
level_adjust int 0 = No idea?
maxhp int 300 = Maximum HP.
maxenergy int 0 = Maximum Energy (NRG ?).
// xp int 60 = This line is commented out.
damage string "hp=40" = I think that this is some kind of damage modifier (perhaps the base damage).
range_damage string "hp=40" = As above, but for ranged attacks.
aiscript file "battle/ai/Mutant.txt" = Location of your AI script file. See Monster AI for more information
Now, this second segment is an attack Object (the attack called 'MutantSpecial'). Here we describe a new attack for a monster (all monsters by default have a base attack that you dont describe, I'll talk about this later) and also link it up to the Planet script to use for this attack.
#object MutantSpecial = Attack name
ai_magic int 1 = Defines weither or not this is a magic attack?
usecamera int 1 = Use the camera during the script?
rangescript string "monster_mutant_atak2a_none" = Filename of base attack script (note that this is a ranged attack, by the use of the word 'rangescript'.
rangeeffect string "tohit=20;hp=80" = The effect list of this attack (hit chance,damage).