EDCD / EDDI

Companion application for Elite Dangerous
Other
448 stars 82 forks source link

Missions (for Beyond) #379

Closed Tkael closed 6 years ago

Tkael commented 6 years ago
Tkael commented 6 years ago

The next update will include a new value in MissionAccepted, "wing":bool

Tkael commented 6 years ago

and there will be an event for collecting and delivering goods as part of a wing delivery mission.

Tkael commented 6 years ago
8.20    MissionAbandoned
When Written: when a mission has been abandoned
Parameters:
•   Name: name of mission
•   MissionID
•   Fine: (if relevant)

Example:
{ "timestamp":"2016-06-10T14:32:03Z", "event":"MissionAbandoned", "Name":"Mission_Collect_name", "MissionID":65343025 }

8.21    MissionAccepted
When Written: when starting a mission
Parameters:
•   Name: name of mission
•   Faction: faction offering mission
•   MissionID
•   Influence: effect on influence (None/Low/Med/High)
•   Reputation: effect on reputation (None/Low/Med/High)
•   Reward: expected cash reward
•   Wing: bool
Optional Parameters (depending on mission type)
•   Commodity: commodity type
•   Count: number required / to deliver
•   Target: name of target
•   TargetType: type of target
•   TargetFaction: target’s faction
•   KillCount: number of targets
•   Expiry: mission expiry time, in ISO 8601
•   DestinationSystem
•   DestinationStation
•   PassengerCount
•   PassengerVIPs: bool
•   PassengerWanted: bool
•   PassengerType: eg Tourist, Soldier, Explorer,...

Examples:

{ "timestamp":"2018-02-28T12:06:37Z", "event":"MissionAccepted", "Faction":"Official i Bootis Liberty Party", "Name":"Mission_DeliveryWing_Agriculture", "LocalisedName":"Agricultural supply run: 2280 units of Tea", "Commodity":"$Tea_Name;", "Commodity_Localised":"Tea", "Count":2280, "TargetFaction":"Ovid Vision & Co", "DestinationSystem":"Ovid", "DestinationStation":"Shriver Platform", "Expiry":"2018-03-01T12:05:53Z", "Wing":true, "Influence":"Med", "Reputation":"Med", "Reward":2686155, "MissionID":65393626 }

8.22    MissionCompleted
When Written: when a mission is completed
Parameters:
•   Name: mission type
•   Faction: faction name
•   MissionID
Optional parameters (depending on mission type)
•   Commodity
•   Count
•   Target
•   TargetType
•   TargetFaction
•   Reward: value of reward
•   Donation: donation offered (for altruism missions)
•   PermitsAwarded:[] (names of any permits awarded, as a JSON array)
•   CommodityReward:[] (names and counts of any commodity rewards)
•   MaterialsReward:[] ( name, category and count)
•   FactionEffects: array of records
o   Faction
o   Effects: array of Effect and Trend value pairs
o   Influence: array of SystemAddress and Trend value pairs
o   Reputation: Trend value

TrendValue can be UpGood, UpBad, DownGood, or DownBad

Example:
{ "timestamp":"2018-01-30T10:00:20Z", "event":"MissionCompleted", "Faction":"Farack Stakeholders", "Name":"Mission_Collect_name", "MissionID":65391731, "Commodity":"$AgriculturalMedicines_Name;", "Count":12, "DestinationSystem":"Farack", "DestinationStation":"Mitra Estate", "Reward":10000, "FactionEffects":[ { "Faction":"Farack Stakeholders", "Effects":[ { "Effect":"$MISSIONUTIL_Interaction_Summary_outbreak_down;", "Effect_Localised":"Outbreak Down", "Trend":"DownGood" } ], "Influence":[ { "System":3932143293138, "Trend":"UpGood" } ], "Reputation":UpGood } ] }

Example of MaterialsReward:
... "MaterialsReward":[ { "Name":"DisruptedWakeEchoes", "Name_Localised":"Atypical Disrupted Wake Echoes", "Category":"$MICRORESOURCE_CATEGORY_Encoded;", "Category_Localised":"Encoded", "Count":4 } ] ...

8.23    MissionFailed
When Written: when a mission has failed
Parameters:
•   Name: name of mission
•   MissionID
•   Fine: (if relevant)

8.24    MissionRedirected
When written: when a mission is updated with a new destination
Parameters
•   MissionID
•   MissionName
•   NewDestinationStation
•   OldDestinationStation
•   NewDestinationSystem
•   OldDestinationSystem

