Difference between revisions of "Personalities OXP"

From Elite Wiki
(Adding yourself as a character: Updated instructions)
(Updating BB links)
 
(10 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
[[File:Lestradae.png|right|400px]]
 
[[File:Lestradae.png|right|400px]]
 
== Overview ==
 
== Overview ==
This [[OXP]] adds characters we all know and love from the [http://www.aegidian.org/bb Oolite Bulletin Boards] to the Ooniverse. Each personality has some specific behaviour and communication patterns.
+
This [[OXP]] adds characters we all know and love from the [https://bb.oolite.space Oolite Bulletin Boards] to the Ooniverse. Each personality has some specific behaviour and communication patterns.
  
 
== Notable Features ==
 
== Notable Features ==
Line 14: Line 14:
 
== Notes on original version 0.9 (2009)==
 
== Notes on original version 0.9 (2009)==
 
=== DISCLAIMER ===
 
=== 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 [http://aegidian.org/bb/viewtopic.php?t=6806 its thread on the Oolite Bulletin Boards]. Thanks very much!
+
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 [https://bb.oolite.space/viewtopic.php?t=6806 its thread on the Oolite Bulletin Boards]. Thanks very much!
 +
 
 +
----
 +
== Tales from the spacelanes... ==
 +
 +
I'd stopped off at a [[Space Bar]] for a quick beverage and perhaps news of a tempting contract in the vicinity and was rather pleased to find a valuable bounty target en route to my next destination. A few jumps later and I was sharing a system with potentially 8000 buckshee credits.
 +
 +
As the system was an Anarchy I had to splash a couple of pirate groups as I torused towards the station and just as I'd finished off the second group I received word that my target had been liquidated by someone else. Foul language may have been employed at this point.
 +
 +
Making the best of the situation I headed for the station to refuel and offload cargo. I dropped out of Torus a few seconds later when I encountered of all things [[User:Wyvern|Commander Wyvern]] in his Caddy Omega heading towards the witchpoint. Suddenly I had my suspicions of exactly who had snaffled my 8000Cr.
 +
 +
These suspicions were confirmed when shortly after passing Wyvern I encountered the remnants of my targets escorts. Clearly the meagre bounties on these peons had been beneath the notice of the mighty Caddy.
 +
 +
The moral of the story? No matter your combat rating or how high you might stand in the [[Bounty Hunter Guild|bounty hunters' guild]], there's always someone in the eight charts with a sharper killer instinct than you. Travel safely friends and watch your six. [https://bb.oolite.space/viewtopic.php?p=127521#p127521 Loxley (2011)]
 +
 
 +
----
 +
== Instructions ==
 +
 
 +
=== How do I add myself as a character? ===
 +
<span id="Adding_yourself_as_a_character"></span> <!-- To keep old links to this section working -->
 +
<!--TODO:
 +
* hide it under spoiler - DONE
 +
* add note that this is rather docs / an instruction in case if they want to do it completely by themself - DONE
 +
* move instructions how remove / add in new section - DONE
 +
* make tables with behavior options have same width
 +
* add example of using behavior options
 +
* add list oxp to list of other oxp's that can be used
 +
-->
 +
'''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 [https://bb.oolite.space/viewtopic.php?f=4&t=6806 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|OXP howto]].
  
=== How do I remove my own character? ===
 
1) Open the shipdata.plist inside the "Config" folder.
 
2) Look for the entry "personalities-<yourname>".
 
3a) Remove it completely.
 
or
 
3b) Go to its "roles" key, and delete the roles "personalities" and "personalities_launcher".
 
  
=== Adding yourself as a character ===
+
<div class="mw-collapsible mw-collapsed custom-collapsible-left-toggle"  data-expandtext="Expand Instruction" data-collapsetext="Collapse Instruction" style="overflow:auto;">
 
'''Make an entry about your ship in [[shipdata.plist|shipdata.plist]]'''
 
'''Make an entry about your ship in [[shipdata.plist|shipdata.plist]]'''
 
#As a base you can take a entry from the game files or OXP or, if your ship is from OXP, from its files.
 
#As a base you can take a entry from the game files or OXP or, if your ship is from OXP, from its files.
Line 89: Line 113:
 
::: '''ai_type''' - <code>personalitiesCruiserAI.plist</code>, <code>personalitiesHunterAI.plist</code> or <code>personalitiesPrivateerAI.plist</code>  
 
::: '''ai_type''' - <code>personalitiesCruiserAI.plist</code>, <code>personalitiesHunterAI.plist</code> or <code>personalitiesPrivateerAI.plist</code>  
 
::: '''script''' - <code>personalities-ship-script.js</code>
 
::: '''script''' - <code>personalities-ship-script.js</code>
::''Priority AI'' - more available communications and slightly better interaction with the environment:
+
::''Priority AI'' - available more communications and slightly better interaction with the environment:
 
::: '''ai_type''' - <code>personalities-cruiserAI.js</code>, <code>personalities-hunterAI.js</code> or <code>personalities-privateerAI.js</code>  
 
::: '''ai_type''' - <code>personalities-cruiserAI.js</code>, <code>personalities-hunterAI.js</code> or <code>personalities-privateerAI.js</code>  
 
::: '''script''' - <code>personalities-priorityai-ship-script.js</code>
 
::: '''script''' - <code>personalities-priorityai-ship-script.js</code>
 
::''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.''
 
::''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 [[shipdata.plist#script_info|script_info]] (shipdata.plist)'''
+
'''Customize behavior via [[shipdata.plist#Format|script_info]] (shipdata.plist)''' <!--NOTE: I link to Format section, because in script_info almost nothing-->
:''Plist AI'':
+
 
<table border=1>
+
{| class="wikitable" style="vertical-align:middle;"
  <tr>
+
|+ Plist AI
    <th>Key</th>
+
|-
    <th>Value</th>
+
! Key
    <th>Meaning</th>
+
! Key meaning / commentary
  </tr>
+
! Value
  <tr>
+
! Value meaning / commentary
    <td>name</td>
+
|-
    <td></td>
+
| name
    <td>internal identifier for the character's chatter</td>
+
| internal identifier, required
  </tr>
+
|
  <tr>
+
|
    <td>displayName</td>
+
|-
    <td></td>
+
| displayName
    <td>the character's human readable name</td>
+
| the character's human readable name
  </tr>
+
|
  <tr>
+
|
    <td>attacked</td>
+
|-
    <td>"flee"</td>
+
| attacked
    <td>lets the ship flee with injectors immediatly if attacked</td>
+
| what to do when attacked
  </tr>
+
| "flee"
  <tr>
+
| lets the ship flee with injectors immediatly if attacked
    <td>attackProbability</td>
+
|-
    <td>number in range [0; 1]</td>
+
| attackProbability
    <td>chance of finding the ship's prey (see below) with each scan</td>
+
| chance of finding the ship's prey (see below) with each scan
  </tr>
+
| number in range [0; 1]
  <tr>
+
|
    <td>cargoType</td>
+
|-
    <td>role</td>
+
| cargoType
    <td>special cargo carried by the ship (e.g. "missilepod")</td>
+
| special cargo carried by the ship (e.g. "missilepod")
  </tr>
+
| role
  <tr>
+
|
    <td rowspan="3">energyDown</td>
+
|-
    <td>"flee"</td>
+
| rowspan="3" | energyDown
    <td>lets the ship flee with injectors, if its energy is down to 1/2 (= shields depleted)</td>
+
| what to do in combat when energy is less than 1/2 (shield down)
  </tr>
+
| "flee"
  <tr>
+
| lets the ship flee with injectors
    <td>"jump"</td>
+
|-
    <td>lets the ship jump out, if its energy is down to 1/2 (= shields depleted)</td>
+
|
  </tr>
+
| "jump"
  <tr>
+
| lets the ship jump out
    <td>"cloak"</td>
+
|-
    <td>lets the ship only use its cloak if its energy is down to 1/2 (= shields depleted)</td>
+
|
  </tr>
+
| "cloak"
  <tr>
+
| lets the ship only use its cloak if its shields depleted
    <td rowspan="2">energyLow</td>
+
|-
    <td>"flee"</td>
+
| rowspan="2" | energyLow
    <td>lets the ship flee with injectors, if its energy is down to 1/4</td>
+
| rowspan="2" | what to do in combat when energy is less than 1/4
  </tr>
+
| "flee"
  <tr>
+
| lets the ship flee with injectors
    <td>"jump"</td>
+
|-
    <td>lets the ship jump out, if its energy is down to 1/4</td>
+
| "jump"
  </tr>
+
| lets the ship jump out
  <tr>
+
|-
    <td rowspan="2">launch</td>
+
| rowspan="2" | launch
    <td>"jump"</td>
+
| rowspan="2" | what to do after launch from the main station
    <td>lets the ship jump out of the system, after launching from the main station</td>
+
| "jump"
  </tr>
+
| jump to another system
  <tr>
+
|-
    <td>"stay"</td>
+
| "stay"
    <td>lets the ship set course to the witchpoint, after launching from the main</td>
+
| keep in this system
  </tr>
+
|-
  <tr>
+
| maxCargo
    <td>maxCargo</td>
+
| the maximum number of cargopods spawned if the ship dies
    <td>integer</td>
+
| integer
    <td>the maximum number of cargopods spawned if the ship dies</td>
+
|
  </tr>
+
|-
  <tr>
+
| miningProbability
    <td>miningProbability</td>
+
| chance of finding asteroids with each scan (only if no prey found) and mining them
    <td rowspan="3">number in range [0; 1]</td>
+
| rowspan="3" | number in range [0; 1]
    <td>chance of finding asteroids with each scan (only if no prey found) and mining them</td>
+
|
  </tr>
+
|-
  <tr>
+
| fuelstationProbability
    <td>fuelstationProbability</td>
+
| chance of using the fuel station (if any), if spawned at witchpoint
    <td>chance of using the fuel station (if any), if spawned at witchpoint</td>
+
|
  </tr>
+
|-
  <tr>
+
| sunskimProbability
    <td>sunskimProbability</td>
+
| chance of going to the sun first, if spawned at witchpoint
    <td>chance of going to the sun first, if spawned at witchpoint</td>
+
|
  </tr>
+
|-
  <tr>
+
| rowspan="4" | prey
    <td rowspan="4">prey</td>
+
| rowspan="4" | who to hunt
    <td>"traders"</td>
+
| "traders"
    <td>(privateers only) will only attack ships which are victims</td>
+
| (privateers only) will only attack ships which are victims
  </tr>
+
|-
  <tr>
+
| "everybody"
    <td>"everybody"</td>
+
| (privateers only) will attack any ship
    <td>(privateers only) will attack any ship</td>
+
|-
  </tr>
+
| "offenders"
  <tr>
+
| (hunters only) will attack any ship with a bounty above a certain treshold
    <td>"offenders"</td>
+
|-
    <td>(hunters only) will attack any ship with a bounty above a certain treshold</td>
+
| "thargoids"
  </tr>
+
| (hunters only) will only attack Thargoids, not pirates
  <tr>
+
|-
    <td>"thargoids"</td>
+
| preyLimit
    <td>(hunters only) will only attack Thargoids, not pirates</td>
+
| (hunters only) bounty treshold for offenders (or fugitives) to be attacked
  </tr>
+
| integer
  <tr>
+
|
    <td>preyLimit</td>
+
|}
    <td>integer</td>
+
 
    <td>(hunters only) bounty treshold for offenders (or fugitives) to be attacked</td>
+
{| class="wikitable" style="vertical-align:middle;"
  </tr>
+
|+Priority AI
</table>
+
|-
 +
! Key
 +
! Key meaning / commentary
 +
! Value
 +
! Value meaning / commentary
 +
|-
 +
| name
 +
| internal identifier, required
 +
|
 +
|
 +
|-
 +
| displayName
 +
| the character's human readable name, required
 +
|
 +
|
 +
|-
 +
| rowspan="3" | attacked
 +
| rowspan="3" | 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
 +
|-
 +
| rowspan="3" | energyDown
 +
| rowspan="3" | 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)
 +
|-
 +
| rowspan="3" | energyLow
 +
| rowspan="3" | 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)
 +
|-
 +
| rowspan="3" | launch
 +
| rowspan="3" | what to do after launch from the main station
 +
| "jump"
 +
| jump to another system
 +
|-
 +
| "stay"
 +
| keep in this system
 +
|-
 +
| "random"
 +
| 50 / 50 (default)
 +
|-
 +
| rowspan="6" | prey
 +
| rowspan="6" | 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
 +
|-
 +
| rowspan="6" | preyCombatOdds
 +
| rowspan="6" | what combat odds are sufficient to attack, "good" is default
 +
| "none"
 +
| rowspan="6" | Note that the standard oolite hunters are happy with the (not) bad outcome: <br \>"if we require bounty hunters to have actual *good* odds they'll never shoot anything" <br \>(from oolite-bountyHunterAI.js)
 +
|-
 +
| "excelent"
 +
|-
 +
| "good"
 +
|-
 +
| "bad"
 +
|-
 +
| "terrible"
 +
|-
 +
| "any"
 +
|-
 +
| rowspan="3" | distressCallReaction
 +
| rowspan="3" | 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
 +
|-
 +
| rowspan="3" | distressCallInsufficientOddsReaction
 +
| rowspan="3" | 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
 +
| rowspan="3" | 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
 +
|
 +
|}
  
:''Priority AI'':
 
Coming soon
 
  
 
'''Add communication messages into [[Misc_plists#descriptions.plist|description.plist]]'''
 
'''Add communication messages into [[Misc_plists#descriptions.plist|description.plist]]'''
# Add entry of what types of messages are used:
+
<div style="display: flex; flex-flow: row wrap; max-width: fit-content;"> <!-- The table is on the side if there is room, otherwise it below and centered -->
::<code>"personalities-''name''-messageTypes" = "attack attacked captured chatter dead flee jump kill launch witchspace"</code> - "name" here must be same as in '''script_info'''
+
<div>
 +
# Add entry of what types of messages are used, ''name'' below must be same as in '''script_info''':
 +
::<code>"personalities-''name''-messageTypes" = "attack attacked captured chatter dead flee jump kill launch witchspace"</code>
 
# Add the comms themselves:
 
# Add the comms themselves:
::"personalities-''name''-attack" = ("Phrase to be sent when attack");  
+
::<code>"personalities-''name''-attack" = ("Phrase to be sent when attack");</code>
::"personalities-''name''-attacked" = ("Either this phrase will be sent..", "or this one when ship attacked");
+
::<code>"personalities-''name''-attacked" = ("Either this phrase will be sent..", "or this one when ship attacked");</code>
::"personalities-''name''-chatter" = ("Also you can add...{pause: 5} some dramatic pauses!");
+
::<code>"personalities-''name''-chatter" = ("Also you can add...{pause: 5} some dramatic pauses!");</code>
List of avalaible comms coming soon
+
</div>
 +
<div style="flex-grow: 1; margin-left: 20px">
 +
{| class="wikitable" style="vertical-align:middle; margin: auto"
 +
|+ 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
 +
|}
 +
</div>
 +
</div>
  
If you have any questions, don't hesitate to ask them in [http://oolite.aegidian.org/bb/viewtopic.php?f=4&t=6806 BB thread] or send a PM to Alnivel.
+
'''Note:''' With PriorityAI scripts you can also use any [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys PriorityAI|standart comms key]] with or without <code>oolite_</code> prefix:
 +
"personalities-''name''-messageTypes" = "dockingWait oolite_selectedStation"; // In messageTypes entry types must be writen same as in descriptions key!
 +
"personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_dockingWait|dockingWait]]" = ("Complaints about tedious waiting for docking");
 +
"personalities-''name''-[[Oolite_Javascript_Reference:_PriorityAI_Documentation#oolite_selectedStation|oolite_selectedStation]]" = ("Phrase about going to check local ConStore");
  
*[http://oolite.aegidian.org/bb/viewtopic.php?p=286858#p286858 Alnivel's 2022 instructions & comments]
+
If you have any questions or suggestions, don't hesitate to ask them in [https://bb.oolite.space/viewtopic.php?f=4&t=6806 BB thread] or send a PM to Alnivel.
 +
</div>
 +
---------------
  
*[url=http://oolite.aegidian.org/bb/viewtopic.php?p=287046#p287046]Post to Lestradae[/url] with some suggestions for updating his character
+
*[https://bb.oolite.space/viewtopic.php?p=286858#p286858 Alnivel's 2022 instructions & comments]
 +
 
 +
*[https://bb.oolite.space/viewtopic.php?p=287046#p287046 Post to Lestradae] with some suggestions for updating his character
 +
 
 +
 
 +
=== How do I remove my own character? ===
 +
# Open the shipdata.plist inside the "Config" folder.
 +
# Look for the entry "personalities-<yourname>".
 +
# Remove it completely '''OR''' Go to its "roles" key, and delete the roles with "personalities" and "personalities_launcher".
  
 
== Minimum Requirements ==
 
== Minimum Requirements ==
Line 223: Line 453:
  
 
== Download Location ==
 
== Download Location ==
[https://www.dropbox.com/s/93yfevfm182veqv/Personalities%20OXP.zip?dl=1 Personalities.oxp v 0.91] (2022)
+
[[Media:PersonalitiesOXP.zip|Personalities.oxp v 0.9.2]] (2022) <!-- (downloaded {{#downloads:PersonalitiesOXP.zip}} times) -->
 +
 
 
[http://app.box.com/shared/4h1n4j1dvy Personalities.oxp v 0.9] (2009) is available for download via Box.com.
 
[http://app.box.com/shared/4h1n4j1dvy Personalities.oxp v 0.9] (2009) is available for download via Box.com.
  
Line 234: Line 465:
  
 
== Version History ==
 
== Version History ==
 +
*version 0.9.2 (October, 2022)
 +
:new AI scripts, most personalities now use them
 +
:with new scripts [[Oolite_Javascript_Reference:_PriorityAI_Documentation#Standard_Communications_Keys|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
 
*version 0.9.1 (September, 2022) by Alnivel
:requires Oolite 1.9 (probably can work even on versions 1.82+, but not tested)
+
:requires Oolite 1.90 (probably can work even on versions 1.82+, but not tested)
 
:fixed several broken function calls
 
:fixed several broken function calls
 
:changed names of internal variables and resources to avoid conflicts
 
:changed names of internal variables and resources to avoid conflicts
Line 249: Line 493:
  
 
== Links ==
 
== Links ==
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&t=6806 Personalities.oxp] (2009 - date)
+
*[https://bb.oolite.space/viewtopic.php?f=4&t=6806 Personalities.oxp] (2009 - date)
*[http://oolite.aegidian.org/bb/viewtopic.php?f=4&t=6736 Forum Denizen OXPs] This seems to be the fons et origo of this oxp (2009)
+
*[https://bb.oolite.space/viewtopic.php?f=4&t=6736 Forum Denizen OXPs] This seems to be the fons et origo of this oxp (2009)
*[http://www.aegidian.org/bb/viewtopic.php?f=2&t=569 How would you like to appear as a Cameo in OOLite?] (2005)
+
*[https://bb.oolite.space/viewtopic.php?f=2&t=569 How would you like to appear as a Cameo in OOLite?] (2005)
  
 
[[Category:Oolite]]
 
[[Category:Oolite]]
 
{{ambience-OXP}}
 
{{ambience-OXP}}

Latest revision as of 13:54, 18 March 2024

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!


Tales from the spacelanes...

I'd stopped off at a Space Bar for a quick beverage and perhaps news of a tempting contract in the vicinity and was rather pleased to find a valuable bounty target en route to my next destination. A few jumps later and I was sharing a system with potentially 8000 buckshee credits.

As the system was an Anarchy I had to splash a couple of pirate groups as I torused towards the station and just as I'd finished off the second group I received word that my target had been liquidated by someone else. Foul language may have been employed at this point.

Making the best of the situation I headed for the station to refuel and offload cargo. I dropped out of Torus a few seconds later when I encountered of all things Commander Wyvern in his Caddy Omega heading towards the witchpoint. Suddenly I had my suspicions of exactly who had snaffled my 8000Cr.

These suspicions were confirmed when shortly after passing Wyvern I encountered the remnants of my targets escorts. Clearly the meagre bounties on these peons had been beneath the notice of the mighty Caddy.

The moral of the story? No matter your combat rating or how high you might stand in the bounty hunters' guild, there's always someone in the eight charts with a sharper killer instinct than you. Travel safely friends and watch your six. Loxley (2011)

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