Personalities OXP

From Elite Wiki

Adds Oolite community personalities to your game

Lestradae.png

Overview

This OXP adds characters we all know and love from the Oolite Bulletin Boards to the Ooniverse. Each personality has some specific behaviour and communication patterns.

Notable Features

There is a 65% chance that you will meet one well-known personality when you either jump into a new system or launch from a main station. Some of them are traders or engage in asteroid mining, some of them are bounty hunters and will protect you in case a pirate attacks you—or attack you in case you are the pirate. Some will only engage Thargoids. And some greet you friendly first, but may try to make you one more step on their ELITE ladder if nobody else is looking. Their behaviour in combat varies, but expect all of them to be a little tougher than your average adversary.

A list of the personalities contained in the basic OXP can be found at the very bottom of its ReadMe, separated by enough whitespace. If you like to be surprised, don't scroll down.

Notes on Alnivel's update version 0.91 (2022)

Update of the original 10 personalities to work with newer versions of Oolite. Adds more options.

Notes on original version 0.9 (2009)

DISCLAIMER

Personalities.oxp is a work in progress, and this version 0.9 is meant as a sneak preview, to give you a feeling what it looks like. It works as it is, but the final release may be different. Please help improving it by reporting bugs and strange or unexpected behaviour in its thread on the Oolite Bulletin Boards. Thanks very much!

Instructions

How do I add myself as a character?

Note: Take this instruction not as a “do it all yourself”, but rather as a reference in case you want to tweak something for yourself (or, well, do everything all yourself). You can always ask for help in the BB thread or even just leave a request there to be added.

You can do this either by modifying this OXP or by creating a separate one, but in any case, you will need at least basic knowledge of how to work on them. It is still preferable to be separate, but still choose as you like or can! A good starting point and reference would be OXP howto.


Make an entry about your ship in shipdata.plist

  1. As a base you can take a entry from the game files or OXP or, if your ship is from OXP, from its files.
  2. Adjust the parameters so that they correspond to the specs of your ship in the game. Pay special attention to:

Make sure that models, textures and shaders used be ship will be available not only for you

  1. Copy them to the appropriate folder of OXP.
  2. (Optional) It would be great if you change resource names, both filenames and references inside the models (.dat) and shipdata.plist, as this will help avoid conflicts.
Model files are just regular text files, same as shipdata.plist, so they can be opened in a any decent text editor. It might be a good idea to use search and replace - one Griff's Cobra model has more than 800 lines with the name of the texture.

(Optional) Add a character entry in characters.plist

If you're carrying an escape capsule with you, you should create this entry, or one day a complete stranger will escape the ship instead of you!

Example of such a entry:

"personalities-hesperus" = {
    bounty = 150; 
    name = "Captain Jack Hesperus"; 
    "random_seed" = "0 0 0 0 0 0"; 
    "short_description" = "a notorious, feline trumble dealer from Orrira"; 
}; 

Give your ship a personality (shipdata.plist)

  • name - shipname: charactername.
  • pilot - key of entry in characters.plist, for example,personalities-hesperus.
  • roles:
general role: personalities
occupation: personalities_cruiser (trader), personalities_privateer (pirate) or personalities_hunter (bounty hunter)
spawn options (several or even none may be specified):
personalities_galaxy_any - can appear in space or near main station in any galaxy
personalities_launcher_galaxy_any - can apear launching from main station in any galaxy (some ships are too big for that)
personalities_galaxy_0, personalities_launcher_galaxy_0 - similar to 'any' variant but limited only to the Galaxy One.
personalities_yourCharacterName - opional but useful for testing
Examples:
  1. personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan - pirate by name "Aodhan" that can appear in any galaxy both in space and via launch from main station,
  2. personalities personalities_hunter personalities_galaxy_7 personalities_launcher_galaxy_7 personalities_cwydion - bounty hunter by name "Gwydion" that can appear only in Galaxy Eight both in space and via launch from main station,
  3. personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson - trader by name "Jameson" that can appear only in Galaxy One, Two and Three and only in space
  • ai_type and script - there are two options here: plist AI or priority AI