Example:
{ "timestamp": "2017-08-01T09:04:07Z", "event": "MissionRedirected", "MissionID": 65367315, "NewDestinationStation": "Metcalf Orbital", "OldDestinationStation": "Cuffey Orbital", "NewDestinationSystem": "Cemiess", "OldDestinationSystem": "Vequess" }

8.3 CargoDepot
When written: when collecting or delivering cargo for a wing mission, or if a wing member updates progress
Parameters:
•   MissionID:(int)
•   UpdateType:(string) (one of: "Collect", "Deliver", "WingUpdate")
•   StartMarketID(int)
•   EndMarketID(int)
•   ItemsCollected(int)
•   ItemsDelivered(int)
•   TotalItemsToDeliver(int)
•   Progress:(float)

Example:
{ "timestamp":"2018-02-28T12:07:22Z", "event":"CargoDepot", "MissionID":65393626, "StartMarketID":128005888, "EndMarketID":3535249920, "ItemsCollected":128, "ItemsDelivered":0, "TotalItemsToDeliver":2280, "Progress":0.056140 }
Hoodathunk commented 6 years ago

T'Kael, I've been wanting to tackle this for some time as a consequence of my mission scripting work with Darkcyde and was hoping to start after I finished the Cargo Monitor but we've all hit a bit of a snag with the dispatcher issues with Observable Collections. After we get this squared away in the Ship Monitor, the Cargo Monitor will go very fast, as it's mostly coded and working, then I would like to go straight to working on the Mission Monitor

Hoodathunk commented 6 years ago

Now that the Cargo Monitor is in beta, I will be devoting time to this project.

Darkcyde13 commented 6 years ago

I don't know how helpful or not this may be, but here is a copy of my Missions_Type function script. I use it in my missions functions to give a humanised version of the mission types and to set things like if it's a return mission, or if it has cargo, etc.

