EDCD / EDMarketConnector

Downloads commodity market and other station data from the game Elite: Dangerous for use with all popular online and offline trading tools.
GNU General Public License v2.0
996 stars 156 forks source link

Mission data / updated events #825

Closed caleb-harrelson closed 3 years ago

caleb-harrelson commented 3 years ago

I'm trying to make a plugin to track stacked wing combat missions. The data when a mission is accepted is good, but I don't see a) how to get a list of missions with relevant data on startup (the list is missing most of the data available on mission acceptance) b) how to get access to the mission status (7/45 targets killed, for example). The "mission updated" stuff shows up in the Info area on screen, but I'm not seeing the data show up as a dashboard or journal event, just the bounty being awarded.

Would it be possible to add missions to the state so that all the data available on mission acceptance is retained for future access? Can an event be fired when a mission is updated to show combat mission progress?

Athanasius commented 3 years ago

The only data EDMC can possibly pass to plugins is that provided by the game. 'dashboard' comes from the Status.json file, all journal events from the Journal. Other internal state (like currently held cargo) from other .json files signalled by journal events.

If you think there's an EDMC bug, then please check http://hosting.zaonce.net/community/journal/v28/Journal_Manual_v28.pdf / http://hosting.zaonce.net/community/journal/v28/Journal_Manual_v28.doc to be sure that the game even provides the data you think we're failing to pass to plugins.

i.e. compare:

3.6 Missions
When written: at startup
Parameters:
    • Active: (array of objects)
    • Failed: (array of objects)
    • Complete: (array of objects)

Each object contains:
    • MissionID
    • Name
    • PassengerMission: bool
    • Expires: time left in seconds

{ "timestamp":"2017-10-02T10:37:58Z", "event":"Missions", "Active":[ { "MissionID":65380900, "Name":"Mission_Courier_name", "PassengerMission":false, Expires":82751 } ], "Failed":[  ], "Complete":[  ] }

to

8.21 MissionAccepted
When Written: when starting a mission
Parameters:
    • Name: name of mission
    • LocalisedName: the mission name as displayed to the user
    • 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
    • Donation: contracted donation (as string) (for altruism missions)
    • Donated: actual donation (as int)
    • 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
    • NewDestinationSystem (if it has been redirected)
    • NewDestinationStation (if redirected)
    • 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 }
caleb-harrelson commented 3 years ago

Definitely not an EDMC bug, just a limitation of the API it appears. I've been through the whole journal manual (prior to creating this) but didn't know if there were any json files with missions around. I also created a plugin that just logged all events so I could see if anything was happening on a mission bounty kill (the bounty, but that's it). After poking through my local data it doesn't appear to be in json files anywhere either, so it seems like a hole in the API.

Do you have any recommendations for how to advocate for changes to the journal spec?

Athanasius commented 3 years ago

I'm afraid the best you can do is post in https://forums.frontier.co.uk/forums/elite-api-and-tools/ and maybe the r/elitedangerous sub-Reddit. Even 'core' EDCD people can have trouble communicating to Frontier developers.