Posted: Mon Nov 23, 2009 11:55 am
In order to help future contributors, here's a short overview of the internal workings:
All personalities have one basic AI, "personalitiesAI.plist", and a common ship script, "personalities-ship-script.js", which modifies their behaviour, starting from three basic behaviours:
Here is a complete list of the available keys, their possible values and meaning:
More keys may be added, if more triggers and behaviours are requested.
EDIT: added another value which I originally forgot ("cloak" for energyDown)
All personalities have one basic AI, "personalitiesAI.plist", and a common ship script, "personalities-ship-script.js", which modifies their behaviour, starting from three basic behaviours:
- cruiser: like a trader, just flies from witchpoint to planet, not looking for fights;
- hunter: like a bounty hunter, also cruising between witchpoint and planet, but scanning for and attacking criminals within certain parameters;
- privateer: like a pirate, also cruising between witchpoint and planet, but scanning for and attacking other ships within certain parameters, if there is no police nearby.
Here is a complete list of the available keys, their possible values and meaning:
Code: Select all
Key value meaning
attacked "flee" lets the ship flee with injectors immediatly if attacked
attackProbability 0 -- 1 chance of finding the ship's prey (see below) with each scan
cargoType role special cargo carried by the ship (e.g. "missilepod")
displayName the character's human readable name
energyDown "flee" lets the ship flee with injectors, if its energy is down to 1/2
(= shields depleted)
"jump" lets the ship jump out, if its energy is down to 1/2 (=
shields depleted)
"cloak" lets the ship only use its cloak if its energy is down to 1/2
(= shields depleted) (will only work starting from Oolite 1.74)
energyLow "flee" lets the ship flee with injectors, if its energy is down to
1/4
"jump" lets the ship jump out, if its energy is down to 1/4
fuelstationProbability 0 -- 1 chance of using the fuel station (if any), if spawned at
witchpoint
launch "jump" lets the ship jump out of the system, after launching from
the main station
"stay" lets the ship set course to the witchpoint, after launching
from the main station
(if undefined, the behaviour is randomized)
maxCargo integer the maximum number of cargopods spawned if the ship dies
miningProbability 0 -- 1 chance of finding asteroids with each scan (only if no prey
found) and mining them
name internal identifier for the character's chatter
prey "traders" (privateers only) will only attack ships which are pirate
victims
"everybody" (privateers only) will attack any ship
"offenders" (hunters only) will attack any ship with a bounty above a
certain treshold
"thargoids" (hunters only) will only attack Thargoids, not pirates
preyLimit integer (hunters only) bounty treshold for offenders (or fugitives)
to be attacked
sunskimProbability 0 -- 1 chance of going to the sun first, if spawned at witchpoint
EDIT: added another value which I originally forgot ("cloak" for energyDown)