This was a complete list of all mission types up to the end of February, so doesn't include any new ones since then (so from Elite v3). Sorry, it's not the easiest of things to read. :(


{_ Get the type of mission accepted/completed/abandoned.}
{_ returns 'type' variable which is the mission selected}
{_ 'part1', 'part2' & 'part3' can also be used for specific case scenarios}
{_ Set 'type' in calling function with event.name, or similar}

{set part1 to token(type,"_",1)}
{set part2 to token(type,"_",2)}
{set part3 to token(type,"_",3)}
{set type to ""}
{set return to ""}

{_part1 Missions}
{if (part1) = "Altruism":
    {set type to "Donation"}
    {set return to "yes"}
    {set cargo to "return"}
|elif (part1) = "AltruismCredits":
    {set type to "Donation"}
    {set return to "yes"}
|elif (part1) = "Assassinate":
    {if (part2) = "Legal":  {set type to OneOf("Assassination","Legal Termination","Legal Execution")}
    |else: {set type to OneOf("Assassination","Illegal Termination","Illegal Execution","Wetwork")} }
    {set return to "yes"}
|elif (part1) = "Collect":
    {set type to OneOf("Supply","Source and return","Locate and supply")}
    {set return to "yes"}
    {set cargo to "return"}
|elif (part1) = "Courier":
    {set type to OneOf("Data Transport","Data Delivery","Courier Data")}
    {set return to "no"}
|elif (part1) = "Delivery":
    {set type to cat(OneOf("Commodity","Cargo"), " ", OneOf(" Transport"," Delivery"))}
    {set return to "no"}
    {set cargo to "yes"}
|elif (part1) = "Disable":
    {set type to cat("Disable Surface ",OneOf("Emplacement","Installation"))}
    {set return to "yes"}

|elif (part1) = "DS":
    {if part2 = "PassengerBulk":
        {set type to cat("Evacuate ", "{Occasionally(2, OneOf('Station', 'Personnel')}")}
    |else:
        {set type to cat(Occasionally(2,'Locate and '), "Salvage")}
    }

|elif (part1) = "Massacre":
    {set type to OneOf("Massacre","Mass Killing","Slaughter")}
    {set return to "yes"}
|elif (part1) = "Mining":
    {set type to OneOf("Mining","Mineral Extraction")}
    {set return to "yes"}
    {set cargo to "return"}
|elif slice(token(part1,"P",1),0,5) = "ermit":
    {set type to "Permit Aquisition"}
|elif (part1) = "Piracy":
    {set type to "Piracy"}
    {set cargo to "return"}
|elif (part1) = "Rescue":
    {set type to OneOf("Rescue Operation","Rescue")}
    {set return to "yes"}
    {set cargo to "return"}
|elif (part1) = "Salvage":
    {set type to OneOf("Salvage Operation","Salvage")}
    {set return to "yes"}
    {set cargo to "return"}
|elif (part1) = "Scan":
    {set type to cat(OneOf("Planitary","Surface"), " ", Occasionally(2,"Installation"), " ", "Scan")}
    {set return to "yes"}
|elif (part1) = "Smuggle":
    {set type to OneOf("Covert Delivery","Smuggling","Covert Transportation")}
    {set return to "no"}
    {set cargo to "yes"}
}

{_ part1 Passenger Missions}

{_PassengerBulk}
{if (part2) = "AIDWORKER":
    {set type to "Transport Aid Worker Passenger Group"}
    {set return to "no"}
|elif (part2) = "BUSINESS":
    {set type to "Transport Business Passenger Group"}
    {set return to "no"}
|elif (part2) = "MEDICAL":
    {set type to "Transport Medical Team"}
    {set return to "no"}
|elif (part2) = "POLITICIAN":
    {set type to "Transport Political Passenger Group"}
    {set return to "no"}
|elif (part2) = "PRISONEROFWAR":
    {set type to "Transport Prisoners of War"}
    {set return to "no"}
|elif (part2) = "PROTESTOR":
    {set type to "Transport Protester Passenger Group"}
    {set return to "no"}
|elif (part2) = "REBEL":
    {set type to "Transport Rebel Passenger Group"}
    {set return to "no"}
|elif (part2) = "REFUGEE":
    {set type to "Transport Refugee Passenger Group"}
|elif (part2) = "SCIENTIST":
    {set type to "Transport Scientific Team"}
    {set return to "no"}
|elif (part2) = "SECURITY":
    {set type to "Transport Security Team"}
    {set return to "no"}
|elif (part1) = "PassengerBulk":
    {set type to "Transport Tourist Passenger Group"}
    {set return to "no"}
}

{_PassengerVIP}
{if (part2) = "Celebrity":
    {set type to OneOf("Celebrity","Superstar")}
|elif (part2) = "CEO":
    {set type to OneOf("Corporate CEO","Chief Executive Officer","Company CEO")}
|elif (part2) = "Criminal":
    {set type to "Criminal Mastermind"}
|elif (part2) = "Doctor":
    {set type to "Doctor"}
|elif (part2) = "Explorer":
    {set type to "Famous Explorer"}
|elif (part2) = "General":
    {set type to "Military General"}
|elif (part2) = "HeadOfState":
    {set type to "Head of State"}
|elif (part2) = "Scientist":
    {set type to "Science Chief"}
|elif (part2) = "Terrorist":
   {set type to "Rebel Leader"}
|elif (part2) = "Whistleblower":
   {set type to "Political Prisoner"}
|elif (part2) = "Tourist" || (part1) = "PassengerVIP":
    {set type to OneOf("Rich Tourist","Wealthy Tourist")}
}

{_Primary PassengerType}
{if (part1) = "LongDistanceExpedition":
    {set type to OneOf("Long Distance Exploration Expedition","Data Collection Expedition")}
    {set return to "yes"}
|elif (part1) = "PassengerVIP":
    {set type to OneOf("{type} Transport","Transport {type}")}
    {set return to "no"}
|elif (part1) = "Sightseeing":
    {set type to OneOf("{type} Sightseeing Trip","Sightseeing Trip {if type != '':for} {type}")}
    {set return to "yes"}
}

{if (part2) = "Planet":
    {set type to cat(OneOf("Surface ", "Planitary "), type)}
}

{if part2 = "RankEmp" || (part2) = "RANKEMP":
    {set type to cat("Imperial Navy ", type)}
|elif (part2) = "RankFed" || (part2) = "RANKFED":
    {set type to cat("Federal Navy ", type)}
}

{set type to cat(type," mission")}

{if event.communal: {set type to "Community goal"} }```
Hoodathunk commented 6 years ago

Thanks @Darkcyde13 . I will definitely be referencing that body of work when writing the Mission Monitor.

Hoodathunk commented 6 years ago

Mission Monitor feature released.