Plist AI - relatively obsolete, but more straightforward for making your own tweaks:
ai_type - personalitiesCruiserAI.plist, personalitiesHunterAI.plist or personalitiesPrivateerAI.plist
script - personalities-ship-script.js
Priority AI - available more communications and slightly better interaction with the environment:
ai_type - personalities-cruiserAI.js, personalities-hunterAI.js or personalities-privateerAI.js
script - personalities-priorityai-ship-script.js
You can also put in your own AI scripts, but then OXP will only decide when to add your personality, and you have to implement everything else yourself.

Customize behavior via script_info (shipdata.plist)

Plist AI
Key Key meaning / commentary Value Value meaning / commentary
name internal identifier, required
displayName the character's human readable name
attacked what to do when attacked "flee" lets the ship flee with injectors immediatly if attacked
attackProbability chance of finding the ship's prey (see below) with each scan number in range [0; 1]
cargoType special cargo carried by the ship (e.g. "missilepod") role
energyDown what to do in combat when energy is less than 1/2 (shield down) "flee" lets the ship flee with injectors
"jump" lets the ship jump out
"cloak" lets the ship only use its cloak if its shields depleted
energyLow what to do in combat when energy is less than 1/4 "flee" lets the ship flee with injectors
"jump" lets the ship jump out
launch what to do after launch from the main station "jump" jump to another system
"stay" keep in this system
maxCargo the maximum number of cargopods spawned if the ship dies integer
miningProbability chance of finding asteroids with each scan (only if no prey found) and mining them number in range [0; 1]
fuelstationProbability chance of using the fuel station (if any), if spawned at witchpoint
sunskimProbability chance of going to the sun first, if spawned at witchpoint
prey who to hunt "traders" (privateers only) will only attack ships which are 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 (hunters only) bounty treshold for offenders (or fugitives) to be attacked integer
Priority AI
Key Key meaning / commentary Value Value meaning / commentary
name internal identifier, required
displayName the character's human readable name, required
attacked what to do when attacked "flee" flee away from the fight
"destroy" destroy the attacker, even if they no longer wants to fight
"repel" repel the attacker
energyDown what to do in combat when energy is less than 1/2 (shield down) "flee" flee away from the fight
"jump" try to witchspace out from the combat
"continue" keep fighting (default)
energyLow what to do in combat when energy is less than 1/4 "flee" flee away from the fight (default)
"jump" try to witchspace out from the combat
"continue" keep fighting (default)
launch what to do after launch from the main station "jump" jump to another system
"stay" keep in this system
"random" 50 / 50 (default)
prey who to hunt "everybody" (privateer only) any clean or not ship (but not police)
"loneVictim" (privateer only) lone pirate victims
"traders" (privateer only) pirate victim ships
"offenders" (hunter only) any offender with sufficient bounty
"thargoids" (hunter only) only thargoids
"nobody" (default) but logicale suitable only for cruisers
preyLimit the minimum bounty that is worth attacking prey positive number if not specified, the standard fine threshold / 2 is used
preyCombatOdds what combat odds are sufficient to attack, "good" is default "none" Note that the standard oolite hunters are happy with the (not) bad outcome:
"if we require bounty hunters to have actual *good* odds they'll never shoot anything"
(from oolite-bountyHunterAI.js)
"excelent"
"good"
"bad"
"terrible"
"any"
distressCallReaction what to do if you hear a distress call if combat odds good enough "ignore" (default) do distressCallInsufficientOddsReaction
"help" intervene on the side of the victim (this is not necessarily who sent the call)
"finishOff" attack the sender of the call
distressCallCombatOdds what combat odds are sufficient to intervene same as for preyCombatOdds
distressCallInsufficientOddsReaction what to do if it's too dangerous to intervene "ignore" (default) do nothing, just fly by
"leaveVicinity" leave vicinity of the sender of distress call
"jumpOut" preventively try to witchspace out
miningProbability chance to start mining if nothing to do more and it posible number in range [0; 1]
fuelstationProbability chance to to refuel at fuelstation after witchspace jump if posible and need
sunskimProbability chance to sunskim after witchspace jump if posible and need


Add communication messages into description.plist

  1. Add entry of what types of messages are used, name below must be same as in script_info:
"personalities-name-messageTypes" = "attack attacked captured chatter dead flee jump kill launch witchspace"
  1. Add the comms themselves:
