Creature and Object Identification is done through the ObjectType Class.
The IDS file used is Object.ids
ObjectType is arranged as follows
EnemyAlly General
General |
Race |
Class |
Specifics V
Instance Specific
SpecialCase
Eg. [EnemyAlly.General.Race.Class.Specifics.Instance.SpecialCase]
EnemyAlly is a range between the PC and the evil NPC’s Creatures can fall anywhere along this range.
The IDS file used is EA.ids
PC refers to any of the possible six party members.
GOODCUTOFF refers to anyone good. Party members, allies, summoned monsters, etc.
GOODBUTBLUE refers to anyone good but with a blue circle.
ENEMY refers to anyone evil, generally red circles.
EVILBUTBLUE refers to anyone evil but with a blue circle.
EVILBUTGREEN refers to anyone evil but with a green circle.
NEUTRAL refers to anyone neutral, generally blue circles.
ANYONE refers to any object.
General specifies the generic characteristics of the creature.
The IDS file used is General.ids
HUMANOID
ANIMAL
DEAD
UNDEAD
GIANTHUMANOID
MONSTER
Etc.
Race is the race of the creature.
The IDS file used is Race.ids
HUMAN
ELF
HALF_ELF
DWARF
HALFLING
GNOME
ANKHEG
BASILISK
BEAR
Class is the class information (Mage, Fighter …) Alternatively it can be used for more detailed information (e.g. Drow is more specific then elf)
The IDS file used is Class.ids
MAGE
FIGHTER
FIGHTER_THIEF
BASILISK_GREATER
BEAR_POLAR
Specifics holds the identification for special NPC’s
Instance is unique for each creature within the game. It should not generally be specifies in the AI scripting but will be set by the AI code once a target is selected
SpecialCase is used to specify whether or not to use any special case information. Currently this will only be used for LAttacked and LTargetted. Protecting, Protector and Myself must be stored in a different way so that you can do things like Protecting.Lattacked.
Eg. To specify all Enemy Fighters: [ENEMY.0.0.FIGHTER]
The following functions return ObjectType variables corresponding to some special cases. They are called using the following syntax:
Function(Source)
For Example: LAttacked(“Spud”) will return the ObjectType of the last thing to attack Spud.
If One of Leader, Weakest, Strongest, MDamaged, LDamaged is called, the Source will be used ONLY to determine which group to use.
For Example: Leader(“Spud”) will return the leader of Spud’s Group
These functions can be used as the Source for any other of these functions. HOWEVER, this nesting can only go 5 deep.
For Example: Protector(LAttacked(LTargeted(Protecting(Myself)))) is valid and will return the protector of the person last attacked by the person last targeted by the person protecting myself. Any more then this depth of nesting is NOT allowed, however.
Note: If you ever use this level of nesting, please seek professional help.
This is the scriptname in the creature file.
This is the creature that the script belongs to.
Leaving out the Object within the brackets defaults the Object to Myself
The Creature that last did the Object damage.
Last heard by the Object.
Last seen by the Object.
Last talked to by the Object.
Both of these default to LastTalkedToBy(Myself)
Last triggerer of the Object
Character 2, 3, 4, 5 or 6 in the order they have joined.
Party member with the highest threat rating.
Male party member with the highest threat rating.
Party member with lowest threat rating.
Returns the nearest creature with Enemy / Ally flag opposite to the Object.
You can check the first ten nearest enemies.
Returns the instance of the nearest Object of the given Type.
Eg. Nearest([0.0.DWARF])
You can check the first ten nearest.
Party member with the worst AC.
BestAC()
Party member with the best AC.
NearestEnemyOfType(Type)
Eg. NearestEnemyOfType([0.0.0.MAGE])
SecondNearestEnemyOfType(Type)
Triggers return True or False
I am a game trigger and have just been clicked on by Object. Usually info triggers use this.
I am a trigger and an Object just entered me. Usually proximity traps use this.
I am a Door and I have just been closed by an Object.
I am a Door, container and I have just been opened by an Object.
I am a Door, container, trigger and my trap has been detected by an Object.
I am a Door, container, trigger and my trap has been disarmed by an Object.
I am a Door, container, trigger and my trap has failed to be disarmed by an Object.
Object just failed to pick my lock.
Object just unlocked me.
I was just attacked by an Object using Style.
Style: DEFAULT
MELEE
RANGED
I am a creature and I just became visible to the party.
I am in the party and have reached my breaking Point.
I have just died. This does not always seem to work.
An Object just died in my hearing range.
I heard an Object shout X.
I have just been hit by an Object using Style.
I have just been created (not necessarily for the first time)
This can be used for creature and area scripts.
My weapon is out of ammo.
ActionListEmpty()
I have no current actions to complete.
Creature Status
Alignment(Object, Alignment)
The Object is of the Alignment specified.
The IDS file used the Align.ids
LAWFUL_GOOD
NEUTRAL
CHAOTIC_EVIL
MASK_GOOD
Allegiance(Object, Allegiance)
The Object is of the Allegiance specified.
Class(Object, Class)
The Object is of the Class specified.
Kit(Object, Kit)
The Object is of the Kit specified.
The IDS file used is Kit.ids
Race(Object, Race)
The Object is of the Race specified.
Gender(Object, Gender)
The Object is of the Gender specified.
The IDS file used is Gender.ids
MALE
FEMALE
SUMMONED
ILLUSIONARY
EXTRA
SUMMONED_DEMON
General(Object, General)
The Object is of the General state specified.
Specifics(Object, Specific)
The Object is of the Specific state specified.
The IDS file used is Specific.ids
HP(Object, X)
HPGT(Object, X)
HPLT(Object, X)
Compares the Object’s hitpoints to X.
HPPercent(Object, X)
HPPercentLT(Object, X)
HPPercentGT(Object, X)
Compares the Object’s hitpoints to X percent.
Morale(Object, X)
MoraleGT(Object, X)
MoraleLT(Object, X)
Compares the Object’s morale to X.
Reputation(Object, X)
ReputationGT(Object, X)...
apd61