Created
September 25, 2022 03:34
-
-
Save vontrapp/748ebce6133c51a854ef9f9d35ba9822 to your computer and use it in GitHub Desktop.
EDDI "Dave" personality
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Dave", | |
"description": "less verbose", | |
"scripts": { | |
"AFMU repairs": { | |
"name": "AFMU repairs", | |
"description": "Triggered when repairing modules using the Auto Field Maintenance Unit (AFMU)", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{event.item} \r\n{if event.repairedfully:\r\n fully repaired\r\n|else:\r\n partially repaired \r\n {Occasionally(2, cat(\r\n OneOf(\"to \", \"at \"),\r\n Humanise(event.health * 100),\r\n \" percent functionality\"\r\n ))}\r\n}\r\n\r\n{Occasionally(2, \r\n cat(OneOf(\", \", \"and is\"), \" ready for re-activation\")\r\n)}.\r\n\r\n{if event.item = ship.frameshiftdrive.name:\r\n\t{if event.repairedfully:\r\n\t\t{SetState('eddi_boost_budget', 0)}\r\n\t\tBoost budget reset.\r\n\t|else:\r\n\t\t{SetState('eddi_boost_budget', round(100-100*event.health))}\r\n\t\tBoost budget set to {state.eddi_boost_budget}.\r\n\t}\r\n}", | |
"defaultValue": "{event.item} \r\n{if event.repairedfully:\r\n fully repaired\r\n|else:\r\n partially repaired \r\n {Occasionally(2, cat(\r\n OneOf(\"to \", \"at \"),\r\n Humanise(event.health * 100),\r\n \" percent functionality\"\r\n ))}\r\n}\r\n\r\n{Occasionally(2, \r\n cat(OneOf(\", \", \"and is\"), \" ready for re-activation\")\r\n)}.", | |
"default": false | |
}, | |
"Asteroid cracked": { | |
"name": "Asteroid cracked", | |
"description": "Triggered when you break up a 'Motherlode' asteroid for mining", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Asteroid prospected": { | |
"name": "Asteroid prospected", | |
"description": "Triggered when using a prospecting drone", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{set minimumPercent to 10} {_ The minimum percentage surface mineral concentration to report _}\r\n{set spokenCores to [\r\n \"Alexandrite\": false,\r\n \"Benitoite\": false,\r\n \"Grandidierite\": false,\r\n \"Low Temperature Diamonds\": true,\r\n \"Monazite\": false,\r\n \"Musgravite\": false,\r\n \"Rhodplumsite\": false,\r\n \"Serendibite\": false,\r\n \"Void Opals\": true,\r\n]}\r\n{set spokenMinerals to [\r\n \"Bauxite\": false,\r\n \"Bertrandite\": false,\r\n \"Bromellite\": false,\r\n \"Cobalt\": false,\r\n \"Coltan\": false,\r\n \"Cryolite\": false,\r\n \"Gallite\": false,\r\n \"Gold\": false,\r\n \"Goslarite\": false,\r\n \"Hydrogen Peroxide\": false,\r\n \"Indite\": false,\r\n \"Jadeite\": false,\r\n \"Lepidolite\": false,\r\n \"Lithium Hydroxide\": false,\r\n \"Liquid oxygen\": false,\r\n \"Low Temperature Diamonds\": true,\r\n \"Methane Clathrate\": false,\r\n \"Methanol Monohydrate\": false,\r\n \"Moissanite\": false,\r\n \"Osmium\": false,\r\n \"Painite\": true,\r\n \"Platinum\": false,\r\n \"Palladium\": false,\r\n \"Praseodymium\": false,\r\n \"Pyrophyllite\": false,\r\n \"Rutile\": false,\r\n \"Samarium\": false,\r\n \"Silver\": false,\r\n \"Taaffeite\": false,\r\n \"Thorium\": false,\r\n \"Tritium\": true,\r\n \"Uraninite\": false,\r\n \"Water\": false,\r\n]}\r\n\r\n{if len(event.motherlode) > 0 && spokenCores[event.motherlode]:\r\n Motherlode detected: {event.motherlode}.\r\n}\r\n\r\n{set minerals to []}\r\n{for mineral in event.commodities:\r\n {if mineral.percentage > minimumPercent && spokenMinerals[mineral.commodity]:\r\n {set mineral_desc to: \r\n {round(mineral.percentage)} percent {mineral.commodity}\r\n }\r\n {set minerals to cat(minerals, [mineral_desc])}\r\n }\r\n}\r\n{if len(minerals) > 0:\r\n Asteroid contains {List(minerals)}\r\n {if event.materialcontent = \"High\":\r\n and a high concentration of engineering materials\r\n }.\r\n {if event.remaining < 100:\r\n It is {100 - event.remaining} percent depleted.\r\n }\r\n}", | |
"defaultValue": "{set minimumPercent to 10} {_ The minimum percentage surface mineral concentration to report _}\r\n{set spokenCores to [\r\n \"Alexandrite\": false,\r\n \"Benitoite\": false,\r\n \"Grandidierite\": false,\r\n \"Low Temperature Diamonds\": true,\r\n \"Monazite\": false,\r\n \"Musgravite\": false,\r\n \"Rhodplumsite\": false,\r\n \"Serendibite\": false,\r\n \"Void Opals\": true,\r\n]}\r\n{set spokenMinerals to [\r\n \"Bauxite\": false,\r\n \"Bertrandite\": false,\r\n \"Bromellite\": false,\r\n \"Cobalt\": false,\r\n \"Coltan\": false,\r\n \"Cryolite\": false,\r\n \"Gallite\": false,\r\n \"Gold\": false,\r\n \"Goslarite\": false,\r\n \"Hydrogen Peroxide\": false,\r\n \"Indite\": false,\r\n \"Jadeite\": false,\r\n \"Lepidolite\": false,\r\n \"Lithium Hydroxide\": false,\r\n \"Liquid oxygen\": false,\r\n \"Low Temperature Diamonds\": true,\r\n \"Methane Clathrate\": false,\r\n \"Methanol Monohydrate\": false,\r\n \"Moissanite\": false,\r\n \"Osmium\": false,\r\n \"Painite\": true,\r\n \"Platinum\": false,\r\n \"Palladium\": false,\r\n \"Praseodymium\": false,\r\n \"Pyrophyllite\": false,\r\n \"Rutile\": false,\r\n \"Samarium\": false,\r\n \"Silver\": false,\r\n \"Taaffeite\": false,\r\n \"Thorium\": false,\r\n \"Tritium\": true,\r\n \"Uraninite\": false,\r\n \"Water\": false,\r\n]}\r\n\r\n{if len(event.motherlode) > 0 && spokenCores[event.motherlode]:\r\n Motherlode detected: {event.motherlode}.\r\n}\r\n\r\n{set minerals to []}\r\n{for mineral in event.commodities:\r\n {if mineral.percentage > minimumPercent && spokenMinerals[mineral.commodity]:\r\n {set mineral_desc to: \r\n {round(mineral.percentage)} percent {mineral.commodity}\r\n }\r\n {set minerals to cat(minerals, [mineral_desc])}\r\n }\r\n}\r\n{if len(minerals) > 0:\r\n Asteroid contains {List(minerals)}\r\n {if event.materialcontent = \"High\":\r\n and a high concentration of engineering materials\r\n }.\r\n {if event.remaining < 100:\r\n It is {100 - event.remaining} percent depleted.\r\n }\r\n}", | |
"default": true | |
}, | |
"Backpack": { | |
"name": "Backpack", | |
"description": "Lists the contents of your backpack when you disembark", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Backpack changed": { | |
"name": "Backpack changed", | |
"description": "Triggered when there is any change to the contents of the suit backpack", | |
"enabled": false, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Blueprint make report": { | |
"name": "Blueprint make report", | |
"description": "Report on how many of a particular blueprint we can make", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch from context / state _}\r\n{set blueprintname to state.blueprint}\r\n{set blueprintgrade to state.blueprintgrade}\r\n\r\n{if blueprintname && blueprintgrade:\r\n {_ Fetch full blueprint details }\r\n {set blueprint to BlueprintDetails(blueprintname, blueprintgrade)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'blueprint')}\r\n {SetState('eddi_context_blueprint_name', blueprintname)}\r\n {SetState('eddi_context_blueprint_grade', blueprintgrade)}\r\n}\r\n\r\n{if !blueprint:\r\n {_ Fetch from context }\r\n {set blueprint to BlueprintDetails(state.eddi_context_blueprint_name, state.eddi_context_blueprint_grade)}\r\n}\r\n\r\n{_ Function to obtain current inventory of a material}\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{set canbemade to 999}\r\n\r\n{if blueprint:\r\n {_ Find the smallest number of this blueprint that can be made }\r\n \r\n {set cur to 0}\r\n {while cur < len(blueprint.materials):\r\n {set inventory to _inventory(blueprint.materials[cur].material)}\r\n {if !inventory:\r\n {set canbemade to 0}\r\n |else:\r\n {if inventory.amount < canbemade:\r\n {set canbemade to inventory.amount}\r\n }\r\n }\r\n {set cur to cur + 1}\r\n }\r\n\r\n {if canbemade = 0:\r\n You cannot make any {blueprintname} grade {blueprintgrade}\r\n |elif canbemade = 1:\r\n You can make one {blueprintname} grade {blueprintgrade}\r\n |else:\r\n You can make {blueprintname} grade {blueprintgrade} {Humanise(canbemade)} times.\r\n }\r\n \r\n|else:\r\n No information available on materials required for {blueprintname} grade {blueprintgrade}\r\n}.\r\n", | |
"defaultValue": "{_ Fetch from context / state _}\r\n{set blueprintname to state.blueprint}\r\n{set blueprintgrade to state.blueprintgrade}\r\n\r\n{if blueprintname && blueprintgrade:\r\n {_ Fetch full blueprint details }\r\n {set blueprint to BlueprintDetails(blueprintname, blueprintgrade)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'blueprint')}\r\n {SetState('eddi_context_blueprint_name', blueprintname)}\r\n {SetState('eddi_context_blueprint_grade', blueprintgrade)}\r\n}\r\n\r\n{if !blueprint:\r\n {_ Fetch from context }\r\n {set blueprint to BlueprintDetails(state.eddi_context_blueprint_name, state.eddi_context_blueprint_grade)}\r\n}\r\n\r\n{_ Function to obtain current inventory of a material}\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{set canbemade to 999}\r\n\r\n{if blueprint:\r\n {_ Find the smallest number of this blueprint that can be made }\r\n \r\n {set cur to 0}\r\n {while cur < len(blueprint.materials):\r\n {set inventory to _inventory(blueprint.materials[cur].material)}\r\n {if !inventory:\r\n {set canbemade to 0}\r\n |else:\r\n {if inventory.amount < canbemade:\r\n {set canbemade to inventory.amount}\r\n }\r\n }\r\n {set cur to cur + 1}\r\n }\r\n\r\n {if canbemade = 0:\r\n You cannot make any {blueprintname} grade {blueprintgrade}\r\n |elif canbemade = 1:\r\n You can make one {blueprintname} grade {blueprintgrade}\r\n |else:\r\n You can make {blueprintname} grade {blueprintgrade} {Humanise(canbemade)} times.\r\n }\r\n \r\n|else:\r\n No information available on materials required for {blueprintname} grade {blueprintgrade}\r\n}.\r\n", | |
"default": true | |
}, | |
"Blueprint material report": { | |
"name": "Blueprint material report", | |
"description": "Report on the material requirements for a blueprint", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch from context / state _}\r\n{set blueprintname to state.blueprint}\r\n{set blueprintgrade to state.blueprintgrade}\r\n\r\n{if blueprintname && blueprintgrade:\r\n {_ Fetch full blueprint details }\r\n {set blueprint to BlueprintDetails(blueprintname, blueprintgrade)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'blueprint')}\r\n {SetState('eddi_context_blueprint_name', blueprintname)}\r\n {SetState('eddi_context_blueprint_grade', blueprintgrade)}\r\n}\r\n\r\n{if blueprintname:\r\n {_ Fetch full blueprint details }\r\n {set blueprint to BlueprintDetails(blueprintname, blueprintgrade)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'blueprint')}\r\n {SetState('eddi_context_blueprint_name', blueprintname)}\r\n {SetState('eddi_context_blueprint_grade', blueprintgrade)}\r\n}\r\n\r\n{if !blueprint || !blueprintgrade:\r\n {_ Fetch from context }\r\n {set blueprint to BlueprintDetails(state.eddi_context_blueprint_name, state.eddi_context_blueprint_grade)}\r\n}\r\n\r\n{if blueprint && blueprintgrade:\r\n {set materials to len(blueprint.materials)}\r\n {blueprintname} grade {blueprintgrade} requires \r\n {if materials = 1:\r\n {blueprint.materials[0].material}\r\n |elif materials = 2:\r\n {blueprint.materials[0].material} and {blueprint.materials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(blueprint.materials):\r\n {if cur = 0:\r\n {blueprint.materials[cur].material}\r\n |elif cur < len(blueprint.materials) - 1:\r\n , {blueprint.materials[cur].material}\r\n |else:\r\n , and {blueprint.materials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n|else:\r\n No information available on materials required for {blueprintname} grade {blueprintgrade}\r\n}.\r\n", | |
"defaultValue": "{_ Fetch from context / state _}\r\n{set blueprintname to state.blueprint}\r\n{set blueprintgrade to state.blueprintgrade}\r\n\r\n{if blueprintname && blueprintgrade:\r\n {_ Fetch full blueprint details }\r\n {set blueprint to BlueprintDetails(blueprintname, blueprintgrade)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'blueprint')}\r\n {SetState('eddi_context_blueprint_name', blueprintname)}\r\n {SetState('eddi_context_blueprint_grade', blueprintgrade)}\r\n}\r\n\r\n{if blueprintname:\r\n {_ Fetch full blueprint details }\r\n {set blueprint to BlueprintDetails(blueprintname, blueprintgrade)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'blueprint')}\r\n {SetState('eddi_context_blueprint_name', blueprintname)}\r\n {SetState('eddi_context_blueprint_grade', blueprintgrade)}\r\n}\r\n\r\n{if !blueprint || !blueprintgrade:\r\n {_ Fetch from context }\r\n {set blueprint to BlueprintDetails(state.eddi_context_blueprint_name, state.eddi_context_blueprint_grade)}\r\n}\r\n\r\n{if blueprint && blueprintgrade:\r\n {set materials to len(blueprint.materials)}\r\n {blueprintname} grade {blueprintgrade} requires \r\n {if materials = 1:\r\n {blueprint.materials[0].material}\r\n |elif materials = 2:\r\n {blueprint.materials[0].material} and {blueprint.materials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(blueprint.materials):\r\n {if cur = 0:\r\n {blueprint.materials[cur].material}\r\n |elif cur < len(blueprint.materials) - 1:\r\n , {blueprint.materials[cur].material}\r\n |else:\r\n , and {blueprint.materials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n|else:\r\n No information available on materials required for {blueprintname} grade {blueprintgrade}\r\n}.\r\n", | |
"default": true | |
}, | |
"Bodies mapped": { | |
"name": "Bodies mapped", | |
"description": "Reports all the bodies mapped in this system so far", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch from Context, if a context is set _}\r\n{if state.eddi_context_system_name:\r\n {set reportSystem to SystemDetails(state.eddi_context_system_name)}\r\n|else:\r\n {set reportSystem to SystemDetails(system.systemname)}\r\n}\r\n\r\n{_ Build a list of scanned bodies _}\r\n\r\n{set mappedList to []}\r\n{for body in reportSystem.bodies:\r\n {if body.mapped:\r\n {set mappedList to cat(mappedList, [P(body.shortname, \"body\")])} \r\n }\r\n}\r\n\r\n{_ Begin speaking _}\r\n\r\n{if len(mappedList) > 0:\r\n {if len(mappedList) = 1: Body |else: Bodies}\r\n {List(mappedList)}\r\n {if len(mappedList) = 1: has |else: have }\r\n {set already to Occasionally(2, \"already\")}\r\n {OneOf(\"{already} been mapped\", \"been mapped {already}\")}.\r\n|else:\r\n You have yet to map any bodies in this system.\r\n}\r\n", | |
"defaultValue": "{_ Fetch from Context, if a context is set _}\r\n{if state.eddi_context_system_name:\r\n {set reportSystem to SystemDetails(state.eddi_context_system_name)}\r\n|else:\r\n {set reportSystem to SystemDetails(system.systemname)}\r\n}\r\n\r\n{_ Build a list of scanned bodies _}\r\n\r\n{set mappedList to []}\r\n{for body in reportSystem.bodies:\r\n {if body.mapped:\r\n {set mappedList to cat(mappedList, [P(body.shortname, \"body\")])} \r\n }\r\n}\r\n\r\n{_ Begin speaking _}\r\n\r\n{if len(mappedList) > 0:\r\n {if len(mappedList) = 1: Body |else: Bodies}\r\n {List(mappedList)}\r\n {if len(mappedList) = 1: has |else: have }\r\n {set already to Occasionally(2, \"already\")}\r\n {OneOf(\"{already} been mapped\", \"been mapped {already}\")}.\r\n|else:\r\n You have yet to map any bodies in this system.\r\n}\r\n", | |
"default": true | |
}, | |
"Bodies to map": { | |
"name": "Bodies to map", | |
"description": "Reports all the unmapped bodies in the system that are worth mapping", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Preferences: _}\r\n\r\n{set reportTerraformables to true} {_ Reports all terraformable and terraformed bodies _}\r\n{set highValueThreshold to 80000} {_ The minimum threshold for estimated exploration value worth mapping _}\r\n{set reportPlanetTypes to [\r\n \"Ammonia world\": true,\r\n \"Earth-like world\": true,\r\n \"Gas giant with ammonia based life\": false,\r\n \"Gas giant with water based life\": false,\r\n \"Helium gas giant\": false,\r\n \"Helium-rich gas giant\": false,\r\n \"High metal content world\": false,\r\n \"Icy body\": false,\r\n \"Metal-rich body\": false,\r\n \"Rocky body\": false,\r\n \"Rocky ice world\": false,\r\n \"Class I gas giant\": false,\r\n \"Class II gas giant\": false,\r\n \"Class III gas giant\": false,\r\n \"Class IV gas giant\": false,\r\n \"Class V gas giant\": false,\r\n \"Water giant\": false,\r\n \"Water giant with life\": false,\r\n \"Water world\": true,\r\n]}\r\n\r\n{_ Fetch from Context, if a context is set _}\r\n{if state.eddi_context_system_name:\r\n {set reportSystem to SystemDetails(state.eddi_context_system_name)}\r\n|else:\r\n {set reportSystem to SystemDetails(system.systemname)}\r\n}\r\n\r\n{_ Identify bodies worth mapping _}\r\n\r\n{set toMapList to []}\r\n{set mappedBodies to 0}\r\n{set totalBodies to 0}\r\n\r\n{for body in reportSystem.bodies:\r\n {set totalBodies to totalBodies + 1}\r\n {if body.mapped:\r\n {set mappedBodies to mappedBodies + 1}\r\n |else:\r\n {if body.bodyType.invariantName != \"Star\":\r\n {if body.terraformState.invariantName = \"Candidate for terraforming\" \r\n || body.terraformState.invariantName = \"Terraformed\":\r\n {if reportTerraformables:\r\n {if !toMapList[body.shortname]: \r\n {set toMapList to cat(toMapList, [body.shortname])}\r\n } \r\n }\r\n |elif reportPlanetTypes[body.planetClass.invariantName]:\r\n {if !toMapList[body.shortname]: \r\n {set toMapList to cat(toMapList, [body.shortname])}\r\n }\r\n |elif body.estimatedvalue > highValueThreshold:\r\n {if !toMapList[body.shortname]: \r\n {set toMapList to cat(toMapList, [body.shortname])}\r\n } \r\n }\r\n }\r\n }\r\n}\r\n{set toMapCount to len(toMapList)}\r\n\r\n{_ Begin speaking _}\r\n\r\n{if toMapCount > 0:\r\n\r\n {if toMapCount = 1: Body |else: Bodies}\r\n\r\n {set cur to 0}\r\n {while cur < toMapCount:\r\n {P(toMapList[cur], \"body\")}\r\n {set cur to cur + 1}\r\n {if cur = toMapCount - 1: and\r\n |elif cur < toMapCount - 1:,\r\n }\r\n }\r\n\r\n {if toMapCount = 1: is |else: are }\r\n {if event.type = \"Body mapped\": \"also\" }\r\n {if toMapCount = 1: a }\r\n {OneOf(\"recommended\", \"good\")}\r\n {set candidates to when(toMapCount = 1, \"candidate\", \"candidates\")}\r\n {OneOf('{candidates} for mapping', '{candidates} to map', 'mapping {candidates}')}.\r\n\r\n|elif mappedBodies > 0:\r\n\r\n {OneOf(\r\n \"You have mapped all {if mappedBodies < totalBodies: {OneOf(\\\"worthwhile\\\", \\\"interesting\\\")}} bodies.\",\r\n \"All {OneOf( \\\"{if mappedBodies < totalBodies: worthwhile} bodies\\\", \\\"bodies of interest\\\" )} {OneOf( \\\"have been mapped.\\\", \\\"are now mapped.\\\" )}\"\r\n )}\r\n}", | |
"defaultValue": "{_ Preferences: _}\r\n\r\n{set reportTerraformables to true} {_ Reports all terraformable and terraformed bodies _}\r\n{set highValueThreshold to 80000} {_ The minimum threshold for estimated exploration value worth mapping _}\r\n{set reportPlanetTypes to [\r\n \"Ammonia world\": true,\r\n \"Earth-like world\": true,\r\n \"Gas giant with ammonia based life\": false,\r\n \"Gas giant with water based life\": false,\r\n \"Helium gas giant\": false,\r\n \"Helium-rich gas giant\": false,\r\n \"High metal content world\": false,\r\n \"Icy body\": false,\r\n \"Metal-rich body\": false,\r\n \"Rocky body\": false,\r\n \"Rocky ice world\": false,\r\n \"Class I gas giant\": false,\r\n \"Class II gas giant\": false,\r\n \"Class III gas giant\": false,\r\n \"Class IV gas giant\": false,\r\n \"Class V gas giant\": false,\r\n \"Water giant\": false,\r\n \"Water giant with life\": false,\r\n \"Water world\": true,\r\n]}\r\n\r\n{_ Fetch from Context, if a context is set _}\r\n{if state.eddi_context_system_name:\r\n {set reportSystem to SystemDetails(state.eddi_context_system_name)}\r\n|else:\r\n {set reportSystem to SystemDetails(system.systemname)}\r\n}\r\n\r\n{_ Identify bodies worth mapping _}\r\n\r\n{set toMapList to []}\r\n{set mappedBodies to 0}\r\n{set totalBodies to 0}\r\n\r\n{for body in reportSystem.bodies:\r\n {set totalBodies to totalBodies + 1}\r\n {if body.mapped:\r\n {set mappedBodies to mappedBodies + 1}\r\n |else:\r\n {if body.bodyType.invariantName != \"Star\":\r\n {if body.terraformState.invariantName = \"Candidate for terraforming\" \r\n || body.terraformState.invariantName = \"Terraformed\":\r\n {if reportTerraformables:\r\n {if !toMapList[body.shortname]: \r\n {set toMapList to cat(toMapList, [body.shortname])}\r\n } \r\n }\r\n |elif reportPlanetTypes[body.planetClass.invariantName]:\r\n {if !toMapList[body.shortname]: \r\n {set toMapList to cat(toMapList, [body.shortname])}\r\n }\r\n |elif body.estimatedvalue > highValueThreshold:\r\n {if !toMapList[body.shortname]: \r\n {set toMapList to cat(toMapList, [body.shortname])}\r\n } \r\n }\r\n }\r\n }\r\n}\r\n{set toMapCount to len(toMapList)}\r\n\r\n{_ Begin speaking _}\r\n\r\n{if toMapCount > 0:\r\n\r\n {if toMapCount = 1: Body |else: Bodies}\r\n\r\n {set cur to 0}\r\n {while cur < toMapCount:\r\n {P(toMapList[cur], \"body\")}\r\n {set cur to cur + 1}\r\n {if cur = toMapCount - 1: and\r\n |elif cur < toMapCount - 1:,\r\n }\r\n }\r\n\r\n {if toMapCount = 1: is |else: are }\r\n {if event.type = \"Body mapped\": \"also\" }\r\n {if toMapCount = 1: a }\r\n {OneOf(\"recommended\", \"good\")}\r\n {set candidates to when(toMapCount = 1, \"candidate\", \"candidates\")}\r\n {OneOf('{candidates} for mapping', '{candidates} to map', 'mapping {candidates}')}.\r\n\r\n|elif mappedBodies > 0:\r\n\r\n {OneOf(\r\n \"You have mapped all {if mappedBodies < totalBodies: {OneOf(\\\"worthwhile\\\", \\\"interesting\\\")}} bodies.\",\r\n \"All {OneOf( \\\"{if mappedBodies < totalBodies: worthwhile} bodies\\\", \\\"bodies of interest\\\" )} {OneOf( \\\"have been mapped.\\\", \\\"are now mapped.\\\" )}\"\r\n )}\r\n}", | |
"default": true | |
}, | |
"Body atmosphere report": { | |
"name": "Body atmosphere report", | |
"description": "Report on the atmosphere of the contextual body", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Preferences _}\r\n{set reportAtmoPressure to 0} {_ Set to 1 if you want to hear about the atmospheric pressure. _}\r\n{set reportAtmoTempScale to 0} {_ Set to 0 if you want to hear about temperatures in Kelvin _}\r\n {_ Set to 1 if you want to hear about temperatures in Celsius _}\r\n {_ Set to 2 if you want to hear about temperatures in Fahrenheit _}\r\n {_ Set to 3 if you don't want to hear about the temperature of the body _}\r\n\r\n{_ Define functions for converting temperature scales _}\r\n{set ToCelsius(kelvin) to: {round(kelvin - 273)}}\r\n{set ToFahrenheit(kelvin) to: {round((kelvin-273)*9/5 + 32)}}\r\n{set TempCalc(kelvin) to: \r\n {if reportAtmoTempScale = 0: {round(kelvin)}}\r\n {if reportAtmoTempScale = 1: {ToCelsius(kelvin)}}\r\n {if reportAtmoTempScale = 2: {ToFahrenheit(kelvin)}}\r\n}\r\n\r\n{_ Name our temperature scale _}\r\n{if reportAtmoTempScale = 0: {set tempscale to: Kelvin}}\r\n{if reportAtmoTempScale = 1: {set tempscale to: degrees Celsius}}\r\n{if reportAtmoTempScale = 2: {set tempscale to: degrees Fahrenheit}}\r\n\r\n{_ Fetch from context _}\r\n{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}\r\n{if !reportbody: \r\n {set reportbody to BodyDetails(state.eddi_context_body_name)}\r\n}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n I'm not sure which body you are asking about.\r\n\r\n|else:\r\n\r\n {if find(reportbody.planettype, \"giant\") >= 0:\r\n {if find(reportbody.planettype, \"Class\") >= 0: \r\n {set sudarsky to Occasionally(3, \"Sud-dar-ski\")}\r\n }\r\n {set planetdesc to OneOf(\"{sudarsky} Gas giants like this one have\", \"This {sudarsky} gas giant has\")}\r\n {if find(reportbody.planettype, \"Class V\") >= 0:\r\n {planetdesc} \r\n {if reportAtmoTempScale < 3: \r\n {set tempmin to: {TempCalc(1373)}}\r\n temperatures above {Humanise(tempmin)} {tempscale}, {OneOf(\"and\", \"with\", \"forming\")}\r\n }\r\n a dense cloud layer of {OneOf(\"vaporized silicates and iron\", \"silicate and iron vapors\")}.\r\n |elif find(reportbody.planettype, \"Class IV\") >= 0:\r\n {planetdesc} \r\n {if reportAtmoTempScale < 3: \r\n {set tempmin to: {TempCalc(354)}}\r\n {set tempmax to: {TempCalc(903)}}\r\n temperatures {OneOf(\"of\", \"ranging\")} between {Humanise(tempmin)} and {Humanise(tempmax)} {tempscale}, {OneOf(\"and\", \"with\", \"forming\")}\r\n }\r\n a dense cloud layer of {OneOf(\"alkali metals vapors\", \"vaporized alkali metals\")}. \r\n |elif find(reportbody.planettype, \"Class III\") >= 0:\r\n {planetdesc} \r\n {if reportAtmoTempScale < 3: \r\n {set tempmin to: {TempCalc(251)}}\r\n {set tempmax to: {TempCalc(353)}}\r\n surface temperatures {OneOf(\"of\", \"ranging\")} between {Humanise(tempmin)} and {Humanise(tempmax)} {tempscale},\r\n }\r\n a temperature at which {OneOf(\"no gaseous elements will form any clouds\", \"suitable chemicals are not present in the atmosphere to form a sustained cloud layer\", \"the atmosphere cannot sustain a persistent cloud layer\")}.\r\n |elif find(reportbody.planettype, \"Class II\") >= 0:\r\n {planetdesc} \r\n {if reportAtmoTempScale < 3: \r\n {set tempmin to: {TempCalc(154)}}\r\n {set tempmax to: {TempCalc(250)}}\r\n surface temperatures {OneOf(\"of\", \"ranging\")} between {Humanise(tempmin)} and {Humanise(tempmax)} {tempscale}, {OneOf(\"and\", \"with\", \"forming\")}\r\n }\r\n a dense cloud layer of water vapors. \r\n |elif find(reportbody.planettype, \"Class I\") >= 0:\r\n {planetdesc} \r\n {if reportAtmoTempScale < 3: \r\n {set tempmin to: {TempCalc(153)}}\r\n {set tempmax to: {TempCalc(83)}}\r\n surface temperatures of {Humanise(tempmax)} {tempscale} {Occasionally(2, OneOf(\", or less,\", \", at most,\"))} {OneOf(\"and\", \"with\", \"forming\")}\r\n }\r\n a dense cloud layer of ammonia vapor. \r\n }\r\n\r\n |elif reportbody.atmosphere = \"No atmosphere\" || !reportbody.atmosphere:\r\n {Occasionally(4, OneOf(\"There is no atmosphere.\", \"It is devoid of any atmosphere.\", \"The years have scoured it clean of any atmosphere.\"))}\r\n {if reportbody.temperature && reportAtmoTempScale < 3:\r\n The surface temperature averages\r\n {TempCalc(reportbody.temperature)} {tempscale}.\r\n }\r\n\r\n |elif reportbody.pressure: \r\n {if reportbody.pressure < 0.1:\r\n {set pressdesc to OneOf(\"trace gas\", \"super thin\")}\r\n |elif reportbody.pressure < 0.25:\r\n {set pressdesc to \"very thin\"}\r\n |elif reportbody.pressure < 0.5:\r\n {set pressdesc to \"thin\"}\r\n |elif reportbody.pressure < 2:\r\n {set pressdesc to \"\"}\r\n |elif reportbody.pressure < 10:\r\n {set pressdesc to \"thick\"}\r\n |elif reportbody.pressure < 50:\r\n {set pressdesc to OneOf(\"dense\", \"very thick\")}\r\n |elif reportbody.pressure < 100:\r\n {set pressdesc to OneOf(\"very dense\", \"super thick\")}\r\n |elif reportbody.pressure >= 100:\r\n {set pressdesc to OneOf(\"crushing\", \"super dense\")}\r\n }\r\n {if find(reportbody.atmosphere, \"-rich\") >= 0:\r\n {set element to token(reportbody.atmosphere, \"-rich\", \"\")}\r\n {set desc to OneOf(\"I detect a \", \"There is a \", \"Sensors detect a\")}\r\n {OneOf(\"{desc} {pressdesc} {reportbody.atmosphere} atmosphere\", \"The {pressdesc} atmosphere is {reportbody.atmosphere}\", \"The {pressdesc} atmosphere is rich in {element}\")}\r\n |elif find(reportbody.atmosphere, \"vapour\") >= 0:\r\n {OneOf(\"The {pressdesc} atmosphere is composed of {reportbody.atmosphere}s\", \"The {pressdesc} atmosphere is rich in {reportbody.atmosphere}s\", \"The {pressdesc} atmosphere contains high levels of {reportbody.atmosphere}s\")}\r\n |elif reportbody.planetClass.invariantName = \"Earth-like world\":\r\n The atmosphere is similar to Earth's, \r\n |else:\r\n {set mostly to OneOf(\"primarily\", \"mainly\", \"mostly\")}\r\n {OneOf(\"The {pressdesc} atmosphere is composed {mostly} of\", \"Most prevalent in the {pressdesc} atmosphere is\")}\r\n {reportbody.atmosphere}\r\n }\r\n { if reportAtmoPressure > 0:\r\n with a surface pressure of {Humanise(reportbody.pressure)} Earth atmospheres\r\n }\r\n {if reportbody.temperature && reportAtmoTempScale < 3:\r\n {set temp to: {TempCalc(reportbody.temperature)}}\r\n {if find(temp, \"-\") >= 0: \r\n {set temp to cat(temp*-1, tempscale, \"below zero\")}\r\n |else:\r\n {set temp to cat(temp, tempscale)}\r\n }\r\n with an average surface temperature of {temp}\r\n }.\r\n }\r\n}", | |
"defaultValue": "{_ Preferences _}\r\n{set reportAtmoPressure to 0} {_ Set to 1 if you want to hear about the atmospheric pressure. _}\r\n{set reportAtmoTempScale to 0} {_ Set to 0 if you want to hear about temperatures in Kelvin _}\r\n {_ Set to 1 if you want to hear about temperatures in Celsius _}\r\n {_ Set to 2 if you want to hear about temperatures in Fahrenheit _}\r\n {_ Set to 3 if you don't want to hear about the temperature of the body _}\r\n\r\n{_ Define functions for converting temperature scales _}\r\n{set ToCelsius(kelvin) to: {round(kelvin - 273)}}\r\n{set ToFahrenheit(kelvin) to: {round((kelvin-273)*9/5 + 32)}}\r\n{set TempCalc(kelvin) to: \r\n {if reportAtmoTempScale = 0: {round(kelvin)}}\r\n {if reportAtmoTempScale = 1: {ToCelsius(kelvin)}}\r\n {if reportAtmoTempScale = 2: {ToFahrenheit(kelvin)}}\r\n}\r\n\r\n{_ Name our temperature scale _}\r\n{if reportAtmoTempScale = 0: {set tempscale to: Kelvin}}\r\n{if reportAtmoTempScale = 1: {set tempscale to: degrees Celsius}}\r\n{if reportAtmoTempScale = 2: {set tempscale to: degrees Fahrenheit}}\r\n\r\n{_ Fetch from context _}\r\n{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}\r\n{if !reportbody: \r\n {set reportbody to BodyDetails(state.eddi_context_body_name)}\r\n}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n I'm not sure which body you are asking about.\r\n\r\n|else:\r\n\r\n {if find(reportbody.planettype, \"giant\") >= 0:\r\n {if find(reportbody.planettype, \"Class\") >= 0: \r\n {set sudarsky to Occasionally(3, \"Sud-dar-ski\")}\r\n }\r\n {set planetdesc to OneOf(\"{sudarsky} Gas giants like this one have\", \"This {sudarsky} gas giant has\")}\r\n {if find(reportbody.planettype, \"Class V\") >= 0:\r\n {planetdesc} \r\n {if reportAtmoTempScale < 3: \r\n {set tempmin to: {TempCalc(1373)}}\r\n temperatures above {Humanise(tempmin)} {tempscale}, {OneOf(\"and\", \"with\", \"forming\")}\r\n }\r\n a dense cloud layer of {OneOf(\"vaporized silicates and iron\", \"silicate and iron vapors\")}.\r\n |elif find(reportbody.planettype, \"Class IV\") >= 0:\r\n {planetdesc} \r\n {if reportAtmoTempScale < 3: \r\n {set tempmin to: {TempCalc(354)}}\r\n {set tempmax to: {TempCalc(903)}}\r\n temperatures {OneOf(\"of\", \"ranging\")} between {Humanise(tempmin)} and {Humanise(tempmax)} {tempscale}, {OneOf(\"and\", \"with\", \"forming\")}\r\n }\r\n a dense cloud layer of {OneOf(\"alkali metals vapors\", \"vaporized alkali metals\")}. \r\n |elif find(reportbody.planettype, \"Class III\") >= 0:\r\n {planetdesc} \r\n {if reportAtmoTempScale < 3: \r\n {set tempmin to: {TempCalc(251)}}\r\n {set tempmax to: {TempCalc(353)}}\r\n surface temperatures {OneOf(\"of\", \"ranging\")} between {Humanise(tempmin)} and {Humanise(tempmax)} {tempscale},\r\n }\r\n a temperature at which {OneOf(\"no gaseous elements will form any clouds\", \"suitable chemicals are not present in the atmosphere to form a sustained cloud layer\", \"the atmosphere cannot sustain a persistent cloud layer\")}.\r\n |elif find(reportbody.planettype, \"Class II\") >= 0:\r\n {planetdesc} \r\n {if reportAtmoTempScale < 3: \r\n {set tempmin to: {TempCalc(154)}}\r\n {set tempmax to: {TempCalc(250)}}\r\n surface temperatures {OneOf(\"of\", \"ranging\")} between {Humanise(tempmin)} and {Humanise(tempmax)} {tempscale}, {OneOf(\"and\", \"with\", \"forming\")}\r\n }\r\n a dense cloud layer of water vapors. \r\n |elif find(reportbody.planettype, \"Class I\") >= 0:\r\n {planetdesc} \r\n {if reportAtmoTempScale < 3: \r\n {set tempmin to: {TempCalc(153)}}\r\n {set tempmax to: {TempCalc(83)}}\r\n surface temperatures of {Humanise(tempmax)} {tempscale} {Occasionally(2, OneOf(\", or less,\", \", at most,\"))} {OneOf(\"and\", \"with\", \"forming\")}\r\n }\r\n a dense cloud layer of ammonia vapor. \r\n }\r\n\r\n |elif reportbody.atmosphere = \"No atmosphere\" || !reportbody.atmosphere:\r\n {Occasionally(4, OneOf(\"There is no atmosphere.\", \"It is devoid of any atmosphere.\", \"The years have scoured it clean of any atmosphere.\"))}\r\n {if reportbody.temperature && reportAtmoTempScale < 3:\r\n The surface temperature averages\r\n {TempCalc(reportbody.temperature)} {tempscale}.\r\n }\r\n\r\n |elif reportbody.pressure: \r\n {if reportbody.pressure < 0.1:\r\n {set pressdesc to OneOf(\"trace gas\", \"super thin\")}\r\n |elif reportbody.pressure < 0.25:\r\n {set pressdesc to \"very thin\"}\r\n |elif reportbody.pressure < 0.5:\r\n {set pressdesc to \"thin\"}\r\n |elif reportbody.pressure < 2:\r\n {set pressdesc to \"\"}\r\n |elif reportbody.pressure < 10:\r\n {set pressdesc to \"thick\"}\r\n |elif reportbody.pressure < 50:\r\n {set pressdesc to OneOf(\"dense\", \"very thick\")}\r\n |elif reportbody.pressure < 100:\r\n {set pressdesc to OneOf(\"very dense\", \"super thick\")}\r\n |elif reportbody.pressure >= 100:\r\n {set pressdesc to OneOf(\"crushing\", \"super dense\")}\r\n }\r\n {if find(reportbody.atmosphere, \"-rich\") >= 0:\r\n {set element to token(reportbody.atmosphere, \"-rich\", \"\")}\r\n {set desc to OneOf(\"I detect a \", \"There is a \", \"Sensors detect a\")}\r\n {OneOf(\"{desc} {pressdesc} {reportbody.atmosphere} atmosphere\", \"The {pressdesc} atmosphere is {reportbody.atmosphere}\", \"The {pressdesc} atmosphere is rich in {element}\")}\r\n |elif find(reportbody.atmosphere, \"vapour\") >= 0:\r\n {OneOf(\"The {pressdesc} atmosphere is composed of {reportbody.atmosphere}s\", \"The {pressdesc} atmosphere is rich in {reportbody.atmosphere}s\", \"The {pressdesc} atmosphere contains high levels of {reportbody.atmosphere}s\")}\r\n |elif reportbody.planetClass.invariantName = \"Earth-like world\":\r\n The atmosphere is similar to Earth's, \r\n |else:\r\n {set mostly to OneOf(\"primarily\", \"mainly\", \"mostly\")}\r\n {OneOf(\"The {pressdesc} atmosphere is composed {mostly} of\", \"Most prevalent in the {pressdesc} atmosphere is\")}\r\n {reportbody.atmosphere}\r\n }\r\n { if reportAtmoPressure > 0:\r\n with a surface pressure of {Humanise(reportbody.pressure)} Earth atmospheres\r\n }\r\n {if reportbody.temperature && reportAtmoTempScale < 3:\r\n {set temp to: {TempCalc(reportbody.temperature)}}\r\n {if find(temp, \"-\") >= 0: \r\n {set temp to cat(temp*-1, tempscale, \"below zero\")}\r\n |else:\r\n {set temp to cat(temp, tempscale)}\r\n }\r\n with an average surface temperature of {temp}\r\n }.\r\n }\r\n}", | |
"default": true | |
}, | |
"Body mapped": { | |
"name": "Body mapped", | |
"description": "Triggered after mapping a body with the Surface Area Analysis scanner", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Preferences _}\r\n\r\n{set bodyReport to 2} {_ 0 = No body report, 1 = Summary body report, 2 = Body report _}\r\n{set recommendOtherMapping to 1} {_ 0 or 1. If 1, recommends other bodies from the `Bodies to map` script _}\r\n{set report_value to 750000}\r\n{_ Context}\r\n{SetState('eddi_context_last_action', 'scan')}\r\n{SetState('eddi_context_last_subject', 'body')}\r\n{SetState('eddi_context_body_system', system.name)}\r\n{SetState('eddi_context_body_name', event.name)}\r\n{SetState('eddi_context_last_scan_estimated_value', event.estimatedvalue)}\r\n\r\n{_ Process the event _}\r\n\r\n{if ship.Role.edname = \"Exploration\" || ship.Role.edname = \"Multipurpose\":\r\n\r\n {Pause(3000)}\r\n\r\n {OneOf(\"Mapping\", \"{Occasionally(2, \\\"Surface\\\")} Map\")}\r\n {OneOf(\"is\", \"is now\")}\r\n {OneOf(\"complete\", \"finished\")}.\r\n\r\n {if event.probesused <= event.efficiencytarget:\r\n Efficiency bonus {OneOf(\"awarded\", \"granted\")}.\r\n }\r\n\r\n {Pause(500)}\r\n {if bodyReport = 2:\r\n {F(\"Body report\")}\r\n |elif bodyReport = 1:\r\n {F(\"Body report summary\")}\r\n }\r\n\r\n {if recommendOtherMapping: \r\n {Pause(1500)}\r\n {F(\"Bodies to map\")}\r\n }\r\n}", | |
"defaultValue": "{_ Preferences _}\r\n\r\n{set bodyReport to 2} {_ 0 = No body report, 1 = Summary body report, 2 = Body report _}\r\n{set recommendOtherMapping to 1} {_ 0 or 1. If 1, recommends other bodies from the `Bodies to map` script _}\r\n\r\n{_ Context}\r\n{SetState('eddi_context_last_action', 'scan')}\r\n{SetState('eddi_context_last_subject', 'body')}\r\n{SetState('eddi_context_body_system', system.name)}\r\n{SetState('eddi_context_body_name', event.name)}\r\n{SetState('eddi_context_last_scan_estimated_value', event.estimatedvalue)}\r\n\r\n{_ Process the event _}\r\n\r\n{if ship.Role.edname = \"Exploration\" || ship.Role.edname = \"Multipurpose\":\r\n\r\n {Pause(3000)}\r\n\r\n {OneOf(\"Mapping\", \"{Occasionally(2, \\\"Surface\\\")} Map\")}\r\n {OneOf(\"is\", \"is now\")}\r\n {OneOf(\"complete\", \"finished\")}.\r\n\r\n {if event.probesused <= event.efficiencytarget:\r\n Efficiency bonus {OneOf(\"awarded\", \"granted\")}.\r\n }\r\n\r\n {Pause(500)}\r\n {if bodyReport = 2:\r\n {F(\"Body report\")}\r\n |elif bodyReport = 1:\r\n {F(\"Body report summary\")}\r\n }\r\n\r\n {if recommendOtherMapping: \r\n {Pause(1500)}\r\n {F(\"Bodies to map\")}\r\n }\r\n}", | |
"default": false | |
}, | |
"Body materials report": { | |
"name": "Body materials report", | |
"description": "Report on the materials available from the contextual body", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Preferences _}\r\n{set reportMats to 1} {_ Set to 0 if you want to hear about materials below your minimum inventory level _}\r\n {_ Set to 1 if you want to hear about materials below your desired inventory level _}\r\n {_ Set to 2 if you want to hear about all materials irrespective of inventory levels _}\r\n\r\n{set reportMatsDesired to 0} {_ Set to 0 if you only want to hear about great material concentrations _}\r\n {_ Set to 1 if you also want good concentrations _}\r\n {_ Set to 2 if you want all concentrations _}\r\n\r\n{set reportMatsMinimum to 1} {_ Set to 0 if you only want to hear about great material concentrations _}\r\n {_ Set to 1 if you alwo want good concentrations _}\r\n {_ Set to 2 if you want all concentrations _}\r\n\r\n{set reportMatConc to 0} {_ Set to 0 if you only want to hear about great material concentrations _}\r\n {_ Set to 1 if you want to hear about good and great material concentrations _}\r\n {_ Set to 2 if you want to hear about all material concentrations _}\r\n\r\n{set reportMatPercent to 2} {_ Set to 0 if you do not want to hear about material percentages _}\r\n {_ Set to 1 if you only want to hear about great material percentages _}\r\n {_ Set to 2 if you want to hear about good and great material percentages _}\r\n {_ Set to 3 if you want to hear about all material percentages _}\r\n\r\n{_ Fetch from context _}\r\n{if state.eddi_context_report_body != \"\":\r\n {set reportbody to BodyDetails(state.eddi_context_report_body)}\r\n {SetState('eddi_context_report_body', \"\")}\r\n|else:\r\n {set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}\r\n {if !reportbody: \r\n {set reportbody to BodyDetails(state.eddi_context_body_name)}\r\n }\r\n}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n {_ If it's still not possible to get the body name... _}\r\n Which body are you\r\n {OneOf(\"asking about\",\"referring to\")}?\r\n\r\n|else:\r\n\r\n {_ Define a function to obtain a material from inventory}\r\n {set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n }\r\n\r\n {if reportbody.landable:\r\n\r\n {set minmaterials to []}\r\n {set desmaterials to []}\r\n\r\n {for material in reportbody.materials:\r\n {set inventoryMat to _inventory(material.material)}\r\n {set materialLevel to 2}\r\n {if material.percentage >= material.definition.greatpctbody: {set materialLevel to 0}\r\n |elif material.percentage >= material.definition.goodpctbody: {set materialLevel to 1}\r\n }\r\n {if (inventoryMat.amount < inventoryMat.minimum && reportMatsMinimum >= materialLevel):\r\n \t{set minmaterials to cat(minmaterials, [material])}\r\n |elif (inventoryMat.amount < inventoryMat.desired && reportMatsDesired >= materialLevel):\r\n {set desmaterials to cat(desmaterials, [material])}\r\n }\r\n }\r\n\r\n {_ Start speaking _}\r\n\r\n {if len(cat(minmaterials, desmaterials)) > 0:\r\n {if reportbody.name = reportbody.shortname:\r\n {P(reportbody.shortname, \"body\")}\r\n |else:\r\n {cat(\"Body \", P(reportbody.shortname, \"body\"))} \r\n }\r\n {OneOf(\"contains\", \"has\")}\r\n }\r\n {for cur in [\"min\",\"des\"]:\r\n {if cur = \"min\": {set list to minmaterials}\r\n |else: {set list to desmaterials}\r\n }\r\n {for material in list:\r\n {set reportPercent to 0}\r\n {if material.percentage >= material.definition.greatpctbody:\r\n {OneOf(\"very high levels\", \"very large deposits\", \"huge tracts\", \"shit tons\")} of\r\n {if reportMatPercent >= 1: {set reportPercent to 1}}\r\n |elif material.percentage >= material.definition.goodpctbody:\r\n {OneOf(\"high levels of\", \"large deposits of\", \"hella\")}\r\n {if reportMatPercent >= 2: {set reportPercent to 1}}\r\n |else:\r\n {OneOf(\"moderate levels\", \"modest deposits\") of}\r\n {if reportMatPercent >= 3: {set reportPercent to 1}}\r\n }\r\n {material.definition.name}\r\n {if reportPercent > 0: at {round(material.percentage, 1)}% }\r\n {if cur = \"min\": {OneOf(\", which is below your minimum.\",\"and you need it.\")}\r\n |else: {OneOf(\", which is below your desired.\",\"and you want it.\")}\r\n }\r\n }\r\n }\r\n }\r\n}", | |
"defaultValue": "{_ Preferences _}\r\n{set reportMats to 1} {_ Set to 0 if you want to hear about materials below your minimum inventory level _}\r\n {_ Set to 1 if you want to hear about materials below your desired inventory level _}\r\n {_ Set to 2 if you want to hear about all materials irrespective of inventory levels _}\r\n\r\n{set reportMatConc to 1} {_ Set to 0 if you only want to hear about great material concentrations _}\r\n {_ Set to 1 if you want to hear about good and great material concentrations _}\r\n {_ Set to 2 if you want to hear about all material concentrations _}\r\n\r\n{set reportMatPercent to 1} {_ Set to 0 if you do not want to hear about material percentages _}\r\n {_ Set to 1 if you only want to hear about great material percentages _}\r\n {_ Set to 2 if you want to hear about good and great material percentages _}\r\n {_ Set to 3 if you want to hear about all material percentages _}\r\n\r\n{_ Fetch from context _}\r\n{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}\r\n{if !reportbody: \r\n {set reportbody to BodyDetails(state.eddi_context_body_name)}\r\n}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n {_ If it's still not possible to get the body name... _}\r\n Which body are you\r\n {OneOf(\"asking about\",\"referring to\")}?\r\n\r\n|else:\r\n\r\n {_ Define a function to obtain a material from inventory}\r\n {set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n }\r\n\r\n {if reportbody.landable:\r\n\r\n {set goodmaterials to []}\r\n {set greatmaterials to []}\r\n {set othermaterials to []}\r\n\r\n {for material in reportbody.materials:\r\n {set inventoryMat to _inventory(material.material)}\r\n {if (reportMats >= 0 && inventoryMat.amount < inventoryMat.minimum && inventoryMat.minimum > 0)\r\n || (reportMats >= 1 && inventoryMat.amount < inventoryMat.desired && inventoryMat.desired > 0)\r\n || (reportMats >= 2):\r\n {if material.percentage >= material.definition.greatpctbody && reportMatConc > -1:\r\n {set greatmaterials to cat(greatmaterials, [material])}\r\n |elif material.percentage >= material.definition.goodpctbody && reportMatConc > 0:\r\n {set goodmaterials to cat(goodmaterials, [material])}\r\n |elif reportMatConc > 1:\r\n {set othermaterials to cat(othermaterials, [material])}\r\n }\r\n }\r\n }\r\n\r\n {_ Start speaking _}\r\n\r\n {if len(goodmaterials) > 0 || len(greatmaterials) > 0 || len(othermaterials) > 0:\r\n {if reportbody.name = reportbody.shortname:\r\n {P(reportbody.shortname, \"body\")}\r\n |else:\r\n {OneOf(\"This body\", cat(\"Body \", P(reportbody.shortname, \"body\")))} \r\n }\r\n {OneOf(\"contains\", \"has\")}\r\n }\r\n\r\n {if len(greatmaterials) > 0:\r\n {OneOf(\"very high levels\", \"very large deposits\")} of\r\n {set cur to 0}\n {set length to len(greatmaterials) - 1}\n {while cur < len(greatmaterials):\n {greatmaterials[cur].definition.name}\n {if reportMatPercent > 0: at {round(greatmaterials[cur].percentage, 1)}% }\n {set cur to cur + 1}\n {if cur = length: and\n |elif cur < length:,\n }\n }\r\n \r\n {if len(goodmaterials) > 0 && len(othermaterials) = 0:\r\n and\r\n |elif len(goodmaterials) > 0 || len(othermaterials) > 0:\r\n ,\r\n }\r\n }\r\n\r\n {if len(goodmaterials) > 0:\r\n {OneOf(\"high levels\", \"large deposits\")} of\r\n {set cur to 0}\n {set length to len(goodmaterials) - 1}\n {while cur < len(goodmaterials):\n {goodmaterials[cur].definition.name}\n {if reportMatPercent > 1: at {round(goodmaterials[cur].percentage, 1)}% }\n {set cur to cur + 1}\n {if cur = length: and\n |elif cur < length:,\n }\n }\r\n }\r\n \r\n {if (len(greatmaterials) > 0 || len(goodmaterials) > 0) && len(othermaterials) > 0:\r\n and\r\n }\r\n \r\n {if len(othermaterials) > 0:\r\n {OneOf(\"moderate levels\", \"modest deposits\")} of\r\n {set cur to 0}\n {set length to len(othermaterials) - 1}\n {while cur < len(othermaterials):\n {othermaterials[cur].definition.name}\n {if reportMatPercent > 2: at {round(othermaterials[cur].percentage, 0)}% }\n {set cur to cur + 1}\n {if cur = length: and\n |elif cur < length:,\n }\n }\r\n }\r\n \r\n {if len(goodmaterials) > 0 || len(greatmaterials) > 0 || len(othermaterials) > 0:\r\n .\r\n }\r\n }\r\n}", | |
"default": false | |
}, | |
"Body report": { | |
"name": "Body report", | |
"description": "Function to report on the details of the contextual body", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Preferences _}\r\n{set reportGravity to 1} {_ Set to 0 if you don't want to hear about the body's gravity. _} \r\n{set reportTerraformState to 1} {_ Set to 0 if you don't want to hear about the terraform state of the body. _}\r\n{set reportRings to 1} {_ Set to 0 if you don't want to hear about the body's rings. _}\r\n{set reportRotation to 0} {_ Set to 1 if you want to hear about the body's rotation. _}\r\n{set reportVolcanism to 1} {_ Set to 0 if you don't want to hear about the body's volcanism. _}\r\n{set reportAtmosphere to 1} {_ Set to 0 if you don't want to hear about the body's atmosphere. _}\r\n{set reportMaterials to 1} {_ Set to 0 if you don't want to hear about the body's materials. _}\r\n{set reportScanValue to 1} {_ Set to 1 if you want to hear about the body's estimated value. _}\r\n{set reportScanValueThreshold to 1000000}\r\n\r\n{_ Fetch from context _}\r\n{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}\r\n{if !reportbody: \r\n {set reportbody to BodyDetails(state.eddi_context_body_name)}\r\n}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n I'm not sure which body you are asking about.\r\n|else:\r\n {if reportbody.shortname != reportbody.name: \r\n {if reportbody.bodytype:\r\n {reportbody.bodytype}\r\n |else:\r\n {OneOf(\"Body\", \"Object\")} \r\n }\r\n }\r\n {P(reportbody.shortname, \"body\")} is\r\n\r\n {if reportGravity > 0:\r\n {if reportbody.gravity < 0.5:\r\n a low-gravity\r\n |elif reportbody.gravity < 2:\r\n a medium-gravity\r\n |elif reportbody.gravity < 4:\r\n a high-gravity\r\n |else:\r\n an extremely high-gravity\r\n }\r\n |else:\r\n a\r\n }\r\n\r\n {if reportTerraformState > 0:\r\n {if reportbody.terraformState.invariantName = \"Candidate for terraforming\":\r\n terraformable\r\n |elif reportbody.terraformState.invariantName = \"Terraformed\":\r\n terraformed\r\n }\r\n }\r\n\r\n {if find(reportbody.planettype, \"Class\") >= 0 && find(reportbody.planettype, \"gas giant\") >= 0:\r\n {set sudarsky to Occasionally(2, \"Sud-dar-ski\")}\r\n {if find(reportbody.planettype, \"Class V\") >= 0:\r\n {Occasionally(2, \"{Sudarsky} class five\")}\r\n |elif find(reportbody.planettype, \"Class IV\") >= 0:\r\n {Occasionally(2, \"{Sudarsky} class four\")}\r\n |elif find(reportbody.planettype, \"Class III\") >= 0:\r\n {Occasionally(2, \"{Sudarsky} class three\")}\r\n |elif find(reportbody.planettype, \"Class II\") >= 0:\r\n {Occasionally(2, \"{Sudarsky} class two\")}\r\n |elif find(reportbody.planettype, \"Class I\") >= 0:\r\n {Occasionally(2, \"{Sudarsky} class one\")}\r\n }\r\n gas giant\r\n |elif reportbody.planettype:\r\n {P(reportbody.planettype, \"planettype\")}\r\n |else: \r\n {if reportbody.bodytype:\r\n {reportbody.bodytype}\r\n |else:\r\n world\r\n }\r\n }\r\n\r\n {if len(reportbody.rings) && reportRings > 0:\r\n with {if len(reportbody.rings) = 1: a}\r\n {if find(reportbody.reserveLevel.invariantName, \"Pristine\") >= 0:\r\n pristine\r\n |elif find(reportbody.reserveLevel.invariantName, \"Major\") >= 0:\r\n rich\r\n }\r\n {set ringname to []}\r\n {set ringcomposition to []}\r\n {for Ring in reportbody.rings:\r\n {if find(ringcomposition, Ring.composition) < 0:\r\n {set ringcomposition to cat(ringcomposition, [Ring.composition])}\r\n }\r\n }\r\n {if len(ringcomposition) > 0:\r\n {List(ringcomposition)}\r\n }\r\n {if find(ringname[0], \"Belt\") >= 0: \r\n {set ring to \"belt\"}\r\n |else:\r\n {set ring to \"ring\"}\r\n }\r\n {ring}{if len(reportbody.rings) > 1 || len(event.rings) > 1:s}\r\n }\r\n\r\n {if reportbody.terraformState.invariantName = \"Terraforming\" && reportTerraformState > 0:\r\n in the process of being terraformed\r\n }\r\n\r\n {if reportbody.landable:\r\n that is suitable for landing\r\n }\r\n . {_ note the full stop}\r\n\r\n {if reportbody.rotationalperiod && reportRotation > 0:\r\n {Pause(100)}\r\n It has a\r\n {if reportbody.rotationalperiod < -20.0:\r\n slow retrograde\r\n |elif reportbody.rotationalperiod < -0.5:\r\n retrograde\r\n |elif reportbody.rotationalperiod < 0.0:\r\n fast retrograde\r\n |elif reportbody.rotationalperiod <= 0.5:\r\n fast\r\n |elif reportbody.rotationalperiod > 20.0:\r\n slow\r\n }\r\n rotational period of {Humanise(round(reportbody.rotationalperiod, 1))} days\r\n {if reportbody.tidallylocked:\r\n and is tidally-locked\r\n }.\r\n }\r\n\r\n {if reportVolcanism: {F(\"Body volcanism report\")} }\r\n\r\n {if reportAtmosphere: {F(\"Body atmosphere report\")} }\r\n\r\n {if reportMaterials: {F(\"Body materials report\")} }\r\n\r\n {if reportScanValue: {F(\"Report last scan value\")} }\r\n {if reportbody.estimatedvalue >= reportScanValueThreshold: High mapping value: {Humanise(reportbody.estimatedvalue)}}\r\n}", | |
"defaultValue": "{_ Preferences _}\r\n{set reportGravity to 1} {_ Set to 0 if you don't want to hear about the body's gravity. _} \r\n{set reportTerraformState to 1} {_ Set to 0 if you don't want to hear about the terraform state of the body. _}\r\n{set reportRings to 1} {_ Set to 0 if you don't want to hear about the body's rings. _}\r\n{set reportRotation to 0} {_ Set to 1 if you want to hear about the body's rotation. _}\r\n{set reportVolcanism to 1} {_ Set to 0 if you don't want to hear about the body's volcanism. _}\r\n{set reportAtmosphere to 1} {_ Set to 0 if you don't want to hear about the body's atmosphere. _}\r\n{set reportMaterials to 1} {_ Set to 0 if you don't want to hear about the body's materials. _}\r\n{set reportScanValue to 0} {_ Set to 1 if you want to hear about the body's estimated value. _}\r\n\r\n{_ Fetch from context _}\r\n{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}\r\n{if !reportbody: \r\n {set reportbody to BodyDetails(state.eddi_context_body_name)}\r\n}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n I'm not sure which body you are asking about.\r\n|else:\r\n {if reportbody.shortname != reportbody.name: \r\n {if reportbody.bodytype:\r\n {reportbody.bodytype}\r\n |else:\r\n {OneOf(\"Body\", \"Object\")} \r\n }\r\n }\r\n {P(reportbody.shortname, \"body\")} is\r\n\r\n {if reportGravity > 0:\r\n {if reportbody.gravity < 0.5:\r\n a low-gravity\r\n |elif reportbody.gravity < 2:\r\n a medium-gravity\r\n |elif reportbody.gravity < 4:\r\n a high-gravity\r\n |else:\r\n an extremely high-gravity\r\n }\r\n |else:\r\n a\r\n }\r\n\r\n {if reportTerraformState > 0:\r\n {if reportbody.terraformState.invariantName = \"Candidate for terraforming\":\r\n terraformable\r\n |elif reportbody.terraformState.invariantName = \"Terraformed\":\r\n terraformed\r\n }\r\n }\r\n\r\n {if find(reportbody.planettype, \"Class\") >= 0 && find(reportbody.planettype, \"gas giant\") >= 0:\r\n {set sudarsky to Occasionally(2, \"Sud-dar-ski\")}\r\n {if find(reportbody.planettype, \"Class V\") >= 0:\r\n {Occasionally(2, \"{Sudarsky} class five\")}\r\n |elif find(reportbody.planettype, \"Class IV\") >= 0:\r\n {Occasionally(2, \"{Sudarsky} class four\")}\r\n |elif find(reportbody.planettype, \"Class III\") >= 0:\r\n {Occasionally(2, \"{Sudarsky} class three\")}\r\n |elif find(reportbody.planettype, \"Class II\") >= 0:\r\n {Occasionally(2, \"{Sudarsky} class two\")}\r\n |elif find(reportbody.planettype, \"Class I\") >= 0:\r\n {Occasionally(2, \"{Sudarsky} class one\")}\r\n }\r\n gas giant\r\n |elif reportbody.planettype:\r\n {P(reportbody.planettype, \"planettype\")}\r\n |else: \r\n {if reportbody.bodytype:\r\n {reportbody.bodytype}\r\n |else:\r\n world\r\n }\r\n }\r\n\r\n {if len(reportbody.rings) && reportRings > 0:\r\n with {if len(reportbody.rings) = 1: a}\r\n {if find(reportbody.reserveLevel.invariantName, \"Pristine\") >= 0:\r\n pristine\r\n |elif find(reportbody.reserveLevel.invariantName, \"Major\") >= 0:\r\n rich\r\n }\r\n {set ringname to []}\r\n {set ringcomposition to []}\r\n {for Ring in reportbody.rings:\r\n {if find(ringcomposition, Ring.composition) < 0:\r\n {set ringcomposition to cat(ringcomposition, [Ring.composition])}\r\n }\r\n }\r\n {if len(ringcomposition) > 0:\r\n {List(ringcomposition)}\r\n }\r\n {if find(ringname[0], \"Belt\") >= 0: \r\n {set ring to \"belt\"}\r\n |else:\r\n {set ring to \"ring\"}\r\n }\r\n {ring}{if len(reportbody.rings) > 1 || len(event.rings) > 1:s}\r\n }\r\n\r\n {if reportbody.terraformState.invariantName = \"Terraforming\" && reportTerraformState > 0:\r\n in the process of being terraformed\r\n }\r\n\r\n {if reportbody.landable:\r\n that is suitable for landing\r\n }\r\n . {_ note the full stop}\r\n\r\n {if reportbody.rotationalperiod && reportRotation > 0:\r\n {Pause(100)}\r\n It has a\r\n {if reportbody.rotationalperiod < -20.0:\r\n slow retrograde\r\n |elif reportbody.rotationalperiod < -0.5:\r\n retrograde\r\n |elif reportbody.rotationalperiod < 0.0:\r\n fast retrograde\r\n |elif reportbody.rotationalperiod <= 0.5:\r\n fast\r\n |elif reportbody.rotationalperiod > 20.0:\r\n slow\r\n }\r\n rotational period of {Humanise(round(reportbody.rotationalperiod, 1))} days\r\n {if reportbody.tidallylocked:\r\n and is tidally-locked\r\n }.\r\n }\r\n\r\n {if reportVolcanism: {F(\"Body volcanism report\")} }\r\n\r\n {if reportAtmosphere: {F(\"Body atmosphere report\")} }\r\n\r\n {if reportMaterials: {F(\"Body materials report\")} }\r\n\r\n {if reportScanValue: {F(\"Report last scan value\")} }\r\n}", | |
"default": false | |
}, | |
"Body report summary": { | |
"name": "Body report summary", | |
"description": "Function to report on summary details of the contextual body", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Preferences _}\r\n\r\n{set reportTerraformables to 1} {_ Reports terraformable and terraformed bodies _}\r\n{set reportPlanetTypes to 1} {_ Reports Earth-like and water worlds _}\r\n{set reportMass to 1} {_ Reports notable masses (relative to Earth's) _}\r\n{set reportRadius to 1} {_ Reports notable radii (in kilometers) _}\r\n{set reportDensity to 0} {_ Reports notable densities (in kilograms per cubic meter) _}\r\n{set reportGravity to 1} {_ Reports notable gravity (in G's) for landable bodies _}\r\n{set reportTemperature to 1} {_ Reports notable temperatures (in Kelvin) _}\r\n{set reportMaterials to 1} {_ Reports materials per preferences in the `Body materials` script. _}\r\n{set reportLandableVolcanism to 0} {_ Reports volcanism on landable worlds _}\r\n{set reportRings to 1} {_ Reports ring details _}\r\n{set reportInterestingOrbits to 1} {_ Reports notable orbital characteristics _}\r\n{set reportRapidRotation to 1} {_ Reports very fast rotating bodies _}\r\n\r\n{_ Fetch from context _}\r\n{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}\r\n{if !reportbody: \r\n {set reportbody to BodyDetails(state.eddi_context_body_name)}\r\n}\r\n\r\n{_ Begin processing _}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n {_ If it's still not possible to get the body name... _}\r\n Which body are you\r\n {OneOf(\"asking about\",\"referring to\")}?\r\n\r\n|else:\r\n\r\n {set notables to []}\r\n\r\n {if reportInterestingOrbits:\r\n\r\n {set orbitNotables to []}\r\n\r\n {if reportbody.eccentricityprobability:\r\n {if reportbody.eccentricityprobability > 99.9:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"incredibly \", OneOf(\"elliptical\", \"oblong\", \"elongated\"))])}\r\n |elif reportbody.eccentricityprobability > 99:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"extremely \", OneOf(\"elliptical\", \"oblong\", \"elongated\"))])}\r\n |elif reportbody.eccentricityprobability > 97:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"unusually \", OneOf(\"elliptical\", \"oblong\", \"elongated\"))])}\r\n }\r\n }\r\n\r\n {if reportbody.inclinationprobability:\r\n {if reportbody.inclinationprobability > 99.9:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"incredibly inclined\")])}\r\n |elif reportbody.inclinationprobability > 99:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"extremely inclined\")])}\r\n |elif reportbody.inclinationprobability > 97:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"unusually inclined\")])}\r\n }\r\n }\r\n\r\n {if reportbody.orbitalperiodprobability:\r\n {if reportbody.orbitalperiod < 0: {set retrograde to cat(\" \", \"retrograde\", \" \")} }\r\n {if reportbody.orbitalperiodprobability < 0.1:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"incredibly fast\", retrograde)])}\r\n |elif reportbody.orbitalperiodprobability < 1:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"extremely fast\", retrograde)])}\r\n |elif reportbody.orbitalperiodprobability < 3:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"unusually fast\", retrograde)])}\r\n }\r\n }\r\n\r\n {if len(orbitNotables) > 0:\r\n {if StartsWithVowel(orbitNotables[0]): {set a to \"an\"} |else: {set a to \"a\"} }\r\n {set cur to 0}\r\n {set length to len(orbitNotables) - 1}\r\n {while cur < len(orbitNotables):\r\n {set orbitdescription to cat(orbitdescription, orbitNotables[cur])}\n {set cur to cur + 1}\n {if cur = length: \r\n {set orbitdescription to cat(orbitdescription, \" and \")}\n |elif cur < length:\r\n {set orbitdescription to cat(orbitdescription, \", \")}\n }\n }\r\n {set notables to cat(notables, [cat(a, \" \", orbitdescription, \" \", \"orbit\")])}\r\n }\r\n }\r\n\r\n {if reportbody.rotationalperiod < 0: {set retrograde to cat(\" \", \"retrograde\", \" \")} }\r\n {if reportRapidRotation && reportbody.rotationalperiodprobability:\r\n {if !retrograde && reportbody.rotationalperiodprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly short rotational period of \", Humanise(reportbody.rotationalperiod), \" days\")])}\r\n |elif !retrograde && reportbody.rotationalperiodprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely short rotational period of \", Humanise(reportbody.rotationalperiod), \" days\")])}\r\n |elif !retrograde && reportbody.rotationalperiodprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually short rotational period of \", Humanise(reportbody.rotationalperiod), \" days\")])}\r\n }\r\n }\r\n\r\n {if reportMass && reportbody.massprobability:\r\n {if reportbody.massprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly low mass at \", Humanise(reportbody.earthmass), \" times Earth's\")])}\r\n |elif reportbody.massprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely low mass at \", Humanise(reportbody.earthmass), \" times Earth's\")])}\r\n |elif reportbody.massprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually low mass at \", Humanise(reportbody.earthmass), \" times Earth's \")])}\r\n |elif reportbody.massprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly high mass at \", Humanise(reportbody.earthmass), \" times Earth's\")])}\r\n |elif reportbody.massprobability > 99:\r\n {set notables to cat(notables, [cat(\"an extremely high mass at \", Humanise(reportbody.earthmass), \" times Earth's\")])}\r\n |elif reportbody.massprobability > 97:\r\n {set notables to cat(notables, [cat(\"an unusually high mass at \", Humanise(reportbody.earthmass), \" times Earth's\")])}\r\n }\r\n }\r\n\r\n {if reportRadius && reportbody.radiusprobability:\r\n {if reportbody.radiusprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly low radius of \", Humanise(reportbody.radius), \" kilometers\")])}\r\n |elif reportbody.radiusprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely low radius of \", Humanise(reportbody.radius), \" kilometers\")])}\r\n |elif reportbody.radiusprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually low radius of \", Humanise(reportbody.radius), \" kilometers\")])}\r\n |elif reportbody.radiusprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an extremely high radius of \", Humanise(reportbody.radius), \" kilometers\")])}\r\n |elif reportbody.radiusprobability > 99:\r\n {set notables to cat(notables, [cat(\"an incredibly large radius of \", Humanise(reportbody.radius), \" kilometers\")])}\r\n |elif reportbody.radiusprobability > 97:\r\n {set notables to cat(notables, [cat(\"an unusually high radius of \", Humanise(reportbody.radius), \" kilometers\")])}\r\n }\r\n }\r\n\r\n {if reportTemperature && reportbody.tempprobability:\r\n {if reportbody.tempprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly low surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely low surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually low surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an extremely high surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability > 99:\r\n {set notables to cat(notables, [cat(\"an incredibly high surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability > 97:\r\n {set notables to cat(notables, [cat(\"an unusually high surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n }\r\n }\r\n\r\n {if reportGravity && reportbody.landable && reportbody.gravityprobability:\r\n {if reportbody.gravityprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly low gravity of \", Humanise(reportbody.gravity), \" times Earth's\")])}\r\n |elif reportbody.gravityprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely low gravity of \", Humanise(reportbody.gravity), \" times Earth's\")])}\r\n |elif reportbody.gravityprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually low gravity of \", Humanise(reportbody.gravity), \" times Earth's\")])}\r\n |elif reportbody.gravityprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly high gravity of \", Humanise(reportbody.gravity), \" times Earth's\")])}\r\n |elif reportbody.gravityprobability > 99:\r\n {set notables to cat(notables, [cat(\"an extremely high gravity of \", Humanise(reportbody.gravity), \" times Earth's\")])}\r\n |elif reportbody.gravityprobability > 97:\r\n {set notables to cat(notables, [cat(\"an unusually high gravity of \", Humanise(reportbody.gravity), \" times Earth's\")])}\r\n }\r\n }\r\n\r\n {if reportDensity && reportbody.densityprobability:\r\n {if reportbody.densityprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly low density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely low density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually low density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly high density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability > 99:\r\n {set notables to cat(notables, [cat(\"an extremely high density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability > 97:\r\n {set notables to cat(notables, [cat(\"an unusually high density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n }\r\n }\r\n\r\n {if reportVolcanism:\r\n {if reportbody.volcanism && reportbody.landable:\r\n {set notables to cat(notables, [cat(OneOf(\"volcanic\", \"tectonic\"), \" activity\")])}\r\n }\r\n }\r\n\r\n {if reportRings:\r\n {if reportbody.rings:\r\n {set ringcompositions to []}\r\n {set cur to 0}\r\n {for ring in reportbody.rings:\r\n {if find(ring.name, \"Ring\") > -1:\r\n {if find(ringcompositions, ring.composition) = -1:\r\n {set ringcompositions to cat(ringcompositions, [cat(ring.composition)])}\r\n }\r\n }\r\n {set cur to cur + 1}\r\n }\r\n {set cur to 0}\r\n {set length to len(ringcompositions) - 1}\r\n {while cur < len(ringcompositions):\r\n {set ringsdescription to cat(ringsdescription, ringcompositions[cur])}\n {set cur to cur + 1}\n {if cur = length: \r\n {set ringsdescription to cat(ringsdescription, \" and \")}\n |elif cur < length:\r\n {set ringsdecription to cat(ringsdescription, \", \")}\n }\n }\r\n {if ringsdescription:\r\n {if len(ringcompositions) = 1:\r\n {if StartsWithVowel(reportbody.reserves): \r\n {set a to \"an \"} \r\n |else: \r\n {set a to \"a \"}\r\n }\r\n {set rings to \"ring\"}\r\n |else:\r\n {set rings to \"rings\"} \r\n }\r\n {if reportbody.reserveLevel.invariantName != \"None\": \r\n {set reserves to reportbody.reserves}\r\n }\r\n {set notables to cat(notables, [cat(a, \" \", reserves, \" \", ringsdescription, \" \", rings)])}\r\n }\r\n }\r\n }\r\n\r\n {if reportTerraformables:\r\n {if reportbody.terraformState.invariantName = \"Candidate for terraforming\":\r\n {set notables to cat(notables, [OneOf(\"potential for terraforming\", \"terraformable conditions\")])}\r\n |elif reportbody.terraformState.invariantName = \"Terraformed\":\r\n {set notables to cat(notables, [\"terraformed conditions\"])}\r\n }\r\n }\r\n\r\n {if reportPlanetTypes:\r\n {if reportbody.planetClass.invariantName = \"Earth-like world\":\r\n {set notables to cat(notables, [\"Earth-like conditions\"])}\r\n |elif reportbody.planetClass.invariantName = \"Water world\":\r\n {set notables to cat(notables, [OneOf(\"abundant liquid water\", \"abundant liquid water at the surface\")])}\r\n }\r\n }\r\n\r\n {_ Begin speaking _}\r\n\r\n {if len(notables) > 0:\r\n {if reportbody.shortname != reportbody.bodyname:\r\n {if reportbody.bodytype:\r\n {reportbody.bodytype}\r\n |else:\r\n Body\r\n }\r\n {P(reportbody.shortname, \"body\")}\r\n |else:\r\n {P(reportbody.bodyname, \"body\")}\r\n }\r\n is\r\n\r\n {if len(notables) = 1:\r\n {set desc to \"notable\"}\r\n |elif len(notables) = 2:\r\n {set desc to OneOf('interesting', 'notable', 'remarkable')}\r\n |elif len(notables) = 3:\r\n {set desc to OneOf('exceptional', 'remarkable')}\r\n |elif len(notables) = 4:\r\n {set desc to OneOf('extraordinary')}\r\n |elif len(notables) >= 5:\r\n {set desc to OneOf('one of a kind', 'unique')}\r\n }\r\n {OneOf(\"{desc},\", \"{if StartsWithVowel(desc): an |else: a } {desc} {P(reportbody.planettype, 'planettype')}\")}\r\n\r\n with {List(notables)}.\r\n }\r\n\r\n {if reportMaterials:\r\n {F(\"Body materials report\")}\r\n }\r\n}", | |
"defaultValue": "{_ Preferences _}\r\n\r\n{set reportTerraformables to 1} {_ Reports terraformable and terraformed bodies _}\r\n{set reportPlanetTypes to 1} {_ Reports Earth-like and water worlds _}\r\n{set reportMass to 1} {_ Reports notable masses (relative to Earth's) _}\r\n{set reportRadius to 1} {_ Reports notable radii (in kilometers) _}\r\n{set reportDensity to 0} {_ Reports notable densities (in kilograms per cubic meter) _}\r\n{set reportGravity to 1} {_ Reports notable gravity (in G's) for landable bodies _}\r\n{set reportTemperature to 1} {_ Reports notable temperatures (in Kelvin) _}\r\n{set reportMaterials to 1} {_ Reports materials per preferences in the `Body materials` script. _}\r\n{set reportLandableVolcanism to 0} {_ Reports volcanism on landable worlds _}\r\n{set reportRings to 1} {_ Reports ring details _}\r\n{set reportInterestingOrbits to 1} {_ Reports notable orbital characteristics _}\r\n{set reportRapidRotation to 1} {_ Reports very fast rotating bodies _}\r\n\r\n{_ Fetch from context _}\r\n{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}\r\n{if !reportbody: \r\n {set reportbody to BodyDetails(state.eddi_context_body_name)}\r\n}\r\n\r\n{_ Begin processing _}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n {_ If it's still not possible to get the body name... _}\r\n Which body are you\r\n {OneOf(\"asking about\",\"referring to\")}?\r\n\r\n|else:\r\n\r\n {set notables to []}\r\n\r\n {if reportInterestingOrbits:\r\n\r\n {set orbitNotables to []}\r\n\r\n {if reportbody.eccentricityprobability:\r\n {if reportbody.eccentricityprobability > 99.9:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"incredibly \", OneOf(\"elliptical\", \"oblong\", \"elongated\"))])}\r\n |elif reportbody.eccentricityprobability > 99:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"extremely \", OneOf(\"elliptical\", \"oblong\", \"elongated\"))])}\r\n |elif reportbody.eccentricityprobability > 97:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"unusually \", OneOf(\"elliptical\", \"oblong\", \"elongated\"))])}\r\n }\r\n }\r\n\r\n {if reportbody.inclinationprobability:\r\n {if reportbody.inclinationprobability > 99.9:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"incredibly inclined\")])}\r\n |elif reportbody.inclinationprobability > 99:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"extremely inclined\")])}\r\n |elif reportbody.inclinationprobability > 97:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"unusually inclined\")])}\r\n }\r\n }\r\n\r\n {if reportbody.orbitalperiodprobability:\r\n {if reportbody.orbitalperiod < 0: {set retrograde to cat(\" \", \"retrograde\", \" \")} }\r\n {if reportbody.orbitalperiodprobability < 0.1:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"incredibly fast\", retrograde)])}\r\n |elif reportbody.orbitalperiodprobability < 1:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"extremely fast\", retrograde)])}\r\n |elif reportbody.orbitalperiodprobability < 3:\r\n {set orbitNotables to cat(orbitNotables, [cat(\"unusually fast\", retrograde)])}\r\n }\r\n }\r\n\r\n {if len(orbitNotables) > 0:\r\n {if StartsWithVowel(orbitNotables[0]): {set a to \"an\"} |else: {set a to \"a\"} }\r\n {set cur to 0}\r\n {set length to len(orbitNotables) - 1}\r\n {while cur < len(orbitNotables):\r\n {set orbitdescription to cat(orbitdescription, orbitNotables[cur])}\n {set cur to cur + 1}\n {if cur = length: \r\n {set orbitdescription to cat(orbitdescription, \" and \")}\n |elif cur < length:\r\n {set orbitdescription to cat(orbitdescription, \", \")}\n }\n }\r\n {set notables to cat(notables, [cat(a, \" \", orbitdescription, \" \", \"orbit\")])}\r\n }\r\n }\r\n\r\n {if reportbody.rotationalperiod < 0: {set retrograde to cat(\" \", \"retrograde\", \" \")} }\r\n {if reportRapidRotation && reportbody.rotationalperiodprobability:\r\n {if !retrograde && reportbody.rotationalperiodprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly short rotational period of \", Humanise(reportbody.rotationalperiod), \" days\")])}\r\n |elif !retrograde && reportbody.rotationalperiodprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely short rotational period of \", Humanise(reportbody.rotationalperiod), \" days\")])}\r\n |elif !retrograde && reportbody.rotationalperiodprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually short rotational period of \", Humanise(reportbody.rotationalperiod), \" days\")])}\r\n }\r\n }\r\n\r\n {if reportMass && reportbody.massprobability:\r\n {if reportbody.massprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly low mass at \", Humanise(reportbody.earthmass), \" times Earth's\")])}\r\n |elif reportbody.massprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely low mass at \", Humanise(reportbody.earthmass), \" times Earth's\")])}\r\n |elif reportbody.massprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually low mass at \", Humanise(reportbody.earthmass), \" times Earth's \")])}\r\n |elif reportbody.massprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly high mass at \", Humanise(reportbody.earthmass), \" times Earth's\")])}\r\n |elif reportbody.massprobability > 99:\r\n {set notables to cat(notables, [cat(\"an extremely high mass at \", Humanise(reportbody.earthmass), \" times Earth's\")])}\r\n |elif reportbody.massprobability > 97:\r\n {set notables to cat(notables, [cat(\"an unusually high mass at \", Humanise(reportbody.earthmass), \" times Earth's\")])}\r\n }\r\n }\r\n\r\n {if reportRadius && reportbody.radiusprobability:\r\n {if reportbody.radiusprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly low radius of \", Humanise(reportbody.radius), \" kilometers\")])}\r\n |elif reportbody.radiusprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely low radius of \", Humanise(reportbody.radius), \" kilometers\")])}\r\n |elif reportbody.radiusprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually low radius of \", Humanise(reportbody.radius), \" kilometers\")])}\r\n |elif reportbody.radiusprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an extremely high radius of \", Humanise(reportbody.radius), \" kilometers\")])}\r\n |elif reportbody.radiusprobability > 99:\r\n {set notables to cat(notables, [cat(\"an incredibly large radius of \", Humanise(reportbody.radius), \" kilometers\")])}\r\n |elif reportbody.radiusprobability > 97:\r\n {set notables to cat(notables, [cat(\"an unusually high radius of \", Humanise(reportbody.radius), \" kilometers\")])}\r\n }\r\n }\r\n\r\n {if reportTemperature && reportbody.tempprobability:\r\n {if reportbody.tempprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly low surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely low surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually low surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an extremely high surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability > 99:\r\n {set notables to cat(notables, [cat(\"an incredibly high surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability > 97:\r\n {set notables to cat(notables, [cat(\"an unusually high surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n }\r\n }\r\n\r\n {if reportGravity && reportbody.landable && reportbody.gravityprobability:\r\n {if reportbody.gravityprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly low gravity of \", Humanise(reportbody.gravity), \" times Earth's\")])}\r\n |elif reportbody.gravityprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely low gravity of \", Humanise(reportbody.gravity), \" times Earth's\")])}\r\n |elif reportbody.gravityprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually low gravity of \", Humanise(reportbody.gravity), \" times Earth's\")])}\r\n |elif reportbody.gravityprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly high gravity of \", Humanise(reportbody.gravity), \" times Earth's\")])}\r\n |elif reportbody.gravityprobability > 99:\r\n {set notables to cat(notables, [cat(\"an extremely high gravity of \", Humanise(reportbody.gravity), \" times Earth's\")])}\r\n |elif reportbody.gravityprobability > 97:\r\n {set notables to cat(notables, [cat(\"an unusually high gravity of \", Humanise(reportbody.gravity), \" times Earth's\")])}\r\n }\r\n }\r\n\r\n {if reportDensity && reportbody.densityprobability:\r\n {if reportbody.densityprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly low density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely low density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually low density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly high density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability > 99:\r\n {set notables to cat(notables, [cat(\"an extremely high density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability > 97:\r\n {set notables to cat(notables, [cat(\"an unusually high density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n }\r\n }\r\n\r\n {if reportVolcanism:\r\n {if reportbody.volcanism && reportbody.landable:\r\n {set notables to cat(notables, [cat(OneOf(\"volcanic\", \"tectonic\"), \" activity\")])}\r\n }\r\n }\r\n\r\n {if reportRings:\r\n {if reportbody.rings:\r\n {set ringcompositions to []}\r\n {set cur to 0}\r\n {for ring in reportbody.rings:\r\n {if find(ring.name, \"Ring\") > -1:\r\n {if find(ringcompositions, ring.composition) = -1:\r\n {set ringcompositions to cat(ringcompositions, [cat(ring.composition)])}\r\n }\r\n }\r\n {set cur to cur + 1}\r\n }\r\n {set cur to 0}\r\n {set length to len(ringcompositions) - 1}\r\n {while cur < len(ringcompositions):\r\n {set ringsdescription to cat(ringsdescription, ringcompositions[cur])}\n {set cur to cur + 1}\n {if cur = length: \r\n {set ringsdescription to cat(ringsdescription, \" and \")}\n |elif cur < length:\r\n {set ringsdecription to cat(ringsdescription, \", \")}\n }\n }\r\n {if ringsdescription:\r\n {if len(ringcompositions) = 1:\r\n {if StartsWithVowel(reportbody.reserves): \r\n {set a to \"an \"} \r\n |else: \r\n {set a to \"a \"}\r\n }\r\n {set rings to \"ring\"}\r\n |else:\r\n {set rings to \"rings\"} \r\n }\r\n {if reportbody.reserveLevel.invariantName != \"None\": \r\n {set reserves to reportbody.reserves}\r\n }\r\n {set notables to cat(notables, [cat(a, \" \", reserves, \" \", ringsdescription, \" \", rings)])}\r\n }\r\n }\r\n }\r\n\r\n {if reportTerraformables:\r\n {if reportbody.terraformState.invariantName = \"Candidate for terraforming\":\r\n {set notables to cat(notables, [OneOf(\"potential for terraforming\", \"terraformable conditions\")])}\r\n |elif reportbody.terraformState.invariantName = \"Terraformed\":\r\n {set notables to cat(notables, [\"terraformed conditions\"])}\r\n }\r\n }\r\n\r\n {if reportPlanetTypes:\r\n {if reportbody.planetClass.invariantName = \"Earth-like world\":\r\n {set notables to cat(notables, [\"Earth-like conditions\"])}\r\n |elif reportbody.planetClass.invariantName = \"Water world\":\r\n {set notables to cat(notables, [OneOf(\"abundant liquid water\", \"abundant liquid water at the surface\")])}\r\n }\r\n }\r\n\r\n {_ Begin speaking _}\r\n\r\n {if len(notables) > 0:\r\n {if reportbody.shortname != reportbody.bodyname:\r\n {if reportbody.bodytype:\r\n {reportbody.bodytype}\r\n |else:\r\n Body\r\n }\r\n {P(reportbody.shortname, \"body\")}\r\n |else:\r\n {P(reportbody.bodyname, \"body\")}\r\n }\r\n is\r\n\r\n {if len(notables) = 1:\r\n {set desc to \"notable\"}\r\n |elif len(notables) = 2:\r\n {set desc to OneOf('interesting', 'notable', 'remarkable')}\r\n |elif len(notables) = 3:\r\n {set desc to OneOf('exceptional', 'remarkable')}\r\n |elif len(notables) = 4:\r\n {set desc to OneOf('extraordinary')}\r\n |elif len(notables) >= 5:\r\n {set desc to OneOf('one of a kind', 'unique')}\r\n }\r\n {OneOf(\"{desc},\", \"{if StartsWithVowel(desc): an |else: a } {desc} {P(reportbody.planettype, 'planettype')}\")}\r\n\r\n with {List(notables)}.\r\n }\r\n\r\n {if reportMaterials:\r\n {F(\"Body materials report\")}\r\n }\r\n}", | |
"default": true | |
}, | |
"Body scanned": { | |
"name": "Body scanned", | |
"description": "Triggered when you complete a scan of a planetary body", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context _}\r\n{SetState('eddi_context_last_subject', 'body')}\r\n{SetState('eddi_context_last_action', 'scan')}\r\n{SetState('eddi_context_body_system', system.name)}\r\n{SetState('eddi_context_body_name', event.name)}\r\n{SetState('eddi_context_last_scan_estimated_value', event.estimatedvalue)}\r\n\r\n{_ Preferences _}\r\n\r\n{set fullBodyReport to 0}\r\n\r\n{_ Process the event _}\r\n\r\n{if ship.Role.edname = \"Exploration\" || ship.Role.edname = \"Multipurpose\":\r\n {Pause(500)}\r\n {if fullBodyReport:\r\n {F(\"Body report\")}\r\n |else:\r\n {F(\"Body report summary\")}\r\n }\r\n}", | |
"defaultValue": "{_ Context _}\r\n{SetState('eddi_context_last_subject', 'body')}\r\n{SetState('eddi_context_last_action', 'scan')}\r\n{SetState('eddi_context_body_system', system.name)}\r\n{SetState('eddi_context_body_name', event.name)}\r\n{SetState('eddi_context_last_scan_estimated_value', event.estimatedvalue)}\r\n\r\n{_ Preferences _}\r\n\r\n{set fullBodyReport to 0}\r\n\r\n{_ Process the event _}\r\n\r\n{if ship.Role.edname = \"Exploration\" || ship.Role.edname = \"Multipurpose\":\r\n {Pause(500)}\r\n {if fullBodyReport:\r\n {F(\"Body report\")}\r\n |else:\r\n {F(\"Body report summary\")}\r\n }\r\n}", | |
"default": true | |
}, | |
"Body volcanism report": { | |
"name": "Body volcanism report", | |
"description": "Report on the volcanism of the contextual body", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch from context _}\r\n{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}\r\n{if !reportbody: \r\n {set reportbody to BodyDetails(state.eddi_context_body_name)}\r\n}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n I'm not sure which body you are asking about.\r\n|else:\r\n {if (reportbody.volcanism || len(reportbody.volcanism) > 0) && reportVolcanism > 0:\r\n {if reportbody.name = reportbody.shortname:\r\n {P(reportbody.shortname, \"body\")} {OneOf(\"has\", \"contains\")}\r\n |else:\r\n {OneOf(\"I detect\", \r\n \"I am detecting\", \r\n \"Sensors detect\", \r\n \"This {reportbody.bodytype} has\", \r\n )}\r\n }\r\n\r\n {if reportbody.volcanism.type = \"Geysers\":\r\n {if reportbody.volcanism.invariantAmount = 'Major':\r\n high numbers of\r\n |elif reportbody.volcanism.invariantAmount = 'Minor':\r\n low numbers of\r\n }\r\n active {reportbody.volcanism.composition} geysers\r\n {Occasionally(3, \"at the surface\")}.\r\n |else:\r\n {if reportbody.volcanism.invariantAmount = 'Major':\r\n high levels of\r\n |elif reportbody.volcanism.invariantAmount = 'Minor':\r\n low levels of\r\n }\r\n active {reportbody.volcanism.composition} \r\n {OneOf(\r\n \"lava flows {Occasionally(3, \\\"at the surface\\\")}\",\r\n OneOf(\"magma flows near the surface\", \"sub-surface magma flows\")\r\n )}.\r\n }\r\n }\r\n}", | |
"defaultValue": "{_ Fetch from context _}\r\n{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}\r\n{if !reportbody: \r\n {set reportbody to BodyDetails(state.eddi_context_body_name)}\r\n}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n I'm not sure which body you are asking about.\r\n|else:\r\n {if (reportbody.volcanism || len(reportbody.volcanism) > 0) && reportVolcanism > 0:\r\n {if reportbody.name = reportbody.shortname:\r\n {P(reportbody.shortname, \"body\")} {OneOf(\"has\", \"contains\")}\r\n |else:\r\n {OneOf(\"I detect\", \r\n \"I am detecting\", \r\n \"Sensors detect\", \r\n \"This {reportbody.bodytype} has\", \r\n )}\r\n }\r\n\r\n {if reportbody.volcanism.type = \"Geysers\":\r\n {if reportbody.volcanism.invariantAmount = 'Major':\r\n high numbers of\r\n |elif reportbody.volcanism.invariantAmount = 'Minor':\r\n low numbers of\r\n }\r\n active {reportbody.volcanism.composition} geysers\r\n {Occasionally(3, \"at the surface\")}.\r\n |else:\r\n {if reportbody.volcanism.invariantAmount = 'Major':\r\n high levels of\r\n |elif reportbody.volcanism.invariantAmount = 'Minor':\r\n low levels of\r\n }\r\n active {reportbody.volcanism.composition} \r\n {OneOf(\r\n \"lava flows {Occasionally(3, \\\"at the surface\\\")}\",\r\n OneOf(\"magma flows near the surface\", \"sub-surface magma flows\")\r\n )}.\r\n }\r\n }\r\n}", | |
"default": true | |
}, | |
"Bond awarded": { | |
"name": "Bond awarded", | |
"description": "Triggered when you are awarded a combat bond", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bond')}\r\n{SetState('eddi_context_last_action', 'award')}\r\n{SetState('eddi_context_bond_amount', event.reward)}\r\n{SetState('eddi_context_bond_faction', event.awardingfaction)}\r\n{SetState(\"eddi_context_criminal_record_change\", true)}\r\n\r\nTarget {OneOf(\"destroyed\",\"eliminated\",\"down\")}.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bond')}\r\n{SetState('eddi_context_last_action', 'award')}\r\n{SetState('eddi_context_bond_amount', event.reward)}\r\n{SetState('eddi_context_bond_faction', event.awardingfaction)}\r\n{SetState(\"eddi_context_criminal_record_change\", true)}\r\n\r\nTarget {OneOf(\"destroyed\",\"eliminated\",\"down\")}.", | |
"default": true | |
}, | |
"Bond redeemed": { | |
"name": "Bond redeemed", | |
"description": "Triggered when you redeem a combat bond", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bond')}\r\n{SetState('eddi_context_last_action', 'redeem')}\r\n{SetState('eddi_context_bond_amount', event.amount)}\r\n\r\nCombat bonds for {Humanise(event.amount)} credits \r\n{Occasionally(2, OneOf(\"have been\", \"have now been\"))}\r\n{OneOf(\"redeemed\", \"claimed\")}\r\n\r\n{Occasionally(2, \"\r\n {if len(event.rewards) = 1 && len(event.rewards[0].faction) > 0:\r\n from {P(event.rewards[0].faction, \"faction\")}\r\n |else:\r\n . \r\n {set cur to 0}\r\n {while cur < len(event.rewards):\r\n {if len(event.rewards[cur].faction) > 0:\r\n {if cur = 0:\r\n |elif cur < len(event.rewards) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {Humanise(event.rewards[cur].amount)} credits from\r\n {P(event.rewards[cur].faction, \"faction\")} \r\n {set cur to cur + 1}\r\n }\r\n }\r\n }\r\n\")}\r\n\r\n{if event.brokerpercentage && event.brokerpercentage > 0:\r\n after deducting\r\n {OneOf(\"payments\", \"fees\")} of\r\n {Humanise(round((event.amount / (100 - event.brokerpercentage)) * event.brokerpercentage, 0))} credits\r\n}.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bond')}\r\n{SetState('eddi_context_last_action', 'redeem')}\r\n{SetState('eddi_context_bond_amount', event.amount)}\r\n\r\nCombat bonds for {Humanise(event.amount)} credits \r\n{Occasionally(2, OneOf(\"have been\", \"have now been\"))}\r\n{OneOf(\"redeemed\", \"claimed\")}\r\n\r\n{Occasionally(2, \"\r\n {if len(event.rewards) = 1 && len(event.rewards[0].faction) > 0:\r\n from {P(event.rewards[0].faction, \"faction\")}\r\n |else:\r\n . \r\n {set cur to 0}\r\n {while cur < len(event.rewards):\r\n {if len(event.rewards[cur].faction) > 0:\r\n {if cur = 0:\r\n |elif cur < len(event.rewards) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {Humanise(event.rewards[cur].amount)} credits from\r\n {P(event.rewards[cur].faction, \"faction\")} \r\n {set cur to cur + 1}\r\n }\r\n }\r\n }\r\n\")}\r\n\r\n{if event.brokerpercentage && event.brokerpercentage > 0:\r\n after deducting\r\n {OneOf(\"payments\", \"fees\")} of\r\n {Humanise(round((event.amount / (100 - event.brokerpercentage)) * event.brokerpercentage, 0))} credits\r\n}.", | |
"default": true | |
}, | |
"Book transport": { | |
"name": "Book transport", | |
"description": "Triggered when booking a taxi or deployment for on foot combat", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Bounty awarded": { | |
"name": "Bounty awarded", | |
"description": "Triggered when you are awarded a bounty", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bounty')}\r\n{SetState('eddi_context_last_action', 'award')}\r\n{SetState('eddi_context_bounty_name', event.target)}\r\n{SetState('eddi_context_bounty_faction', event.faction)}\r\n{SetState('eddi_context_bounty_amount', event.reward)}\r\n{SetState(\"eddi_context_criminal_record_change\", true)}\r\n\r\n{Pause(500)}\r\n{if len(event.rewards) = 1:\r\n Bounty voucher \r\n|elif len(event.rewards) > 1:\r\n Bounty vouchers \r\n}\r\n{OneOf(\"received\", \"awarded\")}.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bounty')}\r\n{SetState('eddi_context_last_action', 'award')}\r\n{SetState('eddi_context_bounty_name', event.target)}\r\n{SetState('eddi_context_bounty_faction', event.faction)}\r\n{SetState('eddi_context_bounty_amount', event.reward)}\r\n{SetState(\"eddi_context_criminal_record_change\", true)}\r\n\r\n{Pause(500)}\r\n{if len(event.rewards) = 1:\r\n Bounty voucher \r\n|elif len(event.rewards) > 1:\r\n Bounty vouchers \r\n}\r\n{OneOf(\"received\", \"awarded\")}.", | |
"default": true | |
}, | |
"Bounty incurred": { | |
"name": "Bounty incurred", | |
"description": "Triggered when you incur a bounty", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bounty')}\r\n{SetState('eddi_context_last_action', 'incur')}\r\n{SetState('eddi_context_bounty_name', event.victim)}\r\n{SetState('eddi_context_bounty_faction', event.faction)}\r\n{SetState('eddi_context_bounty_amount', event.bounty)}\r\n{SetState(\"eddi_context_criminal_record_change\", true)}\r\n\r\nBounty {OneOf('received', 'incurred', 'issued against you', 'placed on your head')} for {event.crime}.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bounty')}\r\n{SetState('eddi_context_last_action', 'incur')}\r\n{SetState('eddi_context_bounty_name', event.victim)}\r\n{SetState('eddi_context_bounty_faction', event.faction)}\r\n{SetState('eddi_context_bounty_amount', event.bounty)}\r\n{SetState(\"eddi_context_criminal_record_change\", true)}\r\n\r\nBounty {OneOf('received', 'incurred', 'issued against you', 'placed on your head')} for {event.crime}.", | |
"default": true | |
}, | |
"Bounty paid": { | |
"name": "Bounty paid", | |
"description": "Triggered when you pay a bounty", | |
"enabled": false, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bounty')}\r\n{SetState('eddi_context_last_action', 'pay')}\r\n{SetState('eddi_context_fine_amount', event.amount)}\r\n\r\n\r\nPaid bounty of {Humanise(event.amount)} credits.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bounty')}\r\n{SetState('eddi_context_last_action', 'pay')}\r\n{SetState('eddi_context_fine_amount', event.amount)}\r\n\r\n\r\nPaid bounty of {Humanise(event.amount)} credits.", | |
"default": true | |
}, | |
"Bounty redeemed": { | |
"name": "Bounty redeemed", | |
"description": "Triggered when you redeem a bounty voucher", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bounty')}\r\n{SetState('eddi_context_last_action', 'redeem')}\r\n{SetState('eddi_context_bounty_amount', event.amount)}\r\n\r\nBounty vouchers for {Humanise(event.amount)} credits \r\n{Occasionally(2, OneOf(\"have been\", \"have now been\"))}\r\n{OneOf(\"redeemed\", \"claimed\")}\r\n\r\n{Occasionally(2, \"\r\n {if len(event.rewards) = 1 && len(event.rewards[0].faction) > 0:\r\n from {P(event.rewards[0].faction, \"faction\")}\r\n |else:\r\n . \r\n {set cur to 0}\r\n {while cur < len(event.rewards):\r\n {if len(event.rewards[cur].faction) > 0:\r\n {if cur = 0:\r\n |elif cur < len(event.rewards) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {Humanise(event.rewards[cur].amount)} credits from\r\n {P(event.rewards[cur].faction, \"faction\")} \r\n {set cur to cur + 1}\r\n }\r\n }\r\n }\r\n\")}\r\n\r\n{if event.brokerpercentage && event.brokerpercentage > 0:\r\n after deducting\r\n {OneOf(\"payments\", \"fees\")} of\r\n {Humanise(round((event.amount / (100 - event.brokerpercentage)) * event.brokerpercentage, 0))} credits\r\n}.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'bounty')}\r\n{SetState('eddi_context_last_action', 'redeem')}\r\n{SetState('eddi_context_bounty_amount', event.amount)}\r\n\r\nBounty vouchers for {Humanise(event.amount)} credits \r\n{Occasionally(2, OneOf(\"have been\", \"have now been\"))}\r\n{OneOf(\"redeemed\", \"claimed\")}\r\n\r\n{Occasionally(2, \"\r\n {if len(event.rewards) = 1 && len(event.rewards[0].faction) > 0:\r\n from {P(event.rewards[0].faction, \"faction\")}\r\n |else:\r\n . \r\n {set cur to 0}\r\n {while cur < len(event.rewards):\r\n {if len(event.rewards[cur].faction) > 0:\r\n {if cur = 0:\r\n |elif cur < len(event.rewards) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {Humanise(event.rewards[cur].amount)} credits from\r\n {P(event.rewards[cur].faction, \"faction\")} \r\n {set cur to cur + 1}\r\n }\r\n }\r\n }\r\n\")}\r\n\r\n{if event.brokerpercentage && event.brokerpercentage > 0:\r\n after deducting\r\n {OneOf(\"payments\", \"fees\")} of\r\n {Humanise(round((event.amount / (100 - event.brokerpercentage)) * event.brokerpercentage, 0))} credits\r\n}.", | |
"default": true | |
}, | |
"Cancel transport": { | |
"name": "Cancel transport", | |
"description": "Triggered when canceling a taxi or deployment for on foot combat", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Cargo depot": { | |
"name": "Cargo depot", | |
"description": "Triggered when engaging with a mission depot", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Cargo depot }\r\n{_ Triggered when engaging with a mission depot }\r\n\r\n\r\n{if event.updatetype = \"Collect\":\r\n You have collected {event.amount} tonne{if event.amount != 1:s} of {event.commodity} from the mission depot.\r\n|elif event.updatetype = \"Deliver\":\r\n You have delivered {event.amount} tonne{if event.amount != 1:s} of {event.commodity} to the mission depot.\r\n\r\n {Pause(500)}\r\n {set remaining to event.totaltodeliver - event.delivered}\r\n {set haulage to HaulageDetails(event.missionid)}\r\n\r\n {if find(haulage.name, \"Wing\") > -1:\r\n Wing\r\n |elif find(haulage.name, \"Rank\") > -1:\r\n Naval\r\n |else:\r\n Solo\r\n }\r\n\r\n {if remaining = 0:\r\n mission requirements are now completed.\r\n |else:\r\n mission is now {round(event.delivered / event.totaltodeliver * 100, 0)} percent complete.\r\n }\r\n}\r\n\r\n", | |
"defaultValue": "{_ Cargo depot }\r\n{_ Triggered when engaging with a mission depot }\r\n\r\n\r\n{if event.updatetype = \"Collect\":\r\n You have collected {event.amount} tonne{if event.amount != 1:s} of {event.commodity} from the mission depot.\r\n|elif event.updatetype = \"Deliver\":\r\n You have delivered {event.amount} tonne{if event.amount != 1:s} of {event.commodity} to the mission depot.\r\n\r\n {Pause(500)}\r\n {set remaining to event.totaltodeliver - event.delivered}\r\n {set haulage to HaulageDetails(event.missionid)}\r\n\r\n {if find(haulage.name, \"Wing\") > -1:\r\n Wing\r\n |elif find(haulage.name, \"Rank\") > -1:\r\n Naval\r\n |else:\r\n Solo\r\n }\r\n\r\n {if remaining = 0:\r\n mission requirements are now completed.\r\n |else:\r\n mission is now {round(event.delivered / event.totaltodeliver * 100, 0)} percent complete.\r\n }\r\n}\r\n\r\n", | |
"default": true | |
}, | |
"Cargo report": { | |
"name": "Cargo report", | |
"description": "Report current cargo manifest", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Cargo report }\r\n{_ Report current cargo manifest }\r\n\r\n{set cargocarried to 0}\r\n{set haulage to 0}\r\n{set illegal to false}\r\n{set stolen to false}\r\n\r\n{if len(inventory) > 0:\r\n {for cargo in inventory:\r\n {set cargocarried to cargocarried + cargo.total}\r\n {set haulage to haulage + cargo.haulage}\r\n {if cargo.stolen > 0: {set stolen to true}}\r\n {if status.docked:\r\n {for prohibited in station.prohibited:\r\n {if cargo.name = prohibited.name: {set illegal to true}}\r\n }\r\n }\r\n }\r\n}\r\n\r\n{if cargocarried > 0:\r\n {if cargocarried = ship.cargocapacity:\r\n Your cargo {OneOf(\"bay\", \"hold\")} is full\r\n |else:\r\n You are carrying {cargocarried} tonne{if cargocarried != 1:s}\r\n }\r\n\r\n {if len(inventory) = 1:\r\n {if inventory[0].name = \"Limpet\":\r\n of limpets.\r\n |else:\r\n of {inventory[0].name}.\r\n {if haulage = cargocarried:\r\n Note: All cargo is mission related haulage.\r\n }\r\n }\r\n |else:\r\n {if cargocarried < ship.cargocapacity: of cargo}.\r\n {Occasionally(2, \"Cargo\")} {OneOf(\"Manifest\", \"Inventory\")} is as follows:\r\n\r\n {set c to []}\r\n {for cargo in inventory:\r\n {if cargo.total > 0:\r\n {set c to cat(c, [cargo])}\r\n }\r\n }\r\n\r\n {set position to 0}\r\n {for cargo in c:\r\n {cargo.total} tonne{if cargo.total != 1:s} of \r\n {if cargo.name = \"Limpet\":\r\n limpets\r\n |else:\r\n {cargo.name}\r\n }\r\n {set position to position + 1}\r\n {if position = len(c) - 1: and |else:,}\r\n }\r\n {if haulage > 0:\r\n Note: {haulage} tonne{if haulage != 1:s} of your manifest is mission related haulage.\r\n }\r\n }.\r\n\r\n {if cargocarried < ship.cargocapacity:\r\n {set free to ship.cargocapacity - cargocarried}\r\n You {OneOf(\"have {free} tonne{if free != 1:s} free\",\r\n \"have {free} tonne{if free != 1:s} of free space\",\r\n \"can carry an additional {free} tonne{if free != 1:s}\")}.\r\n }\r\n\r\n {if stolen || illegal:\r\n Warning: You are carrying\r\n {if stolen: stolen goods}\r\n {if illegal:\r\n {if stolen:, and }\r\n goods that are illegal in this jurisdiction\r\n }.\r\n }\r\n\r\n|else:\r\n {OneOf(\"Your cargo bay is empty.\",\"You have no cargo.\",\"You are carrying no cargo.\")}\r\n}", | |
"defaultValue": "{_ Cargo report }\r\n{_ Report current cargo manifest }\r\n\r\n{set cargocarried to 0}\r\n{set haulage to 0}\r\n{set illegal to false}\r\n{set stolen to false}\r\n\r\n{if len(inventory) > 0:\r\n {for cargo in inventory:\r\n {set cargocarried to cargocarried + cargo.total}\r\n {set haulage to haulage + cargo.haulage}\r\n {if cargo.stolen > 0: {set stolen to true}}\r\n {if status.docked:\r\n {for prohibited in station.prohibited:\r\n {if cargo.name = prohibited.name: {set illegal to true}}\r\n }\r\n }\r\n }\r\n}\r\n\r\n{if cargocarried > 0:\r\n {if cargocarried = ship.cargocapacity:\r\n Your cargo {OneOf(\"bay\", \"hold\")} is full\r\n |else:\r\n You are carrying {cargocarried} tonne{if cargocarried != 1:s}\r\n }\r\n\r\n {if len(inventory) = 1:\r\n {if inventory[0].name = \"Limpet\":\r\n of limpets.\r\n |else:\r\n of {inventory[0].name}.\r\n {if haulage = cargocarried:\r\n Note: All cargo is mission related haulage.\r\n }\r\n }\r\n |else:\r\n {if cargocarried < ship.cargocapacity: of cargo}.\r\n {Occasionally(2, \"Cargo\")} {OneOf(\"Manifest\", \"Inventory\")} is as follows:\r\n\r\n {set c to []}\r\n {for cargo in inventory:\r\n {if cargo.total > 0:\r\n {set c to cat(c, [cargo])}\r\n }\r\n }\r\n\r\n {set position to 0}\r\n {for cargo in c:\r\n {cargo.total} tonne{if cargo.total != 1:s} of \r\n {if cargo.name = \"Limpet\":\r\n limpets\r\n |else:\r\n {cargo.name}\r\n }\r\n {set position to position + 1}\r\n {if position = len(c) - 1: and |else:,}\r\n }\r\n {if haulage > 0:\r\n Note: {haulage} tonne{if haulage != 1:s} of your manifest is mission related haulage.\r\n }\r\n }.\r\n\r\n {if cargocarried < ship.cargocapacity:\r\n {set free to ship.cargocapacity - cargocarried}\r\n You {OneOf(\"have {free} tonne{if free != 1:s} free\",\r\n \"have {free} tonne{if free != 1:s} of free space\",\r\n \"can carry an additional {free} tonne{if free != 1:s}\")}.\r\n }\r\n\r\n {if stolen || illegal:\r\n Warning: You are carrying\r\n {if stolen: stolen goods}\r\n {if illegal:\r\n {if stolen:, and }\r\n goods that are illegal in this jurisdiction\r\n }.\r\n }\r\n\r\n|else:\r\n {OneOf(\"Your cargo bay is empty.\",\"You have no cargo.\",\"You are carrying no cargo.\")}\r\n}", | |
"default": true | |
}, | |
"Cargo scoop": { | |
"name": "Cargo scoop", | |
"description": "Triggered when you deploy or retract your cargo scoop", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Cargo wingupdate": { | |
"name": "Cargo wingupdate", | |
"description": "Triggered when a wing-mate collects or delivers cargo for a wing mission", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Cargo wingupdate }\r\n{_ Triggered when a wing-mate collects or delivers cargo for a wing mission }\r\n\r\n\r\n{if event.updatetype = \"Collect\":\r\n Your wing mate has collected {event.amount} tonne{if event.amount != 1:s}\r\n {if event.commodity != \"Unknown\": of {event.commodity}} from the mission depot.\r\n|elif event.updatetype = \"Deliver\":\r\n Your wing mate has delivered {event.amount} tonne{if event.amount != 1:s} \r\n {if event.commodity != \"Unknown\": of {event.commodity}} to the mission depot.\r\n}\r\n\r\n{Pause(500)}\r\n{set remaining to event.totaltodeliver - event.delivered}\r\n{if remaining = 0:\r\n Wing mission requirements are now completed.\r\n|elif event.updatetype = \"Deliver\":\r\n Wing mission is now {round(event.delivered / event.totaltodeliver * 100, 0)} percent complete.\r\n}\r\n", | |
"defaultValue": "{_ Cargo wingupdate }\r\n{_ Triggered when a wing-mate collects or delivers cargo for a wing mission }\r\n\r\n\r\n{if event.updatetype = \"Collect\":\r\n Your wing mate has collected {event.amount} tonne{if event.amount != 1:s}\r\n {if event.commodity != \"Unknown\": of {event.commodity}} from the mission depot.\r\n|elif event.updatetype = \"Deliver\":\r\n Your wing mate has delivered {event.amount} tonne{if event.amount != 1:s} \r\n {if event.commodity != \"Unknown\": of {event.commodity}} to the mission depot.\r\n}\r\n\r\n{Pause(500)}\r\n{set remaining to event.totaltodeliver - event.delivered}\r\n{if remaining = 0:\r\n Wing mission requirements are now completed.\r\n|elif event.updatetype = \"Deliver\":\r\n Wing mission is now {round(event.delivered / event.totaltodeliver * 100, 0)} percent complete.\r\n}\r\n", | |
"default": true | |
}, | |
"Carrier cooldown": { | |
"name": "Carrier cooldown", | |
"description": "Triggered when you either were docked at a fleet carrier during a jump or are the fleet carrier owner and it completes its cooldown", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Fleet carrier cooldown completed.", | |
"defaultValue": "Fleet carrier cooldown completed.", | |
"default": true | |
}, | |
"Carrier jump cancelled": { | |
"name": "Carrier jump cancelled", | |
"description": "Triggered when you cancel a scheduled fleet carrier jump", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Fleet carrier jump cancelled.", | |
"defaultValue": "Fleet carrier jump cancelled.", | |
"default": true | |
}, | |
"Carrier jump engaged": { | |
"name": "Carrier jump engaged", | |
"description": "Triggered when your fleet carrier performs a jump", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'carrier jump')}\r\n{SetState('eddi_context_last_action', 'start')}\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_system_system', event.system)}\r\n{SetState('eddi_context_system_lastvisit', system.lastVisitSeconds)}\r\n\r\n{if environment = \"Docked\":\r\n\r\n {_ Zero the 'remaining jump' context to only use values following this event _}\r\n {SetState('eddi_context_remaining_jumps', 0)}\r\n\r\n {set reportsystem to SystemDetails(event.systemname)}\r\n\r\n {OneOf(\"Jump in progress\",\"Entering portal\")} to the {P(reportsystem.systemname, \"starsystem\")} system\r\n {if len(event.shortname) > 0:\r\n {set reportBody to BodyDetails(event.bodyname, event.systemname)} \r\n near\r\n {if len(reportBody.bodytype) > 0: {reportBody.bodytype} |else: body}\r\n {P(event.shortname, \"body\")}\r\n }.\r\n\r\n {if reportsystem.systemname = homesystem.systemname:\r\n Welcome home, {F(\"Honorific\")}\r\n |else: \r\n {if lastsystem.allegiance && lastsystem.allegiance != \"None\" && lastsystem.allegiance != \"Independent\" && (!reportsystem.allegiance || reportsystem.allegiance = \"None\" || reportsystem.allegiance = \"Independent\"):\r\n You {OneOf(\"are leaving\", \"have left\", \"are no longer in\")} {lastsystem.allegiance} space.\r\n |elif lastsystem.allegiance && lastsystem.allegiance != reportsystem.allegiance && system.allegiance && system.allegiance != \"None\":\r\n You {OneOf(\"are now in\", \"have entered\", \"are entering\")} {reportsystem.allegiance} space.\r\n {if cmdr.title != \"Commander\":\r\n Welcome back {F(\"Honorific\")}.\r\n }\r\n }\r\n\r\n {if reportsystem.visits = 0:\r\n This is your first visit to this system.\r\n |elif reportsystem.visits = 1:\r\n This is your second visit to this system.\r\n |elif reportsystem.visits = 2:\r\n {Occasionally(2, \"This is your third visit to this system.\")}\r\n |elif reportsystem.visits = 3:\r\n {Occasionally(2, \"This is your fourth visit to this system.\")}\r\n |else:\r\n {Occasionally(3, \"You have visited this system {reportsystem.visits} times.\")}\r\n }\r\n\r\n {if reportsystem.population && reportsystem.population > 0:\r\n {if SecondsSince(reportsystem.lastVisitSeconds) > 3600:\r\n {F(\"System report\")}\r\n }\r\n |else:\r\n {OneOf(\"This system is not populated\",\"There is no human presence here\", \"Humans have yet to colonise this system\")}.\r\n }\r\n\r\n {if reportsystem.distancefromhome:\r\n {set ReportDistanceFromHome() to:\r\n {return cat(\r\n \tOneOf(\"You are\", \"Current location is\", \"You are now\"), \" \",\r\n\t Humanise(reportsystem.distancefromhome), \" lightyears from \",\r\n\t OneOf(\"home\", \"{P(homesystem.name, \"starsystem\")}\"), \".\"\r\n\t )}\r\n }\r\n {Occasionally(7, ReportDistanceFromHome())}\r\n }\r\n\r\n {if reportsystem.comment:\r\n You made a {OneOf(\"note\", \"comment\", \"remark\")} {OneOf(\"about\", \"for\", \"on\")} this system. It {OneOf(\"is as follows\", \"says\", \"reads\", \"is\")} {reportsystem.comment}.\r\n }\r\n }\r\n|else:\r\n Fleet carrier arriving at the {P(event.systemname, \"starsystem\")} system\r\n {if len(event.shortname) > 0:\r\n {set reportBody to BodyDetails(event.bodyname, event.systemname)} \r\n near\r\n {if len(reportBody.bodytype) > 0: {reportBody.bodytype} |else: body}\r\n {P(event.shortname, \"body\")}\r\n }.\r\n}", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'carrier jump')}\r\n{SetState('eddi_context_last_action', 'start')}\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_system_system', event.system)}\r\n{SetState('eddi_context_system_lastvisit', system.lastVisitSeconds)}\r\n\r\n{if environment = \"Docked\":\r\n\r\n {_ Zero the 'remaining jump' context to only use values following this event _}\r\n {SetState('eddi_context_remaining_jumps', 0)}\r\n\r\n {set reportsystem to SystemDetails(event.systemname)}\r\n\r\n {OneOf(\"Jump in progress\",\"Entering portal\")} to the {P(reportsystem.systemname, \"starsystem\")} system\r\n {if len(event.shortname) > 0:\r\n {set reportBody to BodyDetails(event.bodyname, event.systemname)} \r\n near\r\n {if len(reportBody.bodytype) > 0: {reportBody.bodytype} |else: body}\r\n {P(event.shortname, \"body\")}\r\n }.\r\n\r\n {if reportsystem.systemname = homesystem.systemname:\r\n Welcome home, {F(\"Honorific\")}\r\n |else: \r\n {if lastsystem.allegiance && lastsystem.allegiance != \"None\" && lastsystem.allegiance != \"Independent\" && (!reportsystem.allegiance || reportsystem.allegiance = \"None\" || reportsystem.allegiance = \"Independent\"):\r\n You {OneOf(\"are leaving\", \"have left\", \"are no longer in\")} {lastsystem.allegiance} space.\r\n |elif lastsystem.allegiance && lastsystem.allegiance != reportsystem.allegiance && system.allegiance && system.allegiance != \"None\":\r\n You {OneOf(\"are now in\", \"have entered\", \"are entering\")} {reportsystem.allegiance} space.\r\n {if cmdr.title != \"Commander\":\r\n Welcome back {F(\"Honorific\")}.\r\n }\r\n }\r\n\r\n {if reportsystem.visits = 0:\r\n This is your first visit to this system.\r\n |elif reportsystem.visits = 1:\r\n This is your second visit to this system.\r\n |elif reportsystem.visits = 2:\r\n {Occasionally(2, \"This is your third visit to this system.\")}\r\n |elif reportsystem.visits = 3:\r\n {Occasionally(2, \"This is your fourth visit to this system.\")}\r\n |else:\r\n {Occasionally(3, \"You have visited this system {reportsystem.visits} times.\")}\r\n }\r\n\r\n {if reportsystem.population && reportsystem.population > 0:\r\n {if SecondsSince(reportsystem.lastVisitSeconds) > 3600:\r\n {F(\"System report\")}\r\n }\r\n |else:\r\n {OneOf(\"This system is not populated\",\"There is no human presence here\", \"Humans have yet to colonise this system\")}.\r\n }\r\n\r\n {if reportsystem.distancefromhome:\r\n {set ReportDistanceFromHome() to:\r\n {return cat(\r\n \tOneOf(\"You are\", \"Current location is\", \"You are now\"), \" \",\r\n\t Humanise(reportsystem.distancefromhome), \" lightyears from \",\r\n\t OneOf(\"home\", \"{P(homesystem.name, \"starsystem\")}\"), \".\"\r\n\t )}\r\n }\r\n {Occasionally(7, ReportDistanceFromHome())}\r\n }\r\n\r\n {if reportsystem.comment:\r\n You made a {OneOf(\"note\", \"comment\", \"remark\")} {OneOf(\"about\", \"for\", \"on\")} this system. It {OneOf(\"is as follows\", \"says\", \"reads\", \"is\")} {reportsystem.comment}.\r\n }\r\n }\r\n|else:\r\n Fleet carrier arriving at the {P(event.systemname, \"starsystem\")} system\r\n {if len(event.shortname) > 0:\r\n {set reportBody to BodyDetails(event.bodyname, event.systemname)} \r\n near\r\n {if len(reportBody.bodytype) > 0: {reportBody.bodytype} |else: body}\r\n {P(event.shortname, \"body\")}\r\n }.\r\n}", | |
"default": true | |
}, | |
"Carrier jump request": { | |
"name": "Carrier jump request", | |
"description": "Triggered when you request that your fleet carrier performs a jump", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Fleet carrier jump scheduled. Course laid in for the {P(event.systemname, \"starsystem\")} star system\r\n{if len(event.shortname) > 0:\r\n {set reportBody to BodyDetails(event.bodyname, event.systemname)} \r\n , arriving near\r\n {if len(reportBody.bodytype) > 0: {reportBody.bodytype}: |else: body: }\r\n {P(event.shortname, \"body\")}\r\n}.", | |
"defaultValue": "Fleet carrier jump scheduled. Course laid in for the {P(event.systemname, \"starsystem\")} star system\r\n{if len(event.shortname) > 0:\r\n {set reportBody to BodyDetails(event.bodyname, event.systemname)} \r\n , arriving near\r\n {if len(reportBody.bodytype) > 0: {reportBody.bodytype}: |else: body: }\r\n {P(event.shortname, \"body\")}\r\n}.", | |
"default": true | |
}, | |
"Carrier jumped": { | |
"name": "Carrier jumped", | |
"description": "Triggered when you are docked at a fleet carrier as it completes a jump", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Carrier jumped }\r\n{_ Triggered when you are docked at a fleet carrier as it completes a jump }\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'carrier jump')}\r\n{SetState('eddi_context_last_action', 'complete')}\r\n{SetState('eddi_context_system_name', event.systemname)}\r\n{SetState('eddi_context_system_system', event.systemname)}\r\n{SetState('eddi_context_wanted_list', \"\")}\r\n\r\nFleet carrier {Spacialise(event.carriername)} has arrived at the {P(event.systemname, \"starsystem\")} system\r\n{if event.bodyname && len(event.bodyname) > 0:\r\n , near the {event.bodytype}: {P(event.bodyname, \"body\")}\r\n}.\r\n{Pause(1000)}\r\n\r\n{_ Update mission data if we have arrived at our mission destination. _}\r\n{if destinationsystem && destinationsystem.name != \"\":\r\n {RouteDetails(\"update\")}\r\n}\r\n\r\n{_ Report faction states only if it's been more than an hour (3600 seconds) since our last visit. _}\r\n{if SecondsSince(state.eddi_context_system_lastvisit) / 3600 > 1:\r\n {set state_report to F(\"System state report\")}\r\n}\r\n\r\n{set system_engineer to F(\"Engineer report\")}\r\n{set system_missions to F(\"Mission check system\")}\r\n{set system_crimes to F(\"Crime check system\")}\r\n\r\n{if state_report || system_engineer || system_missions || (system_crimes && find(system_crimes, \"Warning\") < 0):\r\n {Pause(500)}\r\n Information:\r\n}\r\n\r\n{if state_report:\r\n {Pause(500)}\r\n {state_report}\r\n}\r\n{if system_engineer:\r\n {Pause(500)}\r\n {system_engineer}\r\n}\r\n{if system_missions:\r\n {Pause(500)}\r\n {system_missions}\r\n}\r\n{if system_crimes:\r\n {Pause(500)}\r\n {system_crimes}\r\n}\r\n", | |
"defaultValue": "{_ Carrier jumped }\r\n{_ Triggered when you are docked at a fleet carrier as it completes a jump }\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'carrier jump')}\r\n{SetState('eddi_context_last_action', 'complete')}\r\n{SetState('eddi_context_system_name', event.systemname)}\r\n{SetState('eddi_context_system_system', event.systemname)}\r\n{SetState('eddi_context_wanted_list', \"\")}\r\n\r\nFleet carrier {Spacialise(event.carriername)} has arrived at the {P(event.systemname, \"starsystem\")} system\r\n{if event.bodyname && len(event.bodyname) > 0:\r\n , near the {event.bodytype}: {P(event.bodyname, \"body\")}\r\n}.\r\n{Pause(1000)}\r\n\r\n{_ Update mission data if we have arrived at our mission destination. _}\r\n{if destinationsystem && destinationsystem.name != \"\":\r\n {RouteDetails(\"update\")}\r\n}\r\n\r\n{_ Report faction states only if it's been more than an hour (3600 seconds) since our last visit. _}\r\n{if SecondsSince(state.eddi_context_system_lastvisit) / 3600 > 1:\r\n {set state_report to F(\"System state report\")}\r\n}\r\n\r\n{set system_engineer to F(\"Engineer report\")}\r\n{set system_missions to F(\"Mission check system\")}\r\n{set system_crimes to F(\"Crime check system\")}\r\n\r\n{if state_report || system_engineer || system_missions || (system_crimes && find(system_crimes, \"Warning\") < 0):\r\n {Pause(500)}\r\n Information:\r\n}\r\n\r\n{if state_report:\r\n {Pause(500)}\r\n {state_report}\r\n}\r\n{if system_engineer:\r\n {Pause(500)}\r\n {system_engineer}\r\n}\r\n{if system_missions:\r\n {Pause(500)}\r\n {system_missions}\r\n}\r\n{if system_crimes:\r\n {Pause(500)}\r\n {system_crimes}\r\n}\r\n", | |
"default": true | |
}, | |
"Carrier pads locked": { | |
"name": "Carrier pads locked", | |
"description": "Triggered when your fleet carrier locks landing pads prior to a jump", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Landing pads locked. Final jump preparations initiated.", | |
"defaultValue": "Landing pads locked. Final jump preparations initiated.", | |
"default": true | |
}, | |
"Cleared save": { | |
"name": "Cleared save", | |
"description": "Triggered when you clear your save", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'save')}\r\n{SetState('eddi_context_last_action', 'clear')}\r\n\r\nGoodbye {F(\"Honorific\")}. It was a pleasure to serve you.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'save')}\r\n{SetState('eddi_context_last_action', 'clear')}\r\n\r\nGoodbye {F(\"Honorific\")}. It was a pleasure to serve you.", | |
"default": true | |
}, | |
"Cockpit breached": { | |
"name": "Cockpit breached", | |
"description": "Triggered when your ship's cockpit is broken", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'cockpit')}\r\n{SetState('eddi_context_last_action', 'breach')}\r\n\r\nIs it me, or is it cold in here?", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'cockpit')}\r\n{SetState('eddi_context_last_action', 'breach')}\r\n\r\nIs it me, or is it cold in here?", | |
"default": true | |
}, | |
"Commander continued": { | |
"name": "Commander continued", | |
"description": "Triggered when you continue an existing game", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Commander continued }\r\n{_ Triggered when you continue an existing game }\r\n\r\n\r\nWelcome back {F(\"Honorific\")}.\r\n\r\n{SetState('eddi_context_last_subject', 'load_game')}\r\n{SetState('eddi_context_system_name', system.name)}\r\n{SetState('eddi_context_body_name', body.name)}\r\n{SetState('eddi_context_station_name', station.name)}\r\n{SetState('eddi_context_lastdocked', station.name)}", | |
"defaultValue": "{_ Commander continued }\r\n{_ Triggered when you continue an existing game }\r\n\r\n\r\nWelcome back {F(\"Honorific\")}.\r\n\r\n{SetState('eddi_context_last_subject', 'load_game')}\r\n{SetState('eddi_context_system_name', system.name)}\r\n{SetState('eddi_context_body_name', body.name)}\r\n{SetState('eddi_context_station_name', station.name)}\r\n{SetState('eddi_context_lastdocked', station.name)}", | |
"default": true | |
}, | |
"Commander loading": { | |
"name": "Commander loading", | |
"description": "Triggered at the very beginning of loading a game", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Commander progress": { | |
"name": "Commander progress", | |
"description": "Triggered when your progress is reported", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Commander promotion": { | |
"name": "Commander promotion", | |
"description": "Triggered when one of your commander ranks increases", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'rank')}\r\n{SetState('eddi_context_last_action', 'promotion')}\r\n{SetState('eddi_context_rank_name', lower(event.rank_type))}\r\n{SetState('eddi_context_rank_amount', event.rating)}\r\n\r\n{if event.rank_type = \"Combat\":\r\n You have been recognised for your valor as a combat pilot, {F(\"Honorific\")}.\r\n|elif event.rank_type = \"CQC\":\r\n You have been recognised for your valor as a close quarters combat pilot, {F(\"Honorific\")}.\r\n|elif event.rank_type = \"Trade\":\r\n You have been recognised for your trading acumen, {F(\"Honorific\")}.\r\n|elif event.rank_type = \"Exploration\":\r\n You have been recognised for your work as an explorer, {F(\"Honorific\")}.\r\n|elif event.rank_type = \"Federation\":\r\n {set plainHonorific to when(cmdr.gender = 'Female', 'Madam', 'Sir')}\r\n Congratulations {OneOf('Commander {CommanderName()}', plainHonorific)}! You have\r\n {OneOf('achieved', 'been promoted to', 'been granted')}\r\n the rank of {event.rank}\r\n {Occasionally(2, OneOf('within the Federal Navy', 'for your service to the Federation'))}.\r\n {if event.rating = 3:\r\n You now qualify to purchase the Federal Dropship.\r\n |elif event.rating = 4:\r\n This grants you access to the {P('Sol', 'starsystem')} system.\r\n |elif event.rating = 5:\r\n You now qualify to purchase the Federal Assault Ship, and have access to the {P('Vega', 'starsystem')} and {P('Beta Hydri', 'starsystem')} systems.\r\n |elif event.rating = 6:\r\n This grants you access to the {P('PLX 695', 'starsystem')} system.\r\n |elif event.rating = 7:\r\n You now qualify to purchase the Federal Gunship, and have access to the {P('Ross 128', 'starsystem')} system.\r\n |elif event.rating = 8:\r\n This grants you access to the {P('Exbeur', 'starsystem')} system.\r\n |elif event.rating = 10:\r\n This grants you access to the {P('Hors', 'starsystem')} system.\r\n |elif event.rating = 12:\r\n You now qualify to purchase the Federal Corvette.\r\n |elif event.rating = 14:\r\n This is the highest rank available to a member of the Federal Naval Reserve.\r\n } \r\n|elif event.rank_type = \"Empire\":\r\n Congratulations {F(\"Empire honorific\")},\r\n the Imperial Navy has \r\n {OneOf(\"granted you a promotion\", \"promoted you\", \"advanced you\", \"named you\")}\r\n to the rank of {event.rank}\r\n {Occasionally(2, OneOf(\"within the Imperial Navy\", \"for your service to the Empire\"))}.\r\n {if event.rating = 1:\r\n You may now purchase the Imperial Eagle.\r\n |elif event.rating = 3:\r\n You may now purchase the Imperial Courier.\r\n |elif event.rating = 4:\r\n This grants you the honour of entering the {P(\"Achenar\", \"starsystem\")} system.\r\n |elif event.rating = 7:\r\n This allows you to purchase the Imperial Clipper, and the honour of entering the {P(\"Summerland\", \"starsystem\")} system.\r\n |elif event.rating = 10:\r\n This grants you the honour of entering the {P(\"Facece\", \"starsystem\")} system\r\n |elif event.rating = 12:\r\n You may now purchase the Imperial Cutter.\r\n |elif event.rating = 14:\r\n This is the highest {OneOf(\"rank\", \"honor\")} available to a member of the Imperial Naval Reserve.\r\n }\r\n|elif event.rank_type = \"Mercenary\":\r\n You have been recognised for your skills as a mercenary, {F(\"Honorific\")}.\r\n|elif event.rank_type = \"Exobiologist\":\r\n You have been recognised for your work as an exobiologist, {F(\"Honorific\")}.\r\n}", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'rank')}\r\n{SetState('eddi_context_last_action', 'promotion')}\r\n{SetState('eddi_context_rank_name', lower(event.rank_type))}\r\n{SetState('eddi_context_rank_amount', event.rating)}\r\n\r\n{if event.rank_type = \"Combat\":\r\n You have been recognised for your valor as a combat pilot, {F(\"Honorific\")}.\r\n|elif event.rank_type = \"CQC\":\r\n You have been recognised for your valor as a close quarters combat pilot, {F(\"Honorific\")}.\r\n|elif event.rank_type = \"Trade\":\r\n You have been recognised for your trading acumen, {F(\"Honorific\")}.\r\n|elif event.rank_type = \"Exploration\":\r\n You have been recognised for your work as an explorer, {F(\"Honorific\")}.\r\n|elif event.rank_type = \"Federation\":\r\n {set plainHonorific to when(cmdr.gender = 'Female', 'Madam', 'Sir')}\r\n Congratulations {OneOf('Commander {CommanderName()}', plainHonorific)}! You have\r\n {OneOf('achieved', 'been promoted to', 'been granted')}\r\n the rank of {event.rank}\r\n {Occasionally(2, OneOf('within the Federal Navy', 'for your service to the Federation'))}.\r\n {if event.rating = 3:\r\n You now qualify to purchase the Federal Dropship.\r\n |elif event.rating = 4:\r\n This grants you access to the {P('Sol', 'starsystem')} system.\r\n |elif event.rating = 5:\r\n You now qualify to purchase the Federal Assault Ship, and have access to the {P('Vega', 'starsystem')} and {P('Beta Hydri', 'starsystem')} systems.\r\n |elif event.rating = 6:\r\n This grants you access to the {P('PLX 695', 'starsystem')} system.\r\n |elif event.rating = 7:\r\n You now qualify to purchase the Federal Gunship, and have access to the {P('Ross 128', 'starsystem')} system.\r\n |elif event.rating = 8:\r\n This grants you access to the {P('Exbeur', 'starsystem')} system.\r\n |elif event.rating = 10:\r\n This grants you access to the {P('Hors', 'starsystem')} system.\r\n |elif event.rating = 12:\r\n You now qualify to purchase the Federal Corvette.\r\n |elif event.rating = 14:\r\n This is the highest rank available to a member of the Federal Naval Reserve.\r\n } \r\n|elif event.rank_type = \"Empire\":\r\n Congratulations {F(\"Empire honorific\")},\r\n the Imperial Navy has \r\n {OneOf(\"granted you a promotion\", \"promoted you\", \"advanced you\", \"named you\")}\r\n to the rank of {event.rank}\r\n {Occasionally(2, OneOf(\"within the Imperial Navy\", \"for your service to the Empire\"))}.\r\n {if event.rating = 1:\r\n You may now purchase the Imperial Eagle.\r\n |elif event.rating = 3:\r\n You may now purchase the Imperial Courier.\r\n |elif event.rating = 4:\r\n This grants you the honour of entering the {P(\"Achenar\", \"starsystem\")} system.\r\n |elif event.rating = 7:\r\n This allows you to purchase the Imperial Clipper, and the honour of entering the {P(\"Summerland\", \"starsystem\")} system.\r\n |elif event.rating = 10:\r\n This grants you the honour of entering the {P(\"Facece\", \"starsystem\")} system\r\n |elif event.rating = 12:\r\n You may now purchase the Imperial Cutter.\r\n |elif event.rating = 14:\r\n This is the highest {OneOf(\"rank\", \"honor\")} available to a member of the Imperial Naval Reserve.\r\n }\r\n|elif event.rank_type = \"Mercenary\":\r\n You have been recognised for your skills as a mercenary, {F(\"Honorific\")}.\r\n|elif event.rank_type = \"Exobiologist\":\r\n You have been recognised for your work as an exobiologist, {F(\"Honorific\")}.\r\n}", | |
"default": true | |
}, | |
"Commander ratings": { | |
"name": "Commander ratings", | |
"description": "Triggered when your ratings are reported", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Commander reputation": { | |
"name": "Commander reputation", | |
"description": "Triggered when your reputation is reported", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ A note on thresholds... _}\r\n{_ -100.. -90: hostile _}\r\n{_ -90.. -35: unfriendly _}\r\n{_ -35..+ 4: neutral _}\r\n{_ +4..+35: cordial _}\r\n{_ +35..+90: friendly _}\r\n{_ +90..+100: allied _}\r\n", | |
"defaultValue": "{_ A note on thresholds... _}\r\n{_ -100.. -90: hostile _}\r\n{_ -90.. -35: unfriendly _}\r\n{_ -35..+ 4: neutral _}\r\n{_ +4..+35: cordial _}\r\n{_ +35..+90: friendly _}\r\n{_ +90..+100: allied _}\r\n", | |
"default": true | |
}, | |
"Commander started": { | |
"name": "Commander started", | |
"description": "Triggered when you start a new game", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Welcome, Commander.", | |
"defaultValue": "Welcome, Commander.", | |
"default": true | |
}, | |
"Commodity collected": { | |
"name": "Commodity collected", | |
"description": "Triggered when you pick up a commodity in your ship or SRV", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'collect')}\r\n{SetState('eddi_context_cargo_name', event.commodity)}\r\n\r\n{event.commodity} now on board.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'collect')}\r\n{SetState('eddi_context_cargo_name', event.commodity)}\r\n\r\n{event.commodity} now on board.", | |
"default": true | |
}, | |
"Commodity ejected": { | |
"name": "Commodity ejected", | |
"description": "Triggered when you eject a commodity from your ship or SRV", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'eject')}\r\n{SetState('eddi_context_commodity_name', event.commodity)}\r\n", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'eject')}\r\n{SetState('eddi_context_commodity_name', event.commodity)}\r\n", | |
"default": true | |
}, | |
"Commodity purchase check": { | |
"name": "Commodity purchase check", | |
"description": "Check to see which commodities are the best to purchase", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{for commodity in station.commodities:\r\n {if commodity.stock > 0 && commodity.buyprice < commodity.avgprice:\r\n {set discount to commodity.avgprice - commodity.buyprice}\r\n {if discount > best.avgprice - best.buyprice:\r\n {set thirdbest to secondbest}\r\n {set secondbest to best}\r\n {set best to commodity}\r\n |elif discount > secondbest.avgprice - secondbest.buyprice:\r\n {set thirdbest to secondbest}\r\n {set secondbest to commodity}\r\n |elif discount > thirdbest.avgprice - thirdbest.buyprice:\r\n {set thirdbest to commodity}\r\n }\r\n }\r\n}\r\n\r\n{if best:\r\n The local market is selling {best.name} at a good price\r\n {if secondbest:\r\n , as well as {secondbest.name}\r\n {if thirdbest:\r\n and {thirdbest.name}\r\n }\r\n }\r\n.}\r\n", | |
"defaultValue": "{for commodity in station.commodities:\r\n {if commodity.stock > 0 && commodity.buyprice < commodity.avgprice:\r\n {set discount to commodity.avgprice - commodity.buyprice}\r\n {if discount > best.avgprice - best.buyprice:\r\n {set thirdbest to secondbest}\r\n {set secondbest to best}\r\n {set best to commodity}\r\n |elif discount > secondbest.avgprice - secondbest.buyprice:\r\n {set thirdbest to secondbest}\r\n {set secondbest to commodity}\r\n |elif discount > thirdbest.avgprice - thirdbest.buyprice:\r\n {set thirdbest to commodity}\r\n }\r\n }\r\n}\r\n\r\n{if best:\r\n The local market is selling {best.name} at a good price\r\n {if secondbest:\r\n , as well as {secondbest.name}\r\n {if thirdbest:\r\n and {thirdbest.name}\r\n }\r\n }\r\n.}\r\n", | |
"default": true | |
}, | |
"Commodity purchased": { | |
"name": "Commodity purchased", | |
"description": "Triggered when you buy a commodity from the markets", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'purchase')}\r\n{SetState('eddi_context_commodity_name', event.commodity)}\r\n{SetState('eddi_context_commodity_amount', event.amount)}\r\n\r\n{if event.amount = 1:\r\n You have just purchased one tonne of {event.commodity} for {Humanise(event.price)} credits.\r\n|elif event.amount > 1:\r\n You have just purchased {event.amount} tonnes of {event.commodity} at {Humanise(event.price)} credits per tonne. Total cost is {Humanise(event.amount * event.price)} credits.\r\n}", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'purchase')}\r\n{SetState('eddi_context_commodity_name', event.commodity)}\r\n{SetState('eddi_context_commodity_amount', event.amount)}\r\n\r\n{if event.amount = 1:\r\n You have just purchased one tonne of {event.commodity} for {Humanise(event.price)} credits.\r\n|elif event.amount > 1:\r\n You have just purchased {event.amount} tonnes of {event.commodity} at {Humanise(event.price)} credits per tonne. Total cost is {Humanise(event.amount * event.price)} credits.\r\n}", | |
"default": true | |
}, | |
"Commodity refined": { | |
"name": "Commodity refined", | |
"description": "Triggered when you refine a commodity from the refinery", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'refine')}\r\n{SetState('eddi_context_commodity_name', event.commodity)}\r\n\r\n", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'refine')}\r\n{SetState('eddi_context_commodity_name', event.commodity)}\r\n\r\n", | |
"default": true | |
}, | |
"Commodity sale check": { | |
"name": "Commodity sale check", | |
"description": "Check to see which commodities can be sold here", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Commodity sale check}\r\n{_ Check to see which commodities can be sold here}\r\n\r\n\r\n{_ Function to find a given commodity in market}\r\n{set market(commodity) to:\r\n {for marketcommodity in station.commodities:\r\n {if marketcommodity.name = commodity.name:\r\n {return marketcommodity}\r\n }\r\n }\r\n}\r\n\r\n{_ Function to find an illegal mission related to the commodity}\r\n{set illegalmission(haulageData) to:\r\n {for haulage in haulageData:\r\n {if haulage.illegal:\r\n {return true}\r\n }\r\n }\r\n {return false}\r\n}\r\n\r\n{set totalprofit to 0}\r\n{set missioncommodities to []}\r\n{set profitablecommodities to []}\r\n{set stolencommodities to []}\r\n{set unknowncommodities to []}\r\n\r\n{for cargo in inventory:\r\n {if cargo.name != 'Limpet':\r\n {set marketcommodity to market(cargo.commodity)}\r\n {set illegal to illegalmission(cargo.haulageData)}\r\n {set profit to (marketcommodity.sellprice - cargo.price) * cargo.owned}\r\n\r\n {if cargo.stolen > 0 && !illegal:\r\n {set stolencommodities to cat(stolencommodities, [cargo.commodity])}\r\n |elif cargo.haulage > 0:\r\n {set missioncommodities to cat(missioncommodities, [cargo.commodity])}\r\n |elif !marketcommodity && lcase(cargo.category) != \"powerplay\" && cargo.total > 0:\r\n {set unknowncommodities to cat(unknowncommodities, [cargo.commodity])}\r\n |elif marketcommodity && profit > 0:\r\n {set profitablecommodities to cat(profitablecommodities, [cargo.commodity])}\r\n {set totalprofit to totalprofit + profit}\r\n }\r\n }\r\n}\r\n\r\n{_ Let the user know about any commodities they can sell here for a profit}\r\n{if len(profitablecommodities) > 0:\r\n You can sell your\r\n {if len(profitablecommodities) = 1:\r\n {profitablecommodities[0].name}\r\n |elif len(profitablecommodities) = 2:\r\n {profitablecommodities[0].name} and {profitablecommodities[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(profitablecommodities):\r\n {if cur = 0:\r\n {profitablecommodities[cur].name}\r\n |elif cur < len(profitablecommodities) - 1:\r\n , {profitablecommodities[cur].name}\r\n |else:\r\n , and {profitablecommodities[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n for a profit of {Humanise(totalprofit)} credits.\r\n}\r\n\r\n{_ Let the user know about any commodities about which we are unsure if they can sell for a profit}\r\n{if len(unknowncommodities) > 0:\r\n You could {if len(profitablecommodities) > 0: also } sell your\r\n {if len(unknowncommodities) = 1:\r\n {unknowncommodities[0].name}\r\n |elif len(unknowncommodities) = 2:\r\n {unknowncommodities[0].name} and {unknowncommodities[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(unknowncommodities):\r\n {if cur = 0:\r\n {unknowncommodities[cur].name}\r\n |elif cur < len(unknowncommodities) - 1:\r\n , {unknowncommodities[cur].name}\r\n |else:\r\n , and {unknowncommodities[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n , although check potential profits for {if len(unknowncommodities) > 1: these |else: this} before confirming the transaction.\r\n}\r\n\r\n{_ Let the user know about any stolen commodities they can sell on the black market}\r\n{if len(stolencommodities) > 0:\r\n {if station.hasblackmarket:\r\n You can fence your stolen\r\n {if len(stolencommodities) = 1:\r\n {stolencommodities[0].name}\r\n |elif len(stolencommodities) = 2:\r\n {stolencommodities[0].name} and {stolencommodities[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(stolencommodities):\r\n {if cur = 0:\r\n {stolencommodities[cur].name}\r\n |elif cur < len(stolencommodities) - 1:\r\n , {stolencommodities[cur].name}\r\n |else:\r\n , and {stolencommodities[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n here.\r\n |else:\r\n Reminder: you {OneOf(\"have stolen cargo on-board\", \"have stolen goods on-board\", \"are carrying stolen goods\", \"are carrying stolen cargo\")}.\r\n }\r\n}\r\n\r\n{_ Let the user know about any mission related commodities they can sell on the black market}\r\n{if len(missioncommodities) > 0 && station.hasblackmarket:\r\n\r\n You can {if len(stolencommodities) > 0: also} {OneOf('offload', 'dump')} your mission related\r\n {if len(missioncommodities) = 1:\r\n {missioncommodities[0].name}\r\n |elif len(missioncommodities) = 2:\r\n {missioncommodities[0].name} and {missioncommodities[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(missioncommodities):\r\n {if cur = 0:\r\n {missioncommodities[cur].name}\r\n |elif cur < len(missioncommodities) - 1:\r\n , {missioncommodities[cur].name}\r\n |else:\r\n , and {missioncommodities[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n here.\r\n}\r\n", | |
"defaultValue": "{_ Commodity sale check}\r\n{_ Check to see which commodities can be sold here}\r\n\r\n\r\n{_ Function to find a given commodity in market}\r\n{set market(commodity) to:\r\n {for marketcommodity in station.commodities:\r\n {if marketcommodity.name = commodity.name:\r\n {return marketcommodity}\r\n }\r\n }\r\n}\r\n\r\n{_ Function to find an illegal mission related to the commodity}\r\n{set illegalmission(haulageData) to:\r\n {for haulage in haulageData:\r\n {if haulage.illegal:\r\n {return true}\r\n }\r\n }\r\n {return false}\r\n}\r\n\r\n{set totalprofit to 0}\r\n{set missioncommodities to []}\r\n{set profitablecommodities to []}\r\n{set stolencommodities to []}\r\n{set unknowncommodities to []}\r\n\r\n{for cargo in inventory:\r\n {if cargo.name != 'Limpet':\r\n {set marketcommodity to market(cargo.commodity)}\r\n {set illegal to illegalmission(cargo.haulageData)}\r\n {set profit to (marketcommodity.sellprice - cargo.price) * cargo.owned}\r\n\r\n {if cargo.stolen > 0 && !illegal:\r\n {set stolencommodities to cat(stolencommodities, [cargo.commodity])}\r\n |elif cargo.haulage > 0:\r\n {set missioncommodities to cat(missioncommodities, [cargo.commodity])}\r\n |elif !marketcommodity && lcase(cargo.category) != \"powerplay\" && cargo.total > 0:\r\n {set unknowncommodities to cat(unknowncommodities, [cargo.commodity])}\r\n |elif marketcommodity && profit > 0:\r\n {set profitablecommodities to cat(profitablecommodities, [cargo.commodity])}\r\n {set totalprofit to totalprofit + profit}\r\n }\r\n }\r\n}\r\n\r\n{_ Let the user know about any commodities they can sell here for a profit}\r\n{if len(profitablecommodities) > 0:\r\n You can sell your\r\n {if len(profitablecommodities) = 1:\r\n {profitablecommodities[0].name}\r\n |elif len(profitablecommodities) = 2:\r\n {profitablecommodities[0].name} and {profitablecommodities[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(profitablecommodities):\r\n {if cur = 0:\r\n {profitablecommodities[cur].name}\r\n |elif cur < len(profitablecommodities) - 1:\r\n , {profitablecommodities[cur].name}\r\n |else:\r\n , and {profitablecommodities[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n for a profit of {Humanise(totalprofit)} credits.\r\n}\r\n\r\n{_ Let the user know about any commodities about which we are unsure if they can sell for a profit}\r\n{if len(unknowncommodities) > 0:\r\n You could {if len(profitablecommodities) > 0: also } sell your\r\n {if len(unknowncommodities) = 1:\r\n {unknowncommodities[0].name}\r\n |elif len(unknowncommodities) = 2:\r\n {unknowncommodities[0].name} and {unknowncommodities[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(unknowncommodities):\r\n {if cur = 0:\r\n {unknowncommodities[cur].name}\r\n |elif cur < len(unknowncommodities) - 1:\r\n , {unknowncommodities[cur].name}\r\n |else:\r\n , and {unknowncommodities[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n , although check potential profits for {if len(unknowncommodities) > 1: these |else: this} before confirming the transaction.\r\n}\r\n\r\n{_ Let the user know about any stolen commodities they can sell on the black market}\r\n{if len(stolencommodities) > 0:\r\n {if station.hasblackmarket:\r\n You can fence your stolen\r\n {if len(stolencommodities) = 1:\r\n {stolencommodities[0].name}\r\n |elif len(stolencommodities) = 2:\r\n {stolencommodities[0].name} and {stolencommodities[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(stolencommodities):\r\n {if cur = 0:\r\n {stolencommodities[cur].name}\r\n |elif cur < len(stolencommodities) - 1:\r\n , {stolencommodities[cur].name}\r\n |else:\r\n , and {stolencommodities[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n here.\r\n |else:\r\n Reminder: you {OneOf(\"have stolen cargo on-board\", \"have stolen goods on-board\", \"are carrying stolen goods\", \"are carrying stolen cargo\")}.\r\n }\r\n}\r\n\r\n{_ Let the user know about any mission related commodities they can sell on the black market}\r\n{if len(missioncommodities) > 0 && station.hasblackmarket:\r\n\r\n You can {if len(stolencommodities) > 0: also} {OneOf('offload', 'dump')} your mission related\r\n {if len(missioncommodities) = 1:\r\n {missioncommodities[0].name}\r\n |elif len(missioncommodities) = 2:\r\n {missioncommodities[0].name} and {missioncommodities[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(missioncommodities):\r\n {if cur = 0:\r\n {missioncommodities[cur].name}\r\n |elif cur < len(missioncommodities) - 1:\r\n , {missioncommodities[cur].name}\r\n |else:\r\n , and {missioncommodities[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n here.\r\n}\r\n", | |
"default": true | |
}, | |
"Commodity sold": { | |
"name": "Commodity sold", | |
"description": "Triggered when you sell a commodity to the markets", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'sell')}\r\n{SetState('eddi_context_commodity_name', event.commodity)}\r\n{SetState('eddi_context_commodity_amount', event.amount)}\r\n\r\n{if event.amount = 1:\r\n You have just sold one tonne of {event.commodity} for {Humanise(event.price)} credits\r\n|elif event.amount > 1:\r\n You have just sold {event.amount} tonnes of {event.commodity} at {Humanise(event.price)} credits per tonne for a total of {Humanise(event.amount * event.price)} credits\r\n}\r\n\r\n{if event.price != event.profit:\r\n {if event.profit < 0:\r\n with a loss of {Humanise(-1 * event.profit * event.amount)} credits.\r\n |elif event.profit = 0:\r\n and broke even on the trade.\r\n |else:\r\n with a profit of {Humanise(event.profit * event.amount)} credits.\r\n }\r\n}", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'commodity')}\r\n{SetState('eddi_context_last_action', 'sell')}\r\n{SetState('eddi_context_commodity_name', event.commodity)}\r\n{SetState('eddi_context_commodity_amount', event.amount)}\r\n\r\n{if event.amount = 1:\r\n You have just sold one tonne of {event.commodity} for {Humanise(event.price)} credits\r\n|elif event.amount > 1:\r\n You have just sold {event.amount} tonnes of {event.commodity} at {Humanise(event.price)} credits per tonne for a total of {Humanise(event.amount * event.price)} credits\r\n}\r\n\r\n{if event.price != event.profit:\r\n {if event.profit < 0:\r\n with a loss of {Humanise(-1 * event.profit * event.amount)} credits.\r\n |elif event.profit = 0:\r\n and broke even on the trade.\r\n |else:\r\n with a profit of {Humanise(event.profit * event.amount)} credits.\r\n }\r\n}", | |
"default": true | |
}, | |
"Community goal": { | |
"name": "Community goal", | |
"description": "Triggered when the status of a community goal changes", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Set Context _}\r\n{SetState('eddi_context_last_subject', 'community goal')}\r\n\r\n{_ Localize percentile bands }\r\n{set ordinalPercentile(percentile) to:\r\n {if percentile = 10:\r\n tenth\r\n |elif percentile = 25:\r\n twenty-fifth\r\n |elif percentile = 50:\r\n fiftieth\r\n |elif percentile = 75:\r\n seventy-fifth\r\n |else:\r\n one hundredth\r\n }\r\n}\r\n\r\n{F(\"Honorific\")}, we have received an update to the community goal \"{event.name}\".\r\n\r\n{for update in event.updates:\r\n {if update.type = \"Tier\":\r\n The goal has reached tier {event.tier}.\r\n |elif update.type = \"Percentile\":\r\n {if event.toprank:\r\n Congratulations! You are now one of the top {event.topranksize} contributors. \r\n |else:\r\n {if update.direction = \"Increase\":\r\n You have reached \r\n |else:\r\n You have fallen to\r\n }\r\n the {Occasionally(2, \"top\")}\r\n {ordinalPercentile(event.percentileband)} percentile band.\r\n }\r\n }\r\n}\r\n\r\n{if event.contribution > 0:\r\n Your expected reward is \r\n {Occasionally(2, \"currently\")}\r\n {Humanise(event.tierreward)} credits.\r\n}", | |
"defaultValue": "{_ Set Context _}\r\n{SetState('eddi_context_last_subject', 'community goal')}\r\n\r\n{_ Localize percentile bands }\r\n{set ordinalPercentile(percentile) to:\r\n {if percentile = 10:\r\n tenth\r\n |elif percentile = 25:\r\n twenty-fifth\r\n |elif percentile = 50:\r\n fiftieth\r\n |elif percentile = 75:\r\n seventy-fifth\r\n |else:\r\n one hundredth\r\n }\r\n}\r\n\r\n{F(\"Honorific\")}, we have received an update to the community goal \"{event.name}\".\r\n\r\n{for update in event.updates:\r\n {if update.type = \"Tier\":\r\n The goal has reached tier {event.tier}.\r\n |elif update.type = \"Percentile\":\r\n {if event.toprank:\r\n Congratulations! You are now one of the top {event.topranksize} contributors. \r\n |else:\r\n {if update.direction = \"Increase\":\r\n You have reached \r\n |else:\r\n You have fallen to\r\n }\r\n the {Occasionally(2, \"top\")}\r\n {ordinalPercentile(event.percentileband)} percentile band.\r\n }\r\n }\r\n}\r\n\r\n{if event.contribution > 0:\r\n Your expected reward is \r\n {Occasionally(2, \"currently\")}\r\n {Humanise(event.tierreward)} credits.\r\n}", | |
"default": true | |
}, | |
"Community goals": { | |
"name": "Community goals", | |
"description": "Triggered when checking the status of community goals", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Controlling fighter": { | |
"name": "Controlling fighter", | |
"description": "Triggered when you switch control from your ship to your fighter", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{OneOf(\"Neural link\", \"Link\", \"Uplink\")} {Occasionally(2, \"to fighter\")} {OneOf(\"initiated\", \"established\", \"engaged\")}.", | |
"defaultValue": "{OneOf(\"Neural link\", \"Link\", \"Uplink\")} {Occasionally(2, \"to fighter\")} {OneOf(\"initiated\", \"established\", \"engaged\")}.", | |
"default": true | |
}, | |
"Controlling ship": { | |
"name": "Controlling ship", | |
"description": "Triggered when you switch control from your fighter to your ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{OneOf(\"Neural link\", \"Link\", \"Uplink\")} {OneOf(\"terminated\", \"disengaged\")}.", | |
"defaultValue": "{OneOf(\"Neural link\", \"Link\", \"Uplink\")} {OneOf(\"terminated\", \"disengaged\")}.", | |
"default": true | |
}, | |
"Crew assigned": { | |
"name": "Crew assigned", | |
"description": "Triggered when you assign crew", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if event.role = \"Active\":\r\n {event.name} is now on active duty.\r\n|else:\r\n {event.name} standing down from active duty.\r\n}", | |
"defaultValue": "{if event.role = \"Active\":\r\n {event.name} is now on active duty.\r\n|else:\r\n {event.name} standing down from active duty.\r\n}", | |
"default": true | |
}, | |
"Crew fired": { | |
"name": "Crew fired", | |
"description": "Triggered when you fire crew", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'fire')}\r\n{SetState('eddi_context_crew_name', event.name)}\r\n\r\n{event.name} has been fired.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'fire')}\r\n{SetState('eddi_context_crew_name', event.name)}\r\n\r\n{event.name} has been fired.", | |
"default": true | |
}, | |
"Crew hired": { | |
"name": "Crew hired", | |
"description": "Triggered when you hire crew", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'hire')}\r\n{SetState('eddi_context_crew_name', event.name)}\r\n\r\n{event.name} has been hired.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'hire')}\r\n{SetState('eddi_context_crew_name', event.name)}\r\n\r\n{event.name} has been hired.", | |
"default": true | |
}, | |
"Crew joined": { | |
"name": "Crew joined", | |
"description": "Triggered when you join a crew", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'join')}\r\n{SetState('eddi_context_crew_name', event.captain)}\r\n\r\nYou have joined {event.captain}'s crew.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'join')}\r\n{SetState('eddi_context_crew_name', event.captain)}\r\n\r\nYou have joined {event.captain}'s crew.", | |
"default": true | |
}, | |
"Crew left": { | |
"name": "Crew left", | |
"description": "Triggered when you leave a crew", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'leave')}\r\n{SetState('eddi_context_crew_name', event.captain)}\r\n\r\nYou have left {event.captain}'s crew.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'leave')}\r\n{SetState('eddi_context_crew_name', event.captain)}\r\n\r\nYou have left {event.captain}'s crew.", | |
"default": true | |
}, | |
"Crew member joined": { | |
"name": "Crew member joined", | |
"description": "Triggered when a commander joins your crew", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'join')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n\r\n{event.crew} has joined your crew.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'join')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n\r\n{event.crew} has joined your crew.", | |
"default": true | |
}, | |
"Crew member launched": { | |
"name": "Crew member launched", | |
"description": "Triggered when a crew member launches the fighter", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'launch')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n\r\n{event.crew} has launched their fighter.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'launch')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n\r\n{event.crew} has launched their fighter.", | |
"default": true | |
}, | |
"Crew member left": { | |
"name": "Crew member left", | |
"description": "Triggered when a commander leaves your crew", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'leave')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n\r\n{event.crew} has left your crew.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'leave')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n\r\n{event.crew} has left your crew.", | |
"default": true | |
}, | |
"Crew member removed": { | |
"name": "Crew member removed", | |
"description": "Triggered when you remove a commander from your crew", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'remove')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n\r\nYou have removed {event.crew} from your crew.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'remove')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n\r\nYou have removed {event.crew} from your crew.", | |
"default": true | |
}, | |
"Crew member role changed": { | |
"name": "Crew member role changed", | |
"description": "Triggered when a crew member changes their role", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'role')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n{SetState('eddi_context_crew_role', event.role)}\r\n\r\n{if event.role = 'Idle':\r\n {event.crew} is no longer manning a position\r\n|elif event.role = 'Fighter':\r\n {event.crew} is now manning the fighter\r\n|elif event.role = 'Gunner':\r\n {event.crew} is now manning the guns\r\n}.\r\n", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'crew')}\r\n{SetState('eddi_context_last_action', 'role')}\r\n{SetState('eddi_context_crew_name', event.crew)}\r\n{SetState('eddi_context_crew_role', event.role)}\r\n\r\n{if event.role = 'Idle':\r\n {event.crew} is no longer manning a position\r\n|elif event.role = 'Fighter':\r\n {event.crew} is now manning the fighter\r\n|elif event.role = 'Gunner':\r\n {event.crew} is now manning the guns\r\n}.\r\n", | |
"default": true | |
}, | |
"Crew paid wage": { | |
"name": "Crew paid wage", | |
"description": "Triggered when npc crew receives a profit share", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Crew paid wage }\r\n{_ Triggered when npc crew receives a profit share }\r\n\r\n", | |
"defaultValue": "{_ Crew paid wage }\r\n{_ Triggered when npc crew receives a profit share }\r\n\r\n", | |
"default": true | |
}, | |
"Crew promotion": { | |
"name": "Crew promotion", | |
"description": "Triggered when crewmember combat rank increases", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Crew promotion }\r\n{_ Triggered when crewmember combat rank increases }\r\n\r\n\r\nCrew member {event.name} has been promoted to the combat rank of {event.combatrating}.", | |
"defaultValue": "{_ Crew promotion }\r\n{_ Triggered when crewmember combat rank increases }\r\n\r\n\r\nCrew member {event.name} has been promoted to the combat rank of {event.combatrating}.", | |
"default": true | |
}, | |
"Crew role changed": { | |
"name": "Crew role changed", | |
"description": "Triggered when your role in the crew changes", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if event.role = 'Gunner':\r\n You are now this crew's gunner.\r\n|elif event.role = 'Fighter':\r\n You are now this crew's fighter pilot.\r\n|elif event.role = 'Idle':\r\n You have been unassigned from active duty.\r\n}", | |
"defaultValue": "{if event.role = 'Gunner':\r\n You are now this crew's gunner.\r\n|elif event.role = 'Fighter':\r\n You are now this crew's fighter pilot.\r\n|elif event.role = 'Idle':\r\n You have been unassigned from active duty.\r\n}", | |
"default": true | |
}, | |
"Crime check station": { | |
"name": "Crime check station", | |
"description": "Check claims, fines & bounties related to the current station", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Preferences }\r\n{set suggestSurrender to 0} {_ set to 1 if you'd like suggestions to turn yourself in to authorities when there is a bounty on your head }\r\n\r\n{set CheckPad(current_station) to:\r\n {set largest_pad to lcase(current_station.largestpad)}\r\n {if largest_pad != \"none\":\r\n {if largest_pad = \"large\":\r\n {return true}\r\n |elif largest_pad = \"medium\":\r\n {if lcase(ship.size) = \"large\":\r\n {return false}\r\n |else:\r\n {return true}\r\n }\r\n }\r\n {if lcase(ship.size) = \"small\":\r\n {return true}\r\n }\r\n }\r\n {return false}\r\n}\r\n\r\n{set HasService(service) to:\r\n {if CheckPad(current_station):\r\n {if find(current_station.stationservices, service) > -1:\r\n {return true}\r\n |else:\r\n {return false}\r\n }\r\n |else: {return false}\r\n }\r\n}\r\n\r\n{if state.eddi_context_body_type = 'Station' && station.name && station.name != \"\":\r\n {set current_station to StationDetails(station.name)}\r\n {set system_claim_records to []}\r\n {set system_claims to 0}\r\n {set system_fine_records to []}\r\n {set system_fines to 0}\r\n {set system_bounty_records to []}\r\n {set system_bounties to 0}\r\n {set interstellar_fine_records to []}\r\n {set interstellar_fines to 0}\r\n {set interstellar_bounty_records to []}\r\n {set interstellar_bounties to 0} \r\n\r\n {for record in criminalrecord:\r\n {set factionMatched to false}\r\n {for faction in system.factions:\r\n {if record.faction = faction.name:\r\n\r\n {_ This record can be connected to a local faction }\r\n {set factionMatched to true}\r\n\r\n {if record.claims > 0:\r\n {set system_claim_records to cat(system_claim_records, [record.faction])}\r\n {set system_claims to system_claims + record.claims}\r\n }\r\n\r\n {set reports to record.finesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {if report.shipId = ship.LocalId:\r\n {set system_fines to system_fines + report.amount}\r\n {if find(system_fine_records, record.faction) < 0:\r\n {set system_fine_records to cat(system_fine_records, [record.faction])}\r\n }\r\n }\r\n }\r\n }\r\n\r\n {set reports to record.bountiesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {if report.shipId = ship.LocalId:\r\n {set system_bounties to system_bounties + report.amount}\r\n {if find(system_bounty_records, record.faction) < 0:\r\n {set system_bounty_records to cat(system_bounty_records, [record.faction])}\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n {if !factionMatched:\r\n \r\n {_ This record requires interstellar factors }\r\n \r\n {set reports to record.finesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {if report.shipId = ship.LocalId:\r\n {set interstellar_fines to interstellar_fines + report.amount}\r\n {if find(interstellar_fine_records, record.faction) < 0:\r\n {set interstellar_fine_records to cat(interstellar_fine_records, [record.faction])}\r\n }\r\n }\r\n }\r\n }\r\n\r\n {set reports to record.bountiesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {if report.shipId = ship.LocalId:\r\n {set interstellar_bounties to interstellar_bounties + report.amount}\r\n {if find(interstellar_bounty_records, record.faction) < 0:\r\n {set interstellar_bounty_records to cat(interstellar_bounty_records, [record.faction])}\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n {set canPaySystemBounties to system_bounties > 0 && suggestSurrender && HasService(\"Contacts\")}\r\n {set canPaySystemFines to system_fines > 0 && HasService(\"Contacts\")}\r\n {set canPayInterstellarBounties to interstellar_bounties > 0 && HasService(\"Interstellar Factors Contact\")}\r\n {set canPayInterstellarFines to interstellar_fines > 0 && HasService(\"Interstellar Factors Contact\")}\r\n {set canRedeemClaims to system_claims > 0 && HasService(\"Contacts\")}\r\n \r\n {if canPaySystemBounties || canPaySystemFines || canRedeemClaims || canPayInterstellarBounties || canPayInterstellarFines:\r\n {set actions to []}\r\n {if canPaySystemBounties || canPayInterstellarBounties:\r\n {set action to:\r\n clear your pending\r\n {if canPaySystemBounties: local }\r\n {if canPaySystemBounties && canPayInterstellarBounties: and}\r\n {if canPayInterstellarBounties: interstellar } \r\n {if len(system_bounty_records) + len(interstellar_bounty_records) = 1: bounty |else: bounties }\r\n }\r\n {set actions to cat(actions, [action])} \r\n }\r\n {if canPaySystemFines || canPayInterstellarFines: \r\n {set action to:\r\n clear your pending\r\n {if canPaySystemFines: local }\r\n {if canPaySystemFines && canPayInterstellarFines: and}\r\n {if canPayInterstellarFines: interstellar } \r\n {if len(system_fine_records) + len(interstellar_fine_records) = 1: fine |else: fines }\r\n }\r\n {set actions to cat(actions, [action])} \r\n }\r\n {if canRedeemClaims:\r\n {set action to:\r\n claim your pending\r\n {if len(system_claim_records) = 1: reward |else: rewards }\r\n for hunting services rendered\r\n }\r\n {set actions to cat(actions, [action])}\r\n }\r\n There are facilities at this station to {List(actions)}.\r\n }\r\n}", | |
"defaultValue": "{_ Preferences }\r\n{set suggestSurrender to 0} {_ set to 1 if you'd like suggestions to turn yourself in to authorities when there is a bounty on your head }\r\n\r\n{set CheckPad(current_station) to:\r\n {set largest_pad to lcase(current_station.largestpad)}\r\n {if largest_pad != \"none\":\r\n {if largest_pad = \"large\":\r\n {return true}\r\n |elif largest_pad = \"medium\":\r\n {if lcase(ship.size) = \"large\":\r\n {return false}\r\n |else:\r\n {return true}\r\n }\r\n }\r\n {if lcase(ship.size) = \"small\":\r\n {return true}\r\n }\r\n }\r\n {return false}\r\n}\r\n\r\n{set HasService(service) to:\r\n {if CheckPad(current_station):\r\n {if find(current_station.stationservices, service) > -1:\r\n {return true}\r\n |else:\r\n {return false}\r\n }\r\n |else: {return false}\r\n }\r\n}\r\n\r\n{if state.eddi_context_body_type = 'Station' && station.name && station.name != \"\":\r\n {set current_station to StationDetails(station.name)}\r\n {set system_claim_records to []}\r\n {set system_claims to 0}\r\n {set system_fine_records to []}\r\n {set system_fines to 0}\r\n {set system_bounty_records to []}\r\n {set system_bounties to 0}\r\n {set interstellar_fine_records to []}\r\n {set interstellar_fines to 0}\r\n {set interstellar_bounty_records to []}\r\n {set interstellar_bounties to 0} \r\n\r\n {for record in criminalrecord:\r\n {set factionMatched to false}\r\n {for faction in system.factions:\r\n {if record.faction = faction.name:\r\n\r\n {_ This record can be connected to a local faction }\r\n {set factionMatched to true}\r\n\r\n {if record.claims > 0:\r\n {set system_claim_records to cat(system_claim_records, [record.faction])}\r\n {set system_claims to system_claims + record.claims}\r\n }\r\n\r\n {set reports to record.finesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {if report.shipId = ship.LocalId:\r\n {set system_fines to system_fines + report.amount}\r\n {if find(system_fine_records, record.faction) < 0:\r\n {set system_fine_records to cat(system_fine_records, [record.faction])}\r\n }\r\n }\r\n }\r\n }\r\n\r\n {set reports to record.bountiesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {if report.shipId = ship.LocalId:\r\n {set system_bounties to system_bounties + report.amount}\r\n {if find(system_bounty_records, record.faction) < 0:\r\n {set system_bounty_records to cat(system_bounty_records, [record.faction])}\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n {if !factionMatched:\r\n \r\n {_ This record requires interstellar factors }\r\n \r\n {set reports to record.finesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {if report.shipId = ship.LocalId:\r\n {set interstellar_fines to interstellar_fines + report.amount}\r\n {if find(interstellar_fine_records, record.faction) < 0:\r\n {set interstellar_fine_records to cat(interstellar_fine_records, [record.faction])}\r\n }\r\n }\r\n }\r\n }\r\n\r\n {set reports to record.bountiesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {if report.shipId = ship.LocalId:\r\n {set interstellar_bounties to interstellar_bounties + report.amount}\r\n {if find(interstellar_bounty_records, record.faction) < 0:\r\n {set interstellar_bounty_records to cat(interstellar_bounty_records, [record.faction])}\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n {set canPaySystemBounties to system_bounties > 0 && suggestSurrender && HasService(\"Contacts\")}\r\n {set canPaySystemFines to system_fines > 0 && HasService(\"Contacts\")}\r\n {set canPayInterstellarBounties to interstellar_bounties > 0 && HasService(\"Interstellar Factors Contact\")}\r\n {set canPayInterstellarFines to interstellar_fines > 0 && HasService(\"Interstellar Factors Contact\")}\r\n {set canRedeemClaims to system_claims > 0 && HasService(\"Contacts\")}\r\n \r\n {if canPaySystemBounties || canPaySystemFines || canRedeemClaims || canPayInterstellarBounties || canPayInterstellarFines:\r\n {set actions to []}\r\n {if canPaySystemBounties || canPayInterstellarBounties:\r\n {set action to:\r\n clear your pending\r\n {if canPaySystemBounties: local }\r\n {if canPaySystemBounties && canPayInterstellarBounties: and}\r\n {if canPayInterstellarBounties: interstellar } \r\n {if len(system_bounty_records) + len(interstellar_bounty_records) = 1: bounty |else: bounties }\r\n }\r\n {set actions to cat(actions, [action])} \r\n }\r\n {if canPaySystemFines || canPayInterstellarFines: \r\n {set action to:\r\n clear your pending\r\n {if canPaySystemFines: local }\r\n {if canPaySystemFines && canPayInterstellarFines: and}\r\n {if canPayInterstellarFines: interstellar } \r\n {if len(system_fine_records) + len(interstellar_fine_records) = 1: fine |else: fines }\r\n }\r\n {set actions to cat(actions, [action])} \r\n }\r\n {if canRedeemClaims:\r\n {set action to:\r\n claim your pending\r\n {if len(system_claim_records) = 1: reward |else: rewards }\r\n for hunting services rendered\r\n }\r\n {set actions to cat(actions, [action])}\r\n }\r\n There are facilities at this station to {List(actions)}.\r\n }\r\n}", | |
"default": true | |
}, | |
"Crime check system": { | |
"name": "Crime check system", | |
"description": "Check claims, fines & bounties related to the current system", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{set system_claim_records to []}\r\n{set system_claims to 0}\r\n{set system_fine_records to []}\r\n{set system_fines to 0}\r\n{set system_bounty_records to []}\r\n{set system_bounties to 0}\r\n{set interstellar_fine_records to []}\r\n{set interstellar_fines to 0}\r\n{set interstellar_bounty_records to []}\r\n{set interstellar_bounties to 0}\r\n{set wanted_faction_count to 0}\r\n\r\n{for record in criminalrecord:\r\n {set factionMatched to false}\r\n {for faction in system.factions:\r\n {if record.faction = faction.name:\r\n\r\n {_ This record pertains to a faction which is present in the system }\r\n {set factionMatched to true}\r\n \r\n {if record.claims > 0:\r\n {set system_claim_records to cat(system_claim_records, [record.faction])}\r\n {set system_claims to system_claims + record.claims}\r\n }\r\n\r\n {set reports to record.finesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {set system_fines to system_fines + report.amount}\r\n {if find(system_fine_records, record.faction) < 0:\r\n {set system_fine_records to cat(system_fine_records, [record.faction])}\r\n {if find(system_bounty_records, record.faction) < 0:\r\n {set wanted_faction_count to wanted_faction_count + 1}\r\n }\r\n }\r\n }\r\n }\r\n\r\n {set reports to record.bountiesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {set system_bounties to system_bounties + report.amount}\r\n {if find(system_bounty_records, record.faction) < 0:\r\n {set system_bounty_records to cat(system_bounty_records, [record.faction])}\r\n {if find(system_fine_records, record.faction) < 0:\r\n {set wanted_faction_count to wanted_faction_count + 1}\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n \r\n {if !factionMatched:\r\n\r\n {_ This record pertains to a faction not present in the system }\r\n {set reports to record.finesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {set interstellar_fines to interstellar_fines + report.amount}\r\n {if find(system_fine_records, record.faction) < 0:\r\n {set interstellar_fine_records to cat(interstellar_fine_records, [record.faction])}\r\n }\r\n }\r\n }\r\n {set reports to record.bountiesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {set interstellar_bounties to interstellar_bounties + report.amount}\r\n {if find(system_bounty_records, record.faction) < 0:\r\n {set interstellar_bounty_records to cat(interstellar_bounty_records, [record.faction])}\r\n }\r\n }\r\n }\r\n } \r\n}\r\n\r\n{if wanted_faction_count > 0:\r\n {OneOf(\"Warning\", \"Caution\", \"Alert\")}:\r\n You are wanted in this system by {wanted_faction_count}\r\n {if wanted_faction_count = 1: faction |else: factions},\r\n for total\r\n {if system_fines > 0 && system_bounties > 0:\r\n fines and bounties\r\n |elif system_fines > 0:\r\n fines\r\n |else:\r\n bounties\r\n }\r\n of {Humanise(system_fines + system_bounties)} credits\r\n}\r\n{if len(system_claim_records) > 0:\r\n {if wanted_faction_count > 0: and |else: You}\r\n have earned {if len(system_claim_records) = 1: a reward |else: rewards} \r\n of {Humanise(system_claims)} credits\r\n for local hunting services rendered\r\n}", | |
"defaultValue": "{set system_claim_records to []}\r\n{set system_claims to 0}\r\n{set system_fine_records to []}\r\n{set system_fines to 0}\r\n{set system_bounty_records to []}\r\n{set system_bounties to 0}\r\n{set interstellar_fine_records to []}\r\n{set interstellar_fines to 0}\r\n{set interstellar_bounty_records to []}\r\n{set interstellar_bounties to 0}\r\n{set wanted_faction_count to 0}\r\n\r\n{for record in criminalrecord:\r\n {set factionMatched to false}\r\n {for faction in system.factions:\r\n {if record.faction = faction.name:\r\n\r\n {_ This record pertains to a faction which is present in the system }\r\n {set factionMatched to true}\r\n \r\n {if record.claims > 0:\r\n {set system_claim_records to cat(system_claim_records, [record.faction])}\r\n {set system_claims to system_claims + record.claims}\r\n }\r\n\r\n {set reports to record.finesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {set system_fines to system_fines + report.amount}\r\n {if find(system_fine_records, record.faction) < 0:\r\n {set system_fine_records to cat(system_fine_records, [record.faction])}\r\n {if find(system_bounty_records, record.faction) < 0:\r\n {set wanted_faction_count to wanted_faction_count + 1}\r\n }\r\n }\r\n }\r\n }\r\n\r\n {set reports to record.bountiesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {set system_bounties to system_bounties + report.amount}\r\n {if find(system_bounty_records, record.faction) < 0:\r\n {set system_bounty_records to cat(system_bounty_records, [record.faction])}\r\n {if find(system_fine_records, record.faction) < 0:\r\n {set wanted_faction_count to wanted_faction_count + 1}\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n \r\n {if !factionMatched:\r\n\r\n {_ This record pertains to a faction not present in the system }\r\n {set reports to record.finesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {set interstellar_fines to interstellar_fines + report.amount}\r\n {if find(system_fine_records, record.faction) < 0:\r\n {set interstellar_fine_records to cat(interstellar_fine_records, [record.faction])}\r\n }\r\n }\r\n }\r\n {set reports to record.bountiesIncurred}\r\n {if len(reports) > 0:\r\n {for report in reports:\r\n {set interstellar_bounties to interstellar_bounties + report.amount}\r\n {if find(system_bounty_records, record.faction) < 0:\r\n {set interstellar_bounty_records to cat(interstellar_bounty_records, [record.faction])}\r\n }\r\n }\r\n }\r\n } \r\n}\r\n\r\n{if wanted_faction_count > 0:\r\n {OneOf(\"Warning\", \"Caution\", \"Alert\")}:\r\n You are wanted in this system by {wanted_faction_count}\r\n {if wanted_faction_count = 1: faction |else: factions},\r\n for total\r\n {if system_fines > 0 && system_bounties > 0:\r\n fines and bounties\r\n |elif system_fines > 0:\r\n fines\r\n |else:\r\n bounties\r\n }\r\n of {Humanise(system_fines + system_bounties)} credits\r\n}\r\n{if len(system_claim_records) > 0:\r\n {if wanted_faction_count > 0: and |else: You}\r\n have earned {if len(system_claim_records) = 1: a reward |else: rewards} \r\n of {Humanise(system_claims)} credits\r\n for local hunting services rendered\r\n}", | |
"default": true | |
}, | |
"Crime report": { | |
"name": "Crime report", | |
"description": "Report on all pending claims, fines, and bounties", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Crime report}\r\n{_ Report on all pending claims, fines, and bounties }\r\n\r\n\r\n{set factions_claims to []}\r\n{set claims_count to 0}\r\n{set factions_fines to []}\r\n{set fines_count to 0}\r\n{set factions_bounties to []}\r\n{set systems_bounties to []}\r\n\r\n{for record in criminalrecord:\r\n {set faction to FactionDetails(record.faction)}\r\n {if faction:\r\n {if record.bounties > 0:\r\n {set factions_bounties to cat(factions_bounties, [record.faction])}\r\n {for presence in faction.presences:\r\n {if find(systems_bounties, presence.systemName) = -1:\r\n {set systems_bounties to cat(systems_bounties, [presence.systemName])}\r\n }\r\n }\r\n }\r\n {if record.fines > 0:\r\n {set factions_fines to cat(factions_fines, [record.faction])}\r\n }\r\n {if record.claims > 0:\r\n {set factions_claims to cat(factions_claims, [record.faction])}\r\n }\r\n\r\n {for report in record.factionReports:\r\n {if !report.bounty && report.crimeEDName != \"none\":\r\n {set fines_count to fines_count + 1}\r\n }\r\n {if report.crimeEDName = \"none\":\r\n {set claims_count to claims_count + 1}\r\n }\r\n }\r\n }\r\n}\r\n\r\n{set factions_count to len(factions_bounties)}\r\n{set systems_count to len(systems_bounties)}\r\n\r\n{if factions_count > 0:\r\n You are wanted by {factions_count} {if factions_count = 1: faction |else: factions}\r\n in {systems_count} {if systems_count = 1: system |else: systems} for a total of\r\n {Humanise(bounties)} credits.\r\n}\r\n\r\n{set factions_count to len(factions_fines)}\r\n{if factions_count > 0:\r\n You have {fines_count} pending {if fines_count = 1: fine |else: fines} from\r\n {factions_count} {if factions_count = 1: faction |else: factions},\r\n for a total of {Humanise(fines)} credits.\r\n}\r\n\r\n{set factions_count to len(factions_claims)}\r\n{if factions_count > 0:\r\n You have {claims_count} uncollected {if claims_count = 1: claim |else: claims} from\r\n {factions_count} {if factions_count = 1: faction |else: factions},\r\n for a total of {Humanise(claims)} credits.\r\n}", | |
"defaultValue": "{_ Crime report}\r\n{_ Report on all pending claims, fines, and bounties }\r\n\r\n\r\n{set factions_claims to []}\r\n{set claims_count to 0}\r\n{set factions_fines to []}\r\n{set fines_count to 0}\r\n{set factions_bounties to []}\r\n{set systems_bounties to []}\r\n\r\n{for record in criminalrecord:\r\n {set faction to FactionDetails(record.faction)}\r\n {if faction:\r\n {if record.bounties > 0:\r\n {set factions_bounties to cat(factions_bounties, [record.faction])}\r\n {for presence in faction.presences:\r\n {if find(systems_bounties, presence.systemName) = -1:\r\n {set systems_bounties to cat(systems_bounties, [presence.systemName])}\r\n }\r\n }\r\n }\r\n {if record.fines > 0:\r\n {set factions_fines to cat(factions_fines, [record.faction])}\r\n }\r\n {if record.claims > 0:\r\n {set factions_claims to cat(factions_claims, [record.faction])}\r\n }\r\n\r\n {for report in record.factionReports:\r\n {if !report.bounty && report.crimeEDName != \"none\":\r\n {set fines_count to fines_count + 1}\r\n }\r\n {if report.crimeEDName = \"none\":\r\n {set claims_count to claims_count + 1}\r\n }\r\n }\r\n }\r\n}\r\n\r\n{set factions_count to len(factions_bounties)}\r\n{set systems_count to len(systems_bounties)}\r\n\r\n{if factions_count > 0:\r\n You are wanted by {factions_count} {if factions_count = 1: faction |else: factions}\r\n in {systems_count} {if systems_count = 1: system |else: systems} for a total of\r\n {Humanise(bounties)} credits.\r\n}\r\n\r\n{set factions_count to len(factions_fines)}\r\n{if factions_count > 0:\r\n You have {fines_count} pending {if fines_count = 1: fine |else: fines} from\r\n {factions_count} {if factions_count = 1: faction |else: factions},\r\n for a total of {Humanise(fines)} credits.\r\n}\r\n\r\n{set factions_count to len(factions_claims)}\r\n{if factions_count > 0:\r\n You have {claims_count} uncollected {if claims_count = 1: claim |else: claims} from\r\n {factions_count} {if factions_count = 1: faction |else: factions},\r\n for a total of {Humanise(claims)} credits.\r\n}", | |
"default": true | |
}, | |
"Damage check": { | |
"name": "Damage check", | |
"description": "Check on the levels of damage to your ship", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{set minor_th to 95}\r\n{set moderate_th to 90}\r\n{set major_th to 80}\r\n{set severe_th to 60}\r\n\r\n{set minor_occ to 10}\r\n{set moderate_occ to 5}\r\n{set major_occ to 0}\r\n{set severe_occ to 0}\r\n\r\n{_ Track if there is any damage}\r\n{set damaged to 0}\r\n\r\n{_ Announce hull health}\r\n{if ship.health < 100:\r\n Hull at {Humanise(ship.health)}%.\r\n {set damaged to 1}\r\n}\r\n\r\n{_ Announce critical module health}\r\n\r\n{set minordamage to []}\r\n{set moderatedamage to []}\r\n{set majordamage to []}\r\n{set severedamage to []}\r\n{set core to [ship.powerplant,\r\n ship.thrusters,\r\n ship.frameshiftdrive,\r\n ship.powerdistributor,\r\n ship.lifesupport,\r\n ship.sensors]}\r\n\r\n{for module in core:\r\n {if module.health < severe_th: {set severedamage to cat(severedamage, [module])}\r\n |elif module.health < major_th: {set majordamage to cat(majordamage, [module])}\r\n |elif module.health < moderate_th: {set moderatedamage to cat(moderatedamage, [module])}\r\n |elif module.health < minor_th: {set minordamage to cat(minordamage, [module])}\r\n |elif module.health < 100: {set damaged to 1}\r\n }\r\n}\r\n\r\n{if len(cat(severedamage, majordamage, moderatedamage, minordamage)) > 0: {set damaged to 1}}\r\n\r\n{set damagereport(msg, modlist) to:\r\n\t{if len(modlist) > 0:\r\n\t\t{msg}\r\n \t{if len(modlist) = 1: {modlist[0].name}\r\n \t|elif len(modlist) = 2: {modlist[0].name} and {modlist[1].name}\r\n \t|else:\r\n \t\t{for module in modlist:\r\n \t\t\t{if module = modlist[0]:\r\n \t\t\t\t{module.name}\r\n \t\t\t|elif cur = modlist[len(modlist)-1]:\r\n \t\t\t\t, and {module.name}\r\n \t\t\t|else:\r\n \t\t\t\t, {module.name}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t.\r\n }\r\n}\r\n\r\n{if Occasionally(severe_occ, \"report\") = \"report\":\r\n\t{damagereport(\"Warning: Severe damage to\", severedamage)}\r\n}\r\n{if Occasionally(major_occ, \"report\") = \"report\":\r\n\t{damagereport(\"Major damage to\", majordamage)}\r\n}\r\n{if Occasionally(moderate_occ, \"report\") = \"report\":\r\n\t{damagereport(\"Moderate damage to\", moderatedamage)}\r\n}\r\n{if Occasionally(minor_occ, \"report\") = \"report\":\r\n\t{damagereport(\"Minor damage to\", minordamage)}\r\n}\r\n\r\n{_ Announce other module health}\r\n\r\n{set minordamage to []}\r\n{set majordamage to []}\r\n\r\n{for compartment in ship.compartments:\r\n {if compartment.module.health < 60:\r\n {set majordamage to cat(majordamage, [compartment.module.name])}\r\n |elif hardpoint.module.health < 100:\r\n {set minordamage to cat(minordamage, [compartment.module.name])}\r\n }\r\n}\r\n\r\n{for hardpoint in ship.hardpoints:\r\n {if hardpoint.module.health < 60:\r\n {set majordamage to cat(majordamage, [hardpoint.module.name])}\r\n |elif hardpoint.module.health < 100:\r\n {set minordamage to cat(minordamage, [hardpiont.module.name])}\r\n }\r\n}\r\n\r\n{if len(majordamage) > 0:\r\n {set damaged to 1}\r\n {if len(majordamage) = 1:\r\n One other ship component with major damage\r\n |elif len(majordamage) > 1:\r\n {len(majordamage)} other ship components with major damage\r\n }\r\n {if len(minordamage) = 1:\r\n and one other ship component with minor damage\r\n |elif len(minordamage) > 1:\r\n and {len(minordamage)} other ship components with minor damage\r\n }.\r\n|elif len(minordamage) = 1:\r\n {set damaged to 1}\r\n One other ship component with minor damage.\r\n|elif len(minordamage) > 1:\r\n {set damaged to 1}\r\n {len(minordamage)} other ship components with minor damage.\r\n}\r\n\r\n{if damaged = 0:\r\n {OneOf(\"All systems fully operational.\", \"{ShipName()} is fully operational.\", \"{ShipName()} is undamaged.\")}\r\n}\r\n", | |
"defaultValue": "{_ Track if there is any damage}\r\n{set damaged to 0}\r\n\r\n{_ Announce hull health}\r\n{if ship.health < 100:\r\n Hull at {Humanise(ship.health)}%.\r\n {set damaged to 1}\r\n}\r\n\r\n{_ Announce critical module health}\r\n\r\n{set minordamage to []}\r\n{set majordamage to []}\r\n\r\n{if ship.powerplant.health < 60:\r\n {set majordamage to cat(majordamage, [ship.powerplant])}\r\n|elif ship.powerplant.health < 100:\r\n {set minordamage to cat(minordamage, [ship.powerplant])}\r\n}\r\n\r\n{if ship.thrusters.health < 60:\r\n {set majordamage to cat(majordamage, [ship.thrusters])}\r\n|elif ship.thrusters.health < 100:\r\n {set minordamage to cat(minordamage, [ship.thrusters])}\r\n}\r\n\r\n{if ship.frameshiftdrive.health < 60:\r\n {set majordamage to cat(majordamage, [ship.frameshiftdrive])}\r\n|elif ship.frameshiftdrive.health < 100:\r\n {set minordamage to cat(minordamage, [ship.frameshiftdrive])}\r\n}\r\n\r\n{if ship.powerdistributor.health < 60:\r\n {set majordamage to cat(majordamage, [ship.powerdistributor])}\r\n|elif ship.powerdistributor.health < 100:\r\n {set minordamage to cat(minordamage, [ship.powerdistributor])}\r\n}\r\n\r\n{if ship.lifesupport.health < 60:\r\n {set majordamage to cat(majordamage, [ship.lifesupport])}\r\n|elif ship.lifesupport.health < 100:\r\n {set minordamage to cat(minordamage, [ship.lifesupport])}\r\n}\r\n\r\n{if ship.sensors.health < 60:\r\n {set majordamage to cat(majordamage, [ship.sensors])}\r\n|elif ship.sensors.health < 100:\r\n {set minordamage to cat(minordamage, [ship.sensors])}\r\n}\r\n\r\n{if len(majordamage) > 0:\r\n {set damaged to 1}\r\n Major damage to\r\n {if len(majordamage) = 1:\r\n {majordamage[0].name}\r\n |elif len(majordamage) = 2:\r\n {majordamage[0].name} and {majordamage[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(majordamage):\r\n {if cur = 0:\r\n {majordamage[cur].name}\r\n |elif cur < len(majordamage) - 1:\r\n , {majordamage[cur].name}\r\n |else:\r\n ,and {majordamage[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n}\r\n\r\n{if len(minordamage) > 0:\r\n {set damaged to 1}\r\n Minor damage to\r\n {if len(minordamage) = 1:\r\n {minordamage[0].name}\r\n |elif len(minordamage) = 2:\r\n {minordamage[0].name} and {minordamage[1].name}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(minordamage):\r\n {if cur = 0:\r\n {minordamage[cur].name}\r\n |elif cur < len(minordamage) - 1:\r\n , {minordamage[cur].name}\r\n |else:\r\n ,and {minordamage[cur].name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n}\r\n\r\n{_ Announce other module health}\r\n\r\n{set minordamage to []}\r\n{set majordamage to []}\r\n\r\n{for compartment in ship.compartments:\r\n {if compartment.module.health < 60:\r\n {set majordamage to cat(majordamage, [compartment.module.name])}\r\n |elif hardpoint.module.health < 100:\r\n {set minordamage to cat(minordamage, [compartment.module.name])}\r\n }\r\n}\r\n\r\n{for hardpoint in ship.hardpoints:\r\n {if hardpoint.module.health < 60:\r\n {set majordamage to cat(majordamage, [hardpoint.module.name])}\r\n |elif hardpoint.module.health < 100:\r\n {set minordamage to cat(minordamage, [hardpiont.module.name])}\r\n }\r\n}\r\n\r\n{if len(majordamage) > 0:\r\n {set damaged to 1}\r\n {if len(majordamage) = 1:\r\n One other ship component with major damage\r\n |elif len(majordamage) > 1:\r\n {len(majordamage)} other ship components with major damage\r\n }\r\n {if len(minordamage) = 1:\r\n and one other ship component with minor damage\r\n |elif len(minordamage) > 1:\r\n and {len(minordamage)} other ship components with minor damage\r\n }.\r\n|elif len(minordamage) = 1:\r\n {set damaged to 1}\r\n One other ship component with minor damage.\r\n|elif len(minordamage) > 1:\r\n {set damaged to 1}\r\n {len(minordamage)} other ship components with minor damage.\r\n}\r\n\r\n{if damaged = 0:\r\n {OneOf(\"All systems fully operational.\", \"{ShipName()} is fully operational.\", \"{ShipName()} is undamaged.\")}\r\n}\r\n", | |
"default": false | |
}, | |
"Data scanned": { | |
"name": "Data scanned", | |
"description": "Triggered when scanning some types of data links", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Data scanned }\r\n{_ Triggered when scanning some types of data links }\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'scan')}\r\n{SetState('eddi_context_last_action', 'data')}\r\n{SetState('eddi_context_data_scan_type', event.datalinktype)}\r\n\r\nData scan of {event.datalinktype} completed.", | |
"defaultValue": "{_ Data scanned }\r\n{_ Triggered when scanning some types of data links }\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'scan')}\r\n{SetState('eddi_context_last_action', 'data')}\r\n{SetState('eddi_context_data_scan_type', event.datalinktype)}\r\n\r\nData scan of {event.datalinktype} completed.", | |
"default": true | |
}, | |
"Data voucher awarded": { | |
"name": "Data voucher awarded", | |
"description": "Triggered when you are awarded a data voucher", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Data voucher awarded }\r\n{_ Triggered when you are awarded a data voucher }\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'data_voucher')}\r\n{SetState('eddi_context_last_action', 'award')}\r\n{SetState('eddi_context_bond_amount', event.reward)}\r\n{SetState('eddi_context_bond_faction', event.payeefaction)}\r\n\r\nData voucher awarded from {P(event.payeefaction, \"faction\")} for {Humanise(event.reward)} credits.\r\n", | |
"defaultValue": "{_ Data voucher awarded }\r\n{_ Triggered when you are awarded a data voucher }\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'data_voucher')}\r\n{SetState('eddi_context_last_action', 'award')}\r\n{SetState('eddi_context_bond_amount', event.reward)}\r\n{SetState('eddi_context_bond_faction', event.payeefaction)}\r\n\r\nData voucher awarded from {P(event.payeefaction, \"faction\")} for {Humanise(event.reward)} credits.\r\n", | |
"default": true | |
}, | |
"Data voucher redeemed": { | |
"name": "Data voucher redeemed", | |
"description": "Triggered when you redeem a data voucher", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'data_voucher')}\r\n{SetState('eddi_context_last_action', 'redeem')}\r\n{SetState('eddi_context_data_voucher_amount', event.amount)}\r\n\r\n{set singular to len(event.rewards) = 1}\r\nData \r\n{if singular: voucher |else: vouchers}\r\nfor {Humanise(event.amount)} credits\r\n{Occasionally(2, \"{if singular: has |else: have} {Occasionally(2, 'now')} been\"))}\r\n{OneOf(\"redeemed\", \"claimed\")}\r\n\r\n{Occasionally(2, \"\r\n {if singular && len(event.rewards[0].faction) > 0:\r\n {OneOf(\"by\", \"courtesy of\")}\r\n {P(event.rewards[0].faction, \"faction\")}\r\n |else:\r\n {if len(event.rewards[0].faction) > 0:\r\n {OneOf(\"by\", \"courtesy of\")}\r\n {set cur to 0}\r\n {while cur < len(event.rewards):\r\n {if cur = 0:\r\n |elif cur < len(event.rewards) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {P(event.rewards[cur].faction, \"faction\")}\r\n {set cur to cur + 1}\r\n }\r\n }\r\n }\r\n\")}.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'data_voucher')}\r\n{SetState('eddi_context_last_action', 'redeem')}\r\n{SetState('eddi_context_data_voucher_amount', event.amount)}\r\n\r\n{set singular to len(event.rewards) = 1}\r\nData \r\n{if singular: voucher |else: vouchers}\r\nfor {Humanise(event.amount)} credits\r\n{Occasionally(2, \"{if singular: has |else: have} {Occasionally(2, 'now')} been\"))}\r\n{OneOf(\"redeemed\", \"claimed\")}\r\n\r\n{Occasionally(2, \"\r\n {if singular && len(event.rewards[0].faction) > 0:\r\n {OneOf(\"by\", \"courtesy of\")}\r\n {P(event.rewards[0].faction, \"faction\")}\r\n |else:\r\n {if len(event.rewards[0].faction) > 0:\r\n {OneOf(\"by\", \"courtesy of\")}\r\n {set cur to 0}\r\n {while cur < len(event.rewards):\r\n {if cur = 0:\r\n |elif cur < len(event.rewards) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {P(event.rewards[cur].faction, \"faction\")}\r\n {set cur to cur + 1}\r\n }\r\n }\r\n }\r\n\")}.", | |
"default": true | |
}, | |
"Datalink message": { | |
"name": "Datalink message", | |
"description": "Triggered upon completion of Datalink scan", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Died": { | |
"name": "Died", | |
"description": "Triggered when you have died", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if vehicle = \"Ship\":\r\n {ShipName()} was {Occasionally(2, \"just\")}\r\n {OneOf(\"destroyed\", \"demolished\")}\r\n|elif vehicle = \"Fighter\":\r\n Your fighter was {Occasionally(2, \"just\")}\r\n {OneOf(\"destroyed\", \"demolished\")}\r\n|elif vehicle = \"SRV\":\r\n Your {Spacialise(\"SRV\")} was {Occasionally(2, \"just\")}\r\n {OneOf(\"destroyed\", \"demolished\")}\r\n|elif vehicle = \"Taxi\":\r\n Your taxi was {Occasionally(2, \"just\")}\r\n {OneOf(\"destroyed\", \"demolished\")}\r\n|elif vehicle = \"Multicrew\": \r\n The ship was {Occasionally(2, \"just\")}\r\n {OneOf(\"destroyed\", \"demolished\")}\r\n|elif vehicle = \"On Foot\":\r\n You were {Occasionally(2, \"just\")}\r\n {OneOf(\"critically injured\", \"incapacitated\")}\r\n}\r\n\r\n{if len(event.killers) > 0:\r\n {set killerDescriptions to []}\r\n {for killer in event.killers:\r\n {set killerDescription to:\r\n by\r\n {if StartsWithVowel(killer.rating): an |else: a }\r\n {if find(killer.name, \"Cmdr \") >= 0:\r\n {_ Commander }\r\n {killer.rating}-ranked\r\n {token(killer.name, \" \", 0, \"Commander \")}\r\n in \r\n {if StartsWithVowel(killer.equipment): an |else: a }\r\n {killer.equipment} \r\n |else:\r\n {_ Generic NPC }\r\n {killer.rating}-ranked\r\n {killer.equipment} \r\n }\r\n }\r\n {set killerDescriptions to cat(killerDescriptions, [killerDescription])} \r\n }\r\n {List(killerDescriptions)}\r\n}", | |
"defaultValue": "{if vehicle = \"Ship\":\r\n {ShipName()} was {Occasionally(2, \"just\")}\r\n {OneOf(\"destroyed\", \"demolished\")}\r\n|elif vehicle = \"Fighter\":\r\n Your fighter was {Occasionally(2, \"just\")}\r\n {OneOf(\"destroyed\", \"demolished\")}\r\n|elif vehicle = \"SRV\":\r\n Your {Spacialise(\"SRV\")} was {Occasionally(2, \"just\")}\r\n {OneOf(\"destroyed\", \"demolished\")}\r\n|elif vehicle = \"Taxi\":\r\n Your taxi was {Occasionally(2, \"just\")}\r\n {OneOf(\"destroyed\", \"demolished\")}\r\n|elif vehicle = \"Multicrew\": \r\n The ship was {Occasionally(2, \"just\")}\r\n {OneOf(\"destroyed\", \"demolished\")}\r\n|elif vehicle = \"On Foot\":\r\n You were {Occasionally(2, \"just\")}\r\n {OneOf(\"critically injured\", \"incapacitated\")}\r\n}\r\n\r\n{if len(event.killers) > 0:\r\n {set killerDescriptions to []}\r\n {for killer in event.killers:\r\n {set killerDescription to:\r\n by\r\n {if StartsWithVowel(killer.rating): an |else: a }\r\n {if find(killer.name, \"Cmdr \") >= 0:\r\n {_ Commander }\r\n {killer.rating}-ranked\r\n {token(killer.name, \" \", 0, \"Commander \")}\r\n in \r\n {if StartsWithVowel(killer.equipment): an |else: a }\r\n {killer.equipment} \r\n |else:\r\n {_ Generic NPC }\r\n {killer.rating}-ranked\r\n {killer.equipment} \r\n }\r\n }\r\n {set killerDescriptions to cat(killerDescriptions, [killerDescription])} \r\n }\r\n {List(killerDescriptions)}\r\n}", | |
"default": true | |
}, | |
"Discovery scan": { | |
"name": "Discovery scan", | |
"description": "Triggered when performing a full system scan (honk)", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Fetch from Context, if a context is set _}\r\n{if state.eddi_context_system_name:\r\n {set reportSystem to SystemDetails(state.eddi_context_system_name)}\r\n|else:\r\n {set reportSystem to SystemDetails(system.systemname)}\r\n}\r\n\r\n{if !reportSystem.name || reportSystem.name = \"\":\r\n I'm not sure which system you are asking about.\r\n|else:\r\n {if ship.Role.edname = \"Exploration\" || \r\n (ship.Role.edname = \"Multipurpose\" && len(reportSystem.factions) = 0):\r\n\r\n {if reportSystem:\r\n \t{set reportedBodies to len(reportSystem.bodies)}\r\n {if 0 < reportedBodies && reportedBodies < event.totalbodies:\r\n {Pause(1000)}\r\n\r\n {set scannedBodies to 0}\r\n {for body in reportSystem.bodies:\r\n {if body.scanned:\r\n {set scannedBodies to scannedBodies + 1}\r\n }\r\n }\r\n {set bodiesToScan to (event.totalbodies- scannedBodies)}\r\n\r\n {if bodiesToScan = 1:\r\n \tOne body remains to be scanned\r\n |elif scannedBodies < event.totalbodies:\r\n {OneOf(\r\n \"{scannedBodies} out of {event.totalbodies} bodies {if scannedBodies != 1: have been scanned |else: has been scanned}\", \r\n \"{bodiesToScan} bodies remain to be scanned\"\r\n )}\r\n {Occasionally(3, OneOf(\"here\", \"in this system\"))}.\r\n }\r\n |else:\r\n {set bodiesToMap to F(\"Bodies to map\")}\r\n {if bodiesToMap:\r\n {bodiesToMap}\r\n }\r\n }\r\n {F(\"System scan complete\")}\r\n }\r\n }\r\n}", | |
"defaultValue": "{_ Fetch from Context, if a context is set _}\r\n{if state.eddi_context_system_name:\r\n {set reportSystem to SystemDetails(state.eddi_context_system_name)}\r\n|else:\r\n {set reportSystem to SystemDetails(system.systemname)}\r\n}\r\n\r\n{if !reportSystem.name || reportSystem.name = \"\":\r\n I'm not sure which system you are asking about.\r\n|else:\r\n {if ship.Role.edname = \"Exploration\" || \r\n (ship.Role.edname = \"Multipurpose\" && len(reportSystem.factions) = 0):\r\n\r\n {if reportSystem:\r\n \t{set reportedBodies to len(reportSystem.bodies)}\r\n {if 0 < reportedBodies && reportedBodies < event.totalbodies:\r\n {Pause(1000)}\r\n\r\n {set scannedBodies to 0}\r\n {for body in reportSystem.bodies:\r\n {if body.scanned:\r\n {set scannedBodies to scannedBodies + 1}\r\n }\r\n }\r\n {set bodiesToScan to (event.totalbodies- scannedBodies)}\r\n\r\n {if bodiesToScan = 1:\r\n \tOne body remains to be scanned\r\n |elif scannedBodies < event.totalbodies:\r\n {OneOf(\r\n \"{scannedBodies} out of {event.totalbodies} bodies {if scannedBodies != 1: have been scanned |else: has been scanned}\", \r\n \"{bodiesToScan} bodies remain to be scanned\"\r\n )}\r\n {Occasionally(3, OneOf(\"here\", \"in this system\"))}.\r\n }\r\n |else:\r\n {set bodiesToMap to F(\"Bodies to map\")}\r\n {if bodiesToMap:\r\n {bodiesToMap}\r\n }\r\n }\r\n }\r\n }\r\n}", | |
"default": false | |
}, | |
"Disembark": { | |
"name": "Disembark", | |
"description": "Triggered when you transition from a ship or SRV to on foot", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Docked": { | |
"name": "Docked", | |
"description": "Triggered when your ship docks at a station or outpost", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if event.state = \"Damaged\": Emergency}\r\nDocking complete.\r\n\r\n{if event.activefine || event.wanted:\r\n Anonymous protocols are in effect.\r\n}\r\n\r\n{if event.cockpitbreached:\r\n Canopy repair highly recommended.\r\n}", | |
"defaultValue": "{if event.state = \"Damaged\": Emergency}\r\nDocking complete.\r\n\r\n{if event.activefine || event.wanted:\r\n Anonymous protocols are in effect.\r\n}\r\n\r\n{if event.cockpitbreached:\r\n Canopy repair highly recommended.\r\n}", | |
"default": true | |
}, | |
"Docking cancelled": { | |
"name": "Docking cancelled", | |
"description": "Triggered when your ship cancels a docking request at a station or outpost", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Docking request cancelled.", | |
"defaultValue": "Docking request cancelled.", | |
"default": true | |
}, | |
"Docking denied": { | |
"name": "Docking denied", | |
"description": "Triggered when your ship is denied docking at a station or outpost", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{Pause(2000)}\r\n\r\nWe have been denied docking\r\n\r\n{if event.reason = \"ActiveFighter\":\r\n because our fighter is deployed\r\n|elif event.reason = \"Distance\":\r\n because we are too far from the station\r\n|elif event.reason = \"Hostile\":\r\n because the station's controlling faction doesn't like us\r\n|elif event.reason = \"NoSpace\":\r\n because there is no space available\r\n|elif event.reason = \"Offences\":\r\n because we have recently committed an offence against them\r\n|elif event.reason = \"TooLarge\":\r\n because there are no landing pads that can accomodate the size of our ship\r\n}.", | |
"defaultValue": "{Pause(2000)}\r\n\r\nWe have been denied docking\r\n\r\n{if event.reason = \"ActiveFighter\":\r\n because our fighter is deployed\r\n|elif event.reason = \"Distance\":\r\n because we are too far from the station\r\n|elif event.reason = \"Hostile\":\r\n because the station's controlling faction doesn't like us\r\n|elif event.reason = \"NoSpace\":\r\n because there is no space available\r\n|elif event.reason = \"Offences\":\r\n because we have recently committed an offence against them\r\n|elif event.reason = \"TooLarge\":\r\n because there are no landing pads that can accomodate the size of our ship\r\n}.", | |
"default": true | |
}, | |
"Docking granted": { | |
"name": "Docking granted", | |
"description": "Triggered when your ship is granted docking permission at a station or outpost", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'landing pad')}\r\n{SetState('eddi_context_landing_pad_system', system.name)}\r\n{SetState('eddi_context_landing_pad_station', event.station)}\r\n{SetState('eddi_context_landing_pad_station_model', event.stationtype)}\r\n{SetState('eddi_context_landing_pad_pad', event.landingpad)}\r\n\r\n{if event.stationDefinition.basename = \"Coriolis\" || \r\n event.stationDefinition.basename = \"Orbis\" || \r\n event.stationDefinition.basename = \"Bernal\" || \r\n event.stationDefinition.basename = \"Ocellus\" || \r\n event.stationDefinition.basename = \"AsteroidBase\":\r\n {Pause(8000)}\r\n {F(\"Landing pad report\")}\r\n|else:\r\n {Pause(8000)}\r\n Landing pad {event.landingpad}\r\n {OneOf('ready', 'assigned', 'allocated')}\r\n {Occasionally(4, cat(', ', F('Honorific') ))}.\r\n}", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'landing pad')}\r\n{SetState('eddi_context_landing_pad_system', system.name)}\r\n{SetState('eddi_context_landing_pad_station', event.station)}\r\n{SetState('eddi_context_landing_pad_station_model', event.stationtype)}\r\n{SetState('eddi_context_landing_pad_pad', event.landingpad)}\r\n\r\n{if event.stationDefinition.basename = \"Coriolis\" || \r\n event.stationDefinition.basename = \"Orbis\" || \r\n event.stationDefinition.basename = \"Bernal\" || \r\n event.stationDefinition.basename = \"Ocellus\" || \r\n event.stationDefinition.basename = \"AsteroidBase\":\r\n {Pause(8000)}\r\n {F(\"Landing pad report\")}\r\n|else:\r\n {Pause(8000)}\r\n Landing pad {event.landingpad}\r\n {OneOf('ready', 'assigned', 'allocated')}\r\n {Occasionally(4, cat(', ', F('Honorific') ))}.\r\n}", | |
"default": true | |
}, | |
"Docking requested": { | |
"name": "Docking requested", | |
"description": "Triggered when your ship requests docking at a station or outpost", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Docking timed out": { | |
"name": "Docking timed out", | |
"description": "Triggered when your docking request times out", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "No response to our docking request.", | |
"defaultValue": "No response to our docking request.", | |
"default": true | |
}, | |
"Dropship deployment": { | |
"name": "Dropship deployment", | |
"description": "Triggered when exiting a military dropship at an on-foot conflict zone", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Embark": { | |
"name": "Embark", | |
"description": "Triggered when you transition from on foot to a ship or SRV", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if !event.tosrv && state.eddi_context_srv_deployed_id:\r\n Your {Spacialise(\"SRV\")} is still deployed, {F('Honorific')}, and will be destroyed if abandoned.\r\n}", | |
"defaultValue": "{if !event.tosrv && state.eddi_context_srv_deployed_id:\r\n Your {Spacialise(\"SRV\")} is still deployed, {F('Honorific')}, and will be destroyed if abandoned.\r\n}", | |
"default": true | |
}, | |
"Empire honorific": { | |
"name": "Empire honorific", | |
"description": "Function to provide a suitable honorific for your commander when in the empire", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Forms of address taken from <https://en.wikipedia.org/wiki/Forms_of_address_in_the_United_Kingdom>}\r\n{if cmdr.empirerating.rank <= 4: {_ Commoner }\r\n commander\r\n|elif cmdr.empirerating.rank = 5: {_ Knight / Dame }\r\n {if cmdr.gender = \"Male\": \r\n sir \r\n |elif cmdr.gender = \"Female\": \r\n madam\r\n |else: \r\n commander\r\n }\r\n|elif cmdr.empirerating.rank <= 11: {_ Peer / Peeress }\r\n {if cmdr.gender = \"Male\": \r\n {OneOf(\"my lord\", \"your lordship\")}\r\n |elif cmdr.gender = \"Female\": \r\n {OneOf(\"my lady\", \"your ladyship\")}\r\n |else: \r\n commander\r\n }\r\n|elif cmdr.empirerating.rank = 12:\r\n your grace\r\n|elif cmdr.empirerating.rank = 13:\r\n your royal highness\r\n|elif cmdr.empirerating.rank = 14:\r\n your majesty\r\n}\r\n", | |
"defaultValue": "{_ Forms of address taken from <https://en.wikipedia.org/wiki/Forms_of_address_in_the_United_Kingdom>}\r\n{if cmdr.empirerating.rank <= 4: {_ Commoner }\r\n commander\r\n|elif cmdr.empirerating.rank = 5: {_ Knight / Dame }\r\n {if cmdr.gender = \"Male\": \r\n sir \r\n |elif cmdr.gender = \"Female\": \r\n madam\r\n |else: \r\n commander\r\n }\r\n|elif cmdr.empirerating.rank <= 11: {_ Peer / Peeress }\r\n {if cmdr.gender = \"Male\": \r\n {OneOf(\"my lord\", \"your lordship\")}\r\n |elif cmdr.gender = \"Female\": \r\n {OneOf(\"my lady\", \"your ladyship\")}\r\n |else: \r\n commander\r\n }\r\n|elif cmdr.empirerating.rank = 12:\r\n your grace\r\n|elif cmdr.empirerating.rank = 13:\r\n your royal highness\r\n|elif cmdr.empirerating.rank = 14:\r\n your majesty\r\n}\r\n", | |
"default": true | |
}, | |
"Engineer contributed": { | |
"name": "Engineer contributed", | |
"description": "Triggered when contributing resources to an engineer in exchange for access", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{event.engineer} \r\nthanks you for contributing\r\n{if event.contributiontype = \"Commodity\":\r\n {event.amount} tonne{if event.amount != 1:s} \r\n|elif event.contributiontype = \"Material\":\r\n {if material.category = 'Data':\r\n {event.amount} {OneOf(\"unit\", \"sample\", \"record\")}{if event.amount != 1:s}\r\n |else:\r\n {event.amount} {OneOf(\"unit\", \"sample\", \"fragment\")}{if event.amount != 1:s}\r\n }\r\n}\r\nof {event.contribution}.", | |
"defaultValue": "{event.engineer} \r\nthanks you for contributing\r\n{if event.contributiontype = \"Commodity\":\r\n {event.amount} tonne{if event.amount != 1:s} \r\n|elif event.contributiontype = \"Material\":\r\n {if material.category = 'Data':\r\n {event.amount} {OneOf(\"unit\", \"sample\", \"record\")}{if event.amount != 1:s}\r\n |else:\r\n {event.amount} {OneOf(\"unit\", \"sample\", \"fragment\")}{if event.amount != 1:s}\r\n }\r\n}\r\nof {event.contribution}.", | |
"default": true | |
}, | |
"Engineer progressed": { | |
"name": "Engineer progressed", | |
"description": "Triggered when you reach a new rank with an engineer", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if event.progresstype = \"Stage\":\r\n\r\n {if event.stage = \"Known\":\r\n The Engineer {event.engineer} has sent you a message.\r\n |elif event.stage = \"Invited\":\r\n Workshop invitation received from {event.engineer}.\r\n |elif event.stage = \"Unlocked\":\r\n {event.engineer} has granted you access to workshop facilities.\r\n |elif event.stage = \"Barred\":\r\n {event.engineer} has {OneOf(\"barred\", \"restricted\")} your access to workshop facilities.\r\n }\r\n\r\n|elif event.engineer:\r\n\r\n {event.engineer} has\r\n {OneOf(\"given\", \"granted\")}\r\n you access to grade {event.rank} blueprints.\r\n\r\n}", | |
"defaultValue": "{if event.progresstype = \"Stage\":\r\n\r\n {if event.stage = \"Known\":\r\n The Engineer {event.engineer} has sent you a message.\r\n |elif event.stage = \"Invited\":\r\n Workshop invitation received from {event.engineer}.\r\n |elif event.stage = \"Unlocked\":\r\n {event.engineer} has granted you access to workshop facilities.\r\n |elif event.stage = \"Barred\":\r\n {event.engineer} has {OneOf(\"barred\", \"restricted\")} your access to workshop facilities.\r\n }\r\n\r\n|elif event.engineer:\r\n\r\n {event.engineer} has\r\n {OneOf(\"given\", \"granted\")}\r\n you access to grade {event.rank} blueprints.\r\n\r\n}", | |
"default": true | |
}, | |
"Engineer report": { | |
"name": "Engineer report", | |
"description": "Report on the engineer in a contextual system", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch from Context, if a context is set _}\r\n{if state.eddi_context_system_name:\r\n {set systemname to state.eddi_context_system_name}\r\n|else:\r\n {set systemname to system.systemname}\r\n}\r\n\r\n{if !systemname || systemname = \"\":\r\n\r\n I'm not sure which system you are asking about.\r\n\r\n|else:\r\n\r\n {set reportEngineer to EngineerDetails(systemname)}\r\n {if reportEngineer:\r\n This system is home to {reportEngineer.name}\r\n {if len(reportEngineer.majorspecialties) + len(reportEngineer.minorspecialties) > 0 :, who}\r\n {if len(reportEngineer.majorspecialties) > 0:\r\n specializes in {OneOf(\"improving\", \"upgrading\")}\r\n {List(reportEngineer.majorspecialties)}.\r\n }\r\n {if len(reportEngineer.minorspecialties) > 0:\r\n {if len(reportEngineer.majorspecialties) > 0: \r\n They also {Occasionally(2, \"can\")} \r\n {OneOf(\"improve\", \"upgrade\")}\r\n |else: \r\n {OneOf(\"improves\", \"upgrades\")}\r\n }\r\n {List(reportEngineer.minorspecialties)}\r\n }.\r\n You can find {reportEngineer.name} at {P(reportEngineer.stationname, \"station\")}.\r\n }\r\n}", | |
"defaultValue": "{_ Fetch from Context, if a context is set _}\r\n{if state.eddi_context_system_name:\r\n {set systemname to state.eddi_context_system_name}\r\n|else:\r\n {set systemname to system.systemname}\r\n}\r\n\r\n{if !systemname || systemname = \"\":\r\n\r\n I'm not sure which system you are asking about.\r\n\r\n|else:\r\n\r\n {set reportEngineer to EngineerDetails(systemname)}\r\n {if reportEngineer:\r\n This system is home to {reportEngineer.name}\r\n {if len(reportEngineer.majorspecialties) + len(reportEngineer.minorspecialties) > 0 :, who}\r\n {if len(reportEngineer.majorspecialties) > 0:\r\n specializes in {OneOf(\"improving\", \"upgrading\")}\r\n {List(reportEngineer.majorspecialties)}.\r\n }\r\n {if len(reportEngineer.minorspecialties) > 0:\r\n {if len(reportEngineer.majorspecialties) > 0: \r\n They also {Occasionally(2, \"can\")} \r\n {OneOf(\"improve\", \"upgrade\")}\r\n |else: \r\n {OneOf(\"improves\", \"upgrades\")}\r\n }\r\n {List(reportEngineer.minorspecialties)}\r\n }.\r\n You can find {reportEngineer.name} at {P(reportEngineer.stationname, \"station\")}.\r\n }\r\n}", | |
"default": true | |
}, | |
"Entered CQC": { | |
"name": "Entered CQC", | |
"description": "Triggered when you enter CQC", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Entering close-quarters combat.", | |
"defaultValue": "Entering close-quarters combat.", | |
"default": true | |
}, | |
"Entered normal space": { | |
"name": "Entered normal space", | |
"description": "Triggered when your ship enters normal space", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Entered normal space }\r\n{_ Triggered when your ship enters normal space }\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'fsd')}\r\n{SetState('eddi_context_last_action', 'disengage')}\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_body_name', event.body)}\r\n{SetState('eddi_context_body_type', event.bodytype)}\r\n{SetState('eddi_context_body_system', event.system)}\r\n\r\n{set station_notifications to:\r\n {set station_missions to F(\"Mission check station\")}\r\n {set station_crimes to F(\"Crime check station\")}\r\n {if station_missions || station_crimes:\r\n {_ Pause for station ATC before speaking again _}\r\n {Pause(5000)}\r\n Information:\r\n {if station_missions:\r\n {Pause(500)}\r\n {station_missions}\r\n }\r\n {if station_crimes:\r\n {Pause(500)}\r\n {station_crimes}\r\n }\r\n }\r\n}\r\n\r\n{Pause(500)}\r\n\r\n{OneOf(\"{ShipName()} has\", \"\")} \r\n{OneOf(\"left supercruise\", \"{OneOf(\\\"entered\\\", \\\"returned to\\\", \\\"dropped to\\\")} normal space\")}\r\n\r\n{if event.bodytype_invariant = 'Planet':\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")}\r\n {set time to SecondsSince(0) - state.eddi_context_approach_time}\r\n {if time < 60:\r\n {set settlement to state.eddi_context_last_settlement}\r\n {set reportStation to StationDetails(settlement, event.system)}\r\n {if reportStation:\r\n {SetState('eddi_context_body_name', settlement)}\r\n {if reportStation.Model.invariantName != \"Unknown Station\":\r\n {P(reportStation.model, \"station\")},\r\n } \r\n {P(settlement, \"station\")}\r\n {station_notifications}\r\n |else:\r\n {P(settlement, \"station\")}\r\n }\r\n |else:\r\n {set reportBody to BodyDetails(event.body, event.system)}\r\n {reportBody.bodytype)} {P(reportBody.name, \"body\")}\r\n }\r\n|elif event.bodytype_invariant = 'Star':\r\n {set reportBody to BodyDetails(event.body, event.system)}\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")} {reportBody.bodytype)} {P(reportBody.name, \"body\")}\r\n|elif event.bodytype_invariant = 'Station':\r\n {set reportStation to StationDetails(event.body, event.system)}\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")}\r\n {P(reportStation.model, \"station\")}, {P(event.body, \"body\")}\r\n {station_notifications}\r\n|elif event.bodytype_invariant = 'Planetary Ring':\r\n {event.bodytype} {P(token(event.body,\" Ring\",0), \"body\")}\r\n}.", | |
"defaultValue": "{_ Entered normal space }\r\n{_ Triggered when your ship enters normal space }\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'fsd')}\r\n{SetState('eddi_context_last_action', 'disengage')}\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_body_name', event.body)}\r\n{SetState('eddi_context_body_type', event.bodytype)}\r\n{SetState('eddi_context_body_system', event.system)}\r\n\r\n{set station_notifications to:\r\n {set station_missions to F(\"Mission check station\")}\r\n {set station_crimes to F(\"Crime check station\")}\r\n {if station_missions || station_crimes:\r\n {_ Pause for station ATC before speaking again _}\r\n {Pause(5000)}\r\n Information:\r\n {if station_missions:\r\n {Pause(500)}\r\n {station_missions}\r\n }\r\n {if station_crimes:\r\n {Pause(500)}\r\n {station_crimes}\r\n }\r\n }\r\n}\r\n\r\n{Pause(500)}\r\n\r\n{OneOf(\"{ShipName()} has\", \"\")} \r\n{OneOf(\"left supercruise\", \"{OneOf(\\\"entered\\\", \\\"returned to\\\", \\\"dropped to\\\")} normal space\")}\r\n\r\n{if event.bodytype_invariant = 'Planet':\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")}\r\n {set time to SecondsSince(0) - state.eddi_context_approach_time}\r\n {if time < 60:\r\n {set settlement to state.eddi_context_last_settlement}\r\n {set reportStation to StationDetails(settlement, event.system)}\r\n {if reportStation:\r\n {SetState('eddi_context_body_name', settlement)}\r\n {if reportStation.Model.invariantName != \"Unknown Station\":\r\n {P(reportStation.model, \"station\")},\r\n } \r\n {P(settlement, \"station\")}\r\n {station_notifications}\r\n |else:\r\n {P(settlement, \"station\")}\r\n }\r\n |else:\r\n {set reportBody to BodyDetails(event.body, event.system)}\r\n {reportBody.bodytype)} {P(reportBody.name, \"body\")}\r\n }\r\n|elif event.bodytype_invariant = 'Star':\r\n {set reportBody to BodyDetails(event.body, event.system)}\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")} {reportBody.bodytype)} {P(reportBody.name, \"body\")}\r\n|elif event.bodytype_invariant = 'Station':\r\n {set reportStation to StationDetails(event.body, event.system)}\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")}\r\n {P(reportStation.model, \"station\")}, {P(event.body, \"body\")}\r\n {station_notifications}\r\n|elif event.bodytype_invariant = 'Planetary Ring':\r\n {event.bodytype} {P(token(event.body,\" Ring\",0), \"body\")}\r\n}.", | |
"default": true | |
}, | |
"Entered signal source": { | |
"name": "Entered signal source", | |
"description": "Triggered when your ship enters a signal source", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{set warninglevel to:\r\n {set entered to OneOf(\"Entered\", \"Dropped into\", \"Entering\")}\r\n {if event.threat < 2:\r\n {entered}\r\n |elif event.threat = 2:\r\n Caution: {entered} medium threat\r\n |elif event.threat = 3:\r\n Warning: {entered} high-threat\r\n |elif event.threat = 4:\r\n Danger: {entered} very high-threat\r\n |elif event.threat = 5:\r\n Extreme Danger: {Occasionally(2, entered)} very high-threat\r\n |elif event.threat = 6:\r\n Extreme Danger: {Occasionally(2, entered)} extremely high-threat\r\n |elif event.threat = 7:\r\n Extreme Danger: {Occasionally(2, entered)} ultra high-threat\r\n |else:\r\n Extreme Danger: {Occasionally(2, entered)} Unprecedented level {event.threat} threat\r\n }\r\n}\r\n\r\n{set source to token(event.source, \"$USS_Type_\", 1)}\r\n\r\n{if source = \"Aftermath;\":\r\n {set source to OneOf(\"combat aftermath\", \"dissipating combat\")}\r\n|elif ((source = \"Anomaly;\" || source = \"Salvage;\") && event.threat = 2):\r\n {set warninglevel to entered}\r\n {set source to OneOf(\"alien\", \"xeno\", \"non-human\", \"Thargoid probe\")}\r\n|elif (source = \"Anomaly;\" && event.threat = 4):\r\n {set warninglevel to entered}\r\n {set source to OneOf(\"alien\", \"xeno\", \"non-human\", \"Thargoid sensor\")}\r\n|elif source = \"Anomaly;\":\r\n {set source to OneOf(\"anomalous\", \"unknown\", \"mysterious\")}\r\n|elif source = \"Ceremonial;\":\r\n {set source to \"ceremonial comms\"}\r\n|elif source = \"Convoy;\":\r\n {set source to \"convoy\"}\r\n|elif source = \"DisruptedWakeEchoes;\":\r\n {set source to \"\"}\r\n|elif source = \"DistressSignal;\":\r\n {set source to \"distress\"}\r\n|elif source = \"MissionTarget;\":\r\n {set source to OneOf(\"mission\", \"mission encoded\")}\r\n|elif source = \"NonHuman;\":\r\n {set source to OneOf(\"alien\", \"xeno\", \"non-human\")}\r\n|elif source = \"Salvage;\":\r\n {set source to \"degraded emissions\"}\r\n|elif source = \"ValuableSalvage;\":\r\n {set source to \"encoded emissions\"}\r\n|elif source = \"VeryValuableSalvage;\":\r\n {set source to \"high grade emissions\"}\r\n|elif source = \"WeaponsFire;\":\r\n {set source to OneOf(\"combat\", \"weapons fire\")}\r\n}\r\n\r\n{Pause(2000)}\r\n{warninglevel} {source} signal source. \r\n\r\n{if system.state = \"Anarchy\" && source = \"degraded emissions\" && system.population > 0: \r\n {Occasionally(2, \"\r\n Caution:\r\n {set local to OneOf('local', 'nearby')}\r\n {set chatter to OneOf('chatter', 'gossip', 'rumor')}\r\n {set indicate to OneOf('claims', 'suggests', 'implies', 'reports')}\r\n {OneOf('{local} transmissions {indicate}', \r\n '{chatter} in {local} transmissions {indicate}')}\r\n {Occasionally(3, 'that there is')}\r\n {OneOf('increased', 'elevated', 'heightened')}\r\n {OneOf('criminal {Occasionally(2, \\\\'syndicate\\\\')}', \r\n 'pirate {Occasionally(2, OneOf(\\\\'gang\\\\', \\\\'clan\\\\'))}' )}\r\n {OneOf('activity', 'presence')}\r\n in {OneOf('the area', 'the vicinity', 'this sector', 'this system')}.\r\n {OneOf('Remain', 'Stay', 'Keep')} {OneOf('vigilant', 'alert', 'frosty', 'sharp')} \r\n {Occasionally(3,' {F(\\\\'Honorific\\\\')}' )}.\r\n \")}\r\n}", | |
"defaultValue": "{set warninglevel to:\r\n {set entered to OneOf(\"Entered\", \"Dropped into\", \"Entering\")}\r\n {if event.threat < 2:\r\n {entered}\r\n |elif event.threat = 2:\r\n Caution: {entered} medium threat\r\n |elif event.threat = 3:\r\n Warning: {entered} high-threat\r\n |elif event.threat = 4:\r\n Danger: {entered} very high-threat\r\n |elif event.threat = 5:\r\n Extreme Danger: {Occasionally(2, entered)} very high-threat\r\n |elif event.threat = 6:\r\n Extreme Danger: {Occasionally(2, entered)} extremely high-threat\r\n |elif event.threat = 7:\r\n Extreme Danger: {Occasionally(2, entered)} ultra high-threat\r\n |else:\r\n Extreme Danger: {Occasionally(2, entered)} Unprecedented level {event.threat} threat\r\n }\r\n}\r\n\r\n{set source to token(event.source, \"$USS_Type_\", 1)}\r\n\r\n{if source = \"Aftermath;\":\r\n {set source to OneOf(\"combat aftermath\", \"dissipating combat\")}\r\n|elif ((source = \"Anomaly;\" || source = \"Salvage;\") && event.threat = 2):\r\n {set warninglevel to entered}\r\n {set source to OneOf(\"alien\", \"xeno\", \"non-human\", \"Thargoid probe\")}\r\n|elif (source = \"Anomaly;\" && event.threat = 4):\r\n {set warninglevel to entered}\r\n {set source to OneOf(\"alien\", \"xeno\", \"non-human\", \"Thargoid sensor\")}\r\n|elif source = \"Anomaly;\":\r\n {set source to OneOf(\"anomalous\", \"unknown\", \"mysterious\")}\r\n|elif source = \"Ceremonial;\":\r\n {set source to \"ceremonial comms\"}\r\n|elif source = \"Convoy;\":\r\n {set source to \"convoy\"}\r\n|elif source = \"DisruptedWakeEchoes;\":\r\n {set source to \"\"}\r\n|elif source = \"DistressSignal;\":\r\n {set source to \"distress\"}\r\n|elif source = \"MissionTarget;\":\r\n {set source to OneOf(\"mission\", \"mission encoded\")}\r\n|elif source = \"NonHuman;\":\r\n {set source to OneOf(\"alien\", \"xeno\", \"non-human\")}\r\n|elif source = \"Salvage;\":\r\n {set source to \"degraded emissions\"}\r\n|elif source = \"ValuableSalvage;\":\r\n {set source to \"encoded emissions\"}\r\n|elif source = \"VeryValuableSalvage;\":\r\n {set source to \"high grade emissions\"}\r\n|elif source = \"WeaponsFire;\":\r\n {set source to OneOf(\"combat\", \"weapons fire\")}\r\n}\r\n\r\n{Pause(2000)}\r\n{warninglevel} {source} signal source. \r\n\r\n{if system.state = \"Anarchy\" && source = \"degraded emissions\" && system.population > 0: \r\n {Occasionally(2, \"\r\n Caution:\r\n {set local to OneOf('local', 'nearby')}\r\n {set chatter to OneOf('chatter', 'gossip', 'rumor')}\r\n {set indicate to OneOf('claims', 'suggests', 'implies', 'reports')}\r\n {OneOf('{local} transmissions {indicate}', \r\n '{chatter} in {local} transmissions {indicate}')}\r\n {Occasionally(3, 'that there is')}\r\n {OneOf('increased', 'elevated', 'heightened')}\r\n {OneOf('criminal {Occasionally(2, \\\\'syndicate\\\\')}', \r\n 'pirate {Occasionally(2, OneOf(\\\\'gang\\\\', \\\\'clan\\\\'))}' )}\r\n {OneOf('activity', 'presence')}\r\n in {OneOf('the area', 'the vicinity', 'this sector', 'this system')}.\r\n {OneOf('Remain', 'Stay', 'Keep')} {OneOf('vigilant', 'alert', 'frosty', 'sharp')} \r\n {Occasionally(3,' {F(\\\\'Honorific\\\\')}' )}.\r\n \")}\r\n}", | |
"default": true | |
}, | |
"Entered supercruise": { | |
"name": "Entered supercruise", | |
"description": "Triggered when your ship enters supercruise", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fsd')}\r\n{SetState('eddi_context_last_action', 'engage')}\r\n\r\n{Pause(1000)}\r\n\r\n{Occasionally(2, \"{ShipName()} has\")} {OneOf(\"entered\", \"jumped to\")} supercruise.\r\n\r\n{_ Report on the state of any pending fines, bounties, or claims }\r\n{if state.eddi_context_criminal_record_change:\r\n {set crimeCheck to F(\"Crime check system\")}\r\n {if crimeCheck:\r\n {Pause(1000)}\r\n {crimeCheck}\r\n }\r\n}", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fsd')}\r\n{SetState('eddi_context_last_action', 'engage')}\r\n\r\n{Pause(1000)}\r\n\r\n{Occasionally(2, \"{ShipName()} has\")} {OneOf(\"entered\", \"jumped to\")} supercruise.\r\n\r\n{_ Report on the state of any pending fines, bounties, or claims }\r\n{if state.eddi_context_criminal_record_change:\r\n {set crimeCheck to F(\"Crime check system\")}\r\n {if crimeCheck:\r\n {Pause(1000)}\r\n {crimeCheck}\r\n }\r\n}", | |
"default": true | |
}, | |
"Exploration data purchased": { | |
"name": "Exploration data purchased", | |
"description": "Triggered when you purchase exploration data", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{OneOf(\"Purchased {OneOf('system', 'exploration')} data for {P(event.system, 'starsystem')}\",\r\n \"{OneOf('system', 'exploration')} data for {P(event.system, 'starsystem')} now available\",\r\n \"{Occasionally(3, '{ShipName()} has')} Received {OneOf('system', 'exploration')} data for {P(event.system, 'starsystem')} from station services\",\r\n \"Receipt of {P(event.system, 'starsystem')} {OneOf('system', 'exploration')} data confirmed\")}.", | |
"defaultValue": "{OneOf(\"Purchased {OneOf('system', 'exploration')} data for {P(event.system, 'starsystem')}\",\r\n \"{OneOf('system', 'exploration')} data for {P(event.system, 'starsystem')} now available\",\r\n \"{Occasionally(3, '{ShipName()} has')} Received {OneOf('system', 'exploration')} data for {P(event.system, 'starsystem')} from station services\",\r\n \"Receipt of {P(event.system, 'starsystem')} {OneOf('system', 'exploration')} data confirmed\")}.", | |
"default": true | |
}, | |
"Exploration data sold": { | |
"name": "Exploration data sold", | |
"description": "Triggered when you sell exploration data", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Exploration data for {len(event.systems)} \r\n{if len(event.systems) = 1: system |else: systems} \r\nsold for {Humanise(event.total)} credits\r\n\r\n{if event.bonus > 0:\r\n , including a bonus of {Humanise(event.bonus)} credits for first discoveries\r\n}.", | |
"defaultValue": "Exploration data for {len(event.systems)} \r\n{if len(event.systems) = 1: system |else: systems} \r\nsold for {Humanise(event.total)} credits\r\n\r\n{if event.bonus > 0:\r\n , including a bonus of {Humanise(event.bonus)} credits for first discoveries\r\n}.", | |
"default": true | |
}, | |
"Fighter docked": { | |
"name": "Fighter docked", | |
"description": "Triggered when you dock a fighter with your ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Fighter {OneOf(\"docked\", \"redocked\")} {Occasionally(2, \"with ship\")}.", | |
"defaultValue": "Fighter {OneOf(\"docked\", \"redocked\")} {Occasionally(2, \"with ship\")}.", | |
"default": true | |
}, | |
"Fighter launched": { | |
"name": "Fighter launched", | |
"description": "Triggered when you launch a fighter from your ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Fighter {OneOf(\"deploying\", \"launching\")} {Occasionally(2, \"from mothership\")}.", | |
"defaultValue": "Fighter {OneOf(\"deploying\", \"launching\")} {Occasionally(2, \"from mothership\")}.", | |
"default": true | |
}, | |
"Fighter rebuilt": { | |
"name": "Fighter rebuilt", | |
"description": "Triggered when a ship's fighter is rebuilt in the hangar", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Fighter {OneOf(\"rebuilt\", \"reconstruction complete\")} and ready for {OneOf(\"launch\", \"deployment\")}.", | |
"defaultValue": "Fighter {OneOf(\"rebuilt\", \"reconstruction complete\")} and ready for {OneOf(\"launch\", \"deployment\")}.", | |
"default": true | |
}, | |
"File Header": { | |
"name": "File Header", | |
"description": "Triggered when the file header is read", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Fine incurred": { | |
"name": "Fine incurred", | |
"description": "Triggered when you incur a fine", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fine')}\r\n{SetState('eddi_context_last_action', 'incur')}\r\n{SetState('eddi_context_fine_name', event.victim)}\r\n{SetState('eddi_context_fine_faction', event.faction)}\r\n{SetState('eddi_context_fine_amount', event.fine)}\r\n{SetState(\"eddi_context_criminal_record_change\", true)}\r\n\r\nFine {OneOf('assigned', 'received', 'incurred', 'issued against you')} for {event.crime}.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fine')}\r\n{SetState('eddi_context_last_action', 'incur')}\r\n{SetState('eddi_context_fine_name', event.victim)}\r\n{SetState('eddi_context_fine_faction', event.faction)}\r\n{SetState('eddi_context_fine_amount', event.fine)}\r\n{SetState(\"eddi_context_criminal_record_change\", true)}\r\n\r\nFine {OneOf('assigned', 'received', 'incurred', 'issued against you')} for {event.crime}.", | |
"default": true | |
}, | |
"Fine paid": { | |
"name": "Fine paid", | |
"description": "Triggered when you pay a fine", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fine')}\r\n{SetState('eddi_context_last_action', 'pay')}\r\n{SetState('eddi_context_fine_amount', event.amount)}\r\n\r\n\r\nPaid fine of {Humanise(event.amount)} credits.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fine')}\r\n{SetState('eddi_context_last_action', 'pay')}\r\n{SetState('eddi_context_fine_amount', event.amount)}\r\n\r\n\r\nPaid fine of {Humanise(event.amount)} credits.", | |
"default": true | |
}, | |
"Flight assist": { | |
"name": "Flight assist", | |
"description": "Triggered when flight assist is toggled", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Friends status": { | |
"name": "Friends status", | |
"description": "Triggered when a friendly commander changes status", | |
"enabled": false, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Set uselist to \"white\" or \"black\", depending on which list you want to use to filter people _}\r\n{_ \"white\" will only allow notifications from people in this list (e.g. \"User1\", \"User2\", & \"User3\") _}\r\n{_ \"black\" will allow all notification EXCEPT those on this list (e.g. \"User4\", \"User5\", & \"User6\") _}\r\n{_ to allow all notifications, you may also use an empty blacklist (i.e. \"set blacklist to []\" _}\r\n\r\n{set uselist to \"black\"}\r\n\r\n{set whitelist to [\"User1\", \"User2\", \"User3\"]}\r\n{set blacklist to [\"User4\", \"User5\", \"User6\"]}\r\n\r\n{if event.name:\r\n {if uselist = \"white\":\r\n {if find(whitelist, event.name) > -1:\r\n {event.name} is now {event.status}.\r\n }\r\n |elif uselist = \"black\":\r\n {if find(blacklist, event.name) = -1:\r\n {event.name} is now {event.status}.\r\n }\r\n }\r\n|else:\r\n I don't know who you are talking about.\r\n}", | |
"defaultValue": "{_ Set uselist to \"white\" or \"black\", depending on which list you want to use to filter people _}\r\n{_ \"white\" will only allow notifications from people in this list (e.g. \"User1\", \"User2\", & \"User3\") _}\r\n{_ \"black\" will allow all notification EXCEPT those on this list (e.g. \"User4\", \"User5\", & \"User6\") _}\r\n{_ to allow all notifications, you may also use an empty blacklist (i.e. \"set blacklist to []\" _}\r\n\r\n{set uselist to \"black\"}\r\n\r\n{set whitelist to [\"User1\", \"User2\", \"User3\"]}\r\n{set blacklist to [\"User4\", \"User5\", \"User6\"]}\r\n\r\n{if event.name:\r\n {if uselist = \"white\":\r\n {if find(whitelist, event.name) > -1:\r\n {event.name} is now {event.status}.\r\n }\r\n |elif uselist = \"black\":\r\n {if find(blacklist, event.name) = -1:\r\n {event.name} is now {event.status}.\r\n }\r\n }\r\n|else:\r\n I don't know who you are talking about.\r\n}", | |
"default": true | |
}, | |
"FSD engaged": { | |
"name": "FSD engaged", | |
"description": "Triggered when your FSD has engaged", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fsd')}\r\n{SetState('eddi_context_last_action', 'engage')}\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_system_system', event.system)}\r\n{SetState('eddi_context_fsd_target', event.target)}\r\n{SetState('eddi_context_system_lastvisit', system.lastVisitSeconds)}\r\n\r\n{_ Zero the 'remaining jump' context to only use values following this event _}\r\n{SetState('eddi_context_remaining_jumps', 0)}\r\n\r\n{if event.target = 'Hyperspace':\r\n {_ Rewrite context to represent a jump }\r\n {SetState('eddi_context_last_subject', 'jump')}\r\n {SetState('eddi_context_last_action', 'start')}\r\n\r\n {set reportsystem to SystemDetails(event.system)}\r\n\r\n {_ Wait for the FSD countdown and initial jump}\r\n {Pause(5000)}\r\n\r\n {OneOf(\"Destination confirmed\",\"Jump in progress\",\"Telemetry obtained\")}.\r\n {ShipName()} is {OneOf(\"heading to\", \"on route to\", \"travelling to\", \"in transit to\")} the {P(reportsystem.name, \"starsystem\")} system.\r\n {if reportsystem.name = homesystem.name:\r\n Welcome home, {F(\"Honorific\")}\r\n |else:\r\n {set scoopables to [\"O\", \"B\", \"A\", \"F\", \"G\", \"K\", \"M\"]}\r\n {if slice(event.stellarclass, 0, 1) = \"D\":\r\n Caution: white dwarf detected.\r\n |elif event.stellarclass = \"N\":\r\n Caution: neutron star detected.\r\n |elif event.stellarclass = \"H\":\r\n Caution: black hole detected.\r\n |elif find(scoopables, event.stellarclass) = -1:\r\n {Occasionally(2, \"Information: \")}\r\n Arrival star is not scoopable.\r\n }\r\n \r\n {if lastsystem.allegiance && lastsystem.allegiance != \"None\" && lastsystem.allegiance != \"Independent\" && (!reportsystem.allegiance || reportsystem.allegiance = \"None\" || reportsystem.allegiance = \"Independent\"):\r\n You {OneOf(\"are leaving\", \"have left\", \"are no longer in\")} {lastsystem.allegiance} space.\r\n |elif lastsystem.allegiance && lastsystem.allegiance != reportsystem.allegiance && system.allegiance && system.allegiance != \"None\":\r\n You {OneOf(\"are now in\", \"have entered\", \"are entering\")} {reportsystem.allegiance} space.\r\n {if cmdr.title != \"Commander\":\r\n Welcome back {F(\"Honorific\")}.\r\n }\r\n }\r\n\r\n {if reportsystem.visits = 0:\r\n This is your first visit to this system.\r\n |elif reportsystem.visits = 1:\r\n This is your second visit to this system.\r\n |elif reportsystem.visits = 2:\r\n {Occasionally(2, \"This is your third visit to this system.\")}\r\n |elif reportsystem.visits = 3:\r\n {Occasionally(2, \"This is your fourth visit to this system.\")}\r\n |else:\r\n {Occasionally(3, \"You have visited this system {reportsystem.visits} times.\")}\r\n }\r\n\r\n {if !reportsystem.population && lastsystem.population:\r\n {OneOf(\"This system is not populated\",\"There is no human presence here\", \"Humans have yet to colonise this system\")}.\r\n |elif reportsystem.population:\r\n {if SecondsSince(reportsystem.lastVisitSeconds) > 3600:\r\n {F(\"System report\")}\r\n }\r\n }\r\n\r\n {if reportsystem.distancefromhome:\r\n {set ReportDistanceFromHome() to:\r\n \t{return cat(\r\n \t OneOf(\"You are\", \"Current location is\", \"You are now\"), \" \",\r\n\t Humanise(reportsystem.distancefromhome), \" lightyears from \",\r\n\t OneOf(\"home\", \"{P(homesystem.name, 'starsystem')}\"), \".\"\r\n\t )}\r\n } \r\n {Occasionally(7, ReportDistanceFromHome())}\r\n }\r\n\r\n {if reportsystem.comment:\r\n You made a {OneOf(\"note\", \"comment\", \"remark\")} {OneOf(\"about\", \"for\", \"on\")} this system. It {OneOf(\"is as follows\", \"says\", \"reads\", \"is\")} {reportsystem.comment}.\r\n }\r\n }\r\n}", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fsd')}\r\n{SetState('eddi_context_last_action', 'engage')}\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_system_system', event.system)}\r\n{SetState('eddi_context_fsd_target', event.target)}\r\n{SetState('eddi_context_system_lastvisit', system.lastVisitSeconds)}\r\n\r\n{_ Zero the 'remaining jump' context to only use values following this event _}\r\n{SetState('eddi_context_remaining_jumps', 0)}\r\n\r\n{if event.target = 'Hyperspace':\r\n {_ Rewrite context to represent a jump }\r\n {SetState('eddi_context_last_subject', 'jump')}\r\n {SetState('eddi_context_last_action', 'start')}\r\n\r\n {set reportsystem to SystemDetails(event.system)}\r\n\r\n {_ Wait for the FSD countdown and initial jump}\r\n {Pause(5000)}\r\n\r\n {OneOf(\"Destination confirmed\",\"Jump in progress\",\"Telemetry obtained\")}.\r\n {ShipName()} is {OneOf(\"heading to\", \"on route to\", \"travelling to\", \"in transit to\")} the {P(reportsystem.name, \"starsystem\")} system.\r\n {if reportsystem.name = homesystem.name:\r\n Welcome home, {F(\"Honorific\")}\r\n |else:\r\n {set scoopables to [\"O\", \"B\", \"A\", \"F\", \"G\", \"K\", \"M\"]}\r\n {if slice(event.stellarclass, 0, 1) = \"D\":\r\n Caution: white dwarf detected.\r\n |elif event.stellarclass = \"N\":\r\n Caution: neutron star detected.\r\n |elif event.stellarclass = \"H\":\r\n Caution: black hole detected.\r\n |elif find(scoopables, event.stellarclass) = -1:\r\n {Occasionally(2, \"Information: \")}\r\n Arrival star is not scoopable.\r\n }\r\n \r\n {if lastsystem.allegiance && lastsystem.allegiance != \"None\" && lastsystem.allegiance != \"Independent\" && (!reportsystem.allegiance || reportsystem.allegiance = \"None\" || reportsystem.allegiance = \"Independent\"):\r\n You {OneOf(\"are leaving\", \"have left\", \"are no longer in\")} {lastsystem.allegiance} space.\r\n |elif lastsystem.allegiance && lastsystem.allegiance != reportsystem.allegiance && system.allegiance && system.allegiance != \"None\":\r\n You {OneOf(\"are now in\", \"have entered\", \"are entering\")} {reportsystem.allegiance} space.\r\n {if cmdr.title != \"Commander\":\r\n Welcome back {F(\"Honorific\")}.\r\n }\r\n }\r\n\r\n {if reportsystem.visits = 0:\r\n This is your first visit to this system.\r\n |elif reportsystem.visits = 1:\r\n This is your second visit to this system.\r\n |elif reportsystem.visits = 2:\r\n {Occasionally(2, \"This is your third visit to this system.\")}\r\n |elif reportsystem.visits = 3:\r\n {Occasionally(2, \"This is your fourth visit to this system.\")}\r\n |else:\r\n {Occasionally(3, \"You have visited this system {reportsystem.visits} times.\")}\r\n }\r\n\r\n {if !reportsystem.population && lastsystem.population:\r\n {OneOf(\"This system is not populated\",\"There is no human presence here\", \"Humans have yet to colonise this system\")}.\r\n |elif reportsystem.population:\r\n {if SecondsSince(reportsystem.lastVisitSeconds) > 3600:\r\n {F(\"System report\")}\r\n }\r\n }\r\n\r\n {if reportsystem.distancefromhome:\r\n {set ReportDistanceFromHome() to:\r\n \t{return cat(\r\n \t OneOf(\"You are\", \"Current location is\", \"You are now\"), \" \",\r\n\t Humanise(reportsystem.distancefromhome), \" lightyears from \",\r\n\t OneOf(\"home\", \"{P(homesystem.name, 'starsystem')}\"), \".\"\r\n\t )}\r\n } \r\n {Occasionally(7, ReportDistanceFromHome())}\r\n }\r\n\r\n {if reportsystem.comment:\r\n You made a {OneOf(\"note\", \"comment\", \"remark\")} {OneOf(\"about\", \"for\", \"on\")} this system. It {OneOf(\"is as follows\", \"says\", \"reads\", \"is\")} {reportsystem.comment}.\r\n }\r\n }\r\n}", | |
"default": true | |
}, | |
"Fuel check": { | |
"name": "Fuel check", | |
"description": "Report on fuel levels", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fuel Check _}\r\n{_ Report fuel level _}\r\n\r\n{_ Might be a taxi or multicrew session. We ignore those. We only want this when we're in our own ship. }\r\n{if vehicle = \"Ship\":\r\n\r\n {for compartment in ship.compartments:\r\n {if compartment.module.basename = \"FuelScoop\": \r\n {set scoop_present to true}\r\n }\r\n }\r\n\r\n {set shipsfuel to:\r\n Fuel {OneOf(\"levels\", \"tanks\", \"reserves\")}\r\n {Occasionally(2, \"are\")} {Occasionally(2, \"now\")}\r\n }\r\n\r\n {set currentfuel to round(status.fuel_percent, 0)}\r\n {set currentpercent to:\r\n at {currentfuel} percent {Occasionally(2, \"capacity\")}\r\n }\r\n\r\n {set title to Occasionally(3,\", {F('Honorific')}\")}\r\n\r\n {set maxjump to status.fuel/ship.maxfuel}\r\n\r\n {if state.eddi_context_last_subject = \"jump\" && state.eddi_context_last_action = \"complete\" && maxjump < 1.25:\r\n Warning: {shipsfuel} almost depleted.\r\n {Pause(500)}\r\n\r\n {if scoop_present:\r\n {if system.scoopable:\r\n {set scoop_system to system.systemname}\r\n |else:\r\n {set detail to JumpDetails('total')}\r\n {set scoop_system to RouteDetails('scoop', detail.distance)}\r\n {set scoop_distance to Distance(scoop_system)}\r\n }\r\n\r\n {if scoop_system && scoop_system != \"\":\r\n Your nearest scoopable \r\n {if scoop_system = system.name:\r\n {set scoopable_bodies to []}\r\n {for body in reportSystem.bodies:\r\n {if body.scoopable:\r\n {set scoopable_bodies to cat(scoopable_bodies, [P(body.shortname, \"body\")])}\r\n }\r\n }\r\n {if len(scoopable_bodies) > 1:\r\n stars are: \r\n {List(scoopable_bodies)}\r\n |else:\r\n star is:\r\n {scoopable_bodies[0]}\r\n }\r\n {Pause(50)}\r\n in the current system.\r\n |else:\r\n star is in the {P(scoop_system, \"starsystem\")} system, {round(scoop_distance, 1)} lightyears away.\r\n }\r\n {Pause(500)}\r\n {if maxjump < 0.5:\r\n {Occasionally(2, \"Fuel\")} scooping is extremely urgent {title}.\r\n |else:\r\n {Occasionally(2, \"Fuel\")} scooping is strongly recommended {title}.\r\n }\r\n |else:\r\n Danger: There are no scoopable stars within your current jump range.\r\n {Pause(500)}\r\n Shutdown of non-essential systems is advised!\r\n {Pause(500)}\r\n Emergency transponder standing by {title}.\r\n }\r\n |else:\r\n {if maxjump < 0.5:\r\n {OneOf(\"Refuel now\", \"Refuelling is extremely urgent\")} {title}.\r\n |else:\r\n {OneOf(\"Please refuel\", \"Refuelling is strongly recommended\")} {title}.\r\n }\r\n }\r\n |elif currentfuel < 25:\r\n {OneOf(\"Warning:\", \"Caution:\", \"Attention:\")}\r\n {shipsfuel} {OneOf(\"below 25%\", \"{currentpercent}\" )} {title}.\r\n |elif currentfuel < 50:\r\n {shipsfuel} {OneOf(\"below 50%\", \"{currentpercent}\" )} {title}.\r\n |elif currentfuel < 75:\r\n {Occasionally(2, \"{shipsfuel} {currentpercent} {title}.\")}\r\n |elif currentfuel < 100:\r\n {Occasionally(3, \"{shipsfuel} {currentpercent} {title}.\")}\r\n |else:\r\n {ShipName()} {shipsfuel} {OneOf(currentpercent, \"at maximum\")} {title}.\r\n }\r\n}", | |
"defaultValue": "{_ Fuel Check _}\r\n{_ Report fuel level _}\r\n\r\n{_ Might be a taxi or multicrew session. We ignore those. We only want this when we're in our own ship. }\r\n{if vehicle = \"Ship\":\r\n\r\n {for compartment in ship.compartments:\r\n {if compartment.module.basename = \"FuelScoop\": \r\n {set scoop_present to true}\r\n }\r\n }\r\n\r\n {set shipsfuel to:\r\n Fuel {OneOf(\"levels\", \"tanks\", \"reserves\")}\r\n {Occasionally(2, \"are\")} {Occasionally(2, \"now\")}\r\n }\r\n\r\n {set currentfuel to round(status.fuel_percent, 0)}\r\n {set currentpercent to:\r\n at {currentfuel} percent {Occasionally(2, \"capacity\")}\r\n }\r\n\r\n {set title to Occasionally(3,\", {F('Honorific')}\")}\r\n\r\n {set maxjump to status.fuel/ship.maxfuel}\r\n\r\n {if state.eddi_context_last_subject = \"jump\" && state.eddi_context_last_action = \"complete\" && maxjump < 1.25:\r\n Warning: {shipsfuel} almost depleted.\r\n {Pause(500)}\r\n\r\n {if scoop_present:\r\n {if system.scoopable:\r\n {set scoop_system to system.systemname}\r\n |else:\r\n {set detail to JumpDetails('total')}\r\n {set scoop_system to RouteDetails('scoop', detail.distance)}\r\n {set scoop_distance to Distance(scoop_system)}\r\n }\r\n\r\n {if scoop_system && scoop_system != \"\":\r\n Your nearest scoopable \r\n {if scoop_system = system.name:\r\n {set scoopable_bodies to []}\r\n {for body in reportSystem.bodies:\r\n {if body.scoopable:\r\n {set scoopable_bodies to cat(scoopable_bodies, [P(body.shortname, \"body\")])}\r\n }\r\n }\r\n {if len(scoopable_bodies) > 1:\r\n stars are: \r\n {List(scoopable_bodies)}\r\n |else:\r\n star is:\r\n {scoopable_bodies[0]}\r\n }\r\n {Pause(50)}\r\n in the current system.\r\n |else:\r\n star is in the {P(scoop_system, \"starsystem\")} system, {round(scoop_distance, 1)} lightyears away.\r\n }\r\n {Pause(500)}\r\n {if maxjump < 0.5:\r\n {Occasionally(2, \"Fuel\")} scooping is extremely urgent {title}.\r\n |else:\r\n {Occasionally(2, \"Fuel\")} scooping is strongly recommended {title}.\r\n }\r\n |else:\r\n Danger: There are no scoopable stars within your current jump range.\r\n {Pause(500)}\r\n Shutdown of non-essential systems is advised!\r\n {Pause(500)}\r\n Emergency transponder standing by {title}.\r\n }\r\n |else:\r\n {if maxjump < 0.5:\r\n {OneOf(\"Refuel now\", \"Refuelling is extremely urgent\")} {title}.\r\n |else:\r\n {OneOf(\"Please refuel\", \"Refuelling is strongly recommended\")} {title}.\r\n }\r\n }\r\n |elif currentfuel < 25:\r\n {OneOf(\"Warning:\", \"Caution:\", \"Attention:\")}\r\n {shipsfuel} {OneOf(\"below 25%\", \"{currentpercent}\" )} {title}.\r\n |elif currentfuel < 50:\r\n {shipsfuel} {OneOf(\"below 50%\", \"{currentpercent}\" )} {title}.\r\n |elif currentfuel < 75:\r\n {Occasionally(2, \"{shipsfuel} {currentpercent} {title}.\")}\r\n |elif currentfuel < 100:\r\n {Occasionally(3, \"{shipsfuel} {currentpercent} {title}.\")}\r\n |else:\r\n {ShipName()} {shipsfuel} {OneOf(currentpercent, \"at maximum\")} {title}.\r\n }\r\n}", | |
"default": true | |
}, | |
"Galnet latest news": { | |
"name": "Galnet latest news", | |
"description": "Read the latest unread news in a given category", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch category from state }\r\n{set articlecategory to state.article_category}\r\n\r\n{if articlecategory:\r\n {set articles to GalnetNewsArticles(articlecategory)}\r\n|else:\r\n {set articles to GalnetNewsArticles('Article')}\r\n}\r\n\r\n{if len(articles) = 0:\r\n There is no unread news in that category\r\n|else:\r\n {set article to articles[0]}\r\n {SetState('eddi_context_galnet_news_id', article.id)}\r\n {article.title}: {article.content}\r\n {GalnetNewsMarkRead(article.id)}\r\n}.\r\n", | |
"defaultValue": "{_ Fetch category from state }\r\n{set articlecategory to state.article_category}\r\n\r\n{if articlecategory:\r\n {set articles to GalnetNewsArticles(articlecategory)}\r\n|else:\r\n {set articles to GalnetNewsArticles('Article')}\r\n}\r\n\r\n{if len(articles) = 0:\r\n There is no unread news in that category\r\n|else:\r\n {set article to articles[0]}\r\n {SetState('eddi_context_galnet_news_id', article.id)}\r\n {article.title}: {article.content}\r\n {GalnetNewsMarkRead(article.id)}\r\n}.\r\n", | |
"default": true | |
}, | |
"Galnet mark read": { | |
"name": "Galnet mark read", | |
"description": "Mark news articles as read", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch category from state }\r\n{set articlecategory to state.article_category}\r\n\r\n{if articlecategory:\r\n {set articles to GalnetNewsArticles(articlecategory)}\r\n|else:\r\n {set articles to GalnetNewsArticles('Article')}\r\n}\r\n\r\n{if len(articles) = 0:\r\n There is no unread news \r\n {if articlecategory: 'in that category' }\r\n|else:\r\n {set item to 0}\r\n {while item < len(articles):\r\n {GalnetNewsMarkRead(articles[item].id)}\r\n {set item to (item + 1)}\r\n }\r\n {len(articles)} news {OneOf('articles', 'items')} marked as red\r\n}.\r\n", | |
"defaultValue": "{_ Fetch category from state }\r\n{set articlecategory to state.article_category}\r\n\r\n{if articlecategory:\r\n {set articles to GalnetNewsArticles(articlecategory)}\r\n|else:\r\n {set articles to GalnetNewsArticles('Article')}\r\n}\r\n\r\n{if len(articles) = 0:\r\n There is no unread news \r\n {if articlecategory: 'in that category' }\r\n|else:\r\n {set item to 0}\r\n {while item < len(articles):\r\n {GalnetNewsMarkRead(articles[item].id)}\r\n {set item to (item + 1)}\r\n }\r\n {len(articles)} news {OneOf('articles', 'items')} marked as red\r\n}.\r\n", | |
"default": true | |
}, | |
"Galnet news": { | |
"name": "Galnet news", | |
"description": "Read a particular news article", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch article from state }\r\n{set articleid to state.articleid}\r\n{if articleid:\r\n {set article to GalnetNews(articleid)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'news')}\r\n {SetState('eddi_context_galnet_news_id', articleid)}\r\n}\r\n\r\n{if !article:\r\n {_ Fetch from context }\r\n {set article to GalnetNews(state.eddi_context_galnet_news_id)}\r\n}\r\n\r\n{if article:\r\n {article.title}: {article.content}\r\n {GalnetNewsMarkRead(article.id)}\r\n|else:\r\n I don't have any information about that article\r\n}.", | |
"defaultValue": "{_ Fetch article from state }\r\n{set articleid to state.articleid}\r\n{if articleid:\r\n {set article to GalnetNews(articleid)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'news')}\r\n {SetState('eddi_context_galnet_news_id', articleid)}\r\n}\r\n\r\n{if !article:\r\n {_ Fetch from context }\r\n {set article to GalnetNews(state.eddi_context_galnet_news_id)}\r\n}\r\n\r\n{if article:\r\n {article.title}: {article.content}\r\n {GalnetNewsMarkRead(article.id)}\r\n|else:\r\n I don't have any information about that article\r\n}.", | |
"default": true | |
}, | |
"Galnet news published": { | |
"name": "Galnet news published", | |
"description": "Triggered when news is published on Galnet", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ set to 1 if you'd like interesting articles to be read to you _}\r\n{set readArticles to 0} \r\n\r\n{_ define news categories that may be of interest to you _}\r\n{_ Valid categories: Article, Powerplay, Community Goal, Starport Status Update, Week in Review _}\r\n{set categories to [\r\n \"Article\",\r\n \"Community Goal\",\r\n]}\r\n\r\n{_ Process articles _}\r\n{set interesting_news_title to []}\r\n{set interesting_news_content to []}\r\n\r\n{set item to 0}\r\n{while item < len(event.items):\r\n {for category in categories:\r\n {if match(event.items[item].category, category):\r\n {set interesting_news_title to cat(interesting_news_title, [event.items[item].title])}\r\n {set interesting_news_content to cat(interesting_news_content, [event.items[item].content])}\r\n }\r\n {GalnetNewsMarkRead(event.items[item].content.id)}\r\n {set item to (item + 1)}\r\n }\r\n}\r\n{if len(event.items) = len(interesting_news_title): \r\n {set allinteresting to 1} \r\n}\r\n\r\n{_ Begin speaking _}\r\n\r\n{if len(interesting_news_title) > 0:\r\n {if len(interesting_news_title) = 1:\r\n {set remarkable to OneOf('A noteworthy', 'A remarkable', 'An interesting', 'An intriguing', 'An unusual')}\r\n {OneOf('A', '{remarkable}' )}\r\n new Galnet article has been published, entitled {interesting_news_title[0]}.\r\n |elif len(event.items) > 1:\r\n {len(event.items)} \r\n {if allinteresting: \r\n {OneOf(\"noteworthy\", \"interesting\", \"intriguing\", \"remarkable\", \"unusual\")}\r\n }\r\n new Galnet articles have been published\r\n {if !allinteresting:\r\n , including {len(interesting_news_title)} \r\n {OneOf('of interest', 'of note', 'worthy of remark')}\r\n }.\r\n }\r\n}\r\n\r\n{if len(interesting_news_title) > 0:\r\n {if len(interesting_news_title) = 1 && readArticles:\r\n It reads: {interesting_news_content[0]}.\r\n |elif len(interesting_news_title) > 1:\r\n {set item to 0}\r\n {while item < len(interesting_news_title):\r\n {if item = 0:\r\n The first \r\n is entitled {interesting_news_title[item]}\r\n {if readArticles:, and reads: {interesting_news_content[item]}}.\r\n |elif item = 1:\r\n The second\r\n is entitled {interesting_news_title[item]}\r\n {if readArticles:, and reads: {interesting_news_content[item]}}.\r\n |elif item = len(interesting_news_title) - 1:\r\n The last\r\n is entitled {interesting_news_title[item]}\r\n {if readArticles:, and reads: {interesting_news_content[item]}}.\r\n |else:\r\n The next\r\n is entitled {interesting_news_title[item]}\r\n {if readArticles:, and reads: {interesting_news_content[item]}}.\r\n }\r\n {set item to item + 1}\r\n }\r\n }\r\n {if !readArticles:\r\n {Pause(500)}\r\n The \r\n {if len(interesting_news_title) > 1: \r\n {OneOf(\"audio recordings\", \"news reports\")} are \r\n |else: \r\n {OneOf(\"audio recording\", \"news report\")} is\r\n } \r\n ready {Occasionally(2, \"for playback\")}.\r\n }\r\n}", | |
"defaultValue": "{_ set to 1 if you'd like interesting articles to be read to you _}\r\n{set readArticles to 0} \r\n\r\n{_ define news categories that may be of interest to you _}\r\n{_ Valid categories: Article, Powerplay, Community Goal, Starport Status Update, Week in Review _}\r\n{set categories to [\r\n \"Article\",\r\n \"Community Goal\",\r\n]}\r\n\r\n{_ Process articles _}\r\n{set interesting_news_title to []}\r\n{set interesting_news_content to []}\r\n\r\n{set item to 0}\r\n{while item < len(event.items):\r\n {for category in categories:\r\n {if match(event.items[item].category, category):\r\n {set interesting_news_title to cat(interesting_news_title, [event.items[item].title])}\r\n {set interesting_news_content to cat(interesting_news_content, [event.items[item].content])}\r\n }\r\n {GalnetNewsMarkRead(event.items[item].content.id)}\r\n {set item to (item + 1)}\r\n }\r\n}\r\n{if len(event.items) = len(interesting_news_title): \r\n {set allinteresting to 1} \r\n}\r\n\r\n{_ Begin speaking _}\r\n\r\n{if len(interesting_news_title) > 0:\r\n {if len(interesting_news_title) = 1:\r\n {set remarkable to OneOf('A noteworthy', 'A remarkable', 'An interesting', 'An intriguing', 'An unusual')}\r\n {OneOf('A', '{remarkable}' )}\r\n new Galnet article has been published, entitled {interesting_news_title[0]}.\r\n |elif len(event.items) > 1:\r\n {len(event.items)} \r\n {if allinteresting: \r\n {OneOf(\"noteworthy\", \"interesting\", \"intriguing\", \"remarkable\", \"unusual\")}\r\n }\r\n new Galnet articles have been published\r\n {if !allinteresting:\r\n , including {len(interesting_news_title)} \r\n {OneOf('of interest', 'of note', 'worthy of remark')}\r\n }.\r\n }\r\n}\r\n\r\n{if len(interesting_news_title) > 0:\r\n {if len(interesting_news_title) = 1 && readArticles:\r\n It reads: {interesting_news_content[0]}.\r\n |elif len(interesting_news_title) > 1:\r\n {set item to 0}\r\n {while item < len(interesting_news_title):\r\n {if item = 0:\r\n The first \r\n is entitled {interesting_news_title[item]}\r\n {if readArticles:, and reads: {interesting_news_content[item]}}.\r\n |elif item = 1:\r\n The second\r\n is entitled {interesting_news_title[item]}\r\n {if readArticles:, and reads: {interesting_news_content[item]}}.\r\n |elif item = len(interesting_news_title) - 1:\r\n The last\r\n is entitled {interesting_news_title[item]}\r\n {if readArticles:, and reads: {interesting_news_content[item]}}.\r\n |else:\r\n The next\r\n is entitled {interesting_news_title[item]}\r\n {if readArticles:, and reads: {interesting_news_content[item]}}.\r\n }\r\n {set item to item + 1}\r\n }\r\n }\r\n {if !readArticles:\r\n {Pause(500)}\r\n The \r\n {if len(interesting_news_title) > 1: \r\n {OneOf(\"audio recordings\", \"news reports\")} are \r\n |else: \r\n {OneOf(\"audio recording\", \"news report\")} is\r\n } \r\n ready {Occasionally(2, \"for playback\")}.\r\n }\r\n}", | |
"default": true | |
}, | |
"Galnet oldest news": { | |
"name": "Galnet oldest news", | |
"description": "Read the oldest unread news in a given category", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch category from state }\r\n{set articlecategory to state.article_category}\r\n\r\n{if articlecategory:\r\n {set articles to GalnetNewsArticles(articlecategory)}\r\n|else:\r\n {set articles to GalnetNewsArticles('Article')}\r\n}\r\n\r\n{if len(articles) = 0:\r\n There is no unread news in that category\r\n|else:\r\n {set article to articles[len(articles)-1]}\r\n {SetState('eddi_context_galnet_news_id', article.id)}\r\n {article.title}: {article.content}\r\n {GalnetNewsMarkRead(article.id)}\r\n}.\r\n", | |
"defaultValue": "{_ Fetch category from state }\r\n{set articlecategory to state.article_category}\r\n\r\n{if articlecategory:\r\n {set articles to GalnetNewsArticles(articlecategory)}\r\n|else:\r\n {set articles to GalnetNewsArticles('Article')}\r\n}\r\n\r\n{if len(articles) = 0:\r\n There is no unread news in that category\r\n|else:\r\n {set article to articles[len(articles)-1]}\r\n {SetState('eddi_context_galnet_news_id', article.id)}\r\n {article.title}: {article.content}\r\n {GalnetNewsMarkRead(article.id)}\r\n}.\r\n", | |
"default": true | |
}, | |
"Galnet unread report": { | |
"name": "Galnet unread report", | |
"description": "Report on unread news", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{set articles to GalnetNewsArticles(\"Article\")}\r\n\r\n{if len(articles) = 0:\r\n You have no unread news\r\n|elif len(articles) = 1:\r\n You have one unread news item\r\n|else:\r\n You have {len(articles)} unread news items\r\n}.", | |
"defaultValue": "{set articles to GalnetNewsArticles(\"Article\")}\r\n\r\n{if len(articles) = 0:\r\n You have no unread news\r\n|elif len(articles) = 1:\r\n You have one unread news item\r\n|else:\r\n You have {len(articles)} unread news items\r\n}.", | |
"default": true | |
}, | |
"Glide": { | |
"name": "Glide", | |
"description": "Triggered when your ship enters or exits glide", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fsd')}\r\n{SetState('eddi_context_last_action', 'glide')}\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_body_name', event.body)}\r\n{SetState('eddi_context_body_system', event.system)}\r\n\r\n{if event.gliding:\r\n Glide {Occasionally(2, \"mode\")} \r\n {OneOf(\"engaged.\", \"initiated.\")}\r\n\r\n {Pause(1000)}\r\n {set body to BodyDetails(event.body, event.system)}\r\n {if !body.name || body.name = \"\" || !body.gravity:\r\n Planetary approach data not available.\r\n |else:\r\n {if body.landable:\r\n {set gravity to round(body.gravity,2)}\r\n {if gravity > 4:\r\n Danger! {body.bodytype} {P(body.shortname, \"body\")} is an extremely high gravity world, at {gravity} G.\r\n |elif gravity > 2:\r\n Caution! {body.bodytype} {P(body.shortname, \"body\")} is a high gravity world, at {gravity} G.\r\n |elif gravity > 0.5:\r\n Warning! {body.bodytype} {P(body.shortname, \"body\")} is a medium gravity world, at {gravity} G.\r\n |else:\r\n {body.bodytype} {P(body.shortname, \"body\")} is a low gravity world, at {gravity} G.\r\n }\r\n }\r\n }\r\n|else:\r\n Glide completed.\r\n}", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'fsd')}\r\n{SetState('eddi_context_last_action', 'glide')}\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_body_name', event.body)}\r\n{SetState('eddi_context_body_system', event.system)}\r\n\r\n{if event.gliding:\r\n Glide {Occasionally(2, \"mode\")} \r\n {OneOf(\"engaged.\", \"initiated.\")}\r\n\r\n {Pause(1000)}\r\n {set body to BodyDetails(event.body, event.system)}\r\n {if !body.name || body.name = \"\" || !body.gravity:\r\n Planetary approach data not available.\r\n |else:\r\n {if body.landable:\r\n {set gravity to round(body.gravity,2)}\r\n {if gravity > 4:\r\n Danger! {body.bodytype} {P(body.shortname, \"body\")} is an extremely high gravity world, at {gravity} G.\r\n |elif gravity > 2:\r\n Caution! {body.bodytype} {P(body.shortname, \"body\")} is a high gravity world, at {gravity} G.\r\n |elif gravity > 0.5:\r\n Warning! {body.bodytype} {P(body.shortname, \"body\")} is a medium gravity world, at {gravity} G.\r\n |else:\r\n {body.bodytype} {P(body.shortname, \"body\")} is a low gravity world, at {gravity} G.\r\n }\r\n }\r\n }\r\n|else:\r\n Glide completed.\r\n}", | |
"default": true | |
}, | |
"Hardpoints": { | |
"name": "Hardpoints", | |
"description": "Triggered when you deploy or retract your hardpoints", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Heat damage": { | |
"name": "Heat damage", | |
"description": "Triggered when your ship is taking damage from excessive heat", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{Occasionally(2, \"Danger:\")}\r\nHeat damage.", | |
"defaultValue": "{Occasionally(2, \"Danger:\")}\r\nHeat damage.", | |
"default": true | |
}, | |
"Heat warning": { | |
"name": "Heat warning", | |
"description": "Triggered when your ship's heat exceeds 100%", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{Occasionally(2, \"Warning:\")}\r\nHeat levels beyond operating tolerance.", | |
"defaultValue": "{Occasionally(2, \"Warning:\")}\r\nHeat levels beyond operating tolerance.", | |
"default": true | |
}, | |
"Honorific": { | |
"name": "Honorific", | |
"description": "Function to provide a suitable honorific for your commander", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{if system.allegiance = \"Empire\":\r\n {F(\"Empire honorific\")}\r\n|elif system.allegiance = \"Federation\":\r\n {if cmdr.federationrating.rank = 0:\r\n commander\r\n |else:\r\n {cmdr.federationrating.name}\r\n }\r\n|else:\r\n commander\r\n}\r\n", | |
"defaultValue": "{if system.allegiance = \"Empire\":\r\n {F(\"Empire honorific\")}\r\n|elif system.allegiance = \"Federation\":\r\n {if cmdr.federationrating.rank = 0:\r\n commander\r\n |else:\r\n {cmdr.federationrating.name}\r\n }\r\n|else:\r\n commander\r\n}\r\n", | |
"default": true | |
}, | |
"Hull damaged": { | |
"name": "Hull damaged", | |
"description": "Triggered when your hull is damaged to a certain extent", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if event.vehicle = vehicle:\r\n {if event.health < 40:\r\n Danger:\r\n |elif event.health < 60:\r\n Warning:\r\n |elif event.health < 80:\r\n Caution:\r\n }\r\n {OneOf(\"Hull\", \"Hull integrity\", \"Integrity\", \"Structural integrity\")} {Occasionally(3, \"is\")} at {event.health}%.\r\n}\r\n", | |
"defaultValue": "{if event.vehicle = vehicle:\r\n {if event.health < 40:\r\n Danger:\r\n |elif event.health < 60:\r\n Warning:\r\n |elif event.health < 80:\r\n Caution:\r\n }\r\n {OneOf(\"Hull\", \"Hull integrity\", \"Integrity\", \"Structural integrity\")} {Occasionally(3, \"is\")} at {event.health}%.\r\n}\r\n", | |
"default": true | |
}, | |
"Insurance check": { | |
"name": "Insurance check", | |
"description": "Check for enough credits to cover your insurance", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{set covereds to floor(cmdr.credits / ship.rebuy)}\r\n\r\n{if covereds = 0:\r\n Danger: you do not have enough credits to cover your insurance excess.\r\n|elif covereds = 1:\r\n Caution: you only have enough credits to cover a single insurance excess.\r\n|elif covereds < 4:\r\n Note: you only have enough credits to cover {covereds} insurance excesses.\r\n|else:\r\n {Occasionally(5, \"You have enough credits to cover {covereds} insurance excesses.\")}\r\n}\r\n", | |
"defaultValue": "{set covereds to floor(cmdr.credits / ship.rebuy)}\r\n\r\n{if covereds = 0:\r\n Danger: you do not have enough credits to cover your insurance excess.\r\n|elif covereds = 1:\r\n Caution: you only have enough credits to cover a single insurance excess.\r\n|elif covereds < 4:\r\n Note: you only have enough credits to cover {covereds} insurance excesses.\r\n|else:\r\n {Occasionally(5, \"You have enough credits to cover {covereds} insurance excesses.\")}\r\n}\r\n", | |
"default": true | |
}, | |
"Jet cone boost": { | |
"name": "Jet cone boost", | |
"description": "Triggered when enough material has been collected from a solar jet cone (at a white dwarf or neutron star) for a jump boost", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{Pause(1000)}\r\nFrame shift drive boosted by {Humanise(event.boost * 100)} percent.\r\n{SetState('eddi_boost_budget', state.eddi_boost_budget+1)}\r\n{if state.eddi_boost_budget >= 15:\r\n\tYou have performed {state.eddi_boost_budget} neutron boosts since last fsd repair.\r\n}", | |
"defaultValue": "{Pause(1000)}\r\nFrame shift drive boosted by {Humanise(event.boost * 100)} percent.", | |
"default": false | |
}, | |
"Jet cone damage": { | |
"name": "Jet cone damage", | |
"description": "Triggered in normal space when passing through the jet cone from a white dwarf or neutron star causes damage to a ship module", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Jumped": { | |
"name": "Jumped", | |
"description": "Triggered when you complete a jump to another system", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Jumped }\r\n{_ Triggered when you complete a jump to another system }\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'jump')}\r\n{SetState('eddi_context_last_action', 'complete')}\r\n{SetState('eddi_context_system_name', system.name)}\r\n{SetState('eddi_context_system_system', system.name)}\r\n{SetState('eddi_context_fuel_remaining', event.fuelremaining)}\r\n{SetState('eddi_context_fuel_used', event.fuelused)}\r\n{SetState('eddi_context_wanted_list', \"\")}\r\n\r\n{set jump_count to state.eddi_context_remaining_jumps}\r\n{if jump_count > 20:\r\n {set occasional to ceil(jump_count / 10)}\r\n|elif jump_count > 5:\r\n {set occasional to 2}\r\n|else:\r\n {set occasional to 1}\r\n}\r\n\r\n{if destinationsystem && destinationsystem.name != \"\":\r\n {if destinationdistance = 0:\r\n {ShipName()} has arrived at the {P(destinationsystem.name, \"starsystem\")} system.\r\n {Pause(1000)}\r\n {set next_system to RouteDetails(\"update\")}\r\n |else:\r\n {if rand(occasional) = 0:\r\n Distance to {P(destinationsystem.name, \"starsystem\")} is {round(destinationdistance, 1)} light years\r\n {if jump_count > 0:\r\n , with {jump_count} {if jump_count = 1: jump |else: jumps}\r\n {OneOf(\"remaining\", \"left\", \"to go\")}\r\n }.\r\n }\r\n }\r\n|else:\r\n {if jump_count > 0 && rand(occasional) = 0:\r\n {Occasionally(2, \"You have\")} {jump_count} {if jump_count = 1: jump |else: jumps} \r\n {OneOf(\"remaining\", \"left\", \"to go\", \"until arrival\")}.\r\n }\r\n}\r\n\r\n{F('Fuel check')}\r\n{if 0: {F('Damage check')} }\r\n{_ Report faction states only if it's been more than an hour (3600 seconds) since our last visit. _}\r\n{if SecondsSince(state.eddi_context_system_lastvisit) / 3600 > 1:\r\n {set state_report to F(\"System state report\")}\r\n}\r\n\r\n{set system_engineer to F(\"Engineer report\")}\r\n{set system_missions to F(\"Mission check system\")}\r\n{set system_crimes to F(\"Crime check system\")}\r\n\r\n{if state_report || system_engineer || system_missions || (system_crimes && find(system_crimes, \"Warning\") < 0):\r\n {Pause(500)}\r\n Information:\r\n}\r\n\r\n{if state_report:\r\n {Pause(500)}\r\n {state_report}\r\n}\r\n{if system_engineer:\r\n {Pause(500)}\r\n {system_engineer}\r\n}\r\n{if system_missions:\r\n {Pause(500)}\r\n {system_missions}\r\n}\r\n{if system_crimes:\r\n {Pause(500)}\r\n {system_crimes}\r\n}\r\n", | |
"defaultValue": "{_ Jumped }\r\n{_ Triggered when you complete a jump to another system }\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'jump')}\r\n{SetState('eddi_context_last_action', 'complete')}\r\n{SetState('eddi_context_system_name', system.name)}\r\n{SetState('eddi_context_system_system', system.name)}\r\n{SetState('eddi_context_fuel_remaining', event.fuelremaining)}\r\n{SetState('eddi_context_fuel_used', event.fuelused)}\r\n{SetState('eddi_context_wanted_list', \"\")}\r\n\r\n{set jump_count to state.eddi_context_remaining_jumps}\r\n{if jump_count > 20:\r\n {set occasional to ceil(jump_count / 10)}\r\n|elif jump_count > 5:\r\n {set occasional to 2}\r\n|else:\r\n {set occasional to 1}\r\n}\r\n\r\n{if destinationsystem && destinationsystem.name != \"\":\r\n {if destinationdistance = 0:\r\n {ShipName()} has arrived at the {P(destinationsystem.name, \"starsystem\")} system.\r\n {Pause(1000)}\r\n {set next_system to RouteDetails(\"update\")}\r\n |else:\r\n {if rand(occasional) = 0:\r\n Distance to {P(destinationsystem.name, \"starsystem\")} is {round(destinationdistance, 1)} light years\r\n {if jump_count > 0:\r\n , with {jump_count} {if jump_count = 1: jump |else: jumps}\r\n {OneOf(\"remaining\", \"left\", \"to go\")}\r\n }.\r\n }\r\n }\r\n|else:\r\n {if jump_count > 0 && rand(occasional) = 0:\r\n {Occasionally(2, \"You have\")} {jump_count} {if jump_count = 1: jump |else: jumps} \r\n {OneOf(\"remaining\", \"left\", \"to go\", \"until arrival\")}.\r\n }\r\n}\r\n\r\n{F('Fuel check')}\r\n\r\n{_ Report faction states only if it's been more than an hour (3600 seconds) since our last visit. _}\r\n{if SecondsSince(state.eddi_context_system_lastvisit) / 3600 > 1:\r\n {set state_report to F(\"System state report\")}\r\n}\r\n\r\n{set system_engineer to F(\"Engineer report\")}\r\n{set system_missions to F(\"Mission check system\")}\r\n{set system_crimes to F(\"Crime check system\")}\r\n\r\n{if state_report || system_engineer || system_missions || (system_crimes && find(system_crimes, \"Warning\") < 0):\r\n {Pause(500)}\r\n Information:\r\n}\r\n\r\n{if state_report:\r\n {Pause(500)}\r\n {state_report}\r\n}\r\n{if system_engineer:\r\n {Pause(500)}\r\n {system_engineer}\r\n}\r\n{if system_missions:\r\n {Pause(500)}\r\n {system_missions}\r\n}\r\n{if system_crimes:\r\n {Pause(500)}\r\n {system_crimes}\r\n}\r\n", | |
"default": false | |
}, | |
"Killed": { | |
"name": "Killed", | |
"description": "Triggered when you kill another player", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Landing gear": { | |
"name": "Landing gear", | |
"description": "Triggered when you deploy or retract your landing gear", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Landing pad report": { | |
"name": "Landing pad report", | |
"description": "Report on the location of a landing pad", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{set landingpad to state.eddi_context_landing_pad_pad}\r\nLanding pad {landingpad} is at\r\n{if landingpad = 1:\r\n six o'clock near\r\n|elif landingpad = 2:\r\n six o'clock near\r\n|elif landingpad = 3:\r\n six o'clock far\r\n|elif landingpad = 4:\r\n six o'clock far\r\n|elif landingpad = 5:\r\n seven o'clock near\r\n|elif landingpad = 6:\r\n seven o'clock near\r\n|elif landingpad = 7:\r\n seven o'clock far\r\n|elif landingpad = 8:\r\n seven o'clock far\r\n|elif landingpad = 9:\r\n eight o'clock near\r\n|elif landingpad = 10:\r\n eight o'clock far\r\n|elif landingpad = 11:\r\n nine o'clock near\r\n|elif landingpad = 12:\r\n nine o'clock near\r\n|elif landingpad = 13:\r\n nine o'clock mid\r\n|elif landingpad = 14:\r\n nine o'clock far\r\n|elif landingpad = 15:\r\n nine o'clock far\r\n|elif landingpad = 16:\r\n ten o'clock near\r\n|elif landingpad = 17:\r\n ten o'clock near\r\n|elif landingpad = 18:\r\n ten o'clock far\r\n|elif landingpad = 19:\r\n ten o'clock far\r\n|elif landingpad = 20:\r\n eleven o'clock near\r\n|elif landingpad = 21:\r\n eleven o'clock near\r\n|elif landingpad = 22:\r\n eleven o'clock far\r\n|elif landingpad = 23:\r\n eleven o'clock far\r\n|elif landingpad = 24:\r\n twelve o'clock near\r\n|elif landingpad = 25:\r\n twelve o'clock far\r\n|elif landingpad = 26:\r\n one o'clock near\r\n|elif landingpad = 27:\r\n one o'clock near\r\n|elif landingpad = 28:\r\n one o'clock mid\r\n|elif landingpad = 29:\r\n one o'clock far\r\n|elif landingpad = 30:\r\n one o'clock far\r\n|elif landingpad = 31:\r\n two o'clock near\r\n|elif landingpad = 32:\r\n two o'clock near\r\n|elif landingpad = 33:\r\n two o'clock far\r\n|elif landingpad = 34:\r\n two o'clock far\r\n|elif landingpad = 35:\r\n three o'clock near\r\n|elif landingpad = 36:\r\n three o'clock near\r\n|elif landingpad = 37:\r\n three o'clock mid\r\n|elif landingpad = 38:\r\n three o'clock far\r\n|elif landingpad = 39:\r\n four o'clock near\r\n|elif landingpad = 40:\r\n four o'clock far\r\n|elif landingpad = 41:\r\n five o'clock near\r\n|elif landingpad = 42:\r\n five o'clock near\r\n|elif landingpad = 43:\r\n five o'clock mid\r\n|elif landingpad = 44:\r\n five o'clock far\r\n|elif landingpad = 45:\r\n five o'clock far\r\n}\r\n, as you enter with the green lights on your right.\r\n\r\n", | |
"defaultValue": "{set landingpad to state.eddi_context_landing_pad_pad}\r\nLanding pad {landingpad} is at\r\n{if landingpad = 1:\r\n six o'clock near\r\n|elif landingpad = 2:\r\n six o'clock near\r\n|elif landingpad = 3:\r\n six o'clock far\r\n|elif landingpad = 4:\r\n six o'clock far\r\n|elif landingpad = 5:\r\n seven o'clock near\r\n|elif landingpad = 6:\r\n seven o'clock near\r\n|elif landingpad = 7:\r\n seven o'clock far\r\n|elif landingpad = 8:\r\n seven o'clock far\r\n|elif landingpad = 9:\r\n eight o'clock near\r\n|elif landingpad = 10:\r\n eight o'clock far\r\n|elif landingpad = 11:\r\n nine o'clock near\r\n|elif landingpad = 12:\r\n nine o'clock near\r\n|elif landingpad = 13:\r\n nine o'clock mid\r\n|elif landingpad = 14:\r\n nine o'clock far\r\n|elif landingpad = 15:\r\n nine o'clock far\r\n|elif landingpad = 16:\r\n ten o'clock near\r\n|elif landingpad = 17:\r\n ten o'clock near\r\n|elif landingpad = 18:\r\n ten o'clock far\r\n|elif landingpad = 19:\r\n ten o'clock far\r\n|elif landingpad = 20:\r\n eleven o'clock near\r\n|elif landingpad = 21:\r\n eleven o'clock near\r\n|elif landingpad = 22:\r\n eleven o'clock far\r\n|elif landingpad = 23:\r\n eleven o'clock far\r\n|elif landingpad = 24:\r\n twelve o'clock near\r\n|elif landingpad = 25:\r\n twelve o'clock far\r\n|elif landingpad = 26:\r\n one o'clock near\r\n|elif landingpad = 27:\r\n one o'clock near\r\n|elif landingpad = 28:\r\n one o'clock mid\r\n|elif landingpad = 29:\r\n one o'clock far\r\n|elif landingpad = 30:\r\n one o'clock far\r\n|elif landingpad = 31:\r\n two o'clock near\r\n|elif landingpad = 32:\r\n two o'clock near\r\n|elif landingpad = 33:\r\n two o'clock far\r\n|elif landingpad = 34:\r\n two o'clock far\r\n|elif landingpad = 35:\r\n three o'clock near\r\n|elif landingpad = 36:\r\n three o'clock near\r\n|elif landingpad = 37:\r\n three o'clock mid\r\n|elif landingpad = 38:\r\n three o'clock far\r\n|elif landingpad = 39:\r\n four o'clock near\r\n|elif landingpad = 40:\r\n four o'clock far\r\n|elif landingpad = 41:\r\n five o'clock near\r\n|elif landingpad = 42:\r\n five o'clock near\r\n|elif landingpad = 43:\r\n five o'clock mid\r\n|elif landingpad = 44:\r\n five o'clock far\r\n|elif landingpad = 45:\r\n five o'clock far\r\n}\r\n, as you enter with the green lights on your right.\r\n\r\n", | |
"default": true | |
}, | |
"Launchbay report": { | |
"name": "Launchbay report", | |
"description": "Describes the contents of each launchbay in the ship", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{if capi_active:\r\n {if len(ship.launchbays) > 0:\r\n {set hanger_count to 0}\r\n {for launchbay in ship.launchbays:\r\n {set hangar to: \r\n size {launchbay.size} \r\n {if launchbay.type = \"SRV\": \r\n {Spacialise(launchbay.type)} hangar\r\n |else: \r\n {launchbay.type} hangar\r\n }\r\n }\r\n {set hangar_count to hangar_count + 1}\r\n {set vehicles to []}\r\n {set vehicles_count to []}\r\n {if len(launchbay.vehicles) > 0:\r\n {for vehicle in launchbay.vehicles:\r\n {set variant to cat(vehicle.name, \"_\", vehicle.description)}\r\n {set here to find(vehicles , variant)}\r\n {if here > -1:\r\n {set count to vehicles_count[here] + 1}\r\n {set vehicles_count to union(vehicles_count, [here:count])}\r\n |else:\r\n {set vehicles to cat(vehicles , [variant])}\r\n {set vehicles_count to cat(vehicles_count, [1])}\r\n }\r\n }\r\n }\r\n\r\n {if len(vehicles) > 0:\r\n {if hangar_count = 1: You have |else: and} a {hangar}, holding\r\n {set cur to 0}\r\n {while cur < len(vehicles):\r\n {set count to vehicles_count[cur]}\r\n {set name to split(vehicles[cur], \"_\")[0]}\r\n {set description to split(vehicles[cur], \"_\")[1]}\r\n {count} {if count = 1: {name} |else: {name}s}, with {description}\r\n {set cur to cur + 1}\r\n {if cur = len(vehicles)-1: and |elif cur < len(vehicles): ,}\r\n }\r\n |else:\r\n {if hangar_count = 1: You have |else: and} an empty {hangar}\r\n }\r\n {if hangar_count = len(ship.launchbays): . |else: ,}\r\n }\r\n }\r\n|else:\r\n Hangar status is not available.\r\n {Pause(500)}\r\n Please verify connection to the pilots federation database.\r\n}\r\n", | |
"defaultValue": "{if capi_active:\r\n {if len(ship.launchbays) > 0:\r\n {set hanger_count to 0}\r\n {for launchbay in ship.launchbays:\r\n {set hangar to: \r\n size {launchbay.size} \r\n {if launchbay.type = \"SRV\": \r\n {Spacialise(launchbay.type)} hangar\r\n |else: \r\n {launchbay.type} hangar\r\n }\r\n }\r\n {set hangar_count to hangar_count + 1}\r\n {set vehicles to []}\r\n {set vehicles_count to []}\r\n {if len(launchbay.vehicles) > 0:\r\n {for vehicle in launchbay.vehicles:\r\n {set variant to cat(vehicle.name, \"_\", vehicle.description)}\r\n {set here to find(vehicles , variant)}\r\n {if here > -1:\r\n {set count to vehicles_count[here] + 1}\r\n {set vehicles_count to union(vehicles_count, [here:count])}\r\n |else:\r\n {set vehicles to cat(vehicles , [variant])}\r\n {set vehicles_count to cat(vehicles_count, [1])}\r\n }\r\n }\r\n }\r\n\r\n {if len(vehicles) > 0:\r\n {if hangar_count = 1: You have |else: and} a {hangar}, holding\r\n {set cur to 0}\r\n {while cur < len(vehicles):\r\n {set count to vehicles_count[cur]}\r\n {set name to split(vehicles[cur], \"_\")[0]}\r\n {set description to split(vehicles[cur], \"_\")[1]}\r\n {count} {if count = 1: {name} |else: {name}s}, with {description}\r\n {set cur to cur + 1}\r\n {if cur = len(vehicles)-1: and |elif cur < len(vehicles): ,}\r\n }\r\n |else:\r\n {if hangar_count = 1: You have |else: and} an empty {hangar}\r\n }\r\n {if hangar_count = len(ship.launchbays): . |else: ,}\r\n }\r\n }\r\n|else:\r\n Hangar status is not available.\r\n {Pause(500)}\r\n Please verify connection to the pilots federation database.\r\n}\r\n", | |
"default": true | |
}, | |
"Liftoff": { | |
"name": "Liftoff", | |
"description": "Triggered when your ship lifts off from a planet's surface", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if event.playercontrolled = true:\r\n Lift off.\r\n|else:\r\n {ShipName()} has lifted off.\r\n}", | |
"defaultValue": "{if event.playercontrolled = true:\r\n Lift off.\r\n|else:\r\n {ShipName()} has lifted off.\r\n}", | |
"default": true | |
}, | |
"Lights": { | |
"name": "Lights", | |
"description": "Triggered when you activate or deactivate your lights", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Limpet check": { | |
"name": "Limpet check", | |
"description": "Check for the presence/absence of limpets and limpet controllers", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{set controllers to 0}\r\n{for compartment in ship.compartments:\r\n {if find(compartment.module.name, \"Controller\") != -1:\r\n {set controllers to controllers + 1}\r\n }\r\n}\r\n\r\n{set limpets to 0}\r\n{for cargo in inventory:\r\n {if cargo.edname = \"Drones\":\r\n {set limpets to cargo.total}\r\n }\r\n}\r\n\r\n{set tenpercent to ship.cargocapacity / 10 - 1}\r\n{if controllers > 0 && limpets = 0:\r\n Reminder: you have a limpet controller but are not carrying any limpets.\r\n|elif controllers = 0 && limpets > 0:\r\n You are carrying limpets but no limpet controller.\r\n|elif controllers > 0 && limpets < tenpercent:\r\n You only have {limpets} {if limpets = 1: limpet |else: limpets} on-board; you might want to consider re-stocking.\r\n}\r\n", | |
"defaultValue": "{set controllers to 0}\r\n{for compartment in ship.compartments:\r\n {if find(compartment.module.name, \"Controller\") != -1:\r\n {set controllers to controllers + 1}\r\n }\r\n}\r\n\r\n{set limpets to 0}\r\n{for cargo in inventory:\r\n {if cargo.edname = \"Drones\":\r\n {set limpets to cargo.total}\r\n }\r\n}\r\n\r\n{set tenpercent to ship.cargocapacity / 10 - 1}\r\n{if controllers > 0 && limpets = 0:\r\n Reminder: you have a limpet controller but are not carrying any limpets.\r\n|elif controllers = 0 && limpets > 0:\r\n You are carrying limpets but no limpet controller.\r\n|elif controllers > 0 && limpets < tenpercent:\r\n You only have {limpets} {if limpets = 1: limpet |else: limpets} on-board; you might want to consider re-stocking.\r\n}\r\n", | |
"default": true | |
}, | |
"Limpet launched": { | |
"name": "Limpet launched", | |
"description": "Triggered when a limpet is launched", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{OneOf('Drone','Limpet')} launched.", | |
"defaultValue": "{OneOf('Drone','Limpet')} launched.", | |
"default": true | |
}, | |
"Limpet purchased": { | |
"name": "Limpet purchased", | |
"description": "Triggered when you buy limpets from a station", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{event.amount} limpet{if event.amount > 1:s}\r\n{Occasionally(2, \"{if event.amount = 1: has |else: have} been\")}\r\nadded to \r\n{OneOf(\"our\", \"{ShipName()}'s\")}\r\n{OneOf(\"cargo hold\", \"inventory\", \"hold\")}", | |
"defaultValue": "{event.amount} limpet{if event.amount > 1:s}\r\n{Occasionally(2, \"{if event.amount = 1: has |else: have} been\")}\r\nadded to \r\n{OneOf(\"our\", \"{ShipName()}'s\")}\r\n{OneOf(\"cargo hold\", \"inventory\", \"hold\")}", | |
"default": true | |
}, | |
"Limpet sold": { | |
"name": "Limpet sold", | |
"description": "Triggered when you sell limpets to a station", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{event.amount} limpet{if event.amount > 1:s}\r\n{Occasionally(2, \"{if event.amount = 1: has |else: have} been\")} sold.", | |
"defaultValue": "{event.amount} limpet{if event.amount > 1:s}\r\n{Occasionally(2, \"{if event.amount = 1: has |else: have} been\")} sold.", | |
"default": true | |
}, | |
"Location": { | |
"name": "Location", | |
"description": "Triggered when the commander's location is reported, usually when they reload their game.", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context _}\r\n{SetState('eddi_context_last_subject', 'location')}\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_body_name', event.body)}\r\n{SetState('eddi_context_body_type', event.bodytype)}\r\n{SetState('eddi_context_body_system', event.system)}\r\n\r\n\r\nYou are\r\n{if event.docked || event.station = event.body:\r\n {set station to StationDetails(event.station, event.system)}\r\n {set station_missions to F(\"Mission check station\")}\r\n {set station_crimes to F(\"Crime check station\")}\r\n\r\n {if event.docked:\r\n docked at\r\n |else:\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")}\r\n }\r\n {P(station.model, \"station\")}, {P(event.station, \"station\")},\r\n {if event.station != event.body:\r\n on {P(event.body, \"body\")},\r\n }\r\n|elif event.body:\r\n {set system_missions to F(\"Mission check system\")}\r\n {set system_crimes to F(\"Crime check system\")}\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")} {P(event.body, \"body\")},\r\n}\r\nin the {P(event.system, \"starsystem\")} system.\r\n\r\n{if station_missions || station_crimes ||system_missions || system_crimes:\r\n {Pause(500)}\r\n Information:\r\n {if station_missions:\r\n {Pause(500)}\r\n {station_missions}\r\n }\r\n {if station_crimes:\r\n {Pause(500)}\r\n {station_crimes}\r\n }\r\n {if system_missions:\r\n {Pause(500)}\r\n {system_missions}\r\n }\r\n {if system_crimes:\r\n {Pause(500)}\r\n {system_crimes}\r\n }\r\n}", | |
"defaultValue": "{_ Context _}\r\n{SetState('eddi_context_last_subject', 'location')}\r\n{SetState('eddi_context_system_name', event.system)}\r\n{SetState('eddi_context_body_name', event.body)}\r\n{SetState('eddi_context_body_type', event.bodytype)}\r\n{SetState('eddi_context_body_system', event.system)}\r\n\r\n\r\nYou are\r\n{if event.docked || event.station = event.body:\r\n {set station to StationDetails(event.station, event.system)}\r\n {set station_missions to F(\"Mission check station\")}\r\n {set station_crimes to F(\"Crime check station\")}\r\n\r\n {if event.docked:\r\n docked at\r\n |else:\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")}\r\n }\r\n {P(station.model, \"station\")}, {P(event.station, \"station\")},\r\n {if event.station != event.body:\r\n on {P(event.body, \"body\")},\r\n }\r\n|elif event.body:\r\n {set system_missions to F(\"Mission check system\")}\r\n {set system_crimes to F(\"Crime check system\")}\r\n {OneOf(\"near\", \"close to\", \"in the vicinity of\")} {P(event.body, \"body\")},\r\n}\r\nin the {P(event.system, \"starsystem\")} system.\r\n\r\n{if station_missions || station_crimes ||system_missions || system_crimes:\r\n {Pause(500)}\r\n Information:\r\n {if station_missions:\r\n {Pause(500)}\r\n {station_missions}\r\n }\r\n {if station_crimes:\r\n {Pause(500)}\r\n {station_crimes}\r\n }\r\n {if system_missions:\r\n {Pause(500)}\r\n {system_missions}\r\n }\r\n {if system_crimes:\r\n {Pause(500)}\r\n {system_crimes}\r\n }\r\n}", | |
"default": true | |
}, | |
"Low fuel": { | |
"name": "Low fuel", | |
"description": "Triggered when your fuel level falls below 25%.", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Market information updated": { | |
"name": "Market information updated", | |
"description": "Triggered when market information for the currently docked station has been updated", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Find out in advance what we have to say }\r\n\r\n{if len(event.updates) > 1:\r\n {set type to \"Station services\"}\r\n {if ship.role = \"Multi-purpose\" || ship.role = \"Trading\":\r\n {set purchasecheck to F(\"Commodity purchase check\")}\r\n }\r\n {set salecheck to F(\"Commodity sale check\")}\r\n {set swapoutcheck to F(\"Swapout check\")}\r\n|elif event.updates[0] = \"market\":\r\n {set type to OneOf(\"Market\", \"Local market\")}\r\n {if ship.role = \"Multi-purpose\" || ship.role = \"Trading\":\r\n {set purchasecheck to F(\"Commodity purchase check\")}\r\n }\r\n {set salecheck to F(\"Commodity sale check\")}\r\n|elif event.updates[0] = \"outfitting\":\r\n {set type to \"Station outfitting\"}\r\n {set swapoutcheck to F(\"Swapout check\")}\r\n|elif event.updates[0] = \"shipyard\":\r\n {set type to \"Station shipyard\"}\r\n}\r\n\r\n{Pause(500)}\r\n{if purchasecheck || salecheck || swapoutcheck:\r\n {type}\r\n {OneOf(\"data\", \"information\", \"price\")}\r\n {OneOf(\"update\", \"refresh\", \"changes\")}\r\n {OneOf(\"received\", \"obtained\")}.\r\n\r\n {salecheck}\r\n {purchasecheck}\r\n {swapoutcheck}\r\n}\r\n{F(\"Limpet check\")}\r\n", | |
"defaultValue": "{_ Find out in advance what we have to say }\r\n\r\n{if len(event.updates) > 1:\r\n {set type to \"Station services\"}\r\n {if ship.role = \"Multi-purpose\" || ship.role = \"Trading\":\r\n {set purchasecheck to F(\"Commodity purchase check\")}\r\n }\r\n {set salecheck to F(\"Commodity sale check\")}\r\n {set swapoutcheck to F(\"Swapout check\")}\r\n|elif event.updates[0] = \"market\":\r\n {set type to OneOf(\"Market\", \"Local market\")}\r\n {if ship.role = \"Multi-purpose\" || ship.role = \"Trading\":\r\n {set purchasecheck to F(\"Commodity purchase check\")}\r\n }\r\n {set salecheck to F(\"Commodity sale check\")}\r\n|elif event.updates[0] = \"outfitting\":\r\n {set type to \"Station outfitting\"}\r\n {set swapoutcheck to F(\"Swapout check\")}\r\n|elif event.updates[0] = \"shipyard\":\r\n {set type to \"Station shipyard\"}\r\n}\r\n\r\n{Pause(500)}\r\n{if purchasecheck || salecheck || swapoutcheck:\r\n {type}\r\n {OneOf(\"data\", \"information\", \"price\")}\r\n {OneOf(\"update\", \"refresh\", \"changes\")}\r\n {OneOf(\"received\", \"obtained\")}.\r\n\r\n {salecheck}\r\n {purchasecheck}\r\n {swapoutcheck}\r\n}\r\n{F(\"Limpet check\")}\r\n", | |
"default": true | |
}, | |
"Material collected": { | |
"name": "Material collected", | |
"description": "Triggered when you collect a material", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'material')}\r\n{SetState('eddi_context_last_action', 'collect')}\r\n{SetState('eddi_context_material_name', event.name)}\r\n\r\n{Occasionally(5, F(\"Material progress report\"))}", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'material')}\r\n{SetState('eddi_context_last_action', 'collect')}\r\n{SetState('eddi_context_material_name', event.name)}\r\n", | |
"default": false | |
}, | |
"Material discard report": { | |
"name": "Material discard report", | |
"description": "Report on how many of a material can be discarded", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Function to obtain a material from inventory}\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{set inventory to _inventory(material.name)}\r\n\r\n\r\n{if inventory:\r\n {if inventory.maximum && inventory.maximum < inventory.amount:\r\n {set over to inventory.amount - inventory.maximum}\r\n {if over > 1:\r\n You can discard {over} units of {inventory.material} to reach your maximum level.\r\n |elif over = 1:\r\n You can discard 1 unit of {inventory.material} to reach your maximum level.\r\n }\r\n |elif inventory.desired && inventory.desired < inventory.amount:\r\n {set over to inventory.amount - inventory.desired}\r\n {if over > 1:\r\n You can discard {over} units of {inventory.material} to reach your desired level.\r\n |elif over = 1:\r\n You can discard 1 unit of {inventory.material} to reach your desired level.\r\n }\r\n |elif inventory.desired:\r\n You are below your desired level for {inventory.material}.\r\n |elif inventory.maximum:\r\n You are below your maximum level for {inventory.material}.\r\n |else:\r\n You have not set any levels for {inventory.material}.\r\n }\r\n}\r\n", | |
"defaultValue": "{_ Function to obtain a material from inventory}\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{set inventory to _inventory(material.name)}\r\n\r\n\r\n{if inventory:\r\n {if inventory.maximum && inventory.maximum < inventory.amount:\r\n {set over to inventory.amount - inventory.maximum}\r\n {if over > 1:\r\n You can discard {over} units of {inventory.material} to reach your maximum level.\r\n |elif over = 1:\r\n You can discard 1 unit of {inventory.material} to reach your maximum level.\r\n }\r\n |elif inventory.desired && inventory.desired < inventory.amount:\r\n {set over to inventory.amount - inventory.desired}\r\n {if over > 1:\r\n You can discard {over} units of {inventory.material} to reach your desired level.\r\n |elif over = 1:\r\n You can discard 1 unit of {inventory.material} to reach your desired level.\r\n }\r\n |elif inventory.desired:\r\n You are below your desired level for {inventory.material}.\r\n |elif inventory.maximum:\r\n You are below your maximum level for {inventory.material}.\r\n |else:\r\n You have not set any levels for {inventory.material}.\r\n }\r\n}\r\n", | |
"default": true | |
}, | |
"Material discarded": { | |
"name": "Material discarded", | |
"description": "Triggered when you discard a material", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'material')}\r\n{SetState('eddi_context_last_action', 'discard')}\r\n{SetState('eddi_context_material_name', event.name)}\r\n", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'material')}\r\n{SetState('eddi_context_last_action', 'discard')}\r\n{SetState('eddi_context_material_name', event.name)}\r\n", | |
"default": true | |
}, | |
"Material discovered": { | |
"name": "Material discovered", | |
"description": "Triggered when you discover a material", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'material')}\r\n{SetState('eddi_context_last_action', 'discover')}\r\n{SetState('eddi_context_material_name', event.name)}\r\n", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'material')}\r\n{SetState('eddi_context_last_action', 'discover')}\r\n{SetState('eddi_context_material_name', event.name)}\r\n", | |
"default": true | |
}, | |
"Material donated": { | |
"name": "Material donated", | |
"description": "Triggered when you donate a material", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'material')}\r\n{SetState('eddi_context_last_action', 'donate')}\r\n{SetState('eddi_context_material_name', event.name)}\r\n", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'material')}\r\n{SetState('eddi_context_last_action', 'donate')}\r\n{SetState('eddi_context_material_name', event.name)}\r\n", | |
"default": true | |
}, | |
"Material inventory": { | |
"name": "Material inventory", | |
"description": "Triggered when you obtain an inventory of your current materials", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Material inventory report": { | |
"name": "Material inventory report", | |
"description": "Report on how many of a material are on-board", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Function to obtain a material from inventory}\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n \r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_last_subject', 'inventory')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{set inventory to _inventory(material.name)}\r\n\r\n{if inventory && inventory.amount > 0:\r\n {if inventory.amount = 1:\r\n You have {inventory.amount} unit of {inventory.material} on board.\r\n |else:\r\n You have {inventory.amount} units of {inventory.material} on board.\r\n }\r\n|else:\r\n You have no {inventory.material} on board.\r\n}\r\n", | |
"defaultValue": "{_ Function to obtain a material from inventory}\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n \r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_last_subject', 'inventory')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{set inventory to _inventory(material.name)}\r\n\r\n{if inventory && inventory.amount > 0:\r\n {if inventory.amount = 1:\r\n You have {inventory.amount} unit of {inventory.material} on board.\r\n |else:\r\n You have {inventory.amount} units of {inventory.material} on board.\r\n }\r\n|else:\r\n You have no {inventory.material} on board.\r\n}\r\n", | |
"default": true | |
}, | |
"Material location report": { | |
"name": "Material location report", | |
"description": "Report on the where to obtain a particular material", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{if material.name:\r\n {if material.location:\r\n {material.name} can be {material.location}\r\n |else:\r\n No information available on where to find {material.name}\r\n }\r\n|else:\r\n I don't have any information about that material\r\n}.\r\n", | |
"defaultValue": "{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{if material.name:\r\n {if material.location:\r\n {material.name} can be {material.location}\r\n |else:\r\n No information available on where to find {material.name}\r\n }\r\n|else:\r\n I don't have any information about that material\r\n}.\r\n", | |
"default": true | |
}, | |
"Material progress report": { | |
"name": "Material progress report", | |
"description": null, | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{set material to state.eddi_context_material_name}\r\n\r\n{for m in materials: {if m.material = material: {set inventory to m}}}\r\n\r\n{if inventory.amount < inventory.minimum:\r\n {set percent to inventory.amount*100/inventory.minimum}\r\n You have {Humanise(percent)}% of your {material} minimum.\r\n|elif inventory.amount < inventory.desired:\r\n {set percent to inventory.amount*100/inventory.desired}\r\n You have {Humanise(percent)}% of your {material} desired.\r\n|else:\r\n {set percent to inventory.amount*100/inventory.maximum}\r\n You have {Humanise(percent)}% of the material {material} that you can carry.\r\n}\r\n", | |
"defaultValue": null, | |
"default": false | |
}, | |
"Material required report": { | |
"name": "Material required report", | |
"description": "Report on how many of a material are required to reach 'desired' level", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Function to obtain a material from inventory}\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{set inventory to _inventory(material.name)}\r\n\r\n\r\n{if inventory:\r\n {if inventory.minimum && inventory.minimum > inventory.amount:\r\n {set under to inventory.minimum - inventory.amount}\r\n {if under > 1:\r\n You require {under} units of {inventory.material} to reach your minimum level.\r\n |elif under = 1:\r\n You require 1 unit of {inventory.material} to reqach your minimum level.\r\n }\r\n |elif inventory.desired && inventory.desired > inventory.amount:\r\n {set under to inventory.desired - inventory.amount}\r\n {if under > 1:\r\n You require {under} units of {inventory.material} to reach your desired level.\r\n |elif under = 1:\r\n You require 1 unit of {inventory.material} to reach your desired level.\r\n }\r\n |elif inventory.desired:\r\n You are above your desired level for {inventory.material}.\r\n |elif inventory.minimum :\r\n You are above your minimum level for {inventory.material}.\r\n |else:\r\n You have not set any levels for {inventory.material}.\r\n }\r\n}\r\n\r\n", | |
"defaultValue": "{_ Function to obtain a material from inventory}\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n}\r\n\r\n{set inventory to _inventory(material.name)}\r\n\r\n\r\n{if inventory:\r\n {if inventory.minimum && inventory.minimum > inventory.amount:\r\n {set under to inventory.minimum - inventory.amount}\r\n {if under > 1:\r\n You require {under} units of {inventory.material} to reach your minimum level.\r\n |elif under = 1:\r\n You require 1 unit of {inventory.material} to reqach your minimum level.\r\n }\r\n |elif inventory.desired && inventory.desired > inventory.amount:\r\n {set under to inventory.desired - inventory.amount}\r\n {if under > 1:\r\n You require {under} units of {inventory.material} to reach your desired level.\r\n |elif under = 1:\r\n You require 1 unit of {inventory.material} to reach your desired level.\r\n }\r\n |elif inventory.desired:\r\n You are above your desired level for {inventory.material}.\r\n |elif inventory.minimum :\r\n You are above your minimum level for {inventory.material}.\r\n |else:\r\n You have not set any levels for {inventory.material}.\r\n }\r\n}\r\n\r\n", | |
"default": true | |
}, | |
"Material threshold": { | |
"name": "Material threshold", | |
"description": "Triggered when a material reaches a threshold", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Set up a function to report our inventory level }\r\n{set reportInventory() to:\r\n {OneOf(\"Current stock is {event.amount}\",\r\n \"Currently holding {event.amount}\",\r\n \"{event.amount} on-board\")}.\r\n}\r\n\r\n{_ Respond to various threshold events }\r\n{if event.level = 'Minimum':\r\n {_ Threshold triggered around the minimum level }\r\n {if event.change = 'Increase':\r\n {OneOf(\"Stock\", \"Inventory\", \"Supply\")} of {event.material.name} has reached your minimum.\r\n {reportInventory()}\r\n |else:\r\n {OneOf(\"Stock\", \"Inventory\", \"Supply\")} of {event.material.name} has fallen below your minimum. \r\n {reportInventory()}\r\n }\r\n|elif event.level = 'Desired':\r\n {_ Threshold triggered around the desired level }\r\n {if event.change = 'Increase':\r\n You have reached your desired level of {event.material.name}.\r\n {reportInventory()}\r\n |else:\r\n You are below your desired level of {event.material.name}.\r\n {reportInventory()}\r\n }\r\n|else:\r\n {_ Threshold triggered around the maximum level }\r\n {if event.change = 'Increase':\r\n {OneOf(\"Stock\", \"Inventory\", \"Supply\")} of {event.material.name} has reached your maximum.\r\n {reportInventory()}\r\n }\r\n}", | |
"defaultValue": "{_ Set up a function to report our inventory level }\r\n{set reportInventory() to:\r\n {OneOf(\"Current stock is {event.amount}\",\r\n \"Currently holding {event.amount}\",\r\n \"{event.amount} on-board\")}.\r\n}\r\n\r\n{_ Respond to various threshold events }\r\n{if event.level = 'Minimum':\r\n {_ Threshold triggered around the minimum level }\r\n {if event.change = 'Increase':\r\n {OneOf(\"Stock\", \"Inventory\", \"Supply\")} of {event.material.name} has reached your minimum.\r\n {reportInventory()}\r\n |else:\r\n {OneOf(\"Stock\", \"Inventory\", \"Supply\")} of {event.material.name} has fallen below your minimum. \r\n {reportInventory()}\r\n }\r\n|elif event.level = 'Desired':\r\n {_ Threshold triggered around the desired level }\r\n {if event.change = 'Increase':\r\n You have reached your desired level of {event.material.name}.\r\n {reportInventory()}\r\n |else:\r\n You are below your desired level of {event.material.name}.\r\n {reportInventory()}\r\n }\r\n|else:\r\n {_ Threshold triggered around the maximum level }\r\n {if event.change = 'Increase':\r\n {OneOf(\"Stock\", \"Inventory\", \"Supply\")} of {event.material.name} has reached your maximum.\r\n {reportInventory()}\r\n }\r\n}", | |
"default": true | |
}, | |
"Material traded": { | |
"name": "Material traded", | |
"description": "Triggered when materials are traded at a material trader", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Material use report": { | |
"name": "Material use report", | |
"description": "Report on the use of a material", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {if len(state.eddi_context_material_name) > 0:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n }\r\n}\r\n\r\n{if material && material.name:\r\n {set uses to len(material.blueprints)}\r\n {if slice(material.name, len(material.name)-1) = 's':\r\n {set plural to 'are'}\r\n |else:\r\n {set plural to 'is'}\r\n }\r\n {if uses = 0:\r\n {material.name} {plural} not required for any blueprints\r\n |elif uses = 1:\r\n {set name to cat(material.blueprints[0].name, material.blueprints[0].modulename, ' grade ', material.blueprints[0].grade)}\r\n {material.name} {plural} used for the {name} blueprint\r\n |elif uses = 2:\r\n {set name0 to cat(material.blueprints[0].name, material.blueprints[0].modulename, ' grade ', material.blueprints[0].grade)}\r\n {set name1 to cat(material.blueprints[1].name, material.blueprints[1].modulename, ' grade ', material.blueprints[1].grade)}\r\n {material.name} {plural} used for the {name0} and {name1} blueprints\r\n |else:\r\n {material.name} {plural} used for {len(material.blueprints)} blueprints. These are\r\n {set cur to 0}\r\n {while cur < len(material.blueprints):\r\n {set name to cat(material.blueprints[cur].name, material.blueprints[cur].modulename, ' grade ', material.blueprints[cur].grade)}\r\n {if cur = 0:\r\n {name}\r\n |elif cur < len(material.blueprints) - 1:\r\n , {name}\r\n |else:\r\n , and {name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n|else:\r\n I don't have any information about that material\r\n}.", | |
"defaultValue": "{_ Fetch material from state }\r\n{set material to state.material}\r\n{if material:\r\n {_ Fetch full material details }\r\n {set material to MaterialDetails(material)}\r\n\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'material')}\r\n {SetState('eddi_context_material_name', material.name)}\r\n}\r\n\r\n{if !material:\r\n {if len(state.eddi_context_material_name) > 0:\r\n {_ Fetch from context }\r\n {set material to MaterialDetails(state.eddi_context_material_name)}\r\n }\r\n}\r\n\r\n{if material && material.name:\r\n {set uses to len(material.blueprints)}\r\n {if slice(material.name, len(material.name)-1) = 's':\r\n {set plural to 'are'}\r\n |else:\r\n {set plural to 'is'}\r\n }\r\n {if uses = 0:\r\n {material.name} {plural} not required for any blueprints\r\n |elif uses = 1:\r\n {set name to cat(material.blueprints[0].name, material.blueprints[0].modulename, ' grade ', material.blueprints[0].grade)}\r\n {material.name} {plural} used for the {name} blueprint\r\n |elif uses = 2:\r\n {set name0 to cat(material.blueprints[0].name, material.blueprints[0].modulename, ' grade ', material.blueprints[0].grade)}\r\n {set name1 to cat(material.blueprints[1].name, material.blueprints[1].modulename, ' grade ', material.blueprints[1].grade)}\r\n {material.name} {plural} used for the {name0} and {name1} blueprints\r\n |else:\r\n {material.name} {plural} used for {len(material.blueprints)} blueprints. These are\r\n {set cur to 0}\r\n {while cur < len(material.blueprints):\r\n {set name to cat(material.blueprints[cur].name, material.blueprints[cur].modulename, ' grade ', material.blueprints[cur].grade)}\r\n {if cur = 0:\r\n {name}\r\n |elif cur < len(material.blueprints) - 1:\r\n , {name}\r\n |else:\r\n , and {name}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }\r\n|else:\r\n I don't have any information about that material\r\n}.", | |
"default": true | |
}, | |
"Materials discard report": { | |
"name": "Materials discard report", | |
"description": "Report on which materials can be discarded", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "\r\n{_ Find those that are above maximum, desired and minimum}\r\n{set shoulddiscardmaterials to []}\r\n{set coulddiscardmaterials to []}\r\n{set lastdiscardmaterials to []}\r\n\r\n{for material in materials:\r\n {if material.maximum && material.amount > material.maximum:\r\n {set shoulddiscardmaterials to cat(shoulddiscardmaterials, [material])}\r\n |elif material.desired && material.amount > material.desired:\r\n {set coulddiscardmaterials to cat(coulddiscardmaterials, [material])}\r\n |elif material.minimum && material.amount > material.minimum:\r\n {set lastdiscardmaterials to cat(lastdiscardmaterials, [material])}\r\n }\r\n}\r\n\r\n{if len(shoulddiscardmaterials) > 0:\r\n You are over your maximum level for {if len(shoulddiscardmaterials) = 1: 1 material |else: {len(shoulddiscardmaterials)} materials}. You can discard\r\n {if len(shoulddiscardmaterials) = 1:\r\n {shoulddiscardmaterials[0].amount - shoulddiscardmaterials[0].maximum} {shoulddiscardmaterials[0].material}\r\n |elif len(shoulddiscardmaterials) = 2:\r\n {shoulddiscardmaterials[0].amount - shoulddiscardmaterials[0].maximum} {shoulddiscardmaterials[0].material} and {shoulddiscardmaterials[1].amount - shoulddiscardmaterials[1].maximum} {shoulddiscardmaterials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(shoulddiscardmaterials):\r\n {if cur = 0:\r\n {shoulddiscardmaterials[cur].amount - shoulddiscardmaterials[cur].maximum} {shoulddiscardmaterials[cur].material}\r\n |elif cur < len(shoulddiscardmaterials) - 1:\r\n , {shoulddiscardmaterials[cur].amount - shoulddiscardmaterials[cur].maximum} {shoulddiscardmaterials[cur].material}\r\n |else:\r\n , and {shoulddiscardmaterials[cur].amount - shoulddiscardmaterials[cur].maximum} {shoulddiscardmaterials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n|elif len(coulddiscardmaterials) > 0:\r\n You are over your desired level for {if len(coulddiscardmaterials) = 1: 1 material |else: {len(coulddiscardmaterials)} materials}. You can discard\r\n {if len(coulddiscardmaterials) = 1:\r\n {coulddiscardmaterials[0].amount - coulddiscardmaterials[0].desired} {coulddiscardmaterials[0].material}\r\n |elif len(coulddiscardmaterials) = 2:\r\n {coulddiscardmaterials[0].amount - coulddiscardmaterials[0].desired} {coulddiscardmaterials[0].material} and {coulddiscardmaterials[1].amount - coulddiscardmaterials[1].desired} {coulddiscardmaterials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(coulddiscardmaterials):\r\n {if cur = 0:\r\n {coulddiscardmaterials[cur].amount - coulddiscardmaterials[cur].desired} {coulddiscardmaterials[cur].material}\r\n |elif cur < len(coulddiscardmaterials) - 1:\r\n , {coulddiscardmaterials[cur].amount - coulddiscardmaterials[cur].desired} {coulddiscardmaterials[cur].material}\r\n |else:\r\n , and {coulddiscardmaterials[cur].amount - coulddiscardmaterials[cur].desired} {coulddiscardmaterials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n|elif len(lastdiscardmaterials) > 0:\r\n You are over your minimum level for {if len(lastdiscardmaterials) = 1: 1 material |else: {len(lastdiscardmaterials)} materials}. You can discard\r\n {if len(lastdiscardmaterials) = 1:\r\n {lastdiscardmaterials[0].amount - lastdiscardmaterials[0].minimum} {lastdiscardmaterials[0].material}\r\n |elif len(lastdiscardmaterials) = 2:\r\n {lastdiscardmaterials[0].amount - lastdiscardmaterials[0].minimum} {lastdiscardmaterials[0].material} and {lastdiscardmaterials[1].amount - lastdiscardmaterials[1].minimum} {lastdiscardmaterials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(lastdiscardmaterials):\r\n {if cur = 0:\r\n {lastdiscardmaterials[cur].amount - lastdiscardmaterials[cur].minimum} {lastdiscardmaterials[cur].material}\r\n |elif cur < len(lastdiscardmaterials) - 1:\r\n , {lastdiscardmaterials[cur].amount - lastdiscardmaterials[cur].minimum} {lastdiscardmaterials[cur].material}\r\n |else:\r\n , and {lastdiscardmaterials[cur].amount - lastdiscardmaterials[cur].minimum} {lastdiscardmaterials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n|else:\r\n No materials can be discarded and remain within minimum levels.\r\n}\r\n", | |
"defaultValue": "\r\n{_ Find those that are above maximum, desired and minimum}\r\n{set shoulddiscardmaterials to []}\r\n{set coulddiscardmaterials to []}\r\n{set lastdiscardmaterials to []}\r\n\r\n{for material in materials:\r\n {if material.maximum && material.amount > material.maximum:\r\n {set shoulddiscardmaterials to cat(shoulddiscardmaterials, [material])}\r\n |elif material.desired && material.amount > material.desired:\r\n {set coulddiscardmaterials to cat(coulddiscardmaterials, [material])}\r\n |elif material.minimum && material.amount > material.minimum:\r\n {set lastdiscardmaterials to cat(lastdiscardmaterials, [material])}\r\n }\r\n}\r\n\r\n{if len(shoulddiscardmaterials) > 0:\r\n You are over your maximum level for {if len(shoulddiscardmaterials) = 1: 1 material |else: {len(shoulddiscardmaterials)} materials}. You can discard\r\n {if len(shoulddiscardmaterials) = 1:\r\n {shoulddiscardmaterials[0].amount - shoulddiscardmaterials[0].maximum} {shoulddiscardmaterials[0].material}\r\n |elif len(shoulddiscardmaterials) = 2:\r\n {shoulddiscardmaterials[0].amount - shoulddiscardmaterials[0].maximum} {shoulddiscardmaterials[0].material} and {shoulddiscardmaterials[1].amount - shoulddiscardmaterials[1].maximum} {shoulddiscardmaterials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(shoulddiscardmaterials):\r\n {if cur = 0:\r\n {shoulddiscardmaterials[cur].amount - shoulddiscardmaterials[cur].maximum} {shoulddiscardmaterials[cur].material}\r\n |elif cur < len(shoulddiscardmaterials) - 1:\r\n , {shoulddiscardmaterials[cur].amount - shoulddiscardmaterials[cur].maximum} {shoulddiscardmaterials[cur].material}\r\n |else:\r\n , and {shoulddiscardmaterials[cur].amount - shoulddiscardmaterials[cur].maximum} {shoulddiscardmaterials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n|elif len(coulddiscardmaterials) > 0:\r\n You are over your desired level for {if len(coulddiscardmaterials) = 1: 1 material |else: {len(coulddiscardmaterials)} materials}. You can discard\r\n {if len(coulddiscardmaterials) = 1:\r\n {coulddiscardmaterials[0].amount - coulddiscardmaterials[0].desired} {coulddiscardmaterials[0].material}\r\n |elif len(coulddiscardmaterials) = 2:\r\n {coulddiscardmaterials[0].amount - coulddiscardmaterials[0].desired} {coulddiscardmaterials[0].material} and {coulddiscardmaterials[1].amount - coulddiscardmaterials[1].desired} {coulddiscardmaterials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(coulddiscardmaterials):\r\n {if cur = 0:\r\n {coulddiscardmaterials[cur].amount - coulddiscardmaterials[cur].desired} {coulddiscardmaterials[cur].material}\r\n |elif cur < len(coulddiscardmaterials) - 1:\r\n , {coulddiscardmaterials[cur].amount - coulddiscardmaterials[cur].desired} {coulddiscardmaterials[cur].material}\r\n |else:\r\n , and {coulddiscardmaterials[cur].amount - coulddiscardmaterials[cur].desired} {coulddiscardmaterials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n|elif len(lastdiscardmaterials) > 0:\r\n You are over your minimum level for {if len(lastdiscardmaterials) = 1: 1 material |else: {len(lastdiscardmaterials)} materials}. You can discard\r\n {if len(lastdiscardmaterials) = 1:\r\n {lastdiscardmaterials[0].amount - lastdiscardmaterials[0].minimum} {lastdiscardmaterials[0].material}\r\n |elif len(lastdiscardmaterials) = 2:\r\n {lastdiscardmaterials[0].amount - lastdiscardmaterials[0].minimum} {lastdiscardmaterials[0].material} and {lastdiscardmaterials[1].amount - lastdiscardmaterials[1].minimum} {lastdiscardmaterials[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(lastdiscardmaterials):\r\n {if cur = 0:\r\n {lastdiscardmaterials[cur].amount - lastdiscardmaterials[cur].minimum} {lastdiscardmaterials[cur].material}\r\n |elif cur < len(lastdiscardmaterials) - 1:\r\n , {lastdiscardmaterials[cur].amount - lastdiscardmaterials[cur].minimum} {lastdiscardmaterials[cur].material}\r\n |else:\r\n , and {lastdiscardmaterials[cur].amount - lastdiscardmaterials[cur].minimum} {lastdiscardmaterials[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n|else:\r\n No materials can be discarded and remain within minimum levels.\r\n}\r\n", | |
"default": true | |
}, | |
"Materials required report": { | |
"name": "Materials required report", | |
"description": "Report on how many of each material are required to reach 'desired' level", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{set required to []}\r\n\r\n{for material in materials:\r\n {if material.desired && material.amount < material.desired:\r\n {set required to cat(required, [material])}\r\n }\r\n}\r\n\r\n{if len(required) > 0:\r\n You require\r\n {if len(required) = 1:\r\n {required[0].desired - required[0].amount} {required[0].material}\r\n |elif len(required) = 2:\r\n {required[0].desired - required[0].amount} {required[0].material} and {required[1].desired - required[1].amount} {required[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(required):\r\n {if cur = 0:\r\n {required[cur].desired - required[cur].amount} {required[cur].material}\r\n |elif cur < len(required) - 1:\r\n , {required[cur].desired - required[cur].amount} {required[cur].material}\r\n |else:\r\n , and {required[cur].desired - required[cur].amount} {required[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n|else:\r\n You have all the materials you desire.\r\n}", | |
"defaultValue": "{set required to []}\r\n\r\n{for material in materials:\r\n {if material.desired && material.amount < material.desired:\r\n {set required to cat(required, [material])}\r\n }\r\n}\r\n\r\n{if len(required) > 0:\r\n You require\r\n {if len(required) = 1:\r\n {required[0].desired - required[0].amount} {required[0].material}\r\n |elif len(required) = 2:\r\n {required[0].desired - required[0].amount} {required[0].material} and {required[1].desired - required[1].amount} {required[1].material}\r\n |else:\r\n {set cur to 0}\r\n {while cur < len(required):\r\n {if cur = 0:\r\n {required[cur].desired - required[cur].amount} {required[cur].material}\r\n |elif cur < len(required) - 1:\r\n , {required[cur].desired - required[cur].amount} {required[cur].material}\r\n |else:\r\n , and {required[cur].desired - required[cur].amount} {required[cur].material}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n }.\r\n|else:\r\n You have all the materials you desire.\r\n}", | |
"default": true | |
}, | |
"Message received": { | |
"name": "Message received", | |
"description": "Triggered when you receive a message", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context _}\r\n{SetState('eddi_context_last_subject', 'message')}\r\n{SetState('eddi_context_last_action', 'receive')}\r\n{SetState('eddi_context_message_name', event.from)}\r\n{SetState('eddi_context_message_content', event.message)}\r\n\r\n{_ \"true\" means spoken and \"false\" means muted.}\r\n{_ \"npc\" controls whether NPC comms will be spoken.}\r\n{_ \"player\" controls direct messages to you will be spoken.}\r\n{_ \"starsystem\" controls whether player comms across game modes will be spoken.}\r\n{set spokenChannels to [\r\n \"friend\": true,\r\n \"local\": true,\r\n \"multicrew\": true,\r\n \"npc\": true,\r\n \"player\": true,\r\n \"squadron\": true,\r\n \"starsystem\": false,\r\n \"voicechat\": false,\r\n \"wing\": true,\r\n]}\r\n\r\n{_ \"true\" means spoken and \"false\" means muted.}\r\n{_ \"NPC\" is the default source for NPC comms.}\r\n{set spokenNpcSources to [\r\n \"Ambushed pilot\" : true,\r\n \"Bounty hunter\" : true,\r\n \"Capital ship\" : true,\r\n \"Cargo hunter\" : true,\r\n \"Civilian pilot\" : true,\r\n \"Conflict zone\" : true,\r\n \"Cruise liner\" : false,\r\n \"Escort\" : true,\r\n \"Exploration convoy\" : true,\r\n \"Hitman\" : true,\r\n \"Messenger\" : true,\r\n \"Military\" : true,\r\n \"Miner\" : true,\r\n \"NPC\" : true,\r\n \"Passenger hunter\" : true,\r\n \"Passenger liner\" : false,\r\n \"Pirate\" : true,\r\n \"Police\" : true,\r\n \"Propagandist\" : false,\r\n \"Protester\" : false,\r\n \"Refugee\" : true,\r\n \"Rival power's agent\" : true,\r\n \"Search and rescue\" : true,\r\n \"Starship One\" : true,\r\n \"Station\" : false,\r\n \"Wedding convoy\" : false,\r\n]}\r\n\r\n{if spokenChannels[event.channel_invariant] = true:\r\n {if event.player = true:\r\n {set words to split(event.message, \" \")}\r\n {set msg to []}\r\n {set cur to 0}\r\n {while cur < len(words): \r\n {set o7match to match(words[cur], \"(?<!\\\\w)([o|O|0]7)(?!\\\\w)\")}\r\n {if cur = 0 && (len(words) > 1 || len(o7match) = 0):\r\n {set msg to cat(msg, [\"sends:\"])}\r\n }\r\n {if len(o7match) > 0:\r\n {set remainder to slice(words[cur], 2)}\r\n {if len(words) = 1:\r\n {if event.channel_invariant = 'player': {set you to \" you\"}}\r\n {set salute to cat(\"salutes\", you)}\r\n {set msg to cat(msg, [cat(salute, remainder)])}\r\n |else:\r\n {set msg to cat(msg, [cat(\"salute\", remainder)])}\r\n }\r\n |else:\r\n {set msg to cat(msg, [words[cur]])}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n {set message to join(msg, \" \")}\r\n {event.source} {event.from} {message}\r\n |elif spokenNpcSources[event.source_invariant] = true:\r\n From {event.source} {event.from}: {event.message}\r\n }\r\n}", | |
"defaultValue": "{_ Context _}\r\n{SetState('eddi_context_last_subject', 'message')}\r\n{SetState('eddi_context_last_action', 'receive')}\r\n{SetState('eddi_context_message_name', event.from)}\r\n{SetState('eddi_context_message_content', event.message)}\r\n\r\n{_ \"true\" means spoken and \"false\" means muted.}\r\n{_ \"npc\" controls whether NPC comms will be spoken.}\r\n{_ \"player\" controls direct messages to you will be spoken.}\r\n{_ \"starsystem\" controls whether player comms across game modes will be spoken.}\r\n{set spokenChannels to [\r\n \"friend\": true,\r\n \"local\": true,\r\n \"multicrew\": true,\r\n \"npc\": true,\r\n \"player\": true,\r\n \"squadron\": true,\r\n \"starsystem\": false,\r\n \"voicechat\": false,\r\n \"wing\": true,\r\n]}\r\n\r\n{_ \"true\" means spoken and \"false\" means muted.}\r\n{_ \"NPC\" is the default source for NPC comms.}\r\n{set spokenNpcSources to [\r\n \"Ambushed pilot\" : true,\r\n \"Bounty hunter\" : true,\r\n \"Capital ship\" : true,\r\n \"Cargo hunter\" : true,\r\n \"Civilian pilot\" : true,\r\n \"Conflict zone\" : true,\r\n \"Cruise liner\" : false,\r\n \"Escort\" : true,\r\n \"Exploration convoy\" : true,\r\n \"Hitman\" : true,\r\n \"Messenger\" : true,\r\n \"Military\" : true,\r\n \"Miner\" : true,\r\n \"NPC\" : true,\r\n \"Passenger hunter\" : true,\r\n \"Passenger liner\" : false,\r\n \"Pirate\" : true,\r\n \"Police\" : true,\r\n \"Propagandist\" : false,\r\n \"Protester\" : false,\r\n \"Refugee\" : true,\r\n \"Rival power's agent\" : true,\r\n \"Search and rescue\" : true,\r\n \"Starship One\" : true,\r\n \"Station\" : false,\r\n \"Wedding convoy\" : false,\r\n]}\r\n\r\n{if spokenChannels[event.channel_invariant] = true:\r\n {if event.player = true:\r\n {set words to split(event.message, \" \")}\r\n {set msg to []}\r\n {set cur to 0}\r\n {while cur < len(words): \r\n {set o7match to match(words[cur], \"(?<!\\\\w)([o|O|0]7)(?!\\\\w)\")}\r\n {if cur = 0 && (len(words) > 1 || len(o7match) = 0):\r\n {set msg to cat(msg, [\"sends:\"])}\r\n }\r\n {if len(o7match) > 0:\r\n {set remainder to slice(words[cur], 2)}\r\n {if len(words) = 1:\r\n {if event.channel_invariant = 'player': {set you to \" you\"}}\r\n {set salute to cat(\"salutes\", you)}\r\n {set msg to cat(msg, [cat(salute, remainder)])}\r\n |else:\r\n {set msg to cat(msg, [cat(\"salute\", remainder)])}\r\n }\r\n |else:\r\n {set msg to cat(msg, [words[cur]])}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n {set message to join(msg, \" \")}\r\n {event.source} {event.from} {message}\r\n |elif spokenNpcSources[event.source_invariant] = true:\r\n From {event.source} {event.from}: {event.message}\r\n }\r\n}", | |
"default": true | |
}, | |
"Message sent": { | |
"name": "Message sent", | |
"description": "Triggered when you send a message", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'message')}\r\n{SetState('eddi_context_last_action', 'send')}\r\n{SetState('eddi_context_message_name', event.to)}\r\n{SetState('eddi_context_message_content', event.message)}\r\n\r\n{OneOf(\"Message away\", \"Message sent\", \"Sent\")}.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'message')}\r\n{SetState('eddi_context_last_action', 'send')}\r\n{SetState('eddi_context_message_name', event.to)}\r\n{SetState('eddi_context_message_content', event.message)}\r\n\r\n{OneOf(\"Message away\", \"Message sent\", \"Sent\")}.", | |
"default": true | |
}, | |
"Micro resources purchased": { | |
"name": "Micro resources purchased", | |
"description": "Triggered when you buy micro resources", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Mission abandoned": { | |
"name": "Mission abandoned", | |
"description": "Triggered when you abandon a mission", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'mission')}\r\n{SetState('eddi_context_last_action', 'abandon')}\r\n\r\n{set mission to MissionDetails(event.missionid)}\r\n\r\n{if event.communal:\r\n You have abandoned the community goal: {mission.localisedname}\r\n|else:\r\n {if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n |else:\r\n {set type to mission.tags[0]}\r\n }\r\n {set type to cat(type, \" mission\")}\r\n\r\n {type} {if mission.faction: for {P(mission.faction, \"faction\")}} abandoned.\r\n}\r\n\r\n", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'mission')}\r\n{SetState('eddi_context_last_action', 'abandon')}\r\n\r\n{set mission to MissionDetails(event.missionid)}\r\n\r\n{if event.communal:\r\n You have abandoned the community goal: {mission.localisedname}\r\n|else:\r\n {if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n |else:\r\n {set type to mission.tags[0]}\r\n }\r\n {set type to cat(type, \" mission\")}\r\n\r\n {type} {if mission.faction: for {P(mission.faction, \"faction\")}} abandoned.\r\n}\r\n\r\n", | |
"default": true | |
}, | |
"Mission accepted": { | |
"name": "Mission accepted", | |
"description": "Triggered when you accept a mission", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{SetState('eddi_context_last_subject', 'mission')}\r\n{SetState('eddi_context_last_action', 'accepted')}\r\n\r\n{set mission to MissionDetails(event.missionid)}\r\n\r\n{if find(mission.invariantTags, \"Donation\") > -1:\r\n {OneOf(\"You have chosen\",\"Mission accepted\")} to {Occasionally(2,\"generously\")} donate\r\n {if find(mission.invariantTags, \"Credits\") = -1: {mission.commodity} |else: credits} to\r\n {OneOf('improve','raise','increase')} your {OneOf('reputation','standing')} with {P(mission.faction, 'faction')}\r\n|elif event.communal:\r\n You have accepted the community goal: {mission.localisedname}\r\n|else:\r\n {if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n |else:\r\n {set type to mission.tags[0]}\r\n }\r\n {set type to cat(type, \" mission\")}\r\n {OneOf(\"{type} {if mission.faction: for {P(mission.faction, 'faction')}} accepted\",\r\n \"{type} accepted {if mission.faction: for {P(mission.faction, 'faction')}}\",\r\n \"You have accepted a {type} {if mission.faction: for {P(mission.faction, 'faction')}}\")\r\n }\r\n}\r\n\r\n{F(\"Mission faction state\")}.\r\n\r\n{if mission.passengerwanted:\r\n Warning! You are {OneOf(\"transporting\",\"carrying\")}\r\n {OneOf(\"{OneOf('wanted','illegal')} {OneOf('passengers','personnel')}\",\"known felons\")}!\r\n You may be attacked by {Occasionally(2,\"system\")} {OneOf(\"authority\",\"police\")}.\r\n Caution is advised. Avoid being scanned.\r\n\r\n|elif token(mission.name,\"_\",2) = \"Skimmer\":\r\n This is a surface {OneOf(\"mission\",\"operation\")}.\r\n\r\n|elif token(mission.name,\"_\",2) = \"Surface\":\r\n This is a surface {OneOf(\"mission\",\"operation\")}, you will require an SRV.\r\n}\r\n\r\n{if !event.communal:\r\n {if missionsCount = 20:\r\n You have now reached the maximum number of missions you can take.\r\n Please complete some, in order to accept more.\r\n |else:\r\n {set reportMissionCount to:\r\n {OneOf(\r\n \"You {Occasionally(2,'now')} have {missionsCount} \r\n {if missionsCount > 1: missions \r\n |else: mission\r\n }\",\r\n \"{OneOf('That is','This is')} your\r\n {if missionsCount = 1: 1st\r\n |elif missionsCount = 2: 2nd\r\n |elif missionsCount = 3: 3rd\r\n |else: {missionsCount}th\r\n }\r\n mission\"\r\n )}.\r\n }\r\n {Occasionally(max(cmdr.combatrating.rank - missionsCount, 1), reportMissionCount)}\r\n }\r\n}", | |
"defaultValue": "{SetState('eddi_context_last_subject', 'mission')}\r\n{SetState('eddi_context_last_action', 'accepted')}\r\n\r\n{set mission to MissionDetails(event.missionid)}\r\n\r\n{if find(mission.invariantTags, \"Donation\") > -1:\r\n {OneOf(\"You have chosen\",\"Mission accepted\")} to {Occasionally(2,\"generously\")} donate\r\n {if find(mission.invariantTags, \"Credits\") = -1: {mission.commodity} |else: credits} to\r\n {OneOf('improve','raise','increase')} your {OneOf('reputation','standing')} with {P(mission.faction, 'faction')}\r\n|elif event.communal:\r\n You have accepted the community goal: {mission.localisedname}\r\n|else:\r\n {if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n |else:\r\n {set type to mission.tags[0]}\r\n }\r\n {set type to cat(type, \" mission\")}\r\n {OneOf(\"{type} {if mission.faction: for {P(mission.faction, 'faction')}} accepted\",\r\n \"{type} accepted {if mission.faction: for {P(mission.faction, 'faction')}}\",\r\n \"You have accepted a {type} {if mission.faction: for {P(mission.faction, 'faction')}}\")\r\n }\r\n}\r\n\r\n{F(\"Mission faction state\")}.\r\n\r\n{if mission.passengerwanted:\r\n Warning! You are {OneOf(\"transporting\",\"carrying\")}\r\n {OneOf(\"{OneOf('wanted','illegal')} {OneOf('passengers','personnel')}\",\"known felons\")}!\r\n You may be attacked by {Occasionally(2,\"system\")} {OneOf(\"authority\",\"police\")}.\r\n Caution is advised. Avoid being scanned.\r\n\r\n|elif token(mission.name,\"_\",2) = \"Skimmer\":\r\n This is a surface {OneOf(\"mission\",\"operation\")}.\r\n\r\n|elif token(mission.name,\"_\",2) = \"Surface\":\r\n This is a surface {OneOf(\"mission\",\"operation\")}, you will require an SRV.\r\n}\r\n\r\n{if !event.communal:\r\n {if missionsCount = 20:\r\n You have now reached the maximum number of missions you can take.\r\n Please complete some, in order to accept more.\r\n |else:\r\n {set reportMissionCount to:\r\n {OneOf(\r\n \"You {Occasionally(2,'now')} have {missionsCount} \r\n {if missionsCount > 1: missions \r\n |else: mission\r\n }\",\r\n \"{OneOf('That is','This is')} your\r\n {if missionsCount = 1: 1st\r\n |elif missionsCount = 2: 2nd\r\n |elif missionsCount = 3: 3rd\r\n |else: {missionsCount}th\r\n }\r\n mission\"\r\n )}.\r\n }\r\n {Occasionally(max(cmdr.combatrating.rank - missionsCount, 1), reportMissionCount)}\r\n }\r\n}", | |
"default": true | |
}, | |
"Mission check galaxy": { | |
"name": "Mission check galaxy", | |
"description": "Check what systems you have missions in", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Mission check galaxy }\r\n{_ Check what systems you have missions in }\r\n\r\n\r\n{_ Setup allmissions function _}\r\n{set allmissions(system) to:\r\n {set here to find(systems, system)}\r\n {if here > -1:\r\n {if mission.statusEDName = \"Active\": \r\n {set active to systems_active[here] + 1}\r\n {set systems_active to union(systems_active, [here:active])}\r\n |elif mission.statusEDName = \"Claim\":\r\n {set claim to systems_claim[here] + 1}\r\n {set systems_claim to union(systems_claim, [here:claim])}\r\n {set active to systems_active[here] + 1}\r\n {set systems_active to union(systems_active, [here:active])}\r\n }\r\n |else:\r\n {set systems to cat(systems, [system])}\r\n {if mission.statusEDName = \"Active\":\r\n {set systems_active to cat(systems_active, [1])}\r\n {set systems_claim to cat(systems_claim, [0])}\r\n |elif mission.statusEDName = \"Claim\":\r\n {set systems_active to cat(systems_active, [1])}\r\n {set systems_claim to cat(systems_claim, [1])}\r\n }\r\n }\r\n}\r\n\r\n{if missionsCount + goalsCount > 0:\r\n {set failed to 0}\r\n {set multi to 0}\r\n {set pending to 0}\r\n {set systems to []}\r\n {set systems_active to []}\r\n {set systems_claim to []}\r\n\r\n {for mission in missions:\r\n {if mission.statusEDName = \"Failed\":\r\n {set failed to failed + 1}\r\n |else:\r\n {set pending to pending + 1}\r\n {if mission.destinationsystems:\r\n {set multi to multi + 1}\r\n {for destination in mission.destinationsystems:\r\n {allmissions(destination.name)}\r\n }\r\n |elif mission.destinationsystem && mission.destinationsystem != \"\":\r\n {allmissions(mission.destinationsystem)}\r\n }\r\n }\r\n }\r\n {set systemsCount to len(systems)}\r\n\r\n You have\r\n {if failed > 0:\r\n {failed} failed\r\n {if pending > 0:\r\n and\r\n |elif missionsCount + goalsCount = 1:\r\n mission.\r\n |else:\r\n missions.\r\n }\r\n }\r\n\r\n {if pending > 0:\r\n {if mission_report && systemsCount > 0:\r\n {set cur to 0}\r\n {while cur < systemsCount:\r\n {set active to systems_active[cur]}\r\n {set claim to systems_claim[cur]}\r\n\r\n {if active > 0 && active > claim:\r\n {active} pending {if active = 1: mission |else: missions }\r\n {if claim > 0:, including {claim} claimable {if claim = 1: mission |else: missions} }\r\n }\r\n {OneOf(\"at\",\"in\")} {P(systems[cur], \"starsystem\")}\r\n {set cur to cur + 1}\r\n {if cur = systemsCount - 1: and |elif cur < systemsCount: , }\r\n }.\r\n |else:\r\n {pending} pending {if missionsCount + goalsCount = 1: mission |else: missions} \r\n {if systemsCount = 0:\r\n with no designated target {if missionsCount + goalsCount = 1: system |else: systems }\r\n |elif systemsCount = 1:\r\n in {if systems[0] = system.name: this |else: one } system\r\n |else:\r\n in {systemsCount} {Occasionally(2,\"star\")} systems\r\n }.\r\n {if multi > 0:\r\n {if multi = pending: All |else: {multi} } of these {if multi = 1: is a |else: are }\r\n multi-destination {if multi = 1: mission |else: missions }.\r\n } \r\n }\r\n }\r\n|else:\r\n {OneOf(\"You currently have no missions.\", \"You have no missions at the moment.\",\r\n \"You have no missions at this time.\")}\r\n}", | |
"defaultValue": "{_ Mission check galaxy }\r\n{_ Check what systems you have missions in }\r\n\r\n\r\n{_ Setup allmissions function _}\r\n{set allmissions(system) to:\r\n {set here to find(systems, system)}\r\n {if here > -1:\r\n {if mission.statusEDName = \"Active\": \r\n {set active to systems_active[here] + 1}\r\n {set systems_active to union(systems_active, [here:active])}\r\n |elif mission.statusEDName = \"Claim\":\r\n {set claim to systems_claim[here] + 1}\r\n {set systems_claim to union(systems_claim, [here:claim])}\r\n {set active to systems_active[here] + 1}\r\n {set systems_active to union(systems_active, [here:active])}\r\n }\r\n |else:\r\n {set systems to cat(systems, [system])}\r\n {if mission.statusEDName = \"Active\":\r\n {set systems_active to cat(systems_active, [1])}\r\n {set systems_claim to cat(systems_claim, [0])}\r\n |elif mission.statusEDName = \"Claim\":\r\n {set systems_active to cat(systems_active, [1])}\r\n {set systems_claim to cat(systems_claim, [1])}\r\n }\r\n }\r\n}\r\n\r\n{if missionsCount + goalsCount > 0:\r\n {set failed to 0}\r\n {set multi to 0}\r\n {set pending to 0}\r\n {set systems to []}\r\n {set systems_active to []}\r\n {set systems_claim to []}\r\n\r\n {for mission in missions:\r\n {if mission.statusEDName = \"Failed\":\r\n {set failed to failed + 1}\r\n |else:\r\n {set pending to pending + 1}\r\n {if mission.destinationsystems:\r\n {set multi to multi + 1}\r\n {for destination in mission.destinationsystems:\r\n {allmissions(destination.name)}\r\n }\r\n |elif mission.destinationsystem && mission.destinationsystem != \"\":\r\n {allmissions(mission.destinationsystem)}\r\n }\r\n }\r\n }\r\n {set systemsCount to len(systems)}\r\n\r\n You have\r\n {if failed > 0:\r\n {failed} failed\r\n {if pending > 0:\r\n and\r\n |elif missionsCount + goalsCount = 1:\r\n mission.\r\n |else:\r\n missions.\r\n }\r\n }\r\n\r\n {if pending > 0:\r\n {if mission_report && systemsCount > 0:\r\n {set cur to 0}\r\n {while cur < systemsCount:\r\n {set active to systems_active[cur]}\r\n {set claim to systems_claim[cur]}\r\n\r\n {if active > 0 && active > claim:\r\n {active} pending {if active = 1: mission |else: missions }\r\n {if claim > 0:, including {claim} claimable {if claim = 1: mission |else: missions} }\r\n }\r\n {OneOf(\"at\",\"in\")} {P(systems[cur], \"starsystem\")}\r\n {set cur to cur + 1}\r\n {if cur = systemsCount - 1: and |elif cur < systemsCount: , }\r\n }.\r\n |else:\r\n {pending} pending {if missionsCount + goalsCount = 1: mission |else: missions} \r\n {if systemsCount = 0:\r\n with no designated target {if missionsCount + goalsCount = 1: system |else: systems }\r\n |elif systemsCount = 1:\r\n in {if systems[0] = system.name: this |else: one } system\r\n |else:\r\n in {systemsCount} {Occasionally(2,\"star\")} systems\r\n }.\r\n {if multi > 0:\r\n {if multi = pending: All |else: {multi} } of these {if multi = 1: is a |else: are }\r\n multi-destination {if multi = 1: mission |else: missions }.\r\n } \r\n }\r\n }\r\n|else:\r\n {OneOf(\"You currently have no missions.\", \"You have no missions at the moment.\",\r\n \"You have no missions at this time.\")}\r\n}", | |
"default": true | |
}, | |
"Mission check station": { | |
"name": "Mission check station", | |
"description": "Check what missions you have for the current station", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Mission check station }\r\n{_ Check what missions you have for the current station }\r\n{if missionsCount + goalsCount > 0:\r\n {set current_station to state.eddi_context_body_name}\r\n {set active to 0}\r\n {set claim to 0}\r\n\r\n {if current_station && current_station != \"\":\r\n {for mission in missions:\r\n {if mission.destinationstation = current_station ||\r\n (mission.originstation = current_station && find(mission.invariantTags, \"Delivery\") > -1):\r\n {if mission.status = \"Active\":\r\n {set active to active + 1}\r\n |elif mission.status = \"Claim\":\r\n {set claim to claim + 1}\r\n }\r\n }\r\n }\r\n }\r\n\r\n {if active + claim > 0:\r\n {set description to []}\r\n {if active > 0:\r\n {set activeDescription to:\r\n {active} {OneOf(\"pending\", \"active\")}\r\n }\r\n {set description to cat(description, [activeDescription])}\r\n }\r\n {if claim > 0:\r\n {set claimDescription to:\r\n {claim} claimable\r\n }\r\n {set description to cat(description, [claimDescription])}\r\n }\r\n \r\n You have {List(description)} \r\n {if active + claim = 1: mission |else: missions}\r\n {Occasionally(3,\"located\")} at this station\r\n }\r\n}\r\n", | |
"defaultValue": "{_ Mission check station }\r\n{_ Check what missions you have for the current station }\r\n{if missionsCount + goalsCount > 0:\r\n {set current_station to state.eddi_context_body_name}\r\n {set active to 0}\r\n {set claim to 0}\r\n\r\n {if current_station && current_station != \"\":\r\n {for mission in missions:\r\n {if mission.destinationstation = current_station ||\r\n (mission.originstation = current_station && find(mission.invariantTags, \"Delivery\") > -1):\r\n {if mission.status = \"Active\":\r\n {set active to active + 1}\r\n |elif mission.status = \"Claim\":\r\n {set claim to claim + 1}\r\n }\r\n }\r\n }\r\n }\r\n\r\n {if active + claim > 0:\r\n {set description to []}\r\n {if active > 0:\r\n {set activeDescription to:\r\n {active} {OneOf(\"pending\", \"active\")}\r\n }\r\n {set description to cat(description, [activeDescription])}\r\n }\r\n {if claim > 0:\r\n {set claimDescription to:\r\n {claim} claimable\r\n }\r\n {set description to cat(description, [claimDescription])}\r\n }\r\n \r\n You have {List(description)} \r\n {if active + claim = 1: mission |else: missions}\r\n {Occasionally(3,\"located\")} at this station\r\n }\r\n}\r\n", | |
"default": true | |
}, | |
"Mission check system": { | |
"name": "Mission check system", | |
"description": "Check what missions you have for the current system", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Mission check system }\r\n{_ Check what missions you have for the current system }\r\n\r\n{_ Setup addstation function }\r\n{set addstation(station) to:\r\n {set missions_here to missions_here + 1}\r\n {set station_based to station_based + 1}\r\n {set here to find(stations_here, station)}\r\n {if here > -1:\r\n {if mission.statusEDName = \"Active\":\r\n {set active to stations_active[here] + 1}\r\n {set stations_active to union(stations_active, [here:active])}\r\n |elif mission.statusEDName = \"Claim\":\r\n {set claim to stations_claim[here] + 1}\r\n {set stations_claim to union(stations_claim, [here:claim])}\r\n }\r\n |else:\r\n {set stations_here to cat(stations_here, [station])}\r\n {if mission.statusEDName = \"Active\":\r\n {set stations_active to cat(stations_active, [1])}\r\n {set stations_claim to cat(stations_claim , [0])}\r\n |elif mission.statusEDName = \"Claim\":\r\n {set stations_active to cat(stations_active, [0])}\r\n {set stations_claim to cat(stations_claim , [1])}\r\n }\r\n }\r\n}\r\n\r\n{if missionsCount + goalsCount > 0:\r\n {set missions_here to 0}\r\n {set station_based to 0}\r\n {set stations_active to []}\r\n {set stations_claim to []}\r\n {set stations_here to []}\r\n {set non_stations to []}\r\n\r\n {_ Find all missions in the current system and identify all the stations }\r\n {for mission in missions:\r\n {if mission.status != \"Failed\":\r\n {if mission.destinationsystems:\r\n {for destination in mission.destinationsystems:\r\n {if destination.name = system.name && !destination.visited:\r\n {set missions_here to missions_here + 1}\r\n {if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n |else:\r\n {set type to mission.tags[0]}\r\n }\r\n\r\n {if find(non_stations, type) = -1:\r\n {set non_stations to cat(non_stations, [type])}\r\n }\r\n }\r\n }\r\n |elif mission.destinationsystem = system.name:\r\n {if mission.destinationstation && mission.destinationstation != \"\":\r\n {addstation(mission.destinationstation)}\r\n |else:\r\n {if mission.status = \"Active\":\r\n {set missions_here to missions_here + 1}\r\n {if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n |else:\r\n {set type to mission.tags[0]}\r\n }\r\n {if find(non_stations, type) = -1:\r\n {set non_stations to cat(non_stations, [type])}\r\n }\r\n }\r\n }\r\n |elif mission.originsystem = system.name && find(mission.invariantTags, \"Delivery\") > -1:\r\n {if mission.originstation && mission.originstation != \"\":\r\n {addstation(mission.originstation)}\r\n }\r\n }\r\n }\r\n }\r\n\r\n {if missions_here > 0:\r\n {set missionSummaries to []}\r\n {set cur to 0}\r\n {for station in stations_here:\r\n {set station to StationDetails(station)}\r\n {set active to stations_active[cur]}\r\n {set claim to stations_claim[cur]}\r\n {set depot to stations_depot[cur]}\r\n\r\n {set summaries to []}\r\n {if active > 0:\r\n {set activeSummary to: \r\n {active} {OneOf(\"active\", \"pending\")} {if active = 1: mission |else: missions}\r\n }\r\n {set summaries to cat(summaries, [activeSummary])}\r\n }\r\n {if claim > 0:\r\n {set claimSummary to: \r\n {claim} claimable {if claim = 1: mission |else: missions}\r\n }\r\n {set summaries to cat(summaries, [claimSummary])}\r\n }\r\n {if len(summaries) > 0:\r\n {set stationSummary to:\r\n {List(summaries)} at \r\n {Occasionally(2, \"the {P(station.model, 'station')}, \")}\r\n {station.name}\r\n }\r\n {set missionSummaries to cat(missionSummaries, [stationSummary])}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n \r\n {set remaining to missions_here - station_based}\r\n {if remaining > 0:\r\n {set otherMissions to:\r\n {remaining} {if len(missionSummaries) > 0: other}\r\n {if remaining > 1: missions |else: mission}\r\n }\r\n {set missionSummaries to cat(missionSummaries, [otherMissions])}\r\n }\r\n\r\n {if len(missionSummaries) > 0:\r\n {Pause(500)}\r\n You have\r\n {List(missionSummaries)}\r\n {OneOf(\"here\", \"in this system\")}.\r\n }\r\n }\r\n}", | |
"defaultValue": "{_ Mission check system }\r\n{_ Check what missions you have for the current system }\r\n\r\n{_ Setup addstation function }\r\n{set addstation(station) to:\r\n {set missions_here to missions_here + 1}\r\n {set station_based to station_based + 1}\r\n {set here to find(stations_here, station)}\r\n {if here > -1:\r\n {if mission.statusEDName = \"Active\":\r\n {set active to stations_active[here] + 1}\r\n {set stations_active to union(stations_active, [here:active])}\r\n |elif mission.statusEDName = \"Claim\":\r\n {set claim to stations_claim[here] + 1}\r\n {set stations_claim to union(stations_claim, [here:claim])}\r\n }\r\n |else:\r\n {set stations_here to cat(stations_here, [station])}\r\n {if mission.statusEDName = \"Active\":\r\n {set stations_active to cat(stations_active, [1])}\r\n {set stations_claim to cat(stations_claim , [0])}\r\n |elif mission.statusEDName = \"Claim\":\r\n {set stations_active to cat(stations_active, [0])}\r\n {set stations_claim to cat(stations_claim , [1])}\r\n }\r\n }\r\n}\r\n\r\n{if missionsCount + goalsCount > 0:\r\n {set missions_here to 0}\r\n {set station_based to 0}\r\n {set stations_active to []}\r\n {set stations_claim to []}\r\n {set stations_here to []}\r\n {set non_stations to []}\r\n\r\n {_ Find all missions in the current system and identify all the stations }\r\n {for mission in missions:\r\n {if mission.status != \"Failed\":\r\n {if mission.destinationsystems:\r\n {for destination in mission.destinationsystems:\r\n {if destination.name = system.name && !destination.visited:\r\n {set missions_here to missions_here + 1}\r\n {if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n |else:\r\n {set type to mission.tags[0]}\r\n }\r\n\r\n {if find(non_stations, type) = -1:\r\n {set non_stations to cat(non_stations, [type])}\r\n }\r\n }\r\n }\r\n |elif mission.destinationsystem = system.name:\r\n {if mission.destinationstation && mission.destinationstation != \"\":\r\n {addstation(mission.destinationstation)}\r\n |else:\r\n {if mission.status = \"Active\":\r\n {set missions_here to missions_here + 1}\r\n {if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n |else:\r\n {set type to mission.tags[0]}\r\n }\r\n {if find(non_stations, type) = -1:\r\n {set non_stations to cat(non_stations, [type])}\r\n }\r\n }\r\n }\r\n |elif mission.originsystem = system.name && find(mission.invariantTags, \"Delivery\") > -1:\r\n {if mission.originstation && mission.originstation != \"\":\r\n {addstation(mission.originstation)}\r\n }\r\n }\r\n }\r\n }\r\n\r\n {if missions_here > 0:\r\n {set missionSummaries to []}\r\n {set cur to 0}\r\n {for station in stations_here:\r\n {set station to StationDetails(station)}\r\n {set active to stations_active[cur]}\r\n {set claim to stations_claim[cur]}\r\n {set depot to stations_depot[cur]}\r\n\r\n {set summaries to []}\r\n {if active > 0:\r\n {set activeSummary to: \r\n {active} {OneOf(\"active\", \"pending\")} {if active = 1: mission |else: missions}\r\n }\r\n {set summaries to cat(summaries, [activeSummary])}\r\n }\r\n {if claim > 0:\r\n {set claimSummary to: \r\n {claim} claimable {if claim = 1: mission |else: missions}\r\n }\r\n {set summaries to cat(summaries, [claimSummary])}\r\n }\r\n {if len(summaries) > 0:\r\n {set stationSummary to:\r\n {List(summaries)} at \r\n {Occasionally(2, \"the {P(station.model, 'station')}, \")}\r\n {station.name}\r\n }\r\n {set missionSummaries to cat(missionSummaries, [stationSummary])}\r\n }\r\n {set cur to cur + 1}\r\n }\r\n \r\n {set remaining to missions_here - station_based}\r\n {if remaining > 0:\r\n {set otherMissions to:\r\n {remaining} {if len(missionSummaries) > 0: other}\r\n {if remaining > 1: missions |else: mission}\r\n }\r\n {set missionSummaries to cat(missionSummaries, [otherMissions])}\r\n }\r\n\r\n {if len(missionSummaries) > 0:\r\n {Pause(500)}\r\n You have\r\n {List(missionSummaries)}\r\n {OneOf(\"here\", \"in this system\")}.\r\n }\r\n }\r\n}", | |
"default": true | |
}, | |
"Mission completed": { | |
"name": "Mission completed", | |
"description": "Triggered when you complete a mission", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Mission completed }\r\n{_ Triggered when you complete a mission }\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'mission')}\r\n{SetState('eddi_context_last_action', 'complete')}\r\n\r\n{set mission to MissionDetails(event.missionid)}\r\n\r\n{if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n|else:\r\n {set type to mission.tags[0]}\r\n}\r\n{set type to cat(type, \" mission\")}\r\n{set ranktype to token(mission.name,\"_\",2)}\r\n{set rewards to []}\r\n\r\n{if find(mission.invariantTags, \"Donation\") > -1:\r\n {if find(mission.invariantTags, \"Credits\") = -1:\r\n {set donated to cat(event.amount, \" tonnes of \",event.commodity)}\r\n |else:\r\n {set donated to cat(Humanise(event.donation),\" credits\")}\r\n }\r\n\r\n {OneOf(\"Donated {Occasionally(2, '{donated}')} to {Occasionally(2, 'a grateful')} {P(mission.faction, 'faction')}\",\r\n \"{P(mission.faction, 'faction')} has received your donation {Occasionally(2, 'of {donated}')}\",\r\n \"{P(mission.faction, 'faction')} thanks you for your donation {Occasionally(2, 'of {donated}')}\")}\r\n|elif ranktype = \"RANKEMP\" || ranktype = \"RankEmp\":\r\n You have {OneOf(\"completed the Imperial {type} successfully\",\"successfully completed the Imperial {type}\")}\r\n|elif ranktype = \"RANKFED\" || ranktype = \"RankFed\":\r\n You have {OneOf(\"completed the Federal {type} successfully\",\"successfully completed the Federal {type}\")}\r\n|elif mission.communal:\r\n You have completed the community goal: {mission.localisedname}\r\n|else:\r\n {type} {Occasionally(2, \"successfully\")} completed\r\n}\r\n{F(\"Mission faction state\")}.\r\n\r\n{if len(event.permitsawarded) > 0:\r\n {for permit in event.permitsawarded:\r\n {set permitReward to:\r\n {OneOf(\"a permit\", \"clearance\")} {OneOf(\"for\", \"to visit\")} the {P(permit, \"starsystem\")} system\r\n }\r\n {set rewards to cat(rewards, [permitReward])}\r\n }\r\n}\r\n\r\n{if len(event.commodityrewards) > 0:\r\n {for commodity in event.commodityrewards:\r\n {set commodityReward to:\r\n {commodity.amount}\r\n {if commodity.amount > 1: tons |else: ton} \r\n of {commodity.commodity}\r\n }\r\n {set rewards to cat(rewards, [commodityReward])}\r\n }\r\n}\r\n\r\n{if len(event.materialsrewards) > 0:\r\n {for material in event.materialsrewards:\r\n {set materialReward to:\r\n {material.amount}\r\n {if material.amount > 1: units |else: unit} \r\n of {material.material}\r\n }\r\n {set rewards to cat(rewards, [materialReward])}\r\n }\r\n}\r\n\r\n{if len(event.microresourcerewards) > 0:\r\n {for microresource in event.microresourcerewards:\r\n {set microresourceReward to:\r\n {microresource.amount}\r\n {if microresource.amount > 1: units |else: unit} \r\n of {microresource.name}\r\n }\r\n {set rewards to cat(rewards, [microresourceReward])}\r\n }\r\n}\r\n\r\n{if event.reward > 0:\r\n {set creditReward to: {Humanise(event.reward)} credits }\r\n {set rewards to cat(rewards, [creditReward])}\r\n}\r\n\r\n{if len(rewards) > 0:\r\n You have {OneOf('received','been awarded')} {List(rewards)}\r\n {if event.faction:\r\n {Occasionally(3, 'from {P(event.faction, \"faction\")}')}\r\n }.\r\n}\r\n\r\n{_ Update to next system in route if conditions met _}\r\n{Pause(1000)}\r\n{set next_system to RouteDetails(\"update\")}", | |
"defaultValue": "{_ Mission completed }\r\n{_ Triggered when you complete a mission }\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'mission')}\r\n{SetState('eddi_context_last_action', 'complete')}\r\n\r\n{set mission to MissionDetails(event.missionid)}\r\n\r\n{if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n|else:\r\n {set type to mission.tags[0]}\r\n}\r\n{set type to cat(type, \" mission\")}\r\n{set ranktype to token(mission.name,\"_\",2)}\r\n{set rewards to []}\r\n\r\n{if find(mission.invariantTags, \"Donation\") > -1:\r\n {if find(mission.invariantTags, \"Credits\") = -1:\r\n {set donated to cat(event.amount, \" tonnes of \",event.commodity)}\r\n |else:\r\n {set donated to cat(Humanise(event.donation),\" credits\")}\r\n }\r\n\r\n {OneOf(\"Donated {Occasionally(2, '{donated}')} to {Occasionally(2, 'a grateful')} {P(mission.faction, 'faction')}\",\r\n \"{P(mission.faction, 'faction')} has received your donation {Occasionally(2, 'of {donated}')}\",\r\n \"{P(mission.faction, 'faction')} thanks you for your donation {Occasionally(2, 'of {donated}')}\")}\r\n|elif ranktype = \"RANKEMP\" || ranktype = \"RankEmp\":\r\n You have {OneOf(\"completed the Imperial {type} successfully\",\"successfully completed the Imperial {type}\")}\r\n|elif ranktype = \"RANKFED\" || ranktype = \"RankFed\":\r\n You have {OneOf(\"completed the Federal {type} successfully\",\"successfully completed the Federal {type}\")}\r\n|elif mission.communal:\r\n You have completed the community goal: {mission.localisedname}\r\n|else:\r\n {type} {Occasionally(2, \"successfully\")} completed\r\n}\r\n{F(\"Mission faction state\")}.\r\n\r\n{if len(event.permitsawarded) > 0:\r\n {for permit in event.permitsawarded:\r\n {set permitReward to:\r\n {OneOf(\"a permit\", \"clearance\")} {OneOf(\"for\", \"to visit\")} the {P(permit, \"starsystem\")} system\r\n }\r\n {set rewards to cat(rewards, [permitReward])}\r\n }\r\n}\r\n\r\n{if len(event.commodityrewards) > 0:\r\n {for commodity in event.commodityrewards:\r\n {set commodityReward to:\r\n {commodity.amount}\r\n {if commodity.amount > 1: tons |else: ton} \r\n of {commodity.commodity}\r\n }\r\n {set rewards to cat(rewards, [commodityReward])}\r\n }\r\n}\r\n\r\n{if len(event.materialsrewards) > 0:\r\n {for material in event.materialsrewards:\r\n {set materialReward to:\r\n {material.amount}\r\n {if material.amount > 1: units |else: unit} \r\n of {material.material}\r\n }\r\n {set rewards to cat(rewards, [materialReward])}\r\n }\r\n}\r\n\r\n{if len(event.microresourcerewards) > 0:\r\n {for microresource in event.microresourcerewards:\r\n {set microresourceReward to:\r\n {microresource.amount}\r\n {if microresource.amount > 1: units |else: unit} \r\n of {microresource.name}\r\n }\r\n {set rewards to cat(rewards, [microresourceReward])}\r\n }\r\n}\r\n\r\n{if event.reward > 0:\r\n {set creditReward to: {Humanise(event.reward)} credits }\r\n {set rewards to cat(rewards, [creditReward])}\r\n}\r\n\r\n{if len(rewards) > 0:\r\n You have {OneOf('received','been awarded')} {List(rewards)}\r\n {if event.faction:\r\n {Occasionally(3, 'from {P(event.faction, \"faction\")}')}\r\n }.\r\n}\r\n\r\n{_ Update to next system in route if conditions met _}\r\n{Pause(1000)}\r\n{set next_system to RouteDetails(\"update\")}", | |
"default": true | |
}, | |
"Mission expired": { | |
"name": "Mission expired", | |
"description": "Triggered when a mission has expired", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Mission expired }\r\n{_ Triggered when a mission has expired }\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'mission')}\r\n{SetState('eddi_context_last_action', 'expired')}\r\n\r\n{set mission to MissionDetails(event.missionid)}\r\n\r\n{if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n|else:\r\n {set type to mission.tags[0]}\r\n}\r\n{set type to cat(type, \" mission\")}\r\n\r\n{type} {if mission.faction: for {P(mission.faction, \"faction\")}} has expired.\r\n{if mission.commodity:\r\n {for cargo in inventory:\r\n {if cargo.name = mission.commodity && cargo.haulage > 0:\r\n All mission related cargo will be flagged as stolen.\r\n }\r\n }\r\n}", | |
"defaultValue": "{_ Mission expired }\r\n{_ Triggered when a mission has expired }\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'mission')}\r\n{SetState('eddi_context_last_action', 'expired')}\r\n\r\n{set mission to MissionDetails(event.missionid)}\r\n\r\n{if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n|else:\r\n {set type to mission.tags[0]}\r\n}\r\n{set type to cat(type, \" mission\")}\r\n\r\n{type} {if mission.faction: for {P(mission.faction, \"faction\")}} has expired.\r\n{if mission.commodity:\r\n {for cargo in inventory:\r\n {if cargo.name = mission.commodity && cargo.haulage > 0:\r\n All mission related cargo will be flagged as stolen.\r\n }\r\n }\r\n}", | |
"default": true | |
}, | |
"Mission faction state": { | |
"name": "Mission faction state", | |
"description": "Report the faction state", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Mission faction state _}\r\n{_ Report the faction state _}\r\n\r\n\r\n{set opening to cat(OneOf(\"during\",\"in\"), \" this \", OneOf(\"time\",\"period\"), \" of\")}\r\n{set state to mission.FactionState.invariantName}\r\n\r\n{if state = \"Boom\":\r\n {opening} {OneOf(\"commercial success\",\"economic boom\")}.\r\n|elif state = \"Bust\":\r\n {opening} {OneOf(\"economic decline\",\"recession\",\"economic downturn\")}.\r\n|elif state = \"CivilLiberty\":\r\n {opening} heightened civil liberty.\r\n|elif state = \"CivilUnrest\":\r\n {opening} {OneOf(\"civil unrest\",\"civil conflict\")}.\r\n|elif state = \"CivilWar\":\r\n {opening} {OneOf(\"civil war\",\"civil conflict\")}.\r\n|elif state = \"Election\":\r\n {opening} {OneOf(\"choosing\",\"electing\",\"voting for\")} new {OneOf(\"leaders\",\"leadership\")}.\r\n|elif state = \"Expansion\":\r\n {opening} expansion into a neighboring {OneOf(\"system\",\"territory\")}.\r\n|elif state = \"Famine\":\r\n {opening} {OneOf(\"famine\",\"food shortage\")}.\r\n|elif state = \"Incursion\":\r\n {opening} alien {OneOf(\"incursion\",\"invasion\")}.\r\n|elif state = \"Investment\":\r\n {opening} investment in its infrastructure.\r\n|elif state = \"Lockdown\":\r\n {opening} {OneOf(\"martial law\",\"enhanced security\")}.\r\n|elif state = \"Outbreak\":\r\n {opening} {OneOf(\"contagion\",\"medical emergency\",\"outbreak relief\")}.\r\n|elif state = \"Retreat\":\r\n {opening} retreat from a neighboring {OneOf(\"system\",\"territory\")}.\r\n|elif state = \"War\":\r\n {opening} {OneOf(\"war\",\"conflict\")}.\r\n}", | |
"defaultValue": "{_ Mission faction state _}\r\n{_ Report the faction state _}\r\n\r\n\r\n{set opening to cat(OneOf(\"during\",\"in\"), \" this \", OneOf(\"time\",\"period\"), \" of\")}\r\n{set state to mission.FactionState.invariantName}\r\n\r\n{if state = \"Boom\":\r\n {opening} {OneOf(\"commercial success\",\"economic boom\")}.\r\n|elif state = \"Bust\":\r\n {opening} {OneOf(\"economic decline\",\"recession\",\"economic downturn\")}.\r\n|elif state = \"CivilLiberty\":\r\n {opening} heightened civil liberty.\r\n|elif state = \"CivilUnrest\":\r\n {opening} {OneOf(\"civil unrest\",\"civil conflict\")}.\r\n|elif state = \"CivilWar\":\r\n {opening} {OneOf(\"civil war\",\"civil conflict\")}.\r\n|elif state = \"Election\":\r\n {opening} {OneOf(\"choosing\",\"electing\",\"voting for\")} new {OneOf(\"leaders\",\"leadership\")}.\r\n|elif state = \"Expansion\":\r\n {opening} expansion into a neighboring {OneOf(\"system\",\"territory\")}.\r\n|elif state = \"Famine\":\r\n {opening} {OneOf(\"famine\",\"food shortage\")}.\r\n|elif state = \"Incursion\":\r\n {opening} alien {OneOf(\"incursion\",\"invasion\")}.\r\n|elif state = \"Investment\":\r\n {opening} investment in its infrastructure.\r\n|elif state = \"Lockdown\":\r\n {opening} {OneOf(\"martial law\",\"enhanced security\")}.\r\n|elif state = \"Outbreak\":\r\n {opening} {OneOf(\"contagion\",\"medical emergency\",\"outbreak relief\")}.\r\n|elif state = \"Retreat\":\r\n {opening} retreat from a neighboring {OneOf(\"system\",\"territory\")}.\r\n|elif state = \"War\":\r\n {opening} {OneOf(\"war\",\"conflict\")}.\r\n}", | |
"default": true | |
}, | |
"Mission failed": { | |
"name": "Mission failed", | |
"description": "Triggered when you fail a mission", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'mission')}\r\n{SetState('eddi_context_last_action', 'fail')}\r\n\r\n\r\n{set mission to MissionDetails(event.missionid)}\r\n\r\n{if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n|else:\r\n {set type to mission.tags[0]}\r\n}\r\n{set type to cat(type, \" mission\")}\r\n\r\n{OneOf(\"{type} {if mission.faction: for {P(mission.faction, 'faction')}} failed\", \r\n \"You have failed the {type} {if mission.faction: for {P(mission.faction, 'faction')}}\")}.\r\n\r\n\r\n\r\n", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'mission')}\r\n{SetState('eddi_context_last_action', 'fail')}\r\n\r\n\r\n{set mission to MissionDetails(event.missionid)}\r\n\r\n{if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n|else:\r\n {set type to mission.tags[0]}\r\n}\r\n{set type to cat(type, \" mission\")}\r\n\r\n{OneOf(\"{type} {if mission.faction: for {P(mission.faction, 'faction')}} failed\", \r\n \"You have failed the {type} {if mission.faction: for {P(mission.faction, 'faction')}}\")}.\r\n\r\n\r\n\r\n", | |
"default": true | |
}, | |
"Mission redirected": { | |
"name": "Mission redirected", | |
"description": "Triggered when a mission is redirected", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Mission redirected }\r\n{_ Triggered when a mission is redirected }\r\n\r\n{set redirected_from to cat(event.olddestinationsystem,\"_\",event.olddestinationstation)}\r\n{set redirected_to to cat(event.newdestinationsystem,\"_\",event.newdestinationstation)}\r\n\r\n{if state.eddi_context_last_subject = 'mission' \r\n && state.eddi_context_last_action = 'redirected' \r\n && state.eddi_context_redirected_mission = event.name\r\n && state.eddi_context_redirected_from = redirected_from \r\n && state.eddi_context_redirected_to = redirected_to:\r\n {_ Duplicate from stacked similar mission, do nothing }\r\n|else:\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'mission')}\r\n {SetState('eddi_context_last_action', 'redirected')}\r\n {SetState('eddi_context_redirected_mission', event.name)}\r\n {SetState('eddi_context_redirected_from', cat(event.olddestinationsystem,\"_\",event.olddestinationstation))}\r\n {SetState('eddi_context_redirected_to', cat(event.newdestinationsystem,\"_\",event.newdestinationstation))}\r\n \r\n {set mission to MissionDetails(event.missionid)}\r\n\r\n {if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n |else:\r\n {set type to mission.tags[0]}\r\n }\r\n {set type to cat(type, \" mission\")}\r\n\r\n {if mission.status = \"Claim\" && mission.destinationsystem = mission.originsystem:\r\n {type} {Occasionally(2, \"requirements\")} completed.\r\n Redirected to {Occasionally(2, \"mission\")} origin.\r\n |elif mission.destinations:\r\n Chained {type} redirected to the {P(event.newdestinationsystem, \"starsystem\")} system.\r\n |else:\r\n {type} redirected to \r\n {if event.newdestinationstation:\r\n {P(event.newdestinationstation, \"station\")} in the {P(event.newdestinationsystem, \"starsystem\")} system.\r\n |else:\r\n the {P(event.newdestinationsystem, \"starsystem\")} system.\r\n }\r\n }\r\n}", | |
"defaultValue": "{_ Mission redirected }\r\n{_ Triggered when a mission is redirected }\r\n\r\n{set redirected_from to cat(event.olddestinationsystem,\"_\",event.olddestinationstation)}\r\n{set redirected_to to cat(event.newdestinationsystem,\"_\",event.newdestinationstation)}\r\n\r\n{if state.eddi_context_last_subject = 'mission' \r\n && state.eddi_context_last_action = 'redirected' \r\n && state.eddi_context_redirected_mission = event.name\r\n && state.eddi_context_redirected_from = redirected_from \r\n && state.eddi_context_redirected_to = redirected_to:\r\n {_ Duplicate from stacked similar mission, do nothing }\r\n|else:\r\n {_ Context }\r\n {SetState('eddi_context_last_subject', 'mission')}\r\n {SetState('eddi_context_last_action', 'redirected')}\r\n {SetState('eddi_context_redirected_mission', event.name)}\r\n {SetState('eddi_context_redirected_from', cat(event.olddestinationsystem,\"_\",event.olddestinationstation))}\r\n {SetState('eddi_context_redirected_to', cat(event.newdestinationsystem,\"_\",event.newdestinationstation))}\r\n \r\n {set mission to MissionDetails(event.missionid)}\r\n\r\n {if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n |else:\r\n {set type to mission.tags[0]}\r\n }\r\n {set type to cat(type, \" mission\")}\r\n\r\n {if mission.status = \"Claim\" && mission.destinationsystem = mission.originsystem:\r\n {type} {Occasionally(2, \"requirements\")} completed.\r\n Redirected to {Occasionally(2, \"mission\")} origin.\r\n |elif mission.destinations:\r\n Chained {type} redirected to the {P(event.newdestinationsystem, \"starsystem\")} system.\r\n |else:\r\n {type} redirected to \r\n {if event.newdestinationstation:\r\n {P(event.newdestinationstation, \"station\")} in the {P(event.newdestinationsystem, \"starsystem\")} system.\r\n |else:\r\n the {P(event.newdestinationsystem, \"starsystem\")} system.\r\n }\r\n }\r\n}", | |
"default": true | |
}, | |
"Mission report": { | |
"name": "Mission report", | |
"description": "Report the current mission log", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Mission report }\r\n{_ Report the current mission log }\r\n\r\n\r\n{set mission_report to true}\r\n{F(\"Mission check galaxy\")}\r\n", | |
"defaultValue": "{_ Mission report }\r\n{_ Report the current mission log }\r\n\r\n\r\n{set mission_report to true}\r\n{F(\"Mission check galaxy\")}\r\n", | |
"default": true | |
}, | |
"Mission warning": { | |
"name": "Mission warning", | |
"description": "Triggered when a mission is about to expire, based on a set threshold", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Mission warning }\r\n{_ Triggered when a mission is about to expire, based on a set threshold }\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'mission')}\r\n{SetState('eddi_context_last_action', 'warning')}\r\n\r\n{set mission to MissionDetails(event.missionid)}\r\n\r\n{if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n|else:\r\n {set type to mission.tags[0]}\r\n}\r\n{set type to cat(type, \" mission\")}\r\n\r\nWarning: {type} {if mission.faction: for {P(mission.faction, \"faction\")}} will expire in {event.remaining} minutes.", | |
"defaultValue": "{_ Mission warning }\r\n{_ Triggered when a mission is about to expire, based on a set threshold }\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'mission')}\r\n{SetState('eddi_context_last_action', 'warning')}\r\n\r\n{set mission to MissionDetails(event.missionid)}\r\n\r\n{if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n|else:\r\n {set type to mission.tags[0]}\r\n}\r\n{set type to cat(type, \" mission\")}\r\n\r\nWarning: {type} {if mission.faction: for {P(mission.faction, \"faction\")}} will expire in {event.remaining} minutes.", | |
"default": true | |
}, | |
"Missions": { | |
"name": "Missions", | |
"description": "Triggered at startup, with basic information of the Mission Log", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Missions }\r\n{_ Triggered at startup, with basic information of the Mission Log }\r\n\r\n{F(\"Mission check galaxy\")}", | |
"defaultValue": "{_ Missions }\r\n{_ Triggered at startup, with basic information of the Mission Log }\r\n\r\n{F(\"Mission check galaxy\")}", | |
"default": true | |
}, | |
"Modification crafted": { | |
"name": "Modification crafted", | |
"description": "Triggered when you craft a modification to a module", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Module arrived": { | |
"name": "Module arrived", | |
"description": "Triggered when you complete a module transfer", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{Occasionally(2, '{F(\\'Honorific\\')}, ')}\r\nYour {event.module.name} has\r\n\r\n{OneOf('arrived {if station.name != event.station && event.station: at}', \r\n 'completed its transfer {if station.name != event.station && event.station: to}')}\r\n\r\n{if station.name != event.station && event.station:\r\n {P(event.station, \"station\")}\r\n {if system.name != event.system && event.system:\r\n in the {P(event.system, \"starsystem\")} system\r\n }\r\n}.", | |
"defaultValue": "{Occasionally(2, '{F(\\'Honorific\\')}, ')}\r\nYour {event.module.name} has\r\n\r\n{OneOf('arrived {if station.name != event.station && event.station: at}', \r\n 'completed its transfer {if station.name != event.station && event.station: to}')}\r\n\r\n{if station.name != event.station && event.station:\r\n {P(event.station, \"station\")}\r\n {if system.name != event.system && event.system:\r\n in the {P(event.system, \"starsystem\")} system\r\n }\r\n}.", | |
"default": true | |
}, | |
"Module info": { | |
"name": "Module info", | |
"description": "Triggered when a ModulesInfo.json file is generated/updated", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ This event updates `ship` module information: position, power, & priority _}", | |
"defaultValue": "{_ This event updates `ship` module information: position, power, & priority _}", | |
"default": true | |
}, | |
"Module purchased": { | |
"name": "Module purchased", | |
"description": "Triggered when you purchase a module in outfitting", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "You have purchased a\r\n{if icao_active:\r\n {event.buymodule.class} {ICAO(event.buymodule.grade)}\r\n|else:\r\n {Spacialise(cat(event.buymodule.class, event.buymodule.grade))}\r\n}\r\n\r\n{if type(event.buymodule.mount) != \"void\":\r\n {for index, value in event.buymodule.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n{event.buymodule.name} for {Humanise(event.buyprice)} credits\r\n\r\n{if type(event.sellmodule) != \"void\":\r\n , and sold a\r\n {if icao_active:\r\n {event.sellmodule.class} {ICAO(event.sellmodule.grade)}\r\n |else:\r\n {Spacialise(cat(event.sellmodule.class, event.sellmodule.grade))}\r\n }\r\n\r\n {if type(event.sellmodule.mount) != \"void\":\r\n {for index, value in event.sellmodule.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n }\r\n {event.sellmodule.name} for {Humanise(event.sellprice)} credits\r\n\r\n|elif type(event.storedmodule) != \"void\":\r\n , and stored a\r\n {if icao_active:\r\n {event.storedmodule.class} {ICAO(event.storedmodule.grade)}\r\n |else:\r\n {Spacialise(cat(event.storedmodule.class, event.storedmodule.grade))}\r\n }\r\n\r\n {if type(event.storedmodule.mount) != \"void\":\r\n {for index, value in event.storedmodule.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n }\r\n {event.storedmodule.name}\r\n}.\r\n\r\n", | |
"defaultValue": "You have purchased a\r\n{if icao_active:\r\n {event.buymodule.class} {ICAO(event.buymodule.grade)}\r\n|else:\r\n {Spacialise(cat(event.buymodule.class, event.buymodule.grade))}\r\n}\r\n\r\n{if type(event.buymodule.mount) != \"void\":\r\n {for index, value in event.buymodule.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n{event.buymodule.name} for {Humanise(event.buyprice)} credits\r\n\r\n{if type(event.sellmodule) != \"void\":\r\n , and sold a\r\n {if icao_active:\r\n {event.sellmodule.class} {ICAO(event.sellmodule.grade)}\r\n |else:\r\n {Spacialise(cat(event.sellmodule.class, event.sellmodule.grade))}\r\n }\r\n\r\n {if type(event.sellmodule.mount) != \"void\":\r\n {for index, value in event.sellmodule.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n }\r\n {event.sellmodule.name} for {Humanise(event.sellprice)} credits\r\n\r\n|elif type(event.storedmodule) != \"void\":\r\n , and stored a\r\n {if icao_active:\r\n {event.storedmodule.class} {ICAO(event.storedmodule.grade)}\r\n |else:\r\n {Spacialise(cat(event.storedmodule.class, event.storedmodule.grade))}\r\n }\r\n\r\n {if type(event.storedmodule.mount) != \"void\":\r\n {for index, value in event.storedmodule.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n }\r\n {event.storedmodule.name}\r\n}.\r\n\r\n", | |
"default": true | |
}, | |
"Module retrieved": { | |
"name": "Module retrieved", | |
"description": "Triggered when you fetch a previously stored module", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "You have retrieved a \r\n{if icao_active:\r\n {event.module.class} {ICAO(event.module.grade)}\r\n|else:\r\n {Spacialise(cat(event.module.class, event.module.grade))}\r\n}\r\n\r\n\r\n{if type(event.module.mount) != \"void\":\r\n {for index, value in event.module.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n\r\n{event.module.name} from storage\r\n\r\n{if type(event.swapoutmodule) != \"void\":\r\n and stored a \r\n {if icao_active:\r\n {event.swapoutmodule.class} {ICAO(event.swapoutmodule.grade)}\r\n |else:\r\n {Spacialise(cat(event.swapoutmodule.class, event.swapoutmodule.grade))}\r\n }\r\n {if type(event.swapoutmodule.mount) != \"void\":\r\n {for index, value in event.swapoutmodule.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n }\r\n {event.swapoutmodule.name}\r\n}\r\n\r\n{if type(event.cost) != \"void\": for a cost of {Humanise(event.cost)} credits}\r\n.", | |
"defaultValue": "You have retrieved a \r\n{if icao_active:\r\n {event.module.class} {ICAO(event.module.grade)}\r\n|else:\r\n {Spacialise(cat(event.module.class, event.module.grade))}\r\n}\r\n\r\n\r\n{if type(event.module.mount) != \"void\":\r\n {for index, value in event.module.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n\r\n{event.module.name} from storage\r\n\r\n{if type(event.swapoutmodule) != \"void\":\r\n and stored a \r\n {if icao_active:\r\n {event.swapoutmodule.class} {ICAO(event.swapoutmodule.grade)}\r\n |else:\r\n {Spacialise(cat(event.swapoutmodule.class, event.swapoutmodule.grade))}\r\n }\r\n {if type(event.swapoutmodule.mount) != \"void\":\r\n {for index, value in event.swapoutmodule.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n }\r\n {event.swapoutmodule.name}\r\n}\r\n\r\n{if type(event.cost) != \"void\": for a cost of {Humanise(event.cost)} credits}\r\n.", | |
"default": true | |
}, | |
"Module sold": { | |
"name": "Module sold", | |
"description": "Triggered when selling a module to outfitting", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "You have sold a \r\n{if icao_active:\r\n {event.module.class} {ICAO(event.module.grade)}\r\n|else:\r\n {Spacialise(cat(event.module.class, event.module.grade))}\r\n}\r\n\r\n{if type(event.module.mount) != \"void\":\r\n {for index, value in event.module.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n\r\n{event.module.name} for {Humanise(event.price)} credits.", | |
"defaultValue": "You have sold a \r\n{if icao_active:\r\n {event.module.class} {ICAO(event.module.grade)}\r\n|else:\r\n {Spacialise(cat(event.module.class, event.module.grade))}\r\n}\r\n\r\n{if type(event.module.mount) != \"void\":\r\n {for index, value in event.module.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n\r\n{event.module.name} for {Humanise(event.price)} credits.", | |
"default": true | |
}, | |
"Module sold from storage": { | |
"name": "Module sold from storage", | |
"description": "Triggered when selling a module from storage", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "You have sold a \r\n{if icao_active:\r\n {event.module.class} {ICAO(event.module.grade)}\r\n|else:\r\n {Spacialise(cat(event.module.class, event.module.grade))}\r\n}\r\n\r\n{if type(event.module.mount) != \"void\":\r\n {for index, value in event.module.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n\r\n{event.module.name} from your stores for {Humanise(event.price)} credits.", | |
"defaultValue": "You have sold a \r\n{if icao_active:\r\n {event.module.class} {ICAO(event.module.grade)}\r\n|else:\r\n {Spacialise(cat(event.module.class, event.module.grade))}\r\n}\r\n\r\n{if type(event.module.mount) != \"void\":\r\n {for index, value in event.module.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n\r\n{event.module.name} from your stores for {Humanise(event.price)} credits.", | |
"default": true | |
}, | |
"Module stored": { | |
"name": "Module stored", | |
"description": "Triggered when you store a module", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "You have stored a \r\n{if icao_active:\r\n {event.module.class} {ICAO(event.module.grade)}\r\n|else:\r\n {Spacialise(cat(event.module.class, event.module.grade))}\r\n}\r\n\r\n{if type(event.module.mount) != \"void\":\r\n {for index, value in event.module.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n\r\n{event.module.name}\r\n\r\n{if type(event.cost) != \"void\": for a cost of {Humanise(event.cost)} credits}.", | |
"defaultValue": "You have stored a \r\n{if icao_active:\r\n {event.module.class} {ICAO(event.module.grade)}\r\n|else:\r\n {Spacialise(cat(event.module.class, event.module.grade))}\r\n}\r\n\r\n{if type(event.module.mount) != \"void\":\r\n {for index, value in event.module.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n\r\n{event.module.name}\r\n\r\n{if type(event.cost) != \"void\": for a cost of {Humanise(event.cost)} credits}.", | |
"default": true | |
}, | |
"Module swapped": { | |
"name": "Module swapped", | |
"description": "Triggered when modules are swapped between slots on the ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "You have swapped the positions of a \r\n{if icao_active:\r\n {event.frommodule.class} {ICAO(event.frommodule.grade)}\r\n|else:\r\n {Spacialise(cat(event.frommodule.class, event.frommodule.grade))}\r\n}\r\n\r\n{if type(event.frommodule.mount) != \"void\":\r\n {for index, value in event.frommodule.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n\r\n{event.frommodule.name} and \r\n\r\n{if event.tomodule:\r\n a \r\n {if icao_active:\r\n {event.tomodule.class} {ICAO(event.tomodule.grade)}\r\n |else:\r\n {Spacialise(cat(event.tomodule.class, event.tomodule.grade))}\r\n }\r\n {if type(event.tomodule.mount) != \"void\":\r\n {for index, value in event.tomodule.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n }\r\n {event.tomodule.name}.\r\n|else: \r\n an empty slot.\r\n}", | |
"defaultValue": "You have swapped the positions of a \r\n{if icao_active:\r\n {event.frommodule.class} {ICAO(event.frommodule.grade)}\r\n|else:\r\n {Spacialise(cat(event.frommodule.class, event.frommodule.grade))}\r\n}\r\n\r\n{if type(event.frommodule.mount) != \"void\":\r\n {for index, value in event.frommodule.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n\r\n{event.frommodule.name} and \r\n\r\n{if event.tomodule:\r\n a \r\n {if icao_active:\r\n {event.tomodule.class} {ICAO(event.tomodule.grade)}\r\n |else:\r\n {Spacialise(cat(event.tomodule.class, event.tomodule.grade))}\r\n }\r\n {if type(event.tomodule.mount) != \"void\":\r\n {for index, value in event.tomodule.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n }\r\n {event.tomodule.name}.\r\n|else: \r\n an empty slot.\r\n}", | |
"default": true | |
}, | |
"Module transfer": { | |
"name": "Module transfer", | |
"description": "Triggered when you transfer a module from storage at another station", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "You have transferred a \r\n{if icao_active:\r\n {event.module.class} {ICAO(event.module.grade)}\r\n|else:\r\n {Spacialise(cat(event.module.class, event.module.grade))}\r\n}\r\n\r\n{if event.module.mount:\r\n {for index, value in event.module.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n\r\n{event.module.name} \r\n\r\n{if event.transfercost: for a cost of {Humanise(event.transfercost)} credits}.\r\n\r\n{set t_remaining to event.transfertime}\r\n\r\n{if t_remaining:\r\n\r\n {Pause(1000)}\r\n Expected arrival in:\r\n\r\n {if t_remaining > (60*60*24):\r\n {set t_days to floor(t_remaining/(60*60*24))}\r\n {t_days} days,\r\n {set t_remaining to t_remaining-(t_days*(60*60*24))}\r\n }\r\n\r\n {if t_remaining > 3600:\r\n {set t_hours to floor(t_remaining/3600)}\r\n {t_hours} hours,\r\n {set t_remaining to t_remaining-(t_hours*(60*60))}\r\n }\r\n\r\n {if t_remaining > 60:\r\n {if t_days || t_hours: and}\r\n {set t_minutes to round(t_remaining/(60),0)}\r\n {t_minutes} minutes.\r\n }\r\n}", | |
"defaultValue": "You have transferred a \r\n{if icao_active:\r\n {event.module.class} {ICAO(event.module.grade)}\r\n|else:\r\n {Spacialise(cat(event.module.class, event.module.grade))}\r\n}\r\n\r\n{if event.module.mount:\r\n {for index, value in event.module.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n}\r\n\r\n{event.module.name} \r\n\r\n{if event.transfercost: for a cost of {Humanise(event.transfercost)} credits}.\r\n\r\n{set t_remaining to event.transfertime}\r\n\r\n{if t_remaining:\r\n\r\n {Pause(1000)}\r\n Expected arrival in:\r\n\r\n {if t_remaining > (60*60*24):\r\n {set t_days to floor(t_remaining/(60*60*24))}\r\n {t_days} days,\r\n {set t_remaining to t_remaining-(t_days*(60*60*24))}\r\n }\r\n\r\n {if t_remaining > 3600:\r\n {set t_hours to floor(t_remaining/3600)}\r\n {t_hours} hours,\r\n {set t_remaining to t_remaining-(t_hours*(60*60))}\r\n }\r\n\r\n {if t_remaining > 60:\r\n {if t_days || t_hours: and}\r\n {set t_minutes to round(t_remaining/(60),0)}\r\n {t_minutes} minutes.\r\n }\r\n}", | |
"default": true | |
}, | |
"Modules stored": { | |
"name": "Modules stored", | |
"description": "Triggered when you store multiple modules", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "You have stored the following modules:\r\n\r\n{for module in event.modules:\r\n {if icao_active:\r\n {module.class} {ICAO(module.grade)}\r\n |else:\r\n {Spacialise(cat(module.class, module.grade))}\r\n }\r\n {if type(module.mount) != \"void\":\r\n {for index, value in module.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n }\r\n {module.name}.\r\n {Pause(400)}\r\n}", | |
"defaultValue": "You have stored the following modules:\r\n\r\n{for module in event.modules:\r\n {if icao_active:\r\n {module.class} {ICAO(module.grade)}\r\n |else:\r\n {Spacialise(cat(module.class, module.grade))}\r\n }\r\n {if type(module.mount) != \"void\":\r\n {for index, value in module.mount: {set mount to value}}\r\n {if mount = 0:\r\n fixed\r\n |elif mount = 1:\r\n giimballed\r\n |elif mount = 2:\r\n turreted\r\n }\r\n }\r\n {module.name}.\r\n {Pause(400)}\r\n}", | |
"default": true | |
}, | |
"Music": { | |
"name": "Music", | |
"description": "Triggered when the game music 'mood' changes", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Nav beacon scan": { | |
"name": "Nav beacon scan", | |
"description": "Triggered when you scan a nav beacon, before the scan data for all the bodies in the system is written into the journal", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context _}\r\n{SetState('eddi_context_last_subject', 'nav beacon')}\r\n{SetState('eddi_context_last_action', 'scan')}\r\n{SetState('eddi_context_star_system', system.name)}\r\n{SetState('eddi_context_nav_scans', event.numbodies)}\r\n\r\n{set nav to OneOf(\"nav\", \"navigation\")}\r\n{set beacon to OneOf(\"beacon\", \"buoy\")}\r\n{OneOf(\"This {nav} {beacon} has transferred details of {event.numbodies} bodies in this system.\",\r\n \"Details on {event.numbodies} bodies in this system received.\")}\r\n\r\n{Pause(500)}", | |
"defaultValue": "{_ Context _}\r\n{SetState('eddi_context_last_subject', 'nav beacon')}\r\n{SetState('eddi_context_last_action', 'scan')}\r\n{SetState('eddi_context_star_system', system.name)}\r\n{SetState('eddi_context_nav_scans', event.numbodies)}\r\n\r\n{set nav to OneOf(\"nav\", \"navigation\")}\r\n{set beacon to OneOf(\"beacon\", \"buoy\")}\r\n{OneOf(\"This {nav} {beacon} has transferred details of {event.numbodies} bodies in this system.\",\r\n \"Details on {event.numbodies} bodies in this system received.\")}\r\n\r\n{Pause(500)}", | |
"default": true | |
}, | |
"Near surface": { | |
"name": "Near surface", | |
"description": "Triggered when you enter or depart orbit around a surface", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Next jump": { | |
"name": "Next jump", | |
"description": "Triggered when selecting a star system to jump to", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Next jump }\r\n{_ Triggered when selecting a star system to jump to }\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_remaining_jumps', event.remainingjumpsinroute)}", | |
"defaultValue": "{_ Next jump }\r\n{_ Triggered when selecting a star system to jump to }\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_remaining_jumps', event.remainingjumpsinroute)}", | |
"default": true | |
}, | |
"NPC attack commenced": { | |
"name": "NPC attack commenced", | |
"description": "Triggered when an attack on your ship by an NPC is detected", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Warning: attack \r\n{if event.by:\r\n by {event.by} \r\n}\r\ndetected.", | |
"defaultValue": "Warning: attack \r\n{if event.by:\r\n by {event.by} \r\n}\r\ndetected.", | |
"default": true | |
}, | |
"NPC cargo scan commenced": { | |
"name": "NPC cargo scan commenced", | |
"description": "Triggered when a cargo scan on your ship by an NPC is detected", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ See if we are carrying non-limpet cargo}\r\n{set carryingvaluablecargo to 0}\r\n{for cargo in ship.cargo:\r\n {if cargo.commodity != 'Limpet':\r\n {set carryingvaluablecargo to 1}\r\n }\r\n}\r\n\r\n{if carryingvaluablecargo = 1:\r\n Caution: cargo scan\r\n {if event.by:\r\n by {event.by} \r\n }\r\n detected.\r\n}\r\n", | |
"defaultValue": "{_ See if we are carrying non-limpet cargo}\r\n{set carryingvaluablecargo to 0}\r\n{for cargo in ship.cargo:\r\n {if cargo.commodity != 'Limpet':\r\n {set carryingvaluablecargo to 1}\r\n }\r\n}\r\n\r\n{if carryingvaluablecargo = 1:\r\n Caution: cargo scan\r\n {if event.by:\r\n by {event.by} \r\n }\r\n detected.\r\n}\r\n", | |
"default": true | |
}, | |
"NPC interdiction commenced": { | |
"name": "NPC interdiction commenced", | |
"description": "Triggered when an interdiction attempt on your ship by an NPC is detected", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Warning: interdiction attempt\r\n{if event.by:\r\n by {event.by} \r\n}\r\ndetected.\r\n\r\n{Occasionally(3, \"Throttle down or evade.\")}", | |
"defaultValue": "Warning: interdiction attempt\r\n{if event.by:\r\n by {event.by} \r\n}\r\ndetected.\r\n\r\n{Occasionally(3, \"Throttle down or evade.\")}", | |
"default": true | |
}, | |
"Passengers": { | |
"name": "Passengers", | |
"description": "Triggered at session start from Passengers event", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Power commodity delivered": { | |
"name": "Power commodity delivered", | |
"description": "Triggered when a commander delivers a commodity to a power", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{event.amount} units of {event.commodity} delivered {Occasionally(2, \"for {P(event.power, 'power')}\")}.", | |
"defaultValue": "{event.amount} units of {event.commodity} delivered {Occasionally(2, \"for {P(event.power, 'power')}\")}.", | |
"default": true | |
}, | |
"Power commodity fast tracked": { | |
"name": "Power commodity fast tracked", | |
"description": "Triggered when a commander fast tracks a commodity of a power", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{Humanise(event.amount)} credits spent fast-tracking commodities {Occasionally(2, \"for {P(event.power, 'power')}\")}.", | |
"defaultValue": "{Humanise(event.amount)} credits spent fast-tracking commodities {Occasionally(2, \"for {P(event.power, 'power')}\")}.", | |
"default": true | |
}, | |
"Power commodity obtained": { | |
"name": "Power commodity obtained", | |
"description": "Triggered when a commander obtains a commodity from a power", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{event.amount} units of {event.commodity} obtained {Occasionally(2, \"for {P(event.power, 'power')}\")}.", | |
"defaultValue": "{event.amount} units of {event.commodity} obtained {Occasionally(2, \"for {P(event.power, 'power')}\")}.", | |
"default": true | |
}, | |
"Power defected": { | |
"name": "Power defected", | |
"description": "Triggered when you defect from one power to another", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "You have defected from {P(event.frompower, \"power\")} to {P(event.topower, \"power\")}.", | |
"defaultValue": "You have defected from {P(event.frompower, \"power\")} to {P(event.topower, \"power\")}.", | |
"default": true | |
}, | |
"Power expansion vote cast": { | |
"name": "Power expansion vote cast", | |
"description": "Triggered when a commander votes for system expansion", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Vote\r\n{OneOf(\"cast\", \"registered\")}", | |
"defaultValue": "Vote\r\n{OneOf(\"cast\", \"registered\")}", | |
"default": true | |
}, | |
"Power joined": { | |
"name": "Power joined", | |
"description": "Triggered when you join a power", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "You have aligned yourself with {P(event.power, \"power\")}", | |
"defaultValue": "You have aligned yourself with {P(event.power, \"power\")}", | |
"default": true | |
}, | |
"Power left": { | |
"name": "Power left", | |
"description": "Triggered when you leave a power", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "You are no longer aligned with {P(event.power, \"power\")}", | |
"defaultValue": "You are no longer aligned with {P(event.power, \"power\")}", | |
"default": true | |
}, | |
"Power preparation vote cast": { | |
"name": "Power preparation vote cast", | |
"description": "Triggered when a commander votes for system preparation", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Vote\r\n{OneOf(\"cast\", \"registered\")}", | |
"defaultValue": "Vote\r\n{OneOf(\"cast\", \"registered\")}", | |
"default": true | |
}, | |
"Power salary claimed": { | |
"name": "Power salary claimed", | |
"description": "Triggered when a commander claims salary from a power", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Salary of {Humanise(event.amount)} credits claimed {Occasionally(2, \"from {P(event.power, 'power')}\")}.", | |
"defaultValue": "Salary of {Humanise(event.amount)} credits claimed {Occasionally(2, \"from {P(event.power, 'power')}\")}.", | |
"default": true | |
}, | |
"Power voucher received": { | |
"name": "Power voucher received", | |
"description": "Triggered when a commander turns in combat vouchers against an opposing power", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Powerplay": { | |
"name": "Powerplay", | |
"description": "Triggered periodically when pledged to a power", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "You are pledged to {P(event.power, \"power\")}. \r\nYou have served for \r\n{if event.timepledgedweeks > 1:\r\n {Humanise(event.timepledgedweeks)} weeks \r\n|elif event.timepledgedweeks = 1:\r\n one week \r\n|elif event.timepledgeddays > 1:\r\n {Humanise(event.timepledgeddays)} days\r\n|elif event.timepledgeddays = 1:\r\n one day\r\n|else:\r\n less than one day\r\n}\r\nand are at rank {event.rank} with \r\n{if event.merits > 0:\r\n {Humanise(event.merits)}\r\n|else:\r\n no\r\n}\r\naccumulated merits.\r\n", | |
"defaultValue": "You are pledged to {P(event.power, \"power\")}. \r\nYou have served for \r\n{if event.timepledgedweeks > 1:\r\n {Humanise(event.timepledgedweeks)} weeks \r\n|elif event.timepledgedweeks = 1:\r\n one week \r\n|elif event.timepledgeddays > 1:\r\n {Humanise(event.timepledgeddays)} days\r\n|elif event.timepledgeddays = 1:\r\n one day\r\n|else:\r\n less than one day\r\n}\r\nand are at rank {event.rank} with \r\n{if event.merits > 0:\r\n {Humanise(event.merits)}\r\n|else:\r\n no\r\n}\r\naccumulated merits.\r\n", | |
"default": true | |
}, | |
"Repair drone": { | |
"name": "Repair drone", | |
"description": "Triggered when your ship is repaired via a repair limpet controller", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{set systemsrepaired to []}\r\n\r\n{if event.hull:\r\n {set systemsrepaired to cat(systemsrepaired, [\"the hull\"])} \r\n}\r\n{if event.cockpit:\r\n {set systemsrepaired to cat(systemsrepaired, [\"the cockpit\"])} \r\n}\r\n{if event.corrosion:\r\n {set systemsrepaired to cat(systemsrepaired, [OneOf(\"corroded systems\", \"systems affected by corrosion\")])} \r\n}\r\n\r\n{if len(systemsrepaired) > 0:\r\n\r\n {set remote to Occasionally(2, \"remote\")}\r\n {set sequence to OneOf(\"sequence\", \"cycle\")}\r\n {OneOf(\r\n \"The limpet has completed it's {remote} repairs to\", \r\n \"{remote} {sequence} completed, repairs made to\"\r\n )}\r\n\r\n {set cur to 0}\r\n {while cur < len(systemsrepaired):\r\n {if cur = 0:\r\n |elif cur < len(systemsrepaired) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {systemsrepaired[cur]}\r\n {set cur to cur + 1}\r\n }\r\n}.\r\n", | |
"defaultValue": "{set systemsrepaired to []}\r\n\r\n{if event.hull:\r\n {set systemsrepaired to cat(systemsrepaired, [\"the hull\"])} \r\n}\r\n{if event.cockpit:\r\n {set systemsrepaired to cat(systemsrepaired, [\"the cockpit\"])} \r\n}\r\n{if event.corrosion:\r\n {set systemsrepaired to cat(systemsrepaired, [OneOf(\"corroded systems\", \"systems affected by corrosion\")])} \r\n}\r\n\r\n{if len(systemsrepaired) > 0:\r\n\r\n {set remote to Occasionally(2, \"remote\")}\r\n {set sequence to OneOf(\"sequence\", \"cycle\")}\r\n {OneOf(\r\n \"The limpet has completed it's {remote} repairs to\", \r\n \"{remote} {sequence} completed, repairs made to\"\r\n )}\r\n\r\n {set cur to 0}\r\n {while cur < len(systemsrepaired):\r\n {if cur = 0:\r\n |elif cur < len(systemsrepaired) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {systemsrepaired[cur]}\r\n {set cur to cur + 1}\r\n }\r\n}.\r\n", | |
"default": true | |
}, | |
"Repeat last speech": { | |
"name": "Repeat last speech", | |
"description": "Repeat the last thing said", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{state.eddi_context_last_speech}", | |
"defaultValue": "{state.eddi_context_last_speech}", | |
"default": true | |
}, | |
"Report last scan value": { | |
"name": "Report last scan value", | |
"description": "Report the estimated value of the last body scanned", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Preferences }\r\n{set minScanValue to 500000} {_ Set the minimum credit value that should be voiced _}\r\n\r\n{_ Context }\r\n{set scanValue to state.eddi_context_last_scan_estimated_value}\r\n\r\n{if scanValue >= minScanValue:\r\n {OneOf(\"This\", \"This data\", \"This scan\")} \r\n {OneOf(\"could\", \"might\", \"can\", \"should\") } \r\n {OneOf(\"fetch\", \"be worth\", \"get you\", \"sell for\")}\r\n {Humanise(scanValue)} credits.\r\n}\r\n", | |
"defaultValue": "{_ Preferences }\r\n{set minScanValue to 5000} {_ Set the minimum credit value that should be voiced _}\r\n\r\n{_ Context }\r\n{set scanValue to state.eddi_context_last_scan_estimated_value}\r\n\r\n{if scanValue >= minScanValue:\r\n {OneOf(\"This\", \"This data\", \"This scan\")} \r\n {OneOf(\"could\", \"might\", \"can\", \"should\") } \r\n {OneOf(\"fetch\", \"be worth\", \"get you\", \"sell for\")}\r\n {Humanise(scanValue)} credits.\r\n}\r\n", | |
"default": false | |
}, | |
"Respawned": { | |
"name": "Respawned", | |
"description": "Triggered when you respawn (either after injury or after handing yourself in to local authorities)", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if state.eddi_context_srv_deployed_id:\r\n {SetState('eddi_context_srv_deployed_id', \"\")}\r\n}", | |
"defaultValue": "{if state.eddi_context_srv_deployed_id:\r\n {SetState('eddi_context_srv_deployed_id', \"\")}\r\n}", | |
"default": true | |
}, | |
"Ring hotspots detected": { | |
"name": "Ring hotspots detected", | |
"description": "Triggered when hotspots are detected in a ring", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if ship.Role.invariantName = \"Mining\" || ship.Role.invariantName = \"Multipurpose\":\r\n {set hotspots to []}\r\n {for hotspot in event.hotspots: \r\n {set hotspot_desc to: \r\n {hotspot.amount} of {hotspot.commodity}\r\n }\r\n {set hotspots to cat(hotspots, [hotspot_desc])}\r\n }\r\n\r\n Hotspots detected.\r\n {List(hotspots)}\r\n}", | |
"defaultValue": "{if ship.Role.invariantName = \"Mining\" || ship.Role.invariantName = \"Multipurpose\":\r\n {set hotspots to []}\r\n {for hotspot in event.hotspots: \r\n {set hotspot_desc to: \r\n {hotspot.amount} of {hotspot.commodity}\r\n }\r\n {set hotspots to cat(hotspots, [hotspot_desc])}\r\n }\r\n\r\n Hotspots detected.\r\n {List(hotspots)}\r\n}", | |
"default": true | |
}, | |
"Ring mapped": { | |
"name": "Ring mapped", | |
"description": "Triggered after mapping a ring with the Surface Area Analysis scanner", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context}\r\n{SetState('eddi_context_last_action', 'scan')}\r\n{SetState('eddi_context_last_subject', 'ring')}\r\n{SetState('eddi_context_body_system', system.name)}\r\n{SetState('eddi_context_ring_name', event.ringname)}\r\n\r\n{_ Process the event _}\r\n\r\n{if ship.Role.edname = \"Exploration\" || ship.Role.edname = \"Multipurpose\":\r\n\r\n {Pause(3000)}\r\n\r\n {OneOf(\"mapping\", \"probing\", \"scanning\")}\r\n of {event.reserves} {event.composition} ring\r\n {OneOf(\"is\", \"is now\")}\r\n {OneOf(\"complete\", \"finished\")}.\r\n}", | |
"defaultValue": "{_ Context}\r\n{SetState('eddi_context_last_action', 'scan')}\r\n{SetState('eddi_context_last_subject', 'ring')}\r\n{SetState('eddi_context_body_system', system.name)}\r\n{SetState('eddi_context_ring_name', event.ringname)}\r\n\r\n{_ Process the event _}\r\n\r\n{if ship.Role.edname = \"Exploration\" || ship.Role.edname = \"Multipurpose\":\r\n\r\n {Pause(3000)}\r\n\r\n {OneOf(\"mapping\", \"probing\", \"scanning\")}\r\n of {event.reserves} {event.composition} ring\r\n {OneOf(\"is\", \"is now\")}\r\n {OneOf(\"complete\", \"finished\")}.\r\n}", | |
"default": true | |
}, | |
"Route details": { | |
"name": "Route details", | |
"description": "Triggered when a route has been generated or updated", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Route details _}\r\n{_ Triggered when a route has been generated or updated _}\r\n\r\n\r\n{_ Context _}\r\n{SetState('eddi_context_search_system', event.system)}\r\n{SetState('eddi_context_search_station', event.station)}\r\n{SetState('eddi_context_search_distance', event.distance)}\r\n{SetState('eddi_context_search_count', event.count)}\r\n\r\n{set clip_notify to false}\r\n{set type to event.routetype}\r\n{if type = \"encoded\" || type = \"facilitator\" || type = \"guardian\"\r\n || type = \"human\" || type = \"manufactured\" || type = \"raw\":\r\n\r\n {if type = \"facilitator\":\r\n {set service to \"interstellar factors contact\"}\r\n |elif type = \"encoded\" || type = \"manufactured\" || type = \"raw\":\r\n {set service to cat(type, \" materials trader\")}\r\n |elif type = \"guardian\" || type = \"human\":\r\n {set service to cat(type, \" technology broker\")}\r\n }\r\n\r\n {if event.system && event.system != \"\":\r\n The nearest {service} is at {P(event.station, \"station\")}, in the\r\n {if event.system = system.name:\r\n current system\r\n |else:\r\n {set clip_notify to true}\r\n {P(event.system, \"starsystem\")} system, {round(event.distance, 1)} lightyears away\r\n }.\r\n |else:\r\n {service} not found within sensor range.\r\n }\r\n|elif type = \"cancel\":\r\n {if !va_active:\r\n {if event.system && event.system != \"\":\r\n Cancelled destination setting to the {P(event.system, \"starsystem\")} system.\r\n }\r\n }\r\n|elif type = \"expiring\":\r\n {if event.system && event.system != \"\":\r\n {set mission to MissionDetails(event.missionids[0])}\r\n\r\n {if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n |else:\r\n {set type to mission.tags[0]}\r\n }\r\n {set type to cat(type, \" mission\")}\r\n\r\n {type} {if mission.faction: for {P(mission.faction, \"faction\")}}\r\n {if mission.destinationsystem: in the\r\n {if mission.destinationsystem = system.name:\r\n current\r\n |else:\r\n {set clip_notify to true}\r\n {P(mission.destinationsystem, \"starsystem\")}\r\n } system\r\n } is expiring next.\r\n |else:\r\n No active missions found.\r\n }\r\n|elif type = \"farthest\":\r\n {if event.system && event.system != \"\":\r\n Your {if missionsCount = 1: only |else: farthest}\r\n mission target is in the\r\n {if event.system = system.name:\r\n current system\r\n |else:\r\n {set clip_notify to true}\r\n {P(event.system, \"starsystem\")} system, {round(event.distance, 1)} lightyears away\r\n }.\r\n |else:\r\n Mission not found with a designated target system.\r\n }\r\n|elif type = \"most\":\r\n {if missionsCount = 1:\r\n Your only mission target is {Occasionally(2,\"located\")} in\r\n {if missions[0].destinationsystem = \"\":\r\n an unknown\r\n |elif missions[0].destinationsystem = system.name:\r\n the current\r\n |else:\r\n the {P(missions[0].destinationsystem, \"starsystem\")}\r\n }\r\n {Occasionally(2,\"star\")} system.\r\n |elif event.system && event.system != \"\":\r\n {set systems to split(event.route, \"_\")}\r\n {set systems_count to len(systems)}\r\n\r\n {if systems_count = 1:\r\n {if event.system = system.name:\r\n {set system_most to \"The current system\"}\r\n |else:\r\n {set clip_notify to true}\r\n {set system_most to cat(\"The \", P(event.system, 'starsystem'), \" system\")}\r\n }\r\n {OneOf(\"Most of your missions are {Occasionally(2,'located')} in {system_most}\",\r\n \"{system_most} has {OneOf('the most','most of your')} missions\",\r\n \"{system_most} has the most missions for you to complete\")}.\r\n |elif systems_count > 2:\r\n You have {event.count} mission target{if event.count > 1:s} each, in the\r\n\r\n {_ Don't include the home system from the route list _}\r\n {set cur to 0}\r\n {set systems_count to systems_count - 1}\r\n {while cur < len(systems_count):\r\n {P(systems[cur], \"starsystem\")}\r\n {set cur to cur + 1}\r\n {if cur = systems_count-1: and |elif cur < systems_count: ,}\r\n } systems.\r\n }\r\n |else:\r\n Mission not found with a designated target system.\r\n }\r\n|elif type = \"nearest\":\r\n {if event.system && event.system != \"\":\r\n Your {if missionsCount = 1: only |else: nearest}\r\n mission target is in the\r\n {if event.system = system.name:\r\n current system\r\n |else:\r\n {set clip_notify to true}\r\n {P(event.system, \"starsystem\")} system, {round(event.distance, 1)} lightyears away\r\n }.\r\n |else:\r\n Mission not found with a designated target system.\r\n }\r\n|elif type = \"route\":\r\n {if event.system && event.system != \"\":\r\n Missions route calculated for {event.count} systems.\r\n Total route distance is {round(event.routedistance, 1)} lightyears.\r\n First mission destination is {P(event.system, \"starsystem\")}, {round(event.distance, 1)} lightyears away.\r\n {set clip_notify to true}\r\n |else:\r\n Unable to calculate missions route.\r\n }\r\n|elif type = \"set\":\r\n {if !va_active:\r\n {if event.system && event.system != \"\":\r\n Destination set to the {P(event.system, \"starsystem\")} system, {round(event.distance, 1)} lightyears away.\r\n |else:\r\n Unable to set destination. \r\n }\r\n }\r\n|elif type = \"source\":\r\n {if event.count > 0:\r\n {set systems to split(event.route, \"_\")}\r\n\r\n {set pos to 0}\r\n {while pos < event.count:\r\n\r\n {set source_cargo to []}\r\n {for missionid in event.missionids:\r\n {set haulage to HaulageDetails(missionid)}\r\n {if haulage.sourcesystem = systems[pos]:\r\n {set cargo to CargoDetails(missionid)}\r\n {if find(source_cargo, cargo.name) = -1:\r\n {set source_cargo to cat(source_cargo, [cargo.name])}\r\n }\r\n }\r\n }\r\n\r\n {if pos = 0:\r\n Your {if event.count = 1: only |else: nearest}\r\n |elif pos = 1:\r\n Additionally, your\r\n |elif pos = event.count - 1:\r\n Lastly, your\r\n |else:\r\n Your\r\n }\r\n\r\n mission cargo source for\r\n {set cur to 0}\r\n {while cur < len(source_cargo):\r\n {source_cargo[cur]}\r\n {set cur to cur + 1}\r\n {if cur = len(source_cargo) - 1: and |elif cur < len(source_cargo): ,}\r\n }\r\n\r\n is in the\r\n {if systems[pos] = system.name:\r\n current system\r\n |else:\r\n {set clip_notify to true}\r\n {P(systems[pos], \"starsystem\")} system,\r\n {set distance to Distance(system.name, systems[pos])}\r\n {round(distance, 1)} light years away\r\n }.\r\n {set pos to pos + 1}\r\n }\r\n {SetState('eddi_context_cargo_source', event.route)}\r\n |else:\r\n Cargo source not found with a designated target system.\r\n }\r\n|elif type = \"update\":\r\n {if event.system && event.system != \"\":\r\n Next mission destination is {P(event.system, \"starsystem\")}, {round(event.distance, 1)} lightyears away.\r\n {set clip_notify to true}\r\n }\r\n}\r\n\r\n{if clip_notify && !va_active:\r\n {Pause(1000)}\r\n Clipboard set to destination system.\r\n}\r\n\r\n", | |
"defaultValue": "{_ Route details _}\r\n{_ Triggered when a route has been generated or updated _}\r\n\r\n\r\n{_ Context _}\r\n{SetState('eddi_context_search_system', event.system)}\r\n{SetState('eddi_context_search_station', event.station)}\r\n{SetState('eddi_context_search_distance', event.distance)}\r\n{SetState('eddi_context_search_count', event.count)}\r\n\r\n{set clip_notify to false}\r\n{set type to event.routetype}\r\n{if type = \"encoded\" || type = \"facilitator\" || type = \"guardian\"\r\n || type = \"human\" || type = \"manufactured\" || type = \"raw\":\r\n\r\n {if type = \"facilitator\":\r\n {set service to \"interstellar factors contact\"}\r\n |elif type = \"encoded\" || type = \"manufactured\" || type = \"raw\":\r\n {set service to cat(type, \" materials trader\")}\r\n |elif type = \"guardian\" || type = \"human\":\r\n {set service to cat(type, \" technology broker\")}\r\n }\r\n\r\n {if event.system && event.system != \"\":\r\n The nearest {service} is at {P(event.station, \"station\")}, in the\r\n {if event.system = system.name:\r\n current system\r\n |else:\r\n {set clip_notify to true}\r\n {P(event.system, \"starsystem\")} system, {round(event.distance, 1)} lightyears away\r\n }.\r\n |else:\r\n {service} not found within sensor range.\r\n }\r\n|elif type = \"cancel\":\r\n {if !va_active:\r\n {if event.system && event.system != \"\":\r\n Cancelled destination setting to the {P(event.system, \"starsystem\")} system.\r\n }\r\n }\r\n|elif type = \"expiring\":\r\n {if event.system && event.system != \"\":\r\n {set mission to MissionDetails(event.missionids[0])}\r\n\r\n {if find(mission.invariantTags, \"Transport\") > -1:\r\n {set type to \"Transport \"}\r\n {set type to cat(type, mission.passengertype)}\r\n |else:\r\n {set type to mission.tags[0]}\r\n }\r\n {set type to cat(type, \" mission\")}\r\n\r\n {type} {if mission.faction: for {P(mission.faction, \"faction\")}}\r\n {if mission.destinationsystem: in the\r\n {if mission.destinationsystem = system.name:\r\n current\r\n |else:\r\n {set clip_notify to true}\r\n {P(mission.destinationsystem, \"starsystem\")}\r\n } system\r\n } is expiring next.\r\n |else:\r\n No active missions found.\r\n }\r\n|elif type = \"farthest\":\r\n {if event.system && event.system != \"\":\r\n Your {if missionsCount = 1: only |else: farthest}\r\n mission target is in the\r\n {if event.system = system.name:\r\n current system\r\n |else:\r\n {set clip_notify to true}\r\n {P(event.system, \"starsystem\")} system, {round(event.distance, 1)} lightyears away\r\n }.\r\n |else:\r\n Mission not found with a designated target system.\r\n }\r\n|elif type = \"most\":\r\n {if missionsCount = 1:\r\n Your only mission target is {Occasionally(2,\"located\")} in\r\n {if missions[0].destinationsystem = \"\":\r\n an unknown\r\n |elif missions[0].destinationsystem = system.name:\r\n the current\r\n |else:\r\n the {P(missions[0].destinationsystem, \"starsystem\")}\r\n }\r\n {Occasionally(2,\"star\")} system.\r\n |elif event.system && event.system != \"\":\r\n {set systems to split(event.route, \"_\")}\r\n {set systems_count to len(systems)}\r\n\r\n {if systems_count = 1:\r\n {if event.system = system.name:\r\n {set system_most to \"The current system\"}\r\n |else:\r\n {set clip_notify to true}\r\n {set system_most to cat(\"The \", P(event.system, 'starsystem'), \" system\")}\r\n }\r\n {OneOf(\"Most of your missions are {Occasionally(2,'located')} in {system_most}\",\r\n \"{system_most} has {OneOf('the most','most of your')} missions\",\r\n \"{system_most} has the most missions for you to complete\")}.\r\n |elif systems_count > 2:\r\n You have {event.count} mission target{if event.count > 1:s} each, in the\r\n\r\n {_ Don't include the home system from the route list _}\r\n {set cur to 0}\r\n {set systems_count to systems_count - 1}\r\n {while cur < len(systems_count):\r\n {P(systems[cur], \"starsystem\")}\r\n {set cur to cur + 1}\r\n {if cur = systems_count-1: and |elif cur < systems_count: ,}\r\n } systems.\r\n }\r\n |else:\r\n Mission not found with a designated target system.\r\n }\r\n|elif type = \"nearest\":\r\n {if event.system && event.system != \"\":\r\n Your {if missionsCount = 1: only |else: nearest}\r\n mission target is in the\r\n {if event.system = system.name:\r\n current system\r\n |else:\r\n {set clip_notify to true}\r\n {P(event.system, \"starsystem\")} system, {round(event.distance, 1)} lightyears away\r\n }.\r\n |else:\r\n Mission not found with a designated target system.\r\n }\r\n|elif type = \"route\":\r\n {if event.system && event.system != \"\":\r\n Missions route calculated for {event.count} systems.\r\n Total route distance is {round(event.routedistance, 1)} lightyears.\r\n First mission destination is {P(event.system, \"starsystem\")}, {round(event.distance, 1)} lightyears away.\r\n {set clip_notify to true}\r\n |else:\r\n Unable to calculate missions route.\r\n }\r\n|elif type = \"set\":\r\n {if !va_active:\r\n {if event.system && event.system != \"\":\r\n Destination set to the {P(event.system, \"starsystem\")} system, {round(event.distance, 1)} lightyears away.\r\n |else:\r\n Unable to set destination. \r\n }\r\n }\r\n|elif type = \"source\":\r\n {if event.count > 0:\r\n {set systems to split(event.route, \"_\")}\r\n\r\n {set pos to 0}\r\n {while pos < event.count:\r\n\r\n {set source_cargo to []}\r\n {for missionid in event.missionids:\r\n {set haulage to HaulageDetails(missionid)}\r\n {if haulage.sourcesystem = systems[pos]:\r\n {set cargo to CargoDetails(missionid)}\r\n {if find(source_cargo, cargo.name) = -1:\r\n {set source_cargo to cat(source_cargo, [cargo.name])}\r\n }\r\n }\r\n }\r\n\r\n {if pos = 0:\r\n Your {if event.count = 1: only |else: nearest}\r\n |elif pos = 1:\r\n Additionally, your\r\n |elif pos = event.count - 1:\r\n Lastly, your\r\n |else:\r\n Your\r\n }\r\n\r\n mission cargo source for\r\n {set cur to 0}\r\n {while cur < len(source_cargo):\r\n {source_cargo[cur]}\r\n {set cur to cur + 1}\r\n {if cur = len(source_cargo) - 1: and |elif cur < len(source_cargo): ,}\r\n }\r\n\r\n is in the\r\n {if systems[pos] = system.name:\r\n current system\r\n |else:\r\n {set clip_notify to true}\r\n {P(systems[pos], \"starsystem\")} system,\r\n {set distance to Distance(system.name, systems[pos])}\r\n {round(distance, 1)} light years away\r\n }.\r\n {set pos to pos + 1}\r\n }\r\n {SetState('eddi_context_cargo_source', event.route)}\r\n |else:\r\n Cargo source not found with a designated target system.\r\n }\r\n|elif type = \"update\":\r\n {if event.system && event.system != \"\":\r\n Next mission destination is {P(event.system, \"starsystem\")}, {round(event.distance, 1)} lightyears away.\r\n {set clip_notify to true}\r\n }\r\n}\r\n\r\n{if clip_notify && !va_active:\r\n {Pause(1000)}\r\n Clipboard set to destination system.\r\n}\r\n\r\n", | |
"default": true | |
}, | |
"Safe": { | |
"name": "Safe", | |
"description": "Triggered when you are no longer in danger", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Screenshot": { | |
"name": "Screenshot", | |
"description": "Triggered when you take a screenshot", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Search and rescue": { | |
"name": "Search and rescue", | |
"description": "Triggered when delivering items to a Search and Rescue contact", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{event.amount} \r\n{if event.commodity.rare: rare}\r\n\r\n{if event.commodity.name = \"Black Box\":\r\n {if event.amount > 1:\r\n {OneOf(\"flight records\", \"black boxes\")}\r\n |else: \r\n {OneOf(\"flight record\", \"black box\")}\r\n }\r\n\r\n|elif event.commodity.name = \"Damaged Escape Pod\":\r\n {OneOf(\"damaged cryo pod\", \"damaged escape pod\")}{if event.amount > 1:s}\r\n\r\n|elif event.commodity.name = \"Occupied Escape Pod\":\r\n {OneOf(\"occupied escape pod\", \"occupied cryo pod\")}{if event.amount > 1:s}\r\n\r\n|elif event.commodity.name = \"Personal Effects\":\r\n {OneOf(\"set\", \"collection\")}{if event.amount > 1:s} of\r\n {OneOf(\"personal effects\", \"personal belongings\")}\r\n\r\n|elif event.commodity.name = \"Salvageable Wreckage\":\r\n {set wreckage to OneOf(\"wreckage\", \"debris\")}\r\n {set fragment to OneOf(\"fragment\", \"bit\", \"piece\", \"part\", \"remnant\")}\r\n {OneOf(\"{fragment}{if event.amount > 1:s} of {wreckage}\", \r\n \"{wreckage} {fragment}{if event.amount > 1:s}\")}\r\n\r\n|elif event.commodity.name = \"Hostage\":\r\n {if event.amount > 1:hostages |else: hostage}\r\n\r\n|else:\r\n {event.commodity.name}{if event.amount > 1:s}\r\n}\r\n\r\n{OneOf(\"recovered\", \"salvaged\")}\r\n{Occasionally(2, \"in exchange\")}\r\nfor {Humanise(event.reward)} credits.\r\n", | |
"defaultValue": "{event.amount} \r\n{if event.commodity.rare: rare}\r\n\r\n{if event.commodity.name = \"Black Box\":\r\n {if event.amount > 1:\r\n {OneOf(\"flight records\", \"black boxes\")}\r\n |else: \r\n {OneOf(\"flight record\", \"black box\")}\r\n }\r\n\r\n|elif event.commodity.name = \"Damaged Escape Pod\":\r\n {OneOf(\"damaged cryo pod\", \"damaged escape pod\")}{if event.amount > 1:s}\r\n\r\n|elif event.commodity.name = \"Occupied Escape Pod\":\r\n {OneOf(\"occupied escape pod\", \"occupied cryo pod\")}{if event.amount > 1:s}\r\n\r\n|elif event.commodity.name = \"Personal Effects\":\r\n {OneOf(\"set\", \"collection\")}{if event.amount > 1:s} of\r\n {OneOf(\"personal effects\", \"personal belongings\")}\r\n\r\n|elif event.commodity.name = \"Salvageable Wreckage\":\r\n {set wreckage to OneOf(\"wreckage\", \"debris\")}\r\n {set fragment to OneOf(\"fragment\", \"bit\", \"piece\", \"part\", \"remnant\")}\r\n {OneOf(\"{fragment}{if event.amount > 1:s} of {wreckage}\", \r\n \"{wreckage} {fragment}{if event.amount > 1:s}\")}\r\n\r\n|elif event.commodity.name = \"Hostage\":\r\n {if event.amount > 1:hostages |else: hostage}\r\n\r\n|else:\r\n {event.commodity.name}{if event.amount > 1:s}\r\n}\r\n\r\n{OneOf(\"recovered\", \"salvaged\")}\r\n{Occasionally(2, \"in exchange\")}\r\nfor {Humanise(event.reward)} credits.\r\n", | |
"default": true | |
}, | |
"Security presence report": { | |
"name": "Security presence report", | |
"description": "Function to report on the details of system security", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{if system.population > 0:\r\n There is\r\n {if system.security = \"None\":\r\n no\r\n |elif system.security = \"Low\":\r\n {OneOf(\"minimal\", \"low\", \"weak\")}\r\n |elif system.security = \"Medium\":\r\n {OneOf(\"standard\", \"medium\", \"average\")}\r\n |elif system.security = \"High\":\r\n {OneOf(\"high\", \"heavy\", \"strong\")}\r\n |else:\r\n {system.security}\r\n }\r\n {OneOf(\"police\", \"security\", \"law enforcement\")} presence {OneOf(\"here\", \"in this system\", \"in the locality\")}.\r\n}", | |
"defaultValue": "{if system.population > 0:\r\n There is\r\n {if system.security = \"None\":\r\n no\r\n |elif system.security = \"Low\":\r\n {OneOf(\"minimal\", \"low\", \"weak\")}\r\n |elif system.security = \"Medium\":\r\n {OneOf(\"standard\", \"medium\", \"average\")}\r\n |elif system.security = \"High\":\r\n {OneOf(\"high\", \"heavy\", \"strong\")}\r\n |else:\r\n {system.security}\r\n }\r\n {OneOf(\"police\", \"security\", \"law enforcement\")} presence {OneOf(\"here\", \"in this system\", \"in the locality\")}.\r\n}", | |
"default": true | |
}, | |
"Self destruct": { | |
"name": "Self destruct", | |
"description": "Triggered when you start the self destruct sequence", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Self-destruct sequence initiated. Closing heat vents.", | |
"defaultValue": "Self-destruct sequence initiated. Closing heat vents.", | |
"default": true | |
}, | |
"Settlement approached": { | |
"name": "Settlement approached", | |
"description": "Triggered when you approach a settlement", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Settlement approached }\r\n{_ Triggered when you approach a settlement }\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'settlement')}\r\n{SetState('eddi_context_last_action', 'approach')}\r\n{SetState('eddi_context_last_settlement', event.name)}\r\n{SetState('eddi_context_approach_time', SecondsSince(0))}\r\n", | |
"defaultValue": "{_ Settlement approached }\r\n{_ Triggered when you approach a settlement }\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'settlement')}\r\n{SetState('eddi_context_last_action', 'approach')}\r\n{SetState('eddi_context_last_settlement', event.name)}\r\n{SetState('eddi_context_approach_time', SecondsSince(0))}\r\n", | |
"default": true | |
}, | |
"Shields down": { | |
"name": "Shields down", | |
"description": "Triggered when your ship's shields go offline", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Shields up": { | |
"name": "Shields up", | |
"description": "Triggered when your ship's shields come online", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Ship arrived": { | |
"name": "Ship arrived", | |
"description": "Triggered when you complete a ship transfer", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{Occasionally(2, '{F(\\'Honorific\\')}, ')}\r\n{ShipName(event.shipid, event.ship)} has \r\n\r\n{OneOf('arrived {if station.name != event.station && event.station: at}', \r\n 'completed its transfer {if station.name != event.station && event.station: to}')}\r\n\r\n{if station.name != event.station && event.station:\r\n {P(event.station, \"station\")}\r\n {if system.name != event.system && event.system:\r\n in the {P(event.system, \"starsystem\")} system\r\n }\r\n}.", | |
"defaultValue": "{Occasionally(2, '{F(\\'Honorific\\')}, ')}\r\n{ShipName(event.shipid, event.ship)} has \r\n\r\n{OneOf('arrived {if station.name != event.station && event.station: at}', \r\n 'completed its transfer {if station.name != event.station && event.station: to}')}\r\n\r\n{if station.name != event.station && event.station:\r\n {P(event.station, \"station\")}\r\n {if system.name != event.system && event.system:\r\n in the {P(event.system, \"starsystem\")} system\r\n }\r\n}.", | |
"default": true | |
}, | |
"Ship delivered": { | |
"name": "Ship delivered", | |
"description": "Triggered when your newly-purchased ship is delivered to you", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{ShipCallsign()} handover complete.", | |
"defaultValue": "{ShipCallsign()} handover complete.", | |
"default": true | |
}, | |
"Ship fsd": { | |
"name": "Ship fsd", | |
"description": "Triggered when there is a change to the status of your ship's fsd", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{set health_minimum to 90}\r\n{set health_report_occasion to 3}\r\n\r\n{set fsdhealth to ship.frameshiftdrive.health}\r\n\r\n{if event.fsd_status = \"masslock cleared\":\r\n Mass lock cleared\r\n|elif event.fsd_status = \"cooldown complete\": {ship.frameshiftdrive.name} ready\r\n|elif event.fsd_status = \"charging\" || event.fsd_status = \"cooldown\" || !event:\r\n {if health <= health_minimum:\r\n Your {ship.frameshiftdrive.name}\r\n {OneOf(\"could fail any time\", \"has sufferred extensive damage\", cat(\"is below\",health_minimum,\"%\"), \"has seen better days\")}\r\n |elif 0:\r\n {Occasionally(health_report_occasion, cat(OneOf(\"The\",\"Your\",ship.name), ship.frameshiftdrive.name, \"health is at\", ship.frameshiftdrive.health, \"%\"))}\r\n }\r\n|else: {event.fsd_status}\r\n}", | |
"defaultValue": null, | |
"default": false | |
}, | |
"Ship interdicted": { | |
"name": "Ship interdicted", | |
"description": "Triggered when your ship is interdicted by another ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Ship interdiction": { | |
"name": "Ship interdiction", | |
"description": "Triggered when you interdict another ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Ship loadout": { | |
"name": "Ship loadout", | |
"description": "Triggered when you obtain the loadout of your ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{SetState('eddi_boost_budget', round(100-ship.frameshiftdrive.health))}", | |
"defaultValue": null, | |
"default": false | |
}, | |
"Ship locker": { | |
"name": "Ship locker", | |
"description": "Triggered when you obtain the contents of your ship's micro-resource materials locker", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Ship purchased": { | |
"name": "Ship purchased", | |
"description": "Triggered when you purchase a ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{P(event.ship, \"shipmodel\")} purchased.", | |
"defaultValue": "{P(event.ship, \"shipmodel\")} purchased.", | |
"default": true | |
}, | |
"Ship rebooted": { | |
"name": "Ship rebooted", | |
"description": "Triggered when you run reboot/repair on your ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if len(event.modules) > 0:\r\n Emergency repairs have been\r\n {OneOf(\"made\", \"applied\")}\r\n to the {List(event.modules)}.\r\n}", | |
"defaultValue": "{if len(event.modules) > 0:\r\n Emergency repairs have been\r\n {OneOf(\"made\", \"applied\")}\r\n to the {List(event.modules)}.\r\n}", | |
"default": true | |
}, | |
"Ship refuelled": { | |
"name": "Ship refuelled", | |
"description": "Triggered when you refuel your ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if event.source = \"Scoop\":\r\n {SetState('eddi_context_fuel_remaining', event.total)}\r\n|elif event.full:\r\n {SetState('eddi_context_fuel_remaining', ship.fueltanktotalcapacity)}\r\n|else:\r\n {SetState('eddi_context_fuel_remaining', state.eddi_context_fuel_remaining + event.amount)}\r\n}\r\n\r\n{Pause(2000)}\r\n{if event.full:\r\n {set refueled_desc to OneOf(\"fully refuelled\", \"at maximum fuel capacity\",\"at 100% fuel capacity\")}\r\n {OneOf(\"Refueled\", \"Fuel at maximum\", \"Maximum fuel\", \"{ShipName()} is now {refueled_desc}\" )}\r\n|else:\r\n {if event.amount <= 5.0000:\r\n {F('Fuel check')}\r\n }\r\n}", | |
"defaultValue": "{if event.source = \"Scoop\":\r\n {SetState('eddi_context_fuel_remaining', event.total)}\r\n|elif event.full:\r\n {SetState('eddi_context_fuel_remaining', ship.fueltanktotalcapacity)}\r\n|else:\r\n {SetState('eddi_context_fuel_remaining', state.eddi_context_fuel_remaining + event.amount)}\r\n}\r\n\r\n{Pause(2000)}\r\n{if event.full:\r\n {set refueled_desc to OneOf(\"fully refuelled\", \"at maximum fuel capacity\",\"at 100% fuel capacity\")}\r\n {OneOf(\"Refueled\", \"Fuel at maximum\", \"Maximum fuel\", \"{ShipName()} is now {refueled_desc}\" )}\r\n|else:\r\n {if event.amount <= 5.0000:\r\n {F('Fuel check')}\r\n }\r\n}", | |
"default": true | |
}, | |
"Ship renamed": { | |
"name": "Ship renamed", | |
"description": "Triggered when you rename a ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{ShipName()} now registered with {P(system.faction, \"faction\")}. \r\n\r\n{set ICAO_ID to ICAO(event.ident)}\r\n{if len(ICAO_ID) > 0:\r\n Identification is {ICAO_ID}.\r\n|else:\r\n Advisory: you have chosen a ship ID that is not pronounceable in the standard radio alphabet.\r\n}\r\n", | |
"defaultValue": "{ShipName()} now registered with {P(system.faction, \"faction\")}. \r\n\r\n{set ICAO_ID to ICAO(event.ident)}\r\n{if len(ICAO_ID) > 0:\r\n Identification is {ICAO_ID}.\r\n|else:\r\n Advisory: you have chosen a ship ID that is not pronounceable in the standard radio alphabet.\r\n}\r\n", | |
"default": true | |
}, | |
"Ship repaired": { | |
"name": "Ship repaired", | |
"description": "Triggered when you repair your ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{set repairedSystems to []}\r\n{if len(event.items) > 0:\r\n {for item in event.items:\r\n {if item = \"Paint\":\r\n {set systemDescription to cat(Occasionally(2, \"{ShipName()}'s\"), \" paint \", OneOf(\"restored.\", \"renewed.\")))}\r\n {set repairedSystems to cat(repairedSystems, [systemDescription])} \r\n |elif item = \"Ship Integrity\" || item = \"Wear\":\r\n {set systemDescription to cat(Occasionally(2, \"{ShipName()}'s\"), \" \", Occasionally(2, '{OneOf(\\\"regular\\\", \\\"standard\\\")}'),\" maintenance completed.\"))}\r\n {set repairedSystems to cat(repairedSystems, [systemDescription])} \r\n }\r\n }\r\n}\r\n\r\n{set repairedModules to []}\r\n{if len(event.modules) > 0:\r\n {for module in event.modules:\r\n {if len(module.localizedmount) > 0:\r\n {_ This is a weapon. We'll identify the class, grade, and mount}\r\n {set weaponDescription to cat(module.class, \" \", module.grade, \" \", module.mount, \" \", module.name)}\r\n {set repairedModules to cat(repairedModules, [weaponDescription])}\r\n |elif find(module.invariantName, \"Cockpit\") > -1:\r\n {_ This isn't a weapon. We've matched it to the name of our cockpit module}\r\n {set repairedModules to cat(repairedModules, [OneOf(\"Canopy\", \"Cockpit\")])} \r\n |else:\r\n {_ This isn't a weapon. We haven't matched it to the name of any particular module}\r\n {set repairedModules to cat(repairedModules, [module.name])}\r\n }\r\n }\r\n}\r\n\r\n{if len(repairedSystems) > 0:\r\n {List(repairedSystems)}.\r\n}\r\n{if len(repairedModules) > 0:\r\n {List(repairedModules)} repaired.\r\n}\r\n{if len(repairedSystems) = 0 && len(repairedModules) = 0:\r\n {ShipName()} repaired.\r\n}", | |
"defaultValue": "{set repairedSystems to []}\r\n{if len(event.items) > 0:\r\n {for item in event.items:\r\n {if item = \"Paint\":\r\n {set systemDescription to cat(Occasionally(2, \"{ShipName()}'s\"), \" paint \", OneOf(\"restored.\", \"renewed.\")))}\r\n {set repairedSystems to cat(repairedSystems, [systemDescription])} \r\n |elif item = \"Ship Integrity\" || item = \"Wear\":\r\n {set systemDescription to cat(Occasionally(2, \"{ShipName()}'s\"), \" \", Occasionally(2, '{OneOf(\\\"regular\\\", \\\"standard\\\")}'),\" maintenance completed.\"))}\r\n {set repairedSystems to cat(repairedSystems, [systemDescription])} \r\n }\r\n }\r\n}\r\n\r\n{set repairedModules to []}\r\n{if len(event.modules) > 0:\r\n {for module in event.modules:\r\n {if len(module.localizedmount) > 0:\r\n {_ This is a weapon. We'll identify the class, grade, and mount}\r\n {set weaponDescription to cat(module.class, \" \", module.grade, \" \", module.mount, \" \", module.name)}\r\n {set repairedModules to cat(repairedModules, [weaponDescription])}\r\n |elif find(module.invariantName, \"Cockpit\") > -1:\r\n {_ This isn't a weapon. We've matched it to the name of our cockpit module}\r\n {set repairedModules to cat(repairedModules, [OneOf(\"Canopy\", \"Cockpit\")])} \r\n |else:\r\n {_ This isn't a weapon. We haven't matched it to the name of any particular module}\r\n {set repairedModules to cat(repairedModules, [module.name])}\r\n }\r\n }\r\n}\r\n\r\n{if len(repairedSystems) > 0:\r\n {List(repairedSystems)}.\r\n}\r\n{if len(repairedModules) > 0:\r\n {List(repairedModules)} repaired.\r\n}\r\n{if len(repairedSystems) = 0 && len(repairedModules) = 0:\r\n {ShipName()} repaired.\r\n}", | |
"default": true | |
}, | |
"Ship restocked": { | |
"name": "Ship restocked", | |
"description": "Triggered when you restock your ship's ammunition", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{ShipName()} {OneOf(\"restocked\",\"rearmed\")}.", | |
"defaultValue": "{ShipName()} {OneOf(\"restocked\",\"rearmed\")}.", | |
"default": true | |
}, | |
"Ship shutdown": { | |
"name": "Ship shutdown", | |
"description": "Triggered when your ship's system are shutdown", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Ship sold": { | |
"name": "Ship sold", | |
"description": "Triggered when you sell a ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{OneOf(\"Retired {ShipName(event.shipid, event.ship)} from active duty\",\r\n \"Decommissioned {ShipName(event.shipid, event.ship)}\",\r\n \"Sold {ShipName(event.shipid, event.ship)}\")}\r\n{if event.system && event.system != system.name:\r\n in {P(event.system, \"starsystem\")}\r\n}.", | |
"defaultValue": "{OneOf(\"Retired {ShipName(event.shipid, event.ship)} from active duty\",\r\n \"Decommissioned {ShipName(event.shipid, event.ship)}\",\r\n \"Sold {ShipName(event.shipid, event.ship)}\")}\r\n{if event.system && event.system != system.name:\r\n in {P(event.system, \"starsystem\")}\r\n}.", | |
"default": true | |
}, | |
"Ship sold on rebuy": { | |
"name": "Ship sold on rebuy", | |
"description": "Triggered when you sell a ship to raise funds on the insurance / rebuy screen", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{P(event.ship, \"shipmodel\")}, identification {event.shipid}, sold in {P(event.system, \"starsystem\")} for {Humanise(event.price)} credits", | |
"defaultValue": "{P(event.ship, \"shipmodel\")}, identification {event.shipid}, sold in {P(event.system, \"starsystem\")} for {Humanise(event.price)} credits", | |
"default": true | |
}, | |
"Ship swapped": { | |
"name": "Ship swapped", | |
"description": "Triggered when you swap a ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if event.storedship:\r\n {OneOf(\"Storing\", \"Mothballing\", \"Parking\")} {ShipName(event.storedshipid, event.storedship)} and\r\n|elif event.soldship:\r\n Selling {ShipName(event.soldshipid, event.soldship)} and\r\n}\r\n{OneOf(\"swapping\",\"moving\",\"transferring\")} to {ShipName(event.shipid, event.ship)}.\r\n\r\n{F(\"Limpet check\")}\r\n{F(\"Launchbay report\")}\r\n\r\n{set fighterhangar to false}\r\n{for compartment in ship.compartments:\r\n {if find(compartment.module.name, \"Fighter Hangar\") != -1:\r\n {set fighterhangar to true}\r\n }\r\n}\r\n{if fighterhangar = true:\r\n Reminder: you need to assign a crew member to active duty.\r\n}\r\n", | |
"defaultValue": "{if event.storedship:\r\n {OneOf(\"Storing\", \"Mothballing\", \"Parking\")} {ShipName(event.storedshipid, event.storedship)} and\r\n|elif event.soldship:\r\n Selling {ShipName(event.soldshipid, event.soldship)} and\r\n}\r\n{OneOf(\"swapping\",\"moving\",\"transferring\")} to {ShipName(event.shipid, event.ship)}.\r\n\r\n{F(\"Limpet check\")}\r\n{F(\"Launchbay report\")}\r\n\r\n{set fighterhangar to false}\r\n{for compartment in ship.compartments:\r\n {if find(compartment.module.name, \"Fighter Hangar\") != -1:\r\n {set fighterhangar to true}\r\n }\r\n}\r\n{if fighterhangar = true:\r\n Reminder: you need to assign a crew member to active duty.\r\n}\r\n", | |
"default": true | |
}, | |
"Ship targeted": { | |
"name": "Ship targeted", | |
"description": "Triggered when the player selects a target", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Ship targeted }\r\n{_ Triggered when the player selects a target }\r\n\r\n{_ event Parameters: targetlocked - bool (ie false when losing target) _}\r\n{_ If target locked: name (of ship), scanstage (ie 0, 1, 2, 3) _}\r\n{_ If Scan stage >= 1: name (of pilot), rank (of pilot) _}\r\n{_ If scan stage >= 2: shieldhealth, hullhealth (both 0-100) _}\r\n{_ If scan stage >= 3: faction, power (if player is pledged to a power), _}\r\n{_ legalstatus (ie clean, wanted, etc), bounty (if applicable), _}\r\n{_ subsystem (ie FSD, power plant, etc), subsystemhealth (0-100) _}\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'ship')}\r\n{SetState('eddi_context_last_action', 'targeted')}\r\n\r\n{if event.targetlocked && event.scanstage > 2 && !event.subsystem:\r\n {set legalstatus to event.legalstatus}\r\n {if legalstatus = \"Wanted\" || legalstatus = \"Wanted Enemy\" || legalstatus = \"Warrant\":\r\n {set wanted_list to split(state.eddi_context_wanted_list, \"+=\")}\r\n {if find(wanted_list, event.name) < 0:\r\n {event.name} {OneOf(\"has a bounty\", \"is fair game\", \"is a legitimate target\")}.\r\n {if len(wanted_list) = 0: {set sep to \"\"} |else: {set sep to \"+=\"}}\r\n {set wanted_list to cat(wanted_list, [event.name])}\r\n {SetState('eddi_context_wanted_list', join(wanted_list, sep))}\r\n } \r\n }\r\n}\r\n", | |
"defaultValue": "{_ Ship targeted }\r\n{_ Triggered when the player selects a target }\r\n\r\n{_ event Parameters: targetlocked - bool (ie false when losing target) _}\r\n{_ If target locked: name (of ship), scanstage (ie 0, 1, 2, 3) _}\r\n{_ If Scan stage >= 1: name (of pilot), rank (of pilot) _}\r\n{_ If scan stage >= 2: shieldhealth, hullhealth (both 0-100) _}\r\n{_ If scan stage >= 3: faction, power (if player is pledged to a power), _}\r\n{_ legalstatus (ie clean, wanted, etc), bounty (if applicable), _}\r\n{_ subsystem (ie FSD, power plant, etc), subsystemhealth (0-100) _}\r\n\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'ship')}\r\n{SetState('eddi_context_last_action', 'targeted')}\r\n\r\n{if event.targetlocked && event.scanstage > 2 && !event.subsystem:\r\n {set legalstatus to event.legalstatus}\r\n {if legalstatus = \"Wanted\" || legalstatus = \"Wanted Enemy\" || legalstatus = \"Warrant\":\r\n {set wanted_list to split(state.eddi_context_wanted_list, \"+=\")}\r\n {if find(wanted_list, event.name) < 0:\r\n {event.name} {OneOf(\"has a bounty\", \"is fair game\", \"is a legitimate target\")}.\r\n {if len(wanted_list) = 0: {set sep to \"\"} |else: {set sep to \"+=\"}}\r\n {set wanted_list to cat(wanted_list, [event.name])}\r\n {SetState('eddi_context_wanted_list', join(wanted_list, sep))}\r\n } \r\n }\r\n}\r\n", | |
"default": true | |
}, | |
"Ship transfer initiated": { | |
"name": "Ship transfer initiated", | |
"description": "Triggered when you initiate a ship transfer", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{ShipName(event.shipid, event.ship)} {OneOf(\"on its way\",\"being transferred\", \"transfer initiated\", \"being transported\", \"being transferred\")} from {P(event.system, \"starsystem\")}\r\n\r\n{if event.transfercost: for a cost of {Humanise(event.price)} credits.}\r\n\r\n{set t_remaining to event.time}\r\n\r\n{if t_remaining:\r\n\r\n {Pause(1000)}\r\n Expected arrival in:\r\n\r\n {if t_remaining > (60*60*24):\r\n {set t_days to floor(t_remaining/(60*60*24))}\r\n {if t_days > 1:\r\n {t_days} days,\r\n |else:\r\n 1 day,\r\n }\r\n {set t_remaining to t_remaining-(t_days*(60*60*24))}\r\n }\r\n\r\n {if t_remaining > 3600:\r\n {set t_hours to floor(t_remaining/3600)}\r\n {if t_hours > 1:\r\n {t_hours} hours,\r\n |else:\r\n 1 hour,\r\n }\r\n {set t_remaining to t_remaining-(t_hours*(60*60))}\r\n }\r\n\r\n {if t_remaining > 60:\r\n {if t_days || t_hours: and}\r\n {set t_minutes to round(t_remaining/(60),0)}\r\n {if t_minutes > 1:\r\n {t_minutes} minutes.\r\n |else:\r\n 1 minute,\r\n }\r\n }\r\n}", | |
"defaultValue": "{ShipName(event.shipid, event.ship)} {OneOf(\"on its way\",\"being transferred\", \"transfer initiated\", \"being transported\", \"being transferred\")} from {P(event.system, \"starsystem\")}\r\n\r\n{if event.transfercost: for a cost of {Humanise(event.price)} credits.}\r\n\r\n{set t_remaining to event.time}\r\n\r\n{if t_remaining:\r\n\r\n {Pause(1000)}\r\n Expected arrival in:\r\n\r\n {if t_remaining > (60*60*24):\r\n {set t_days to floor(t_remaining/(60*60*24))}\r\n {if t_days > 1:\r\n {t_days} days,\r\n |else:\r\n 1 day,\r\n }\r\n {set t_remaining to t_remaining-(t_days*(60*60*24))}\r\n }\r\n\r\n {if t_remaining > 3600:\r\n {set t_hours to floor(t_remaining/3600)}\r\n {if t_hours > 1:\r\n {t_hours} hours,\r\n |else:\r\n 1 hour,\r\n }\r\n {set t_remaining to t_remaining-(t_hours*(60*60))}\r\n }\r\n\r\n {if t_remaining > 60:\r\n {if t_days || t_hours: and}\r\n {set t_minutes to round(t_remaining/(60),0)}\r\n {if t_minutes > 1:\r\n {t_minutes} minutes.\r\n |else:\r\n 1 minute,\r\n }\r\n }\r\n}", | |
"default": true | |
}, | |
"Shutdown": { | |
"name": "Shutdown", | |
"description": "Triggered on a clean shutdown of the game", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Signal detected": { | |
"name": "Signal detected", | |
"description": "Triggered when a signal source is detected", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Edit the true/false values of `spokenSources` to identify signal types that should be announced whenever they are first detected within a system (otherwise, only signal sources detected while in fss or saa mode will be taken into account. _}\r\n\r\n{set spokenSources to [\r\n \"Anomaly\": true,\r\n \"AX Conflict Zone\": true,\r\n \"Capitol Ship\": false,\r\n \"Ceremonial Comms\": false,\r\n \"Combat Aftermath\": false,\r\n \"Compromised Nav Beacon\": false,\r\n \"Convoy Dispersal Pattern Detected\": false,\r\n \"Degraded Emissions\": false,\r\n \"Distress Call\": true,\r\n \"Encoded Emissions\": false,\r\n \"Hazardous Resource Extraction Site\": false,\r\n \"High Grade Emissions\": false,\r\n \"High Intensity Conflict Zone\": false,\r\n \"High Intensity Resource Extraction Site\": false,\r\n \"Listening Post\": true,\r\n \"Low Intensity Conflict Zone\": false,\r\n \"Low Intensity Resource Extraction Site\": false,\r\n \"Medium Intensity Conflict Zone\": false,\r\n \"Mission Target\": true,\r\n \"Nav Beacon\": false,\r\n \"Non-Human Signal Source\": false,\r\n \"Notable Stellar Phenomena\": true,\r\n \"Resource Extraction Site\": false,\r\n \"Trading Beacon\": false,\r\n \"Unidentified Signal Source\": false,\r\n \"Unregistered Comms Beacon\": true,\r\n \"Weapons Fire\": false,\r\n]}\r\n\r\n{if status.gui_focus = \"fss mode\" || status.gui_focus = \"saa mode\" || \r\n(spokenSources[event.source] = true && event.unique):\r\n {if event.source && !event.stationsignal:\r\n {if event.threatlevel > 0:\r\n Class {event.threatlevel} \r\n }\r\n {event.source} \r\n {if event.faction != \"None\":\r\n for {P(event.faction, \"faction\")}\r\n }\r\n detected.\r\n }\r\n}", | |
"defaultValue": "{_ Edit the true/false values of `spokenSources` to identify signal types that should be announced whenever they are first detected within a system (otherwise, only signal sources detected while in fss or saa mode will be taken into account. _}\r\n\r\n{set spokenSources to [\r\n \"Anomaly\": true,\r\n \"AX Conflict Zone\": true,\r\n \"Capitol Ship\": false,\r\n \"Ceremonial Comms\": false,\r\n \"Combat Aftermath\": false,\r\n \"Compromised Nav Beacon\": false,\r\n \"Convoy Dispersal Pattern Detected\": false,\r\n \"Degraded Emissions\": false,\r\n \"Distress Call\": true,\r\n \"Encoded Emissions\": false,\r\n \"Hazardous Resource Extraction Site\": false,\r\n \"High Grade Emissions\": false,\r\n \"High Intensity Conflict Zone\": false,\r\n \"High Intensity Resource Extraction Site\": false,\r\n \"Listening Post\": true,\r\n \"Low Intensity Conflict Zone\": false,\r\n \"Low Intensity Resource Extraction Site\": false,\r\n \"Medium Intensity Conflict Zone\": false,\r\n \"Mission Target\": true,\r\n \"Nav Beacon\": false,\r\n \"Non-Human Signal Source\": false,\r\n \"Notable Stellar Phenomena\": true,\r\n \"Resource Extraction Site\": false,\r\n \"Trading Beacon\": false,\r\n \"Unidentified Signal Source\": false,\r\n \"Unregistered Comms Beacon\": true,\r\n \"Weapons Fire\": false,\r\n]}\r\n\r\n{if status.gui_focus = \"fss mode\" || status.gui_focus = \"saa mode\" || \r\n(spokenSources[event.source] = true && event.unique):\r\n {if event.source && !event.stationsignal:\r\n {if event.threatlevel > 0:\r\n Class {event.threatlevel} \r\n }\r\n {event.source} \r\n {if event.faction != \"None\":\r\n for {P(event.faction, \"faction\")}\r\n }\r\n detected.\r\n }\r\n}", | |
"default": true | |
}, | |
"Silent running": { | |
"name": "Silent running", | |
"description": "Triggered when you activate or deactivate silent running", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Squadron rank": { | |
"name": "Squadron rank", | |
"description": "Triggered when your rank with a squadron has changed", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Squadron rank }\r\n{_ Triggered when your rank with a squadron has changed }\r\n\r\n\r\nYou have been\r\n{if event.newrank > event.oldrank:\r\n promoted \r\n|else:\r\n demoted\r\n}\r\nto {cmdr.squadronrank.name} in the {event.name} squadron.\r\n", | |
"defaultValue": "{_ Squadron rank }\r\n{_ Triggered when your rank with a squadron has changed }\r\n\r\n\r\nYou have been\r\n{if event.newrank > event.oldrank:\r\n promoted \r\n|else:\r\n demoted\r\n}\r\nto {cmdr.squadronrank.name} in the {event.name} squadron.\r\n", | |
"default": true | |
}, | |
"Squadron status": { | |
"name": "Squadron status", | |
"description": "Triggered when your status with a squadron has changed", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Squadron status }\r\n{_ Triggered when your status with a squadron changes }\r\n\r\n\r\n{if event.status = \"applied\":\r\n You have applied for admission into the {event.name} squadron.\r\n|elif event.status = \"created\":\r\n You have created the {event.name} squadron.\r\n|elif event.status = \"disbanded\":\r\n The {event.name} squadron has been disbanded.\r\n|elif event.status = \"invited\":\r\n You have been invited into the {event.name} squadron.\r\n|elif event.status = \"joined\":\r\n You have joined the {event.name} squadron.\r\n|elif event.status = \"kicked\":\r\n You have been kicked from the {event.name} squadron.\r\n|elif event.status = \"left\":\r\n You have left the {event.name} squadron.\r\n}\r\n", | |
"defaultValue": "{_ Squadron status }\r\n{_ Triggered when your status with a squadron changes }\r\n\r\n\r\n{if event.status = \"applied\":\r\n You have applied for admission into the {event.name} squadron.\r\n|elif event.status = \"created\":\r\n You have created the {event.name} squadron.\r\n|elif event.status = \"disbanded\":\r\n The {event.name} squadron has been disbanded.\r\n|elif event.status = \"invited\":\r\n You have been invited into the {event.name} squadron.\r\n|elif event.status = \"joined\":\r\n You have joined the {event.name} squadron.\r\n|elif event.status = \"kicked\":\r\n You have been kicked from the {event.name} squadron.\r\n|elif event.status = \"left\":\r\n You have left the {event.name} squadron.\r\n}\r\n", | |
"default": true | |
}, | |
"SRV docked": { | |
"name": "SRV docked", | |
"description": "Triggered when you dock an SRV with your ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if state.eddi_context_srv_deployed_id = event.id:\r\n {SetState('eddi_context_srv_deployed_id', \"\")}\r\n}\r\n\r\n{OneOf(\"Buggy\", \"SRV\")} docked.", | |
"defaultValue": "{if state.eddi_context_srv_deployed_id = event.id:\r\n {SetState('eddi_context_srv_deployed_id', \"\")}\r\n}\r\n\r\n{OneOf(\"Buggy\", \"SRV\")} docked.", | |
"default": true | |
}, | |
"SRV launched": { | |
"name": "SRV launched", | |
"description": "Triggered when you launch an SRV from your ship", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{SetState('eddi_context_srv_deployed_id', event.id)}\r\n\r\n{OneOf(\"Buggy\", \"SRV\")} {OneOf(\"launched\", \"away\")}.", | |
"defaultValue": "{SetState('eddi_context_srv_deployed_id', event.id)}\r\n\r\n{OneOf(\"Buggy\", \"SRV\")} {OneOf(\"launched\", \"away\")}.", | |
"default": true | |
}, | |
"SRV turret": { | |
"name": "SRV turret", | |
"description": "Triggered when you deploy or retract your SRV's turret", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"SRV turret deployable": { | |
"name": "SRV turret deployable", | |
"description": "Triggered when your SRV enters or leaves the restriction zone around a ship.", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if !event.deployable:\r\n {OneOf(\"Buggy\", \"SRV\")} standing by for recovery.\r\n}", | |
"defaultValue": "{if !event.deployable:\r\n {OneOf(\"Buggy\", \"SRV\")} standing by for recovery.\r\n}", | |
"default": true | |
}, | |
"Star habitable zone": { | |
"name": "Star habitable zone", | |
"description": "Report on the habitable zone around a star", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch from context }\r\n{if event: {set reportbody to event} }\r\n{if !event: {set reportbody to BodyDetails(state.eddi_context_star_star, state.eddi_context_star_system)}}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n I'm not sure which star you are asking about.\r\n|else:\r\n {if (reportbody.estimatedhabzoneinner && reportbody.estimatedhabzoneouter) && \r\n (reportbody.estimatedhabzoneinner > 0 && reportbody.estimatedhabzoneouter> 0):\r\n Habitable zone\r\n {Occasionally(2, OneOf(\"calculated at\", \"calculated to fall from\"))}: \r\n {Humanise(reportbody.estimatedhabzoneinner)} \r\n to {Humanise(reportbody.estimatedhabzoneouter)} \r\n lightseconds.\r\n |elif reportbody.estimatedhabzoneouter && reportbody.estimatedhabzoneouter > 0:\r\n Habitable zone\r\n {Occasionally(2, OneOf(\"calculated at\", \"calculated to fall from\"))}: \r\n {Humanise(reportbody.estimatedhabzoneouter)} \r\n lightseconds maximum.\r\n }\r\n}", | |
"defaultValue": "{_ Fetch from context }\r\n{if event: {set reportbody to event} }\r\n{if !event: {set reportbody to BodyDetails(state.eddi_context_star_star, state.eddi_context_star_system)}}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n I'm not sure which star you are asking about.\r\n|else:\r\n {if (reportbody.estimatedhabzoneinner && reportbody.estimatedhabzoneouter) && \r\n (reportbody.estimatedhabzoneinner > 0 && reportbody.estimatedhabzoneouter> 0):\r\n Habitable zone\r\n {Occasionally(2, OneOf(\"calculated at\", \"calculated to fall from\"))}: \r\n {Humanise(reportbody.estimatedhabzoneinner)} \r\n to {Humanise(reportbody.estimatedhabzoneouter)} \r\n lightseconds.\r\n |elif reportbody.estimatedhabzoneouter && reportbody.estimatedhabzoneouter > 0:\r\n Habitable zone\r\n {Occasionally(2, OneOf(\"calculated at\", \"calculated to fall from\"))}: \r\n {Humanise(reportbody.estimatedhabzoneouter)} \r\n lightseconds maximum.\r\n }\r\n}", | |
"default": true | |
}, | |
"Star report": { | |
"name": "Star report", | |
"description": "Function to report on the details of the contextual body", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Preferences _}\r\n{set reportAge to 1} {_ Set to 1 to report the star's age. _}\r\n{set reportRareStarClasses to 1} {_ Set to 1 to report when rare star classes are found _}\r\n{set reportMass to 1} {_ Set to 1 to report stars with abnormal mass _}\r\n{set reportRadius to 1} {_ Set to 1 to report stars with abnormal radii _}\r\n{set reportRotation to 1} {_ Set to 1 to report stars with abnormal rotational periods _}\r\n{set reportTemps to 1} {_ Set to 1 to report stars with abnormal surface temperatures _}\r\n{set reportDensity to 1} {_ Set to 1 to report notable densities (in kilograms per cubic meter) _}\r\n{set reportAbsMagnitude to 1} {_ Set to 1 to report stars with abnormal absolute magnitude (lower is brighter) _}\r\n{set reportRingedStars to 1} {_ Set to 1 to report when ringed stars are found _}\r\n{set reportChromaticity to 1} {_ Set to 1 to report the star's colour. _}\r\n{set reportClass to 1} {_ Set to 1 to report the stellar class. _}\r\n{set reportSubClass to 0} {_ Set to 1 to report the stellar sub class (if reportClass is also 1) _}\r\n{set reportScanValue to 0} {_ Set to 1 to report the scan value. _}\r\n{set reportHabZone to 0} {_ Set to 1 to report habitable zone details for the primary star. _}\r\n{set mainSequenceFrequency to 4} {_ Set to determine the frequency (1 chance in n) for describing applicable stars as \"main sequence\" _}\r\n{set reportRapidRotation to 1} {_ Reports very fast rotating bodies _}\r\n\r\n{_ Fetch from context }\r\n{set reportbody to BodyDetails(state.eddi_context_star_star, state.eddi_context_star_system)}\r\n{if !reportbody: {set reportbody to BodyDetails(state.eddi_context_star_star)}}\r\n{if !reportbody && event: {set reportbody to event.star}}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n\r\n Which star are you {OneOf(\"asking about\", \"referencing\")}?\r\n\r\n|else:\r\n\r\n {_ Set up a list of notable star characteristics _}\r\n {set notables to []}\r\n\r\n {_ Set up various groups of stars _}\r\n {set mainsequence to [\"O\", \"B\", \"A\", \"F\", \"G\", \"K\", \"M\"]}\r\n {set fastburning to [\"WC\", \"WN\", \"WO\", \"WNC\", \"W\"]}\r\n {set browndwarves to [\"L\", \"T\", \"Y\"]}\r\n\r\n {for starclass in mainsequence:\r\n {if reportbody.stellarclass = starclass:\r\n {set mainsequence to Occasionally(mainSequenceFrequency, \"main sequence\")}\r\n }\r\n } \r\n {for starclass in browndwarves:\r\n {if reportbody.stellarclass = starclass:\r\n {set browndwarf to 1}\r\n }\r\n } \r\n {for starclass in fastburning:\r\n {if reportbody.stellarclass = starclass: \r\n {set fastburning to 1}\r\n }\r\n }\r\n\r\n {_ Is this a rare class of star? _}\r\n {if reportRareStarClasses:\r\n {if reportbody.starClass.percentage < 0.01:\r\n {set rarity to \"Incredibly rare\"}\r\n |elif reportbody.starClass.percentage < 0.1:\r\n {set rarity to \"Very rare\"}\r\n |elif reportbody.starClass.percentage < 1.0:\r\n {set rarity to \"Rare\"}\r\n |elif reportbody.starClass.percentage < 5:\r\n {set rarity to \"Uncommon\"}\r\n }\r\n }\r\n\r\n {_ Is the star notable in some other way? _}\r\n\r\n {if reportAge:\r\n {set ageInYears to reportbody.age * 1000000}\r\n {if ageInYears <= 1000000:\r\n {set ps to \", making it one of the youngest stars in the galaxy\"}\r\n |elif ageInYears >= 13000000000:\r\n {set ps to \", making it one of the oldest stars in the galaxy\"}\r\n }\r\n {if reportbody.ageprobability:\r\n {if reportbody.ageprobability < 0.01:\r\n {set notables to cat(notables, [cat(\"an incredibly young age of \", Humanise(ageInYears), \" years\", ps)])}\r\n |elif reportbody.ageprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an extremely young age of \", Humanise(ageInYears), \" years\", ps)])}\r\n |elif reportbody.ageprobability < 5:\r\n {set notables to cat(notables, [cat(\"an unusually young age of \", Humanise(ageInYears), \" years\", ps)])}\r\n |elif reportbody.ageprobability > 99.99:\r\n {set notables to cat(notables, [cat(\"an incredibly old age of \", Humanise(ageInYears), \" years\", ps)])}\r\n |elif reportbody.ageprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an extremely old age of \", Humanise(ageInYears), \" years\", ps)])}\r\n |elif reportbody.ageprobability > 95:\r\n {set notables to cat(notables, [cat(\"an unusually old age of \", Humanise(ageInYears), \" years\", ps)])}\r\n }\r\n }\r\n }\r\n\r\n {if reportMass && reportbody.massprobability:\r\n {if reportbody.massprobability < 0.01:\r\n {set notables to cat(notables, [cat(\"an incredibly low solar mass of \", Humanise(reportbody.solarmass), \" times Sol's\")])}\r\n |elif reportbody.massprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an extremely low solar mass of \", Humanise(reportbody.solarmass), \" times Sol's\")])}\r\n |elif reportbody.massprobability < 1:\r\n {set notables to cat(notables, [cat(\"an unusually low solar mass of \", Humanise(reportbody.solarmass), \" times Sol's\")])}\r\n |elif reportbody.massprobability > 99.99:\r\n {set notables to cat(notables, [cat(\"an incredibly high solar mass of \", Humanise(reportbody.solarmass), \" times Sol's\")])}\r\n |elif reportbody.massprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an extremely high solar mass of \", Humanise(reportbody.solarmass), \" times Sol's\")])}\r\n |elif reportbody.massprobability > 99:\r\n {set notables to cat(notables, [cat(\"an unusually high solar mass of \", Humanise(reportbody.solarmass), \" times Sol's\")])}\r\n }\r\n }\r\n\r\n {if reportRadius && reportbody.radiusprobability:\r\n {if reportbody.radiusprobability < 0.01:\r\n {set notables to cat(notables, [cat(\"an incredibly low radius at \", Humanise(reportbody.solarradius), \" times Sol's\")])}\r\n |elif reportbody.radiusprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an extremely low solar radius at \", Humanise(reportbody.solarradius), \" times Sol's\")])}\r\n |elif reportbody.radiusprobability < 5:\r\n {set notables to cat(notables, [cat(\"an unusually low solar radius at \", Humanise(reportbody.solarradius), \" times Sol's\")])}\r\n |elif reportbody.radiusprobability > 99.99:\r\n {set notables to cat(notables, [cat(\"an extremely high solar radius at \", Humanise(reportbody.solarradius), \" times Sol's\")])}\r\n |elif reportbody.radiusprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly high solar radius at \", Humanise(reportbody.solarradius), \" times Sol's\")])}\r\n |elif reportbody.radiusprobability > 95:\r\n {set notables to cat(notables, [cat(\"an unusually high solar radius at \", Humanise(reportbody.solarradius), \" times Sol's\")])}\r\n }\r\n }\r\n\r\n {if reportRotation && reportbody.rotationalperiodprobability:\r\n {if reportbody.rotationalperiodprobability > 99.99:\r\n {set notables to cat(notables, [cat(\"an extremely \", OneOf(\"rapid\", \"high\"), \" rate of rotation at \", Humanise(reportbody.rotationalperiod), \" days \", Occasionally(2, \"per revolution\"))])}\r\n |elif reportbody.rotationalperiodprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly \", OneOf(\"rapid\", \"high\"), \" rate of rotation at \", Humanise(reportbody.rotationalperiod), \" days \", Occasionally(2, \"per revolution\"))])}\r\n |elif reportbody.rotationalperiodprobability > 99:\r\n {set notables to cat(notables, [cat(\"an unusually \", OneOf(\"rapid\", \"high\"), \" rate of rotation at \", Humanise(reportbody.rotationalperiod), \" days \", Occasionally(2, \"per revolution\"))])}\r\n |elif reportbody.rotationalperiodprobability > 95:\r\n {set notables to cat(notables, [cat(\"a high rate of rotation at \", Humanise(reportbody.rotationalperiod), \" days \", Occasionally(2, \" per revolution\"))])}\r\n }\r\n }\r\n\r\n {if reportTemps && reportbody.tempprobability:\r\n {if reportbody.tempprobability < 0.01:\r\n {set notables to cat(notables, [cat(\"an incredibly low surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an extremely low surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability < 1:\r\n {set notables to cat(notables, [cat(\"an unusually low surface temperature\")])}\r\n |elif reportbody.tempprobability < 5:\r\n {set notables to cat(notables, [cat(\"lower than average surface temperature\")])}\r\n |elif reportbody.tempprobability > 99.99:\r\n {set notables to cat(notables, [cat(\"an extremely high surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly high surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability > 99:\r\n {set notables to cat(notables, [cat(\"an unusually high surface temperature\")])}\r\n |elif reportbody.tempprobability > 95:\r\n {set notables to cat(notables, [cat(\"higher than average surface temperature\")])}\r\n }\r\n }\r\n\r\n {if reportDensity && reportbody.densityprobability:\r\n {if reportbody.densityprobability < 0.01:\r\n {set notables to cat(notables, [cat(\"an incredibly low average density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an extremely low average density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability < 1:\r\n {set notables to cat(notables, [cat(\"an unusually low average density\")])}\r\n |elif reportbody.densityprobability < 5:\r\n {set notables to cat(notables, [cat(\"lower than average density\")])}\r\n |elif reportbody.densityprobability > 99.99:\r\n {set notables to cat(notables, [cat(\"an extremely high average density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly high average density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability > 99:\r\n {set notables to cat(notables, [cat(\"an unusually high average density\")])}\r\n |elif reportbody.densityprobability > 95:\r\n {set notables to cat(notables, [cat(\"higher than average density\")])}\r\n }\r\n }\r\n\r\n {if reportRapidRotation && reportbody.rotationalperiodprobability:\r\n {if reportbody.rotationalperiodprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly short rotational period of \", Humanise(reportbody.rotationalperiod), \" days\")])}\r\n |elif reportbody.rotationalperiodprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely short rotational period of \", Humanise(reportbody.rotationalperiod), \" days\")])}\r\n |elif reportbody.rotationalperiodprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually short rotational period of \", Humanise(reportbody.rotationalperiod), \" days\")])}\r\n }\r\n }\r\n\r\n {if reportAbsMagnitude && reportbody.absolutemagnitudeprobability:\r\n {if reportbody.absolutemagnitudeprobability < 0.01:\r\n {set notables to cat(notables, [cat(OneOf(\"incredible brilliance\", \"incredible luminosity\"))])}\r\n |elif reportbody.absolutemagnitudeprobability < 0.1:\r\n {set notables to cat(notables, [cat(OneOf(\"extreme brilliance\", \"extremely high luminousity\"))])}\r\n |elif reportbody.absolutemagnitudeprobability < 1:\r\n {set notables to cat(notables, [cat(OneOf(\"unusually high brilliance\", \"unusually high luminousity\"))])}\r\n |elif reportbody.absolutemagnitudeprobability < 5:\r\n {set notables to cat(notables, [cat(OneOf(\"high brilliance\", \"high luminousity\"))])}\r\n }\r\n }\r\n\r\n {_ Is the star ringed? _}\r\n {if reportRingedStars:\r\n {if reportbody.rings:\r\n {set ringcompositions to []}\r\n {set cur to 0}\r\n {for ring in reportbody.rings:\r\n {if find(ring.name, \"Ring\") > -1:\r\n {if find(ringcompositions, ring.composition) = -1:\r\n {set ringcompositions to cat(ringcompositions, [cat(ring.composition)])}\r\n }\r\n }\r\n {set cur to cur + 1}\r\n }\r\n {set cur to 0}\r\n {set length to len(ringcompositions) - 1}\r\n {while cur < len(ringcompositions):\r\n {set ringsdescription to cat(ringsdescription, ringcompositions[cur])}\n {set cur to cur + 1}\n {if cur = length: \r\n {set ringsdescription to cat(ringsdescription, \" and \")}\n |elif cur < length:\r\n {set ringsdecription to cat(ringsdescription, \", \")}\n }\n }\r\n {if ringsdescription:\r\n {if len(ringcompositions) = 1:\r\n {if StartsWithVowel(reportbody.reserves): \r\n {set a to \"an \"} \r\n |else: \r\n {set a to \"a \"}\r\n }\r\n {set rings to \"ring\"}\r\n |else:\r\n {set rings to \"rings\"} \r\n }\r\n {if reportbody.reserveLevel.invariantName != \"None\": \r\n {set reserves to reportbody.reserves}\r\n }\r\n {set notables to cat(notables, [cat(a, \" \", reserves, \" \", ringsdescription, \" \", rings)])}\r\n }\r\n }\r\n }\r\n\r\n {_ Report notable stars _}\r\n\r\n {if len(notables) > 0:\r\n\r\n {_ Setup descriptions for our star _}\r\n\r\n {if find([\"L\", \"T\", \"Y\"], reportbody.stellarclass) > -1:\r\n {set shortdescription to \"brown dwarf\"}\r\n |elif reportbody.stellarclass = \"TTS\":\r\n {set shortdescription to \"T tauri star\"}\r\n {set desc2 to Occasionally(2, \"in the process of gravitational contraction\")}\r\n |elif reportbody.stellarclass = \"AEBE\":\r\n {set age to \"Very young\"}\r\n {set shortdescription to \"proto-star\"}\r\n {set desc2 to Occasionally(2, \"yet to enter main sequence {Occasionally(2, \\\"but on the way to becoming an A or B class star\\\")}\")}\r\n |elif reportbody.stellarclass = \"WC\":\r\n {set desc1 to \"carbon rich\"}\r\n {set shortdescription to \"Wolf-Rayet star\"}\r\n {set desc2 to Occasionally(2, \", shedding considerable mass and exposing ionised carbon at its core, \")}\r\n |elif reportbody.stellarclass = \"WN\":\r\n {set desc1 to \"helium and nitrogen rich\"}\r\n {set shortdescription to \"Wolf-Rayet star\"}\r\n {set desc2 to Occasionally(2, \", shedding considerable mass and exposing ionised helium and nitrogen at its core, \")}\r\n |elif reportbody.stellarclass = \"WO\":\r\n {set desc1 to \"oxygen rich\"}\r\n {set shortdescription to \"Wolf-Rayet star\"}\r\n {set desc2 to Occasionally(2, \", shedding considerable mass and exposing ionised oxygen at its core, \")}\r\n |elif reportbody.stellarclass = \"WNC\":\r\n {set shortdescription to \"Wolf-Rayet star\"}\r\n {set desc2 to Occasionally(2, \", shedding considerable mass and exposing ionised nitrogen, carbon, oxygen, and helium at its core, \")}\r\n |elif reportbody.stellarclass = \"W\":\r\n {set shortdescription to \"Wolf-Rayet star\"} \r\n {set desc2 to Occasionally(2, \", shedding considerable mass and exposing heavier elements at its core, \")}\r\n |elif reportbody.stellarclass = \"CS\":\r\n {set shortdescription to \"carbon star\"}\r\n |elif find([\"C\", \"CN\", \"CH\", \"CHd\"], reportbody.stellarclass) > -1:\r\n {set age to Occasionally(2, \"late-sequence\")} \r\n {set shortdescription to \"carbon-rich star\"}\r\n |elif reportbody.stellarclass = \"CJ\":\r\n {set age to Occasionally(2, \"late-sequence\")} \r\n {set shortdescription to \"carbon star\"}\r\n {set desc2 to Occasionally(2, \"with high levels of carbon 13 in its atmosphere\")}\r\n |elif find([\"MS\", \"S\"], reportbody.stellarclass) > -1:\r\n {set age to Occasionally(2, \"late-sequence\")} \r\n {set shortdescription to \"star\"}\r\n {set desc2 to Occasionally(4, \"that was once an M class star and is on the way to becoming a carbon star\")}\r\n |elif reportbody.stellarclass = \"DA\":\r\n {set shortdescription to \"white dwarf\"}\r\n {set desc2 to Occasionally(4, \"with a hydrogen-rich atmosphere\")}\r\n |elif reportbody.stellarclass = \"DAB\":\r\n {set shortdescription to \"white dwarf\"}\r\n {set desc2 to Occasionally(4, \"with an atmosphere rich in hydrogen and helium\")}\r\n |elif slice(reportbody.stellarclass, 0, 1) = \"D\":\r\n {set shortdescription to \"white dwarf\"}\r\n |elif slice(reportbody.stellarclass, 0, 1) = \"N\":\r\n {set shortdescription to \"neutron star\"}\r\n {set desc2 to Occasionally(4, \"that has a dangerously high-density core\")}\r\n |elif reportbody.stellarclass = \"H\":\r\n {set shortdescription to \"black hole\"}\r\n |elif reportbody.stellarclass = \"X\":\r\n {set shortdescription to \"Exotic stellar entity\"}\r\n |elif reportbody.stellarclass = \"SuperMassiveBlackHole\":\r\n {set shortdescription to \"Supermassive black hole\"}\r\n |elif reportbody.stellarclass = \"A_BlueWhiteSuperGiant\":\r\n {set class to \"{Spacialise(\\\"A\\\")}\"}\r\n {set shortdescription to \"blue-white super-giant\"}\r\n {set desc2 to Occasionally(4, \"that is expanding towards being a red super-giant\")}\r\n |elif reportbody.stellarclass = \"F_WhiteSuperGiant\":\r\n {set class to \"{Spacialise(\\\"F\\\")}\"} \r\n {set shortdescription to \"yellow-white super-giant\"}\r\n {set desc2 to Occasionally(4, \"that is expanding towards being a red super-giant\")}\r\n |elif reportbody.stellarclass = \"M_RedSuperGiant\":\r\n {set class to \"{Spacialise(\\\"M\\\")}\"} \r\n {set shortdescription to \"red super-giant\"}\r\n {set desc2 to Occasionally(4, \"in its helium burning phase\")}\r\n |elif reportbody.stellarclass = \"M_RedGiant\":\r\n {set class to \"{Spacialise(\\\"M\\\")}\"} \r\n {set shortdescription to \"red giant\"}\r\n {set desc2 to Occasionally(4, \"that is expanding towards being a red super-giant\")}\r\n |elif reportbody.stellarclass = \"K_OrangeGiant\":\r\n {set class to \"{Spacialise(\\\"M\\\")}\"} \r\n {set shortdescription to \"orange giant\"}\r\n {set desc2 to Occasionally(4, \"that is expanding as it heads towards the end of its life\")}\r\n |elif reportbody.stellarclass = \"RoguePlanet\":\r\n {set class to \"\"} \r\n {set shortdescription to \"Rogue planet\"}\r\n |elif reportbody.stellarclass = \"Nebula\":\r\n {set class to \"\"} \r\n {set shortdescription to \"Nebula\"}\r\n |elif reportbody.stellarclass = \"StellarRemnantNebula\":\r\n {set class to \"\"} \r\n {set shortdescription to \"Nebula remnant\"}\r\n }\r\n\r\n {if !shortdescription:\r\n {set shortdescription to \"star\"}\r\n }\r\n {set description to shortdescription}\r\n {if desc1: \r\n {set description to cat(desc1, \" \", description)}\r\n }\r\n {if desc2: \r\n {set description to cat(description, \" \", desc2)}\r\n }\r\n\r\n {_ Set additional common elements _}\r\n\r\n {if !class:\r\n {set class to Spacialise(reportbody.stellarclass)}\r\n }\r\n\r\n {_ Begin speaking _}\r\n\r\n {if len(notables) > 0:\r\n {if reportbody.shortname != reportbody.systemname:\r\n {if fastburning = 1: {Occasionally(2, \"fast burning\")}}\r\n {mainsequence}\r\n {shortdescription}\r\n {P(reportbody.shortname, \"body\")} is\r\n |else:\r\n This\r\n {if fastburning = 1: {Occasionally(2, \"fast burning\")}}\r\n {mainsequence}\r\n {shortdescription} is\r\n }\r\n\r\n {if rarity:\r\n {rarity}{if reportbody.chromaticity: \", \"} and\r\n }\r\n\r\n {if len(notables) = 1:\r\n notable,\r\n |elif len(notables) = 2:\r\n {OneOf('interesting,', 'notable', 'remarkable')}\r\n |elif len(notables) = 3:\r\n {OneOf('exceptional,', 'remarkable,')}\r\n |elif len(notables) = 4:\r\n {OneOf('extraordinary,')}\r\n |elif len(notables) >= 5:\r\n {OneOf('one of a kind,', 'unique,')}\r\n }\r\n\r\n {if reportClass = 1 && len(class) > 0: \r\n {set class to cat(\"class\", \" \", class)}\r\n {if reportSubClass && reportbody.stellarsubclass:\r\n {set class to cat(class, \" \", reportbody.stellarsubclass)}\r\n }\r\n }\r\n {Occasionally(3, \"relative to similar {class} {shortdescription}s,\")}\r\n\r\n {if len(notables) > 0:\r\n with {List(notables)}.\r\n }\r\n\r\n {if reportbody.chromaticity && reportChromaticity = 1:\r\n As you can see, it emits \r\n {if StartsWithVowel(reportbody.chromaticity): an |else: a } \r\n {reportbody.chromaticity} light. \r\n }\r\n }\r\n } \r\n\r\n {if reportScanValue: {F(\"Report last scan value\")} }\r\n\r\n {if reportHabZone && event.mainstar: {F(\"Star habitable zone\")} }\r\n}", | |
"defaultValue": "{_ Preferences _}\r\n{set reportAge to 1} {_ Set to 1 to report the star's age. _}\r\n{set reportRareStarClasses to 1} {_ Set to 1 to report when rare star classes are found _}\r\n{set reportMass to 1} {_ Set to 1 to report stars with abnormal mass _}\r\n{set reportRadius to 1} {_ Set to 1 to report stars with abnormal radii _}\r\n{set reportRotation to 1} {_ Set to 1 to report stars with abnormal rotational periods _}\r\n{set reportTemps to 1} {_ Set to 1 to report stars with abnormal surface temperatures _}\r\n{set reportDensity to 1} {_ Set to 1 to report notable densities (in kilograms per cubic meter) _}\r\n{set reportAbsMagnitude to 1} {_ Set to 1 to report stars with abnormal absolute magnitude (lower is brighter) _}\r\n{set reportRingedStars to 1} {_ Set to 1 to report when ringed stars are found _}\r\n{set reportChromaticity to 1} {_ Set to 1 to report the star's colour. _}\r\n{set reportClass to 1} {_ Set to 1 to report the stellar class. _}\r\n{set reportSubClass to 0} {_ Set to 1 to report the stellar sub class (if reportClass is also 1) _}\r\n{set reportScanValue to 0} {_ Set to 1 to report the scan value. _}\r\n{set reportHabZone to 0} {_ Set to 1 to report habitable zone details for the primary star. _}\r\n{set mainSequenceFrequency to 4} {_ Set to determine the frequency (1 chance in n) for describing applicable stars as \"main sequence\" _}\r\n{set reportRapidRotation to 1} {_ Reports very fast rotating bodies _}\r\n\r\n{_ Fetch from context }\r\n{set reportbody to BodyDetails(state.eddi_context_star_star, state.eddi_context_star_system)}\r\n{if !reportbody: {set reportbody to BodyDetails(state.eddi_context_star_star)}}\r\n{if !reportbody && event: {set reportbody to event.star}}\r\n\r\n{if !reportbody.name || reportbody.name = \"\":\r\n\r\n Which star are you {OneOf(\"asking about\", \"referencing\")}?\r\n\r\n|else:\r\n\r\n {_ Set up a list of notable star characteristics _}\r\n {set notables to []}\r\n\r\n {_ Set up various groups of stars _}\r\n {set mainsequence to [\"O\", \"B\", \"A\", \"F\", \"G\", \"K\", \"M\"]}\r\n {set fastburning to [\"WC\", \"WN\", \"WO\", \"WNC\", \"W\"]}\r\n {set browndwarves to [\"L\", \"T\", \"Y\"]}\r\n\r\n {for starclass in mainsequence:\r\n {if reportbody.stellarclass = starclass:\r\n {set mainsequence to Occasionally(mainSequenceFrequency, \"main sequence\")}\r\n }\r\n } \r\n {for starclass in browndwarves:\r\n {if reportbody.stellarclass = starclass:\r\n {set browndwarf to 1}\r\n }\r\n } \r\n {for starclass in fastburning:\r\n {if reportbody.stellarclass = starclass: \r\n {set fastburning to 1}\r\n }\r\n }\r\n\r\n {_ Is this a rare class of star? _}\r\n {if reportRareStarClasses:\r\n {if reportbody.starClass.percentage < 0.01:\r\n {set rarity to \"Incredibly rare\"}\r\n |elif reportbody.starClass.percentage < 0.1:\r\n {set rarity to \"Very rare\"}\r\n |elif reportbody.starClass.percentage < 1.0:\r\n {set rarity to \"Rare\"}\r\n |elif reportbody.starClass.percentage < 5:\r\n {set rarity to \"Uncommon\"}\r\n }\r\n }\r\n\r\n {_ Is the star notable in some other way? _}\r\n\r\n {if reportAge:\r\n {set ageInYears to reportbody.age * 1000000}\r\n {if ageInYears <= 1000000:\r\n {set ps to \", making it one of the youngest stars in the galaxy\"}\r\n |elif ageInYears >= 13000000000:\r\n {set ps to \", making it one of the oldest stars in the galaxy\"}\r\n }\r\n {if reportbody.ageprobability:\r\n {if reportbody.ageprobability < 0.01:\r\n {set notables to cat(notables, [cat(\"an incredibly young age of \", Humanise(ageInYears), \" years\", ps)])}\r\n |elif reportbody.ageprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an extremely young age of \", Humanise(ageInYears), \" years\", ps)])}\r\n |elif reportbody.ageprobability < 5:\r\n {set notables to cat(notables, [cat(\"an unusually young age of \", Humanise(ageInYears), \" years\", ps)])}\r\n |elif reportbody.ageprobability > 99.99:\r\n {set notables to cat(notables, [cat(\"an incredibly old age of \", Humanise(ageInYears), \" years\", ps)])}\r\n |elif reportbody.ageprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an extremely old age of \", Humanise(ageInYears), \" years\", ps)])}\r\n |elif reportbody.ageprobability > 95:\r\n {set notables to cat(notables, [cat(\"an unusually old age of \", Humanise(ageInYears), \" years\", ps)])}\r\n }\r\n }\r\n }\r\n\r\n {if reportMass && reportbody.massprobability:\r\n {if reportbody.massprobability < 0.01:\r\n {set notables to cat(notables, [cat(\"an incredibly low solar mass of \", Humanise(reportbody.solarmass), \" times Sol's\")])}\r\n |elif reportbody.massprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an extremely low solar mass of \", Humanise(reportbody.solarmass), \" times Sol's\")])}\r\n |elif reportbody.massprobability < 1:\r\n {set notables to cat(notables, [cat(\"an unusually low solar mass of \", Humanise(reportbody.solarmass), \" times Sol's\")])}\r\n |elif reportbody.massprobability > 99.99:\r\n {set notables to cat(notables, [cat(\"an incredibly high solar mass of \", Humanise(reportbody.solarmass), \" times Sol's\")])}\r\n |elif reportbody.massprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an extremely high solar mass of \", Humanise(reportbody.solarmass), \" times Sol's\")])}\r\n |elif reportbody.massprobability > 99:\r\n {set notables to cat(notables, [cat(\"an unusually high solar mass of \", Humanise(reportbody.solarmass), \" times Sol's\")])}\r\n }\r\n }\r\n\r\n {if reportRadius && reportbody.radiusprobability:\r\n {if reportbody.radiusprobability < 0.01:\r\n {set notables to cat(notables, [cat(\"an incredibly low radius at \", Humanise(reportbody.solarradius), \" times Sol's\")])}\r\n |elif reportbody.radiusprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an extremely low solar radius at \", Humanise(reportbody.solarradius), \" times Sol's\")])}\r\n |elif reportbody.radiusprobability < 5:\r\n {set notables to cat(notables, [cat(\"an unusually low solar radius at \", Humanise(reportbody.solarradius), \" times Sol's\")])}\r\n |elif reportbody.radiusprobability > 99.99:\r\n {set notables to cat(notables, [cat(\"an extremely high solar radius at \", Humanise(reportbody.solarradius), \" times Sol's\")])}\r\n |elif reportbody.radiusprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly high solar radius at \", Humanise(reportbody.solarradius), \" times Sol's\")])}\r\n |elif reportbody.radiusprobability > 95:\r\n {set notables to cat(notables, [cat(\"an unusually high solar radius at \", Humanise(reportbody.solarradius), \" times Sol's\")])}\r\n }\r\n }\r\n\r\n {if reportRotation && reportbody.rotationalperiodprobability:\r\n {if reportbody.rotationalperiodprobability > 99.99:\r\n {set notables to cat(notables, [cat(\"an extremely \", OneOf(\"rapid\", \"high\"), \" rate of rotation at \", Humanise(reportbody.rotationalperiod), \" days \", Occasionally(2, \"per revolution\"))])}\r\n |elif reportbody.rotationalperiodprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly \", OneOf(\"rapid\", \"high\"), \" rate of rotation at \", Humanise(reportbody.rotationalperiod), \" days \", Occasionally(2, \"per revolution\"))])}\r\n |elif reportbody.rotationalperiodprobability > 99:\r\n {set notables to cat(notables, [cat(\"an unusually \", OneOf(\"rapid\", \"high\"), \" rate of rotation at \", Humanise(reportbody.rotationalperiod), \" days \", Occasionally(2, \"per revolution\"))])}\r\n |elif reportbody.rotationalperiodprobability > 95:\r\n {set notables to cat(notables, [cat(\"a high rate of rotation at \", Humanise(reportbody.rotationalperiod), \" days \", Occasionally(2, \" per revolution\"))])}\r\n }\r\n }\r\n\r\n {if reportTemps && reportbody.tempprobability:\r\n {if reportbody.tempprobability < 0.01:\r\n {set notables to cat(notables, [cat(\"an incredibly low surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an extremely low surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability < 1:\r\n {set notables to cat(notables, [cat(\"an unusually low surface temperature\")])}\r\n |elif reportbody.tempprobability < 5:\r\n {set notables to cat(notables, [cat(\"lower than average surface temperature\")])}\r\n |elif reportbody.tempprobability > 99.99:\r\n {set notables to cat(notables, [cat(\"an extremely high surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly high surface temperature of \", Humanise(reportbody.temperature), \" Kelvin\")])}\r\n |elif reportbody.tempprobability > 99:\r\n {set notables to cat(notables, [cat(\"an unusually high surface temperature\")])}\r\n |elif reportbody.tempprobability > 95:\r\n {set notables to cat(notables, [cat(\"higher than average surface temperature\")])}\r\n }\r\n }\r\n\r\n {if reportDensity && reportbody.densityprobability:\r\n {if reportbody.densityprobability < 0.01:\r\n {set notables to cat(notables, [cat(\"an incredibly low average density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an extremely low average density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability < 1:\r\n {set notables to cat(notables, [cat(\"an unusually low average density\")])}\r\n |elif reportbody.densityprobability < 5:\r\n {set notables to cat(notables, [cat(\"lower than average density\")])}\r\n |elif reportbody.densityprobability > 99.99:\r\n {set notables to cat(notables, [cat(\"an extremely high average density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability > 99.9:\r\n {set notables to cat(notables, [cat(\"an incredibly high average density of \", Humanise(reportbody.density), \" kilograms per cubic meter\")])}\r\n |elif reportbody.densityprobability > 99:\r\n {set notables to cat(notables, [cat(\"an unusually high average density\")])}\r\n |elif reportbody.densityprobability > 95:\r\n {set notables to cat(notables, [cat(\"higher than average density\")])}\r\n }\r\n }\r\n\r\n {if reportRapidRotation && reportbody.rotationalperiodprobability:\r\n {if reportbody.rotationalperiodprobability < 0.1:\r\n {set notables to cat(notables, [cat(\"an incredibly short rotational period of \", Humanise(reportbody.rotationalperiod), \" days\")])}\r\n |elif reportbody.rotationalperiodprobability < 1:\r\n {set notables to cat(notables, [cat(\"an extremely short rotational period of \", Humanise(reportbody.rotationalperiod), \" days\")])}\r\n |elif reportbody.rotationalperiodprobability < 3:\r\n {set notables to cat(notables, [cat(\"an unusually short rotational period of \", Humanise(reportbody.rotationalperiod), \" days\")])}\r\n }\r\n }\r\n\r\n {if reportAbsMagnitude && reportbody.absolutemagnitudeprobability:\r\n {if reportbody.absolutemagnitudeprobability < 0.01:\r\n {set notables to cat(notables, [cat(OneOf(\"incredible brilliance\", \"incredible luminosity\"))])}\r\n |elif reportbody.absolutemagnitudeprobability < 0.1:\r\n {set notables to cat(notables, [cat(OneOf(\"extreme brilliance\", \"extremely high luminousity\"))])}\r\n |elif reportbody.absolutemagnitudeprobability < 1:\r\n {set notables to cat(notables, [cat(OneOf(\"unusually high brilliance\", \"unusually high luminousity\"))])}\r\n |elif reportbody.absolutemagnitudeprobability < 5:\r\n {set notables to cat(notables, [cat(OneOf(\"high brilliance\", \"high luminousity\"))])}\r\n }\r\n }\r\n\r\n {_ Is the star ringed? _}\r\n {if reportRingedStars:\r\n {if reportbody.rings:\r\n {set ringcompositions to []}\r\n {set cur to 0}\r\n {for ring in reportbody.rings:\r\n {if find(ring.name, \"Ring\") > -1:\r\n {if find(ringcompositions, ring.composition) = -1:\r\n {set ringcompositions to cat(ringcompositions, [cat(ring.composition)])}\r\n }\r\n }\r\n {set cur to cur + 1}\r\n }\r\n {set cur to 0}\r\n {set length to len(ringcompositions) - 1}\r\n {while cur < len(ringcompositions):\r\n {set ringsdescription to cat(ringsdescription, ringcompositions[cur])}\n {set cur to cur + 1}\n {if cur = length: \r\n {set ringsdescription to cat(ringsdescription, \" and \")}\n |elif cur < length:\r\n {set ringsdecription to cat(ringsdescription, \", \")}\n }\n }\r\n {if ringsdescription:\r\n {if len(ringcompositions) = 1:\r\n {if StartsWithVowel(reportbody.reserves): \r\n {set a to \"an \"} \r\n |else: \r\n {set a to \"a \"}\r\n }\r\n {set rings to \"ring\"}\r\n |else:\r\n {set rings to \"rings\"} \r\n }\r\n {if reportbody.reserveLevel.invariantName != \"None\": \r\n {set reserves to reportbody.reserves}\r\n }\r\n {set notables to cat(notables, [cat(a, \" \", reserves, \" \", ringsdescription, \" \", rings)])}\r\n }\r\n }\r\n }\r\n\r\n {_ Report notable stars _}\r\n\r\n {if len(notables) > 0:\r\n\r\n {_ Setup descriptions for our star _}\r\n\r\n {if find([\"L\", \"T\", \"Y\"], reportbody.stellarclass) > -1:\r\n {set shortdescription to \"brown dwarf\"}\r\n |elif reportbody.stellarclass = \"TTS\":\r\n {set shortdescription to \"T tauri star\"}\r\n {set desc2 to Occasionally(2, \"in the process of gravitational contraction\")}\r\n |elif reportbody.stellarclass = \"AEBE\":\r\n {set age to \"Very young\"}\r\n {set shortdescription to \"proto-star\"}\r\n {set desc2 to Occasionally(2, \"yet to enter main sequence {Occasionally(2, \\\"but on the way to becoming an A or B class star\\\")}\")}\r\n |elif reportbody.stellarclass = \"WC\":\r\n {set desc1 to \"carbon rich\"}\r\n {set shortdescription to \"Wolf-Rayet star\"}\r\n {set desc2 to Occasionally(2, \", shedding considerable mass and exposing ionised carbon at its core, \")}\r\n |elif reportbody.stellarclass = \"WN\":\r\n {set desc1 to \"helium and nitrogen rich\"}\r\n {set shortdescription to \"Wolf-Rayet star\"}\r\n {set desc2 to Occasionally(2, \", shedding considerable mass and exposing ionised helium and nitrogen at its core, \")}\r\n |elif reportbody.stellarclass = \"WO\":\r\n {set desc1 to \"oxygen rich\"}\r\n {set shortdescription to \"Wolf-Rayet star\"}\r\n {set desc2 to Occasionally(2, \", shedding considerable mass and exposing ionised oxygen at its core, \")}\r\n |elif reportbody.stellarclass = \"WNC\":\r\n {set shortdescription to \"Wolf-Rayet star\"}\r\n {set desc2 to Occasionally(2, \", shedding considerable mass and exposing ionised nitrogen, carbon, oxygen, and helium at its core, \")}\r\n |elif reportbody.stellarclass = \"W\":\r\n {set shortdescription to \"Wolf-Rayet star\"} \r\n {set desc2 to Occasionally(2, \", shedding considerable mass and exposing heavier elements at its core, \")}\r\n |elif reportbody.stellarclass = \"CS\":\r\n {set shortdescription to \"carbon star\"}\r\n |elif find([\"C\", \"CN\", \"CH\", \"CHd\"], reportbody.stellarclass) > -1:\r\n {set age to Occasionally(2, \"late-sequence\")} \r\n {set shortdescription to \"carbon-rich star\"}\r\n |elif reportbody.stellarclass = \"CJ\":\r\n {set age to Occasionally(2, \"late-sequence\")} \r\n {set shortdescription to \"carbon star\"}\r\n {set desc2 to Occasionally(2, \"with high levels of carbon 13 in its atmosphere\")}\r\n |elif find([\"MS\", \"S\"], reportbody.stellarclass) > -1:\r\n {set age to Occasionally(2, \"late-sequence\")} \r\n {set shortdescription to \"star\"}\r\n {set desc2 to Occasionally(4, \"that was once an M class star and is on the way to becoming a carbon star\")}\r\n |elif reportbody.stellarclass = \"DA\":\r\n {set shortdescription to \"white dwarf\"}\r\n {set desc2 to Occasionally(4, \"with a hydrogen-rich atmosphere\")}\r\n |elif reportbody.stellarclass = \"DAB\":\r\n {set shortdescription to \"white dwarf\"}\r\n {set desc2 to Occasionally(4, \"with an atmosphere rich in hydrogen and helium\")}\r\n |elif slice(reportbody.stellarclass, 0, 1) = \"D\":\r\n {set shortdescription to \"white dwarf\"}\r\n |elif slice(reportbody.stellarclass, 0, 1) = \"N\":\r\n {set shortdescription to \"neutron star\"}\r\n {set desc2 to Occasionally(4, \"that has a dangerously high-density core\")}\r\n |elif reportbody.stellarclass = \"H\":\r\n {set shortdescription to \"black hole\"}\r\n |elif reportbody.stellarclass = \"X\":\r\n {set shortdescription to \"Exotic stellar entity\"}\r\n |elif reportbody.stellarclass = \"SuperMassiveBlackHole\":\r\n {set shortdescription to \"Supermassive black hole\"}\r\n |elif reportbody.stellarclass = \"A_BlueWhiteSuperGiant\":\r\n {set class to \"{Spacialise(\\\"A\\\")}\"}\r\n {set shortdescription to \"blue-white super-giant\"}\r\n {set desc2 to Occasionally(4, \"that is expanding towards being a red super-giant\")}\r\n |elif reportbody.stellarclass = \"F_WhiteSuperGiant\":\r\n {set class to \"{Spacialise(\\\"F\\\")}\"} \r\n {set shortdescription to \"yellow-white super-giant\"}\r\n {set desc2 to Occasionally(4, \"that is expanding towards being a red super-giant\")}\r\n |elif reportbody.stellarclass = \"M_RedSuperGiant\":\r\n {set class to \"{Spacialise(\\\"M\\\")}\"} \r\n {set shortdescription to \"red super-giant\"}\r\n {set desc2 to Occasionally(4, \"in its helium burning phase\")}\r\n |elif reportbody.stellarclass = \"M_RedGiant\":\r\n {set class to \"{Spacialise(\\\"M\\\")}\"} \r\n {set shortdescription to \"red giant\"}\r\n {set desc2 to Occasionally(4, \"that is expanding towards being a red super-giant\")}\r\n |elif reportbody.stellarclass = \"K_OrangeGiant\":\r\n {set class to \"{Spacialise(\\\"M\\\")}\"} \r\n {set shortdescription to \"orange giant\"}\r\n {set desc2 to Occasionally(4, \"that is expanding as it heads towards the end of its life\")}\r\n |elif reportbody.stellarclass = \"RoguePlanet\":\r\n {set class to \"\"} \r\n {set shortdescription to \"Rogue planet\"}\r\n |elif reportbody.stellarclass = \"Nebula\":\r\n {set class to \"\"} \r\n {set shortdescription to \"Nebula\"}\r\n |elif reportbody.stellarclass = \"StellarRemnantNebula\":\r\n {set class to \"\"} \r\n {set shortdescription to \"Nebula remnant\"}\r\n }\r\n\r\n {if !shortdescription:\r\n {set shortdescription to \"star\"}\r\n }\r\n {set description to shortdescription}\r\n {if desc1: \r\n {set description to cat(desc1, \" \", description)}\r\n }\r\n {if desc2: \r\n {set description to cat(description, \" \", desc2)}\r\n }\r\n\r\n {_ Set additional common elements _}\r\n\r\n {if !class:\r\n {set class to Spacialise(reportbody.stellarclass)}\r\n }\r\n\r\n {_ Begin speaking _}\r\n\r\n {if len(notables) > 0:\r\n {if reportbody.shortname != reportbody.systemname:\r\n {if fastburning = 1: {Occasionally(2, \"fast burning\")}}\r\n {mainsequence}\r\n {shortdescription}\r\n {P(reportbody.shortname, \"body\")} is\r\n |else:\r\n This\r\n {if fastburning = 1: {Occasionally(2, \"fast burning\")}}\r\n {mainsequence}\r\n {shortdescription} is\r\n }\r\n\r\n {if rarity:\r\n {rarity}{if reportbody.chromaticity: \", \"} and\r\n }\r\n\r\n {if len(notables) = 1:\r\n notable,\r\n |elif len(notables) = 2:\r\n {OneOf('interesting,', 'notable', 'remarkable')}\r\n |elif len(notables) = 3:\r\n {OneOf('exceptional,', 'remarkable,')}\r\n |elif len(notables) = 4:\r\n {OneOf('extraordinary,')}\r\n |elif len(notables) >= 5:\r\n {OneOf('one of a kind,', 'unique,')}\r\n }\r\n\r\n {if reportClass = 1 && len(class) > 0: \r\n {set class to cat(\"class\", \" \", class)}\r\n {if reportSubClass && reportbody.stellarsubclass:\r\n {set class to cat(class, \" \", reportbody.stellarsubclass)}\r\n }\r\n }\r\n {Occasionally(3, \"relative to similar {class} {shortdescription}s,\")}\r\n\r\n {if len(notables) > 0:\r\n with {List(notables)}.\r\n }\r\n\r\n {if reportbody.chromaticity && reportChromaticity = 1:\r\n As you can see, it emits \r\n {if StartsWithVowel(reportbody.chromaticity): an |else: a } \r\n {reportbody.chromaticity} light. \r\n }\r\n }\r\n } \r\n\r\n {if reportScanValue: {F(\"Report last scan value\")} }\r\n\r\n {if reportHabZone && event.mainstar: {F(\"Star habitable zone\")} }\r\n}", | |
"default": true | |
}, | |
"Star scanned": { | |
"name": "Star scanned", | |
"description": "Triggered when you complete a scan of a stellar body", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'star')}\r\n{SetState('eddi_context_last_action', 'scan')}\r\n{SetState('eddi_context_star_system', system.name)}\r\n{SetState('eddi_context_star_star', event.name)}\r\n{SetState('eddi_context_last_scan_estimated_value', event.estimatedvalue)}\r\n\r\n{if ship.Role.edname = \"Exploration\" || ship.Role.edname = \"Multipurpose\":\r\n {F(\"Star report\")}\r\n}", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'star')}\r\n{SetState('eddi_context_last_action', 'scan')}\r\n{SetState('eddi_context_star_system', system.name)}\r\n{SetState('eddi_context_star_star', event.name)}\r\n{SetState('eddi_context_last_scan_estimated_value', event.estimatedvalue)}\r\n\r\n{if ship.Role.edname = \"Exploration\" || ship.Role.edname = \"Multipurpose\":\r\n {F(\"Star report\")}\r\n}", | |
"default": true | |
}, | |
"Station no fire zone entered": { | |
"name": "Station no fire zone entered", | |
"description": "Triggered when your ship enters a station's no fire zone", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Station no fire zone exited": { | |
"name": "Station no fire zone exited", | |
"description": "Triggered when your ship exits a station's no fire zone", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Station report": { | |
"name": "Station report", | |
"description": "Function to report on the details of the current station", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "Nothing of interest here.", | |
"defaultValue": "Nothing of interest here.", | |
"default": true | |
}, | |
"Statistics": { | |
"name": "Statistics", | |
"description": "Statistics provided at the beginning of a game session", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Suit purchased": { | |
"name": "Suit purchased", | |
"description": "Triggered when you buy a space suit", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Surface signals detected": { | |
"name": "Surface signals detected", | |
"description": "Triggered when surface signal sources are detected", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{set surfacesignals to []}\r\n{for signal in event.surfacesignals: \r\n {set surfacesignals_desc to: \r\n {signal.amount} {signal.source}{if signal.amount > 1:s}\r\n }\r\n {set surfacesignals to cat(surfacesignals, [surfacesignals_desc])}\r\n}\r\n\r\n{List(surfacesignals)} detected.", | |
"defaultValue": "{set surfacesignals to []}\r\n{for signal in event.surfacesignals: \r\n {set surfacesignals_desc to: \r\n {signal.amount} {signal.source}{if signal.amount > 1:s}\r\n }\r\n {set surfacesignals to cat(surfacesignals, [surfacesignals_desc])}\r\n}\r\n\r\n{List(surfacesignals)} detected.", | |
"default": true | |
}, | |
"Swapout check": { | |
"name": "Swapout check", | |
"description": "Check to see if any fitted modules are available more cheaply here", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Function to find a given module in outfitting}\r\n{set outfitting(module) to:\r\n {for outfittingmodule in station.outfitting:\r\n {if outfittingmodule.EDName = module.EDName:\r\n {return outfittingmodule}\r\n }\r\n }\r\n}\r\n\r\n{_ Function to report if a module is cheaper in outfitting that on the ship}\r\n{set reportIfCheaper(shipmodule) to:\r\n {_ Only consider if this has no modifications}\r\n {if !shipmodule.modified:\r\n {set outfittingmodule to outfitting(shipmodule)}\r\n {if outfittingmodule:\r\n {if outfittingmodule.price > 0 && outfittingmodule.price < shipmodule.price:\r\n {set saving to shipmodule.price - outfittingmodule.price}\r\n {_ Only bother if it's a relatively good saving... more than 2% of the ship value or more than 0.1% of the commander's credit balance}\r\n {if saving / ship.value > 0.02 || (cmdr.credits > 0 && saving / cmdr.credits > 0.001):\r\n You could reduce your re-buy by {Humanise(round(saving * cmdr.insurance))} credits by swapping out your {shipmodule.name} here.\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n{reportIfCheaper(ship.powerplant)}\r\n{reportIfCheaper(ship.thrusters)}\r\n{reportIfCheaper(ship.frameshiftdrive)}\r\n{reportIfCheaper(ship.lifesupport)}\r\n{reportIfCheaper(ship.powerdistributor)}\r\n{reportIfCheaper(ship.sensors)}\r\n{for hardpoint in ship.hardpoints:\r\n {if hardpoint.module:\r\n {reportIfCheaper(hardpoint.module)}\r\n }\r\n}\r\n{for compartment in ship.compartments:\r\n {if compartment.module:\r\n {reportIfCheaper(compartment.module)}\r\n }\r\n}\r\n", | |
"defaultValue": "{_ Function to find a given module in outfitting}\r\n{set outfitting(module) to:\r\n {for outfittingmodule in station.outfitting:\r\n {if outfittingmodule.EDName = module.EDName:\r\n {return outfittingmodule}\r\n }\r\n }\r\n}\r\n\r\n{_ Function to report if a module is cheaper in outfitting that on the ship}\r\n{set reportIfCheaper(shipmodule) to:\r\n {_ Only consider if this has no modifications}\r\n {if !shipmodule.modified:\r\n {set outfittingmodule to outfitting(shipmodule)}\r\n {if outfittingmodule:\r\n {if outfittingmodule.price > 0 && outfittingmodule.price < shipmodule.price:\r\n {set saving to shipmodule.price - outfittingmodule.price}\r\n {_ Only bother if it's a relatively good saving... more than 2% of the ship value or more than 0.1% of the commander's credit balance}\r\n {if saving / ship.value > 0.02 || (cmdr.credits > 0 && saving / cmdr.credits > 0.001):\r\n You could reduce your re-buy by {Humanise(round(saving * cmdr.insurance))} credits by swapping out your {shipmodule.name} here.\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n{reportIfCheaper(ship.powerplant)}\r\n{reportIfCheaper(ship.thrusters)}\r\n{reportIfCheaper(ship.frameshiftdrive)}\r\n{reportIfCheaper(ship.lifesupport)}\r\n{reportIfCheaper(ship.powerdistributor)}\r\n{reportIfCheaper(ship.sensors)}\r\n{for hardpoint in ship.hardpoints:\r\n {if hardpoint.module:\r\n {reportIfCheaper(hardpoint.module)}\r\n }\r\n}\r\n{for compartment in ship.compartments:\r\n {if compartment.module:\r\n {reportIfCheaper(compartment.module)}\r\n }\r\n}\r\n", | |
"default": true | |
}, | |
"Synthesised": { | |
"name": "Synthesised", | |
"description": "Triggered when you synthesise something from materials", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "Synthesis complete.", | |
"defaultValue": "Synthesis complete.", | |
"default": true | |
}, | |
"System distance report": { | |
"name": "System distance report", | |
"description": "Function to report on the distance to the contextual system", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch from context }\r\n{set reportsystem to SystemDetails(state.eddi_context_system_system)}\r\n\r\n{if !reportsystem.name || reportsystem.name = \"\":\r\n I'm not sure which system you are asking about.\r\n|else:\r\n Distance to {P(reportsystem.name, \"starsystem\")} is {Humanise(Distance(reportsystem.x, reportsystem.y, reportsystem.z, system.x, system.y, system.z))} light years.\r\n}", | |
"defaultValue": "{_ Fetch from context }\r\n{set reportsystem to SystemDetails(state.eddi_context_system_system)}\r\n\r\n{if !reportsystem.name || reportsystem.name = \"\":\r\n I'm not sure which system you are asking about.\r\n|else:\r\n Distance to {P(reportsystem.name, \"starsystem\")} is {Humanise(Distance(reportsystem.x, reportsystem.y, reportsystem.z, system.x, system.y, system.z))} light years.\r\n}", | |
"default": true | |
}, | |
"System faction changed": { | |
"name": "System faction changed", | |
"description": "Triggered when there is a change in the controlling faction of a watched system", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"System materials report": { | |
"name": "System materials report", | |
"description": "Run a body materials report for each landable body in the system", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{set landable to 0}\r\n{set landable_rings to 0}\r\n\r\n{set _inventory(required) to:\r\n {for material in materials:\r\n {if material.material = required:\r\n {return material}\r\n }\r\n }\r\n}\r\n\r\n{set score to -1}\r\n{set needfactor to 1.4}\r\n{set bestbody to \"\"}\r\n\r\n{for body in system.bodies:\r\n\t{set _score to 0}\r\n\t{if body.landable:\r\n\t\t{for material in body.materials:\r\n\t\t\t{set inventoryMat to _inventory(material.material)}\r\n\t\t\t{set needamt to inventoryMat.minimum - inventoryMat.amount}\r\n\t\t\t{set wantamt to inventoryMat.desired - inventoryMat.amount}\r\n\t\t\t{set factor to (material.percentage - material.definition.goodpctbody) / (material.definition.greatpctbody - material.goodpctbody)}\r\n\t\t\t{if factor >= 0 && needamt > 0:\r\n\t\t\t\t{set _score to _score + needamt * factor * needfactor}\r\n\t\t\t}\r\n\t\t\t{if factor >= 0 && wantamt > 0:\r\n\t\t\t\t{set _score to _score + wantamt * factor}\r\n\t\t\t}\r\n\t\t}\r\n\t\t{if _score > score:\r\n\t\t\t{set score to _score}\r\n\t\t\t{set bestbody to body.shortname}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n{for body in system.bodies:\r\n {if body.landable:\r\n {set landable to landable + 1}\r\n {if body.rings && len(body.rings) > 0:\r\n {set landable_rings to landable_rings + 1}\r\n {if reportbody.shortname != reportbody.name: \r\n {if reportbody.bodytype:\r\n {reportbody.bodytype}\r\n |else:\r\n {OneOf(\"Body\", \"Object\")} \r\n }\r\n }\r\n {P(body.shortname, \"body\")} is a landable body with\r\n {if len(body.rings) = 1: one ring.\r\n |else: {len(body.rings)} rings.\r\n }\r\n }\r\n {SetState(\"eddi_context_report_body\", body.name)}\r\n {if body.shortname = bestbody: {P(body.shortname, \"body\")} scored {Humanise(score)}}.\r\n {if bestbody = \"\" || body.shortname = bestbody: {F(\"Body materials report\")}}\r\n .\r\n }\r\n}\r\n\r\n{if landable > 0:\r\n {if landable = 1:\r\n There is one landable body {Occasionally(3, \"in this system\")}\r\n |else:\r\n There are {landable} landable bodies in this system.\r\n }\r\n}\r\n\r\n", | |
"defaultValue": null, | |
"default": false | |
}, | |
"System report": { | |
"name": "System report", | |
"description": "Function to report on the details of the contextual star system", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch from Context, if a context is set _}\r\n{if state.eddi_context_system_name:\r\n {set reportSystem to SystemDetails(state.eddi_context_system_name)}\r\n|else:\r\n {set reportSystem to SystemDetails(system.systemname)}\r\n}\r\n\r\n{if !reportSystem.name || reportSystem.name = \"\":\r\n I'm not sure which system you are asking about.\r\n|else:\r\n {P(reportSystem.name, \"starsystem\")} is\r\n {if reportSystem.population && reportSystem.population > 0:\r\n {if reportSystem.security = \"High\":\r\n {OneOf(\"a highly policed\", \"a well regulated\")}\r\n |elif reportSystem.security = \"Low\":\r\n {OneOf(\"a poorly policed\", \"a poorly secured\")}\r\n |elif reportSystem.security = \"Anarchy\":\r\n {OneOf(\"an unpoliced\", \"an unsecured\")}\r\n |else:\r\n {if reportSystem.allegiance = \"Federation\": a |else: an }\r\n }\r\n {if reportSystem.allegiance = \"Federation\":\r\n Federal\r\n |elif reportSystem.allegiance = \"Empire\":\r\n Imperial\r\n |else:\r\n independent\r\n }\r\n {if reportSystem.government != \"None\":\r\n {reportSystem.government}\r\n |else:\r\n system\r\n }\r\n {OneOf(\"of\", \"with a population of\", \"home to\", \"supporting\")} {Humanise(reportSystem.population)} {OneOf(\"people\", \"souls\")}\r\n {if reportSystem.powerState.invariantName != \"None\":\r\n {if reportSystem.powerState.invariantName = \"Home System\":\r\n , and is home to {P(reportSystem.power, \"power\")}\r\n |elif reportSystem.powerState.invariantName = \"Control\":\r\n , and is {OneOf(\"allied with\", \"controlled by\")} {P(reportSystem.power, \"power\")}\r\n |elif reportSystem.powerState.invariantName = \"Exploited\":\r\n , and is {OneOf(\"aligned to\", \"within the influence of\")} {P(reportSystem.power, \"power\")}\r\n |elif reportSystem.powerState.invariantName = \"Contested\":\r\n , and is contested by multiple powers\r\n }\r\n }.\r\n\r\n {if reportSystem.faction:\r\n {P(reportSystem.faction, \"faction\")} is the {OneOf(\"controlling\", \"local\", \"immediate\")} {OneOf(\"power\", \"faction\")}.\r\n }\r\n\r\n {if len(reportSystem.stations) = 0:\r\n There are no stations present\r\n |else:\r\n {set systemStations to []}\r\n {if len(reportSystem.orbitalstations) = 1:\r\n {set orbitalStationDesc to: \r\n There is {OneOf(\"a single\", \"a lone\", \"just one\", \"one\")} orbital station\r\n }\r\n |elif len(reportSystem.orbitalstations) > 1:\r\n {set orbitalStationDesc to: \r\n There are {len(reportSystem.orbitalstations)} orbital stations\r\n }\r\n }\r\n {if len(reportSystem.planetarystations) = 1:\r\n {set planetaryStationDesc to: \r\n {if len(reportSystem.orbitalstations) = 0: There is}\r\n {OneOf(\"a single\", \"a lone\", \"just one\", \"one\")} planetary station\r\n }\r\n |elif len(reportSystem.planetarystations) > 1:\r\n {set planetaryStationDesc to: \r\n {if len(reportSystem.orbitalstations) = 0: There are}\r\n {len(reportSystem.planetarystations)} planetary stations\r\n }\r\n }\r\n {if len(reportSystem.carriersignalsources) = 1:\r\n {set fleetCarrierDesc to:\r\n {if len(reportSystem.orbitalstations) = 0 && len(reportSystem.planetarystations) = 0: There is}\r\n {OneOf(\"a single\", \"a lone\", \"just one\", \"one\")} fleet carrier\r\n }\r\n |elif len(reportSystem.carriersignalsources) > 1:\r\n {set fleetCarrierDesc to: \r\n {if len(reportSystem.orbitalstations) = 0 && len(reportSystem.planetarystations) = 0: There are}\r\n {len(reportSystem.carriersignalsources)} fleet carriers\r\n }\r\n }\r\n {if orbitalStationDesc:\r\n {set systemStations to cat(systemStations, [orbitalStationDesc])}\r\n }\r\n {if planetaryStationDesc:\r\n {set systemStations to cat(systemStations, [planetaryStationDesc])}\r\n }\r\n {if fleetCarrierDesc:\r\n {set systemStations to cat(systemStations, [fleetCarrierDesc])}\r\n }\r\n {List(systemStations)}\r\n }\r\n in this system\r\n |else:\r\n unpopulated\r\n }.\r\n}", | |
"defaultValue": "{_ Fetch from Context, if a context is set _}\r\n{if state.eddi_context_system_name:\r\n {set reportSystem to SystemDetails(state.eddi_context_system_name)}\r\n|else:\r\n {set reportSystem to SystemDetails(system.systemname)}\r\n}\r\n\r\n{if !reportSystem.name || reportSystem.name = \"\":\r\n I'm not sure which system you are asking about.\r\n|else:\r\n {P(reportSystem.name, \"starsystem\")} is\r\n {if reportSystem.population && reportSystem.population > 0:\r\n {if reportSystem.security = \"High\":\r\n {OneOf(\"a highly policed\", \"a well regulated\")}\r\n |elif reportSystem.security = \"Low\":\r\n {OneOf(\"a poorly policed\", \"a poorly secured\")}\r\n |elif reportSystem.security = \"Anarchy\":\r\n {OneOf(\"an unpoliced\", \"an unsecured\")}\r\n |else:\r\n {if reportSystem.allegiance = \"Federation\": a |else: an }\r\n }\r\n {if reportSystem.allegiance = \"Federation\":\r\n Federal\r\n |elif reportSystem.allegiance = \"Empire\":\r\n Imperial\r\n |else:\r\n independent\r\n }\r\n {if reportSystem.government != \"None\":\r\n {reportSystem.government}\r\n |else:\r\n system\r\n }\r\n {OneOf(\"of\", \"with a population of\", \"home to\", \"supporting\")} {Humanise(reportSystem.population)} {OneOf(\"people\", \"souls\")}\r\n {if reportSystem.powerState.invariantName != \"None\":\r\n {if reportSystem.powerState.invariantName = \"Home System\":\r\n , and is home to {P(reportSystem.power, \"power\")}\r\n |elif reportSystem.powerState.invariantName = \"Control\":\r\n , and is {OneOf(\"allied with\", \"controlled by\")} {P(reportSystem.power, \"power\")}\r\n |elif reportSystem.powerState.invariantName = \"Exploited\":\r\n , and is {OneOf(\"aligned to\", \"within the influence of\")} {P(reportSystem.power, \"power\")}\r\n |elif reportSystem.powerState.invariantName = \"Contested\":\r\n , and is contested by multiple powers\r\n }\r\n }.\r\n\r\n {if reportSystem.faction:\r\n {P(reportSystem.faction, \"faction\")} is the {OneOf(\"controlling\", \"local\", \"immediate\")} {OneOf(\"power\", \"faction\")}.\r\n }\r\n\r\n {if len(reportSystem.stations) = 0:\r\n There are no stations present\r\n |else:\r\n {set systemStations to []}\r\n {if len(reportSystem.orbitalstations) = 1:\r\n {set orbitalStationDesc to: \r\n There is {OneOf(\"a single\", \"a lone\", \"just one\", \"one\")} orbital station\r\n }\r\n |elif len(reportSystem.orbitalstations) > 1:\r\n {set orbitalStationDesc to: \r\n There are {len(reportSystem.orbitalstations)} orbital stations\r\n }\r\n }\r\n {if len(reportSystem.planetarystations) = 1:\r\n {set planetaryStationDesc to: \r\n {if len(reportSystem.orbitalstations) = 0: There is}\r\n {OneOf(\"a single\", \"a lone\", \"just one\", \"one\")} planetary station\r\n }\r\n |elif len(reportSystem.planetarystations) > 1:\r\n {set planetaryStationDesc to: \r\n {if len(reportSystem.orbitalstations) = 0: There are}\r\n {len(reportSystem.planetarystations)} planetary stations\r\n }\r\n }\r\n {if len(reportSystem.carriersignalsources) = 1:\r\n {set fleetCarrierDesc to:\r\n {if len(reportSystem.orbitalstations) = 0 && len(reportSystem.planetarystations) = 0: There is}\r\n {OneOf(\"a single\", \"a lone\", \"just one\", \"one\")} fleet carrier\r\n }\r\n |elif len(reportSystem.carriersignalsources) > 1:\r\n {set fleetCarrierDesc to: \r\n {if len(reportSystem.orbitalstations) = 0 && len(reportSystem.planetarystations) = 0: There are}\r\n {len(reportSystem.carriersignalsources)} fleet carriers\r\n }\r\n }\r\n {if orbitalStationDesc:\r\n {set systemStations to cat(systemStations, [orbitalStationDesc])}\r\n }\r\n {if planetaryStationDesc:\r\n {set systemStations to cat(systemStations, [planetaryStationDesc])}\r\n }\r\n {if fleetCarrierDesc:\r\n {set systemStations to cat(systemStations, [fleetCarrierDesc])}\r\n }\r\n {List(systemStations)}\r\n }\r\n in this system\r\n |else:\r\n unpopulated\r\n }.\r\n}", | |
"default": true | |
}, | |
"System scan complete": { | |
"name": "System scan complete", | |
"description": "Triggered after having identified all bodies in the system", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Preferences _}\r\n{set reportGreenSystems to true} {_ if true, reports systems containing all fsd synthesis elements. _}\r\n{set reportGoldSystems to true} {_ if true, reports systems containing all surface prospectable elements. _}\r\n{set reportBodiesToMap to true} {_ If true, recommends bodies to map using the `Bodies to map` script. _}\r\n{set reportValueThreshold to 5000000}\r\n\r\n{if ship.Role.edname = \"Exploration\" || ship.Role.edname = \"Multipurpose\":\r\n {for compartment in ship.compartments:\r\n {if compartment.module.invariantName = \"Planetary Vehicle Hangar\":\r\n {set hasSRV to true}\r\n }\r\n }\r\n {if hasSRV:\r\n {if system.isgold:\r\n {if reportGoldSystems:\r\n This {Occasionally(2, \"star\")} system \r\n {OneOf(\"contains\", \"holds\", \"has\")}\r\n every element \r\n {OneOf(\"that can be found\", \"available\")}\r\n {OneOf(\"on planetary surfaces.\", \"from surface prospecting.\")}\r\n Exploration class: Gold.\r\n }\r\n |elif system.isgreen:\r\n {if reportGreenSystems:\r\n This {Occasionally(2, \"star\")} system \r\n {OneOf(\"contains\", \"holds\", \"has\")}\r\n every element \r\n {Occasionally(2, \"that may be\")} \r\n required to \r\n {OneOf(\"augment\", \"boost\")} \r\n {OneOf(\"the {Occasionally(2, \\\"jump\\\")} range of this ship.\", \r\n \"an explorer's {Occasionally(2, \\\"jump\\\")} range.\", \r\n \"{ShipName()}'s {Occasionally(2, \\\"jump\\\")} range.\"\r\n )}\r\n Exploration class: Green.\r\n }\r\n }\r\n {F(\"System materials report\")}\r\n }\r\n\r\n {if reportBodiesToMap:\r\n {set bodiesToMap to F(\"Bodies to map\")}\r\n {if bodiesToMap:\r\n {Pause(2000)}\r\n {bodiesToMap}\r\n }\r\n }\r\n \r\n {if system.estimatedvalue >= reportValueThreshold:\r\n \tSystem estimated value: {Humanise(system.estimatedvalue)}\r\n }\r\n}", | |
"defaultValue": "{_ Preferences _}\r\n{set reportGreenSystems to true} {_ if true, reports systems containing all fsd synthesis elements. _}\r\n{set reportGoldSystems to true} {_ if true, reports systems containing all surface prospectable elements. _}\r\n{set reportBodiesToMap to true} {_ If true, recommends bodies to map using the `Bodies to map` script. _}\r\n\r\n{if ship.Role.edname = \"Exploration\" || ship.Role.edname = \"Multipurpose\":\r\n {for compartment in ship.compartments:\r\n {if compartment.module.invariantName = \"Planetary Vehicle Hangar\":\r\n {set hasSRV to true}\r\n }\r\n }\r\n {if hasSRV:\r\n {if system.isgold:\r\n {if reportGoldSystems:\r\n This {Occasionally(2, \"star\")} system \r\n {OneOf(\"contains\", \"holds\", \"has\")}\r\n every element \r\n {OneOf(\"that can be found\", \"available\")}\r\n {OneOf(\"on planetary surfaces.\", \"from surface prospecting.\")}\r\n Exploration class: Gold.\r\n }\r\n |elif system.isgreen:\r\n {if reportGreenSystems:\r\n This {Occasionally(2, \"star\")} system \r\n {OneOf(\"contains\", \"holds\", \"has\")}\r\n every element \r\n {Occasionally(2, \"that may be\")} \r\n required to \r\n {OneOf(\"augment\", \"boost\")} \r\n {OneOf(\"the {Occasionally(2, \\\"jump\\\")} range of this ship.\", \r\n \"an explorer's {Occasionally(2, \\\"jump\\\")} range.\", \r\n \"{ShipName()}'s {Occasionally(2, \\\"jump\\\")} range.\"\r\n )}\r\n Exploration class: Green.\r\n }\r\n }\r\n }\r\n\r\n {if reportBodiesToMap:\r\n {set bodiesToMap to F(\"Bodies to map\")}\r\n {if bodiesToMap:\r\n {Pause(2000)}\r\n {bodiesToMap}\r\n }\r\n }\r\n}", | |
"default": false | |
}, | |
"System state changed": { | |
"name": "System state changed", | |
"description": "Triggered when there is a change in the state of a watched system", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'system')}\r\n{SetState('eddi_context_last_action', 'change_state')}\r\n{SetState('eddi_context_system', event.system)}\r\n{SetState('eddi_context_system_system', event.system)}\r\n\r\n{_ Set up our system name}\r\n{if event.system = homesystem.name:\r\n {set system to OneOf('{P(event.system, \"starsystem\")}',\r\n 'your home system')}\r\n|elif event.system = system.name:\r\n {set system to OneOf('{P(event.system, \"starsystem\")}',\r\n 'this system')}\r\n|else:\r\n {set system to OneOf('system {P(event.system, \"starsystem\")}',\r\n '{P(event.system, \"starsystem\")}')}\r\n}\r\n\r\n{if event.newstate != 'None':\r\n {_ System has entered a new state}\r\n {OneOf('Local transmissions report that', 'Information: ', 'Transmission intercepted. Contents state that ')}\r\n {if event.newstate = 'Boom':\r\n {OneOf('{system} is experiencing a commercial boom',\r\n '{system} is entering a period of heightened commercial success')}\r\n |elif event.newstate = 'Bust':\r\n {system} is experiencing economic hardship\r\n |elif event.newstate = 'Civil Unrest':\r\n {OneOf('{system} is experiencing civil unrest',\r\n 'there is unrest in the {system} system')}\r\n |elif event.newstate = 'Civil War':\r\n {OneOf('{system} is at war with another faction in the same system',\r\n 'civil war has broken out in {system}',\r\n '{system} has fallen in to civil war',\r\n 'hostilities have broken out in {system}')}\r\n |elif event.newstate = 'Election':\r\n {system} is undergoing elections\r\n |elif event.newstate = 'Expansion':\r\n {OneOf(\"a faction in {system}'s is attempting to expand in to a neighbouring system\",\r\n \"a faction in {system}'s is preparing to expand in to a neighbouring system\")}\r\n |elif event.newstate = 'Famine':\r\n {system} is suffering from famine\r\n |elif event.newstate = 'Investment':\r\n {system}'s controlling faction are investing heavily in their local infrastructure\r\n |elif event.newstate = 'Lockdown':\r\n {system} has heightened security due to a lockdown by the controlling faction\r\n |elif event.newstate = 'Outbreak':\r\n {system} is suffering from an outbreak of contagious disease\r\n |elif event.newstate = 'Retreat':\r\n {system}'s controlling faction is retreating from a neighbouring system\r\n |elif event.newstate = 'War':\r\n {system} is now at war with a neighbouring system\r\n |else:\r\n {OneOf('{system} has entered {event.state}',\r\n '{system} is now in a state of {event.state}')}\r\n }.\r\n}\r\n\r\n", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'system')}\r\n{SetState('eddi_context_last_action', 'change_state')}\r\n{SetState('eddi_context_system', event.system)}\r\n{SetState('eddi_context_system_system', event.system)}\r\n\r\n{_ Set up our system name}\r\n{if event.system = homesystem.name:\r\n {set system to OneOf('{P(event.system, \"starsystem\")}',\r\n 'your home system')}\r\n|elif event.system = system.name:\r\n {set system to OneOf('{P(event.system, \"starsystem\")}',\r\n 'this system')}\r\n|else:\r\n {set system to OneOf('system {P(event.system, \"starsystem\")}',\r\n '{P(event.system, \"starsystem\")}')}\r\n}\r\n\r\n{if event.newstate != 'None':\r\n {_ System has entered a new state}\r\n {OneOf('Local transmissions report that', 'Information: ', 'Transmission intercepted. Contents state that ')}\r\n {if event.newstate = 'Boom':\r\n {OneOf('{system} is experiencing a commercial boom',\r\n '{system} is entering a period of heightened commercial success')}\r\n |elif event.newstate = 'Bust':\r\n {system} is experiencing economic hardship\r\n |elif event.newstate = 'Civil Unrest':\r\n {OneOf('{system} is experiencing civil unrest',\r\n 'there is unrest in the {system} system')}\r\n |elif event.newstate = 'Civil War':\r\n {OneOf('{system} is at war with another faction in the same system',\r\n 'civil war has broken out in {system}',\r\n '{system} has fallen in to civil war',\r\n 'hostilities have broken out in {system}')}\r\n |elif event.newstate = 'Election':\r\n {system} is undergoing elections\r\n |elif event.newstate = 'Expansion':\r\n {OneOf(\"a faction in {system}'s is attempting to expand in to a neighbouring system\",\r\n \"a faction in {system}'s is preparing to expand in to a neighbouring system\")}\r\n |elif event.newstate = 'Famine':\r\n {system} is suffering from famine\r\n |elif event.newstate = 'Investment':\r\n {system}'s controlling faction are investing heavily in their local infrastructure\r\n |elif event.newstate = 'Lockdown':\r\n {system} has heightened security due to a lockdown by the controlling faction\r\n |elif event.newstate = 'Outbreak':\r\n {system} is suffering from an outbreak of contagious disease\r\n |elif event.newstate = 'Retreat':\r\n {system}'s controlling faction is retreating from a neighbouring system\r\n |elif event.newstate = 'War':\r\n {system} is now at war with a neighbouring system\r\n |else:\r\n {OneOf('{system} has entered {event.state}',\r\n '{system} is now in a state of {event.state}')}\r\n }.\r\n}\r\n\r\n", | |
"default": true | |
}, | |
"System state report": { | |
"name": "System state report", | |
"description": "Report on the current state of the contextual system", | |
"enabled": true, | |
"priority": null, | |
"responder": false, | |
"script": "{_ Fetch from Context, if a context is set _}\r\n{if state.eddi_context_system_name:\r\n {set reportSystem to SystemDetails(state.eddi_context_system_name)}\r\n|else:\r\n {set reportSystem to SystemDetails(system.systemname)}\r\n}\r\n\r\n{if !reportSystem.name || reportSystem.name = \"\":\r\n\r\n I'm not sure which system you are asking about.\r\n\r\n|else:\r\n\r\n {_ Report any ongoing conflicts _}\r\n {set conflictfactions to []}\r\n {if reportSystem.conflicts != null:\r\n {for conflict in reportSystem.conflicts:\r\n {P(conflict.faction1, \"faction\")}\r\n {if conflict.status = \"active\":\r\n are\r\n |elif conflict.status = \"pending\":\r\n will soon be\r\n |else:\r\n are recovering after\r\n }\r\n {if conflict.faction1dayswon > conflict.faction2dayswon:\r\n {if conflict.margin >= 3:\r\n dominating\r\n |elif conflict.margin = 2:\r\n winning\r\n |else:\r\n ahead in\r\n }\r\n |elif conflict.faction2dayswon > conflict.faction1dayswon:\r\n {if conflict.margin >= 2:\r\n losing\r\n |else:\r\n trailing in\r\n }\r\n |else:\r\n tied in\r\n }\r\n {if StartsWithVowel(conflict.state): an |else: a }\r\n {conflict.state}\r\n with \r\n {P(conflict.faction2, \"faction\")}\r\n {if conflict.stake:\r\n for control of {P(conflict.stake, \"station\")}\r\n }\r\n .\r\n {set conflictfactions to cat(conflictfactions, [conflict.faction1])}\r\n {set conflictfactions to cat(conflictfactions, [conflict.faction2])}\r\n }\r\n }\r\n\r\n {_ List our non-conflict faction states _}\r\n {set otherstates to []}\r\n {for faction in reportSystem.factions:\r\n {if faction.influence > 0 && find(conflictfactions, faction.name) = -1:\r\n {for presence in faction.presences:\r\n {if presence.systemName = reportSystem.name:\r\n {if presence.FactionState.invariantName != \"None\":\r\n\r\n {_ Note our controlling faction, if present in our `otherstates` list. _}\r\n {if faction.name = reportSystem.faction:\r\n {set factions to token(factions, \"\", index, \"controlling \")}\r\n }\r\n\r\n {_ Add the faction to our list _}\r\n {if has(otherstates, presence.state):\r\n {set factions to otherstates[presence.state])}\r\n {set factions to cat(factions, \",\", P(faction.name, \"faction\"))}\r\n {set otherstates to union(otherstates, [presence.state: factions])}\r\n |else:\r\n {set otherstates to union(otherstates, [presence.state: P(faction.name, \"faction\")])}\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n {_ Sort from most factions with each state to least factions with each state. _}\r\n {declare by_items(a, b) as:\r\n {return cmp(len(split(b, \",\")), len(split(a, \",\")))}\r\n }\r\n {sort(otherstates, by_items)}\r\n\r\n {_ Prepare summaries for each state _}\r\n {set statesummaries to []}\r\n {for state, factions in otherstates:\r\n\r\n {set factions to split(factions, \",\")}\r\n\r\n {set statesummary to:\r\n {if len(factions) > 1:\r\n {List(factions)} are\r\n |else:\r\n {factions[0]} are\r\n }\r\n {if state = \"Retreat\":\r\n in retreat\r\n |elif state = \"War\":\r\n at war\r\n |elif state = \"Boom\":\r\n undergoing a boom\r\n |elif state = \"Civil Liberty\":\r\n enjoying a period of heightened civil liberty\r\n |elif state = \"Civil Unrest\":\r\n experiencing civil unrest\r\n |elif state = \"Civil War\":\r\n in civil war\r\n |elif state = \"Famine\":\r\n in a state of famine\r\n |elif state = \"Lockdown\":\r\n in lockdown\r\n |elif state = \"Outbreak\":\r\n attempting to contain an outbreak of disease\r\n |elif state = \"Expansion\":\r\n gearing up to expand to another system\r\n |elif state = \"Bust\":\r\n financially bust\r\n |elif state = \"Election\":\r\n electing new leaders\r\n |elif state = \"Investment\":\r\n investing in its infrastructure\r\n |elif state = \"Incursion\":\r\n under assault by alien forces\r\n |elif state = \"Pirate Attack\":\r\n suffering from pirate attacks\r\n |elif state = \"Blight\":\r\n suffering from a crop blight\r\n |else: {_ catch-all, worded to avoid deciding between a/an}\r\n in a state of {state}\r\n }\r\n }\r\n {set statesummaries to cat(statesummaries, [statesummary])}\r\n }\r\n\r\n {_ Describe our non-conflict states _}\r\n {if len(statesummaries) > 0:\r\n {Pause(100)}\r\n {List(statesummaries)}\r\n }\r\n\r\n}", | |
"defaultValue": "{_ Fetch from Context, if a context is set _}\r\n{if state.eddi_context_system_name:\r\n {set reportSystem to SystemDetails(state.eddi_context_system_name)}\r\n|else:\r\n {set reportSystem to SystemDetails(system.systemname)}\r\n}\r\n\r\n{if !reportSystem.name || reportSystem.name = \"\":\r\n\r\n I'm not sure which system you are asking about.\r\n\r\n|else:\r\n\r\n {_ Report any ongoing conflicts _}\r\n {set conflictfactions to []}\r\n {if reportSystem.conflicts != null:\r\n {for conflict in reportSystem.conflicts:\r\n {P(conflict.faction1, \"faction\")}\r\n {if conflict.status = \"active\":\r\n are\r\n |elif conflict.status = \"pending\":\r\n will soon be\r\n |else:\r\n are recovering after\r\n }\r\n {if conflict.faction1dayswon > conflict.faction2dayswon:\r\n {if conflict.margin >= 3:\r\n dominating\r\n |elif conflict.margin = 2:\r\n winning\r\n |else:\r\n ahead in\r\n }\r\n |elif conflict.faction2dayswon > conflict.faction1dayswon:\r\n {if conflict.margin >= 2:\r\n losing\r\n |else:\r\n trailing in\r\n }\r\n |else:\r\n tied in\r\n }\r\n {if StartsWithVowel(conflict.state): an |else: a }\r\n {conflict.state}\r\n with \r\n {P(conflict.faction2, \"faction\")}\r\n {if conflict.stake:\r\n for control of {P(conflict.stake, \"station\")}\r\n }\r\n .\r\n {set conflictfactions to cat(conflictfactions, [conflict.faction1])}\r\n {set conflictfactions to cat(conflictfactions, [conflict.faction2])}\r\n }\r\n }\r\n\r\n {_ List our non-conflict faction states _}\r\n {set otherstates to []}\r\n {for faction in reportSystem.factions:\r\n {if faction.influence > 0 && find(conflictfactions, faction.name) = -1:\r\n {for presence in faction.presences:\r\n {if presence.systemName = reportSystem.name:\r\n {if presence.FactionState.invariantName != \"None\":\r\n\r\n {_ Note our controlling faction, if present in our `otherstates` list. _}\r\n {if faction.name = reportSystem.faction:\r\n {set factions to token(factions, \"\", index, \"controlling \")}\r\n }\r\n\r\n {_ Add the faction to our list _}\r\n {if has(otherstates, presence.state):\r\n {set factions to otherstates[presence.state])}\r\n {set factions to cat(factions, \",\", P(faction.name, \"faction\"))}\r\n {set otherstates to union(otherstates, [presence.state: factions])}\r\n |else:\r\n {set otherstates to union(otherstates, [presence.state: P(faction.name, \"faction\")])}\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n {_ Sort from most factions with each state to least factions with each state. _}\r\n {declare by_items(a, b) as:\r\n {return cmp(len(split(b, \",\")), len(split(a, \",\")))}\r\n }\r\n {sort(otherstates, by_items)}\r\n\r\n {_ Prepare summaries for each state _}\r\n {set statesummaries to []}\r\n {for state, factions in otherstates:\r\n\r\n {set factions to split(factions, \",\")}\r\n\r\n {set statesummary to:\r\n {if len(factions) > 1:\r\n {List(factions)} are\r\n |else:\r\n {factions[0]} are\r\n }\r\n {if state = \"Retreat\":\r\n in retreat\r\n |elif state = \"War\":\r\n at war\r\n |elif state = \"Boom\":\r\n undergoing a boom\r\n |elif state = \"Civil Liberty\":\r\n enjoying a period of heightened civil liberty\r\n |elif state = \"Civil Unrest\":\r\n experiencing civil unrest\r\n |elif state = \"Civil War\":\r\n in civil war\r\n |elif state = \"Famine\":\r\n in a state of famine\r\n |elif state = \"Lockdown\":\r\n in lockdown\r\n |elif state = \"Outbreak\":\r\n attempting to contain an outbreak of disease\r\n |elif state = \"Expansion\":\r\n gearing up to expand to another system\r\n |elif state = \"Bust\":\r\n financially bust\r\n |elif state = \"Election\":\r\n electing new leaders\r\n |elif state = \"Investment\":\r\n investing in its infrastructure\r\n |elif state = \"Incursion\":\r\n under assault by alien forces\r\n |elif state = \"Pirate Attack\":\r\n suffering from pirate attacks\r\n |elif state = \"Blight\":\r\n suffering from a crop blight\r\n |else: {_ catch-all, worded to avoid deciding between a/an}\r\n in a state of {state}\r\n }\r\n }\r\n {set statesummaries to cat(statesummaries, [statesummary])}\r\n }\r\n\r\n {_ Describe our non-conflict states _}\r\n {if len(statesummaries) > 0:\r\n {Pause(100)}\r\n {List(statesummaries)}\r\n }\r\n\r\n}", | |
"default": true | |
}, | |
"Technology broker": { | |
"name": "Technology broker", | |
"description": "Triggered when using the Technology Broker to unlock new purchasable technology", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Touchdown": { | |
"name": "Touchdown", | |
"description": "Triggered when your ship touches down on a planet's surface", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Touchdown _}\r\n{_ Triggered when your ship touches down on a planet's surface _}\r\n\r\n\r\n{set body to BodyDetails(state.eddi_context_body_name, state.eddi_context_system_name)}\r\n\r\n{if event.playercontrolled = true && state.eddi_context_last_subject != 'location':\r\n Touchdown \r\n {if body.name: on {P(body.name, \"body\")} }.\r\n|else:\r\n {ShipName()} has touched down\r\n {if body.name: on {P(body.name, \"body\")} }.\r\n}\r\n\r\n{Pause(2000)}\r\n\r\n{if type(event.latitude) != \"void\" && type(event.longitude) != \"void\" :\r\n Coordinates are {round(event.latitude, 2)} degrees latitude, {round(event.longitude, 2)} degrees longitude.\r\n}\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'ship')}\r\n{SetState('eddi_context_last_action', 'land')}\r\n", | |
"defaultValue": "{_ Touchdown _}\r\n{_ Triggered when your ship touches down on a planet's surface _}\r\n\r\n\r\n{set body to BodyDetails(state.eddi_context_body_name, state.eddi_context_system_name)}\r\n\r\n{if event.playercontrolled = true && state.eddi_context_last_subject != 'location':\r\n Touchdown \r\n {if body.name: on {P(body.name, \"body\")} }.\r\n|else:\r\n {ShipName()} has touched down\r\n {if body.name: on {P(body.name, \"body\")} }.\r\n}\r\n\r\n{Pause(2000)}\r\n\r\n{if type(event.latitude) != \"void\" && type(event.longitude) != \"void\" :\r\n Coordinates are {round(event.latitude, 2)} degrees latitude, {round(event.longitude, 2)} degrees longitude.\r\n}\r\n\r\n{_ Context }\r\n{SetState('eddi_context_last_subject', 'ship')}\r\n{SetState('eddi_context_last_action', 'land')}\r\n", | |
"default": true | |
}, | |
"Trade data purchased": { | |
"name": "Trade data purchased", | |
"description": "Triggered when you purchase trade data", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'tradedata')}\r\n{SetState('eddi_context_last_action', 'buy')}\r\n{SetState('eddi_context_tradedata_name', event.system)}\r\n\r\n{OneOf(\"Purchased trade data for {P(event.system, 'starsystem')}\",\r\n \"Trade data for {P(event.system, 'starsystem')} now available\",\r\n \"Received trade data for {P(event.system, 'starsystem')} from station services\",\r\n \"Receipt of {P(event.system, 'starsystem')} trade data confirmed\")}.", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'tradedata')}\r\n{SetState('eddi_context_last_action', 'buy')}\r\n{SetState('eddi_context_tradedata_name', event.system)}\r\n\r\n{OneOf(\"Purchased trade data for {P(event.system, 'starsystem')}\",\r\n \"Trade data for {P(event.system, 'starsystem')} now available\",\r\n \"Received trade data for {P(event.system, 'starsystem')} from station services\",\r\n \"Receipt of {P(event.system, 'starsystem')} trade data confirmed\")}.", | |
"default": true | |
}, | |
"Trade voucher redeemed": { | |
"name": "Trade voucher redeemed", | |
"description": "Triggered when you redeem a trade voucher", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'trade_voucher')}\r\n{SetState('eddi_context_last_action', 'redeem')}\r\n{SetState('eddi_context_trade_voucher_amount', event.amount)}\r\n\r\nTrade vouchers for {Humanise(event.amount)} credits redeemed\r\n{Occasionally(2, \"\r\n {if len(event.rewards) = 1:\r\n by {P(event.rewards[0].faction, \"faction\")}\r\n |else:\r\n by\r\n {set cur to 0}\r\n {while cur < len(event.rewards):\r\n {if cur = 0:\r\n |elif cur < len(event.rewards) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {P(event.rewards[cur].faction, \"faction\")}\r\n {set cur to cur + 1}\r\n }\r\n }\r\n\")}.\r\n", | |
"defaultValue": "{_ Context }\r\n{SetState('eddi_context_last_subject', 'trade_voucher')}\r\n{SetState('eddi_context_last_action', 'redeem')}\r\n{SetState('eddi_context_trade_voucher_amount', event.amount)}\r\n\r\nTrade vouchers for {Humanise(event.amount)} credits redeemed\r\n{Occasionally(2, \"\r\n {if len(event.rewards) = 1:\r\n by {P(event.rewards[0].faction, \"faction\")}\r\n |else:\r\n by\r\n {set cur to 0}\r\n {while cur < len(event.rewards):\r\n {if cur = 0:\r\n |elif cur < len(event.rewards) - 1:\r\n , \r\n |else:\r\n and\r\n }\r\n {P(event.rewards[cur].faction, \"faction\")}\r\n {set cur to cur + 1}\r\n }\r\n }\r\n\")}.\r\n", | |
"default": true | |
}, | |
"Under attack": { | |
"name": "Under attack", | |
"description": "Triggered when under fire (same time as the Under Attack voice message)", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Undocked": { | |
"name": "Undocked", | |
"description": "Triggered when your ship undocks from a station or outpost", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{OneOf(\"Full control re-established\", \"Docking clamps free\", \"Disengaged from local networks\")}.\r\n\r\n{set limpetcheck to F(\"Limpet check\")}\r\n\r\n{if limpetcheck:\r\n {Pause(5000)}\r\n {limpetcheck}\r\n}\r\n", | |
"defaultValue": "{OneOf(\"Full control re-established\", \"Docking clamps free\", \"Disengaged from local networks\")}.\r\n\r\n{set limpetcheck to F(\"Limpet check\")}\r\n\r\n{if limpetcheck:\r\n {Pause(5000)}\r\n {limpetcheck}\r\n}\r\n", | |
"default": true | |
}, | |
"VA initialized": { | |
"name": "VA initialized", | |
"description": "Triggered when the VoiceAttack plugin is initialized", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": null, | |
"defaultValue": null, | |
"default": true | |
}, | |
"Vehicle destroyed": { | |
"name": "Vehicle destroyed", | |
"description": "Triggered when your vehicle is destroyed", | |
"enabled": true, | |
"priority": 3, | |
"responder": true, | |
"script": "{if state.eddi_context_srv_deployed_id = event.id:\r\n {SetState('eddi_context_srv_deployed_id', \"\")}\r\n}\r\n\r\n{Pause(2000)}\r\n{OneOf(\"Neural link\", \"Link\", \"Uplink\")} {OneOf(\"terminated\", \"disengaged\")}.", | |
"defaultValue": "{if state.eddi_context_srv_deployed_id = event.id:\r\n {SetState('eddi_context_srv_deployed_id', \"\")}\r\n}\r\n\r\n{Pause(2000)}\r\n{OneOf(\"Neural link\", \"Link\", \"Uplink\")} {OneOf(\"terminated\", \"disengaged\")}.", | |
"default": true | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment