aarronc / hutton-helper

data collection tool to aid in better management of the BGS
9 stars 4 forks source link

You'd better stock up on land mines #8

Closed sporebat closed 6 years ago

sporebat commented 6 years ago

mentioned on Reddit

by looking at the journal file, I can know EXACTLY what the VIP wants before they request it! Just check the "MissionAccepted" entry and plan accordingly. When your VIP General requests landmines for "comfort", you will be prepared to quickly, and efficiently, supply that need.

MissionAccepted, you say? I can look for that, display the commodity needed, and pop up your browser with the right EDDB query to find it when you click. No worries.

sporebat commented 6 years ago

Mechanism could also be used for source and return missions.

sporebat commented 6 years ago

@aarronc could you dig up some example events for MissionAccepted with VIP passenger demands, or for source and return missions?

sporebat commented 6 years ago

Relevant parts of the VIP mission event:

{
    "Commodity_Localised": "Consumer Technology",
    "Commodity": "$ConsumerTechnology_Name;",
    "Count": 2,
    "DestinationSystem": "LTT 9360",
    "event": "MissionAccepted",
    "Expiry": "2018-09-08T18:26:17Z",
    "LocalisedName": "Transport Milo Cote",
    "MissionID": 417255854,
    "Name": "Mission_PassengerVIP",
    "timestamp": "2018-09-08T16:19:56Z"
}
sporebat commented 6 years ago

MissionAccepted events with this Name also have a Commodity and Commodity_Localised, but don't need an EDDB link:

sporebat commented 6 years ago

Aah, here are the others that need us to go shopping:

(Yes, yes, wildcards.)

{
    "Commodity_Localised": "Basic Medicines",
    "Commodity": "$BasicMedicines_Name;",
    "Count": 28,
    "DestinationStation": "Davies Station",
    "DestinationSystem": "Epsilon Eridani",
    "event": "MissionAccepted",
    "Expiry": "2018-09-09T17:38:05Z",
    "Faction": "Hutton Orbital Truckers Co-Operative",
    "LocalisedName": "Outbreak aid needed 28 units of Basic Medicines",
    "MissionID": 417282049,
    "Name": "Mission_Collect_Outbreak",
    "timestamp": "2018-09-08T17:48:51Z"
}
aarronc commented 6 years ago

Here is a full list of Delivery Missions

aarronc commented 6 years ago

Just for Completeness :) here is the full list (maybe missing the new wing mission types)

sporebat commented 6 years ago

Lowercase prefix checks FTW.

https://eddb.io/archive/v5/commodities.json has the commodity name to ID mappings we need for their form, but their form is designed to resist direct use.

We can link directly to a commodity at INARA but the "where to buy close to you" feature would depend on the commander having INARA set up in EDMC and being logged in in their browser.

sporebat commented 6 years ago

Commodity values in the mission dump for which a lower case alphabet only check in commodities.json fails:

That can't be comprehensive. @aarronc could you SELECT DISTINCT the Commodity and Commodity_Localised values from MissionAccepted events, and also the distinct Type values from MarketBuy events?

aarronc commented 6 years ago

Here you go 👍

sporebat commented 6 years ago

This scenario hadn't occurred to me. Reckon I should suppress this mission type?

[Deleted wrong screen shot, but it was for "black box"]

sporebat commented 6 years ago

image

NoneX None

What. Data delivery mission.

aarronc commented 6 years ago

untitled-3 i get an nonex none when taking a dontation mission.

I was thinking of maybe having 3 lists. a stock up, a deliver to with the DestinationSystem displayed (for courier ones and passenger ones) and a general one of those pesky mission types like donation who dont fit the other 2 catagories

sporebat commented 6 years ago

I think I'll just suppress those. Need to dig into the events, though.

sporebat commented 6 years ago

Oh yeah don't forget the dump of unique Commodity + Commodity_Localised combinations in a CSV gist.

aarronc commented 6 years ago

had to hand compile this

https://gist.github.com/aarronc/93db8ee7f499edd52265e72e91466889

PsymonsB commented 6 years ago

