Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a CarrierDetails() function #2374

Closed
Darkcyde13 opened this issue Jun 26, 2022 · 4 comments
Closed

Implement a CarrierDetails() function #2374

Darkcyde13 opened this issue Jun 26, 2022 · 4 comments
Assignees
Labels
9. enhancement The behaviour is as specified, but we would like to modify or extend the spec.

Comments

@Darkcyde13
Copy link

What happens now

There doesn't appear to be any way to obtain details on your fleet carrier.

What I'd like to happen

Have a CarrierDetails() function to provide these details.

How it can happen

Parse the CarrierStats Journal entry to create the CarrierDetails() function, that would allow all carrier information to be available to EDDI scripting.

Example of the CarrierStats Journal entry:

{ "timestamp":"2022-06-26T11:58:01Z", "event":"CarrierStats", "CarrierID":3705241088, "Callsign":"XZX-84Z", "Name":"MCRN SUSTENTUS FEREBAT", "DockingAccess":"all", "AllowNotorious":true, "FuelLevel":376, "JumpRangeCurr":500.000000, "JumpRangeMax":500.000000, "PendingDecommission":false, "SpaceUsage":{ "TotalCapacity":25000, "Crew":930, "Cargo":0, "CargoSpaceReserved":0, "ShipPacks":0, "ModulePacks":0, "FreeSpace":24070 }, "Finance":{ "CarrierBalance":1027000141, "ReserveBalance":10090001, "AvailableBalance":1016910140, "ReservePercent":1, "TaxRate_rearm":5, "TaxRate_refuel":5, "TaxRate_repair":5 }, "Crew":[ { "CrewRole":"BlackMarket", "Activated":false }, { "CrewRole":"Captain", "Activated":true, "Enabled":true, "CrewName":"Brant Dyer" }, { "CrewRole":"Refuel", "Activated":true, "Enabled":true, "CrewName":"Linnea Travis" }, { "CrewRole":"Repair", "Activated":true, "Enabled":true, "CrewName":"Hugh Morris" }, { "CrewRole":"Rearm", "Activated":true, "Enabled":true, "CrewName":"Mauricio Wise" }, { "CrewRole":"Commodities", "Activated":true, "Enabled":true, "CrewName":"Viola Sexton" }, { "CrewRole":"VoucherRedemption", "Activated":false }, { "CrewRole":"Exploration", "Activated":false }, { "CrewRole":"Shipyard", "Activated":false }, { "CrewRole":"Outfitting", "Activated":false }, { "CrewRole":"CarrierFuel", "Activated":true, "Enabled":true, "CrewName":"Kimberly Evans" }, { "CrewRole":"VistaGenomics", "Activated":false }, { "CrewRole":"PioneerSupplies", "Activated":false }, { "CrewRole":"Bartender", "Activated":false } ], "ShipPacks":[  ], "ModulePacks":[  ] }

At the moment, I only have the default services, plus rearm, refuel, and repair installed, so the above example doesn't show what the other services data would look like (Vista Genomics, Redemption Office, Bar, etc).

I notice that the 'Crew' variable under SpaceUsage, is the total space used by the services I have installed.

If you need additional info, I can always go add all services, and get some cargo too, to hopefully fill out the event with complete details.

EDDI Version

v4.0.1

@Tkael Tkael added the 9. enhancement The behaviour is as specified, but we would like to modify or extend the spec. label Jun 26, 2022
@Tkael
Copy link
Member

Tkael commented Jun 26, 2022

There's a queryable Frontier API endpoint (which I believe would contain somewhat similar information). A CarrierDetails() function would probably pull from that. For CarrierStats, we'd probably just do a Carrier stats event.

I'm honestly not sure how much use I'd get out of the information if the data were available. How would you use it? Are there any secondary events that we could generate (by monitoring changes in carrier stats) which might be worthwhile?

@Tkael
Copy link
Member

Tkael commented Jun 26, 2022

Related: #1828

@Darkcyde13
Copy link
Author

Hmm, well I was thinking recently about getting EDDI to tell me how much Tritium would be used when a jump was requested. However, for that to be calculated, I'd need to know the jump mass of the carrier, and I can only find that in the Journal event (although I've not thought about the API call, as it's not the kind of thing I'd know about).

Now that you've asked, it occurs to me that you could possibly do something similar to existing scripts, like informing of carrier cargo that can be sold in the arrival system, or getting EDDI to say when services have been installed or uninstalled, paused or resumed. I know that last part is pretty obvious when you're doing them in game, but then so are many of EDDI's scripts (buying cargo, repairing, redeeming vouchers, etc). Naming the actual crew member assigned when purchasing services, would be nice too.

It would certainly be useful for obtaining your carrier's name, and enabling to use that instead of it's registration code all the time. A report that you've changed the name, as you get for your normal ships, would be another thing too.

I'm sure I could come up with some other things, in time. :)

@Tkael Tkael added this to the 4.0.2 milestone Nov 21, 2022
@Tkael Tkael self-assigned this Nov 25, 2022
@Tkael
Copy link
Member

Tkael commented Nov 25, 2022

I've added a top-level carrier object for the next release. Carrier cargo / material inventories are not yet supported but I've added another ticket (#2418) to allow us to circle back and add that functionality later.

@Tkael Tkael closed this as completed Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9. enhancement The behaviour is as specified, but we would like to modify or extend the spec.
Projects
None yet
Development

No branches or pull requests

2 participants