"personalities-name-attack" = ("Phrase to be sent when attack");
"personalities-name-attacked" = ("Either this phrase will be sent..", "or this one when ship attacked");
"personalities-name-chatter" = ("Also you can add...{pause: 5} some dramatic pauses!");
List of available message types
Comms key Full form (PriorityAI scripts) Notes
attack oolite_beginningAttack Commencing an attack, repetitive
flee oolite_startFleeing Ship begins fleeing combat
jump oolite_engageWitchspaceDriveFlee Ship to escape from a fight via witchspace jump
kill oolite_killedTarget Current fight target destroyed
witchspace oolite_engageWitchspaceDrive Preparing to witchspace jump
greet personalitiesOXP_greet (Only with PriorityAI) First chatter
chatter personalitiesOXP_chatter Player nearby, repetitive
launch personalitiesOXP_launch Launched from a main station
attacked personalitiesOXP_attacked Someone hits the ship, repetitive
dead personalitiesOXP_dead Killed or ejected escape pod
captured personalitiesOXP_captured Escape pod unloaded at station

Note: With PriorityAI scripts you can also use any standart comms key with or without oolite_ prefix:

"personalities-name-messageTypes" = "dockingWait oolite_selectedStation"; // In messageTypes entry types must be writen same as in descriptions key!
"personalities-name-dockingWait" = ("Complaints about tedious waiting for docking");
"personalities-name-oolite_selectedStation" = ("Phrase about going to check local ConStore");

If you have any questions or suggestions, don't hesitate to ask them in BB thread or send a PM to Alnivel.



How do I remove my own character?

  1. Open the shipdata.plist inside the "Config" folder.
  2. Look for the entry "personalities-<yourname>".
  3. Remove it completely OR Go to its "roles" key, and delete the roles with "personalities" and "personalities_launcher".

Minimum Requirements

Personalities 0.95 was updated for Oolite 1.90. The AI's are still in .plist form, but can now be located in a specific system/galaxy. Personalities 0.9 was written and tested on Oolite 1.73.4. It should run on Oolite 1.73 and above. Some of its features will only be available and enabled from Oolite 1.74 onwards.

Download Location

Personalities.oxp v 0.9.2 (2022)

Personalities.oxp v 0.9 (2009) is available for download via Box.com.

Installation

Move or copy the file Personalities.oxp from the main download folder into your AddOns folder. Where this resides, depends on your OS and your personal preferences. Restart Oolite.

IconLib.png

Tweaking

This oxp is customisable through Library OXP - via the Config for AddOns option on the docked F4 screen

Version History

  • version 0.9.2 (October, 2022)
new AI scripts, most personalities now use them
with new scripts standard communications keys can be used (however, it makes sense to use only those that are used by AI), old comms keys still works
fixed a bug in plistAI scripts that caused the ships themselves to never attack
pauses can be added to comms messages: "The message will be split{pause: 12}and the second half will be sent with specified delay"
appearance can be limited through the list of roles:
1) "personalities personalities_privateer personalities_galaxy_any personalities_launcher_galaxy_any personalities_aodhan" -
pirate by name "Aodhan" that can appear in any galaxy both in space and via launch from main station
2) "personalities personalities_cruiser personalities_galaxy_0 ppersonalities_galaxy_1 personalities_galaxy_2 personalities_jameson" -
trader by name "Jameson" that can appear only in Galaxy One, Two and Three and only in space
added methods for setting callbacks at escape pod scooping and unloading
added method to adjust spawn weight (for galaxies) in case if someone suddenly decides to use 100 ship variants with a weight of (0.01) each
  • version 0.9.1 (September, 2022) by Alnivel
requires Oolite 1.90 (probably can work even on versions 1.82+, but not tested)
fixed several broken function calls
changed names of internal variables and resources to avoid conflicts
changed comms message using method, it now requires a description.plist entry to be defined in this format:
"personalities-<personality name>-messageTypes" = "<list of space separated message types>";
rewritten methods for the spawn of special ships, changing a probability of this spawns now easier
added method for adding role to appear on a specified condition, such as system id, after some event etc
  • version 0.9 (November 5th, 2009) by Commander McLane
functional version for testing and feedback purposes
script may still get worked over
requires Oolite 1.73

Links