Could use mechanize ( https://github.com/python-mechanize/mechanize ) to fill the form on eddb.io and submit ? but would have to distribute mechanize with the plug in, will work out a function tonight.

PsymonsB commented 6 years ago

Could use mechanize ( https://github.com/python-mechanize/mechanize ) to fill the form on eddb.io and submit ? but would have to distribute mechanize with the plug in, will work out a function tonight.

Seems this may be possible from urllib will spend some time on this this after noon

aarronc commented 6 years ago

excellent find! would be cool to see where this could lead

PsymonsB commented 6 years ago

screengrab the ringed missions have been handed in ? also all these missions are mission specific cargo so can't pick them up. also i'm not actually in deriso

sporebat commented 6 years ago

There's no automatic check-off feature yet, no, and we need to filter on the mission type.

sporebat commented 6 years ago

Bit of a mismatch in the data. I can't find the identifiers for:

... and I'm missing name keys for:

... and lots more I figure would vanish from ED-Normal-Names-vs-Journal-names.csv if we filtered on the mission types. Still working on it.

sporebat commented 6 years ago

The Inara and EDDB numbers don't line up, e.g. for Time Capsule (335 / 1012). I don't believe a trucker has yet been sent on a mission yet to get one of those, judging by the sheet, but there are no guarantees.

sporebat commented 6 years ago

I'm not sure I can check these off as the pilot picks up cargo, if only because it's hard to know which mission they'll hand it in for. Instead, I think I'll:

Meanwhile, I think we can only sanely redirect people to EDDB for the time being as they're the only site that publish the name-to-number map. Mid term, I'll start collecting market data so we know which Hutton stations sell what.

sporebat commented 6 years ago

Let's just say it's a little more complicated than it sounds at first.

TEST_EVENTS = [{
    'event': 'Cargo',
    'Inventory': [{
        'Count': 4,
        'Name_Localised': 'Uranium'
        'Name': 'uranium',
    }],
}, {
    'event': 'MissionAccepted',
    'Commodity_Localised': 'Uranium',
    'Commodity': '$Uranium_Name',
    'Count': 25,
    'MissionID': 415110664,
    'Name': 'Mission_Collect',
}, {
    'event': 'MissionAccepted',
    'Commodity_Localised': 'Uranium',
    'Commodity': '$Uranium_Name',
    'Count': 23,
    'MissionID': 415110665,
    'Name': 'Mission_Collect',
}, {
    'event': 'MissionAccepted',
    'Commodity_Localised': 'Uranium',
    'Commodity': '$Uranium_Name',
    'Count': 22,
    'MissionID': 415110666,
    'Name': 'Mission_Collect',
}, {
    'event': 'MarketBuy'
    'Count': 27
    'Type': 'uranium',
}, {
    'event': 'CargoDepot',
    'Count': 25,
    'ItemsDelivered': 25,
    'MissionID': 415110664,
    'TotalItemsToDeliver': 25
    'CargoType_Localised': 'Uranium',
    'CargoType': 'Uranium',
    'UpdateType': 'Deliver',
}, {
    'event': 'MissionCompleted',
    'MissionID': 415110664,
}, {
    'event': 'MarketSell',
    'Count': 1
    'Type': 'uranium',
    'Type_Localised': 'Uranium',
}, {
    'event': 'EjectCargo',
    'Count': 1
    'Type': 'uranium',
    'Type_Localised': 'Uranium',
}, {
    'event': 'Died'
}, {
    'event': 'MissionFailed',
    'MissionID': 415110665,
}, {
    'event': 'Missions',
    'Active': [],
}]
PsymonsB commented 6 years ago

Do we even need to tell them the number of each commodity. couldn't we just say seems like you need to find, Explosives, Bio-waste and Uranium. also market data can change every tick very dependent on faction states.

sporebat commented 6 years ago

Oh, is that what does it? I'll play with the display. No point committing to stuff that won't fit.

sporebat commented 6 years ago

Closing as sufficient enough for release. If you've found a bug or have an idea for improvement, raise another issue and mention this one.