EDEngineer
EDEngineer copied to clipboard
Questions about PATCHing the shopping-list
I'm in the process of adding retrofitting analysis to EDSY and I'd like to support integration with EDEngineer, but I have some questions:
-
Is it possible to PATCH the shopping list of the "current commander" using some placeholder like
/-/shopping-list? Or do I have to first GET from/commandersin order to construct the URL to then PATCH to/<cmdrname>/shopping-list? -
When listing materials to add to the shopping list, is it possible to identify them using Frontier's identifiers, such as "ConductivePolymers" or "Guardian_Sentinel_WeaponParts" rather than Coriolis GUIDs? If not, would you be willing to add that?
Thanks!
Gonna sort of hijack this issue, me and @felixlinker were actually just discussing about your second point, because the list is getting out of sync so it would make sense as there would be no maintenance needed.
Yeah, I'd be happy to remove the coriolis GUIDs.
- do I have to first GET from /commanders in order to construct the URL to then PATCH to /
/shopping-list?
as of now yes ; however it wouldn't be hard to introduce a magic string (like your suggested -) to ask for the current commander
- is it possible to identify them using Frontier's identifiers, such as "ConductivePolymers" or "Guardian_Sentinel_WeaponParts" rather than Coriolis GUIDs?
it would be great ; as of now there's the FormattedName proprety (which you can see in the list https://github.com/msarilar/EDEngineer/blob/master/EDEngineer/Resources/Data/entryData.json) but it's not the one in the game's logs (except in some cases... basically it's the name of the ingredient shown in the app in lowercase and without any space unless the name in the logs is widely different and cannot be matched with it so I had to edit it manually)
adding all the names would be quite a long task but I think a good idea to have!
I think, what @willyb321 and me were talking about though were the actual uuids of blueprints and experimental effects. It'd probably be better to use keys like "weapon_overcharged" instead of some random string.
The FormattedName does look like a close match to the FDev identifiers, though probably worth double checking them; then it'd just need to be possible to use those in a PATCH to /<cmdrname>/shopping-list instead of UUIDs to identify the materials.
But I guess @willyb321 and @felixlinker's comments raise another question too: Does EDEngineer have any variant of the shopping-list that takes a list of blueprint and expeffects and desired number of rolls? On one hand it'd be equivalent since you'd just do the multiplication on your end to come up with the same total materials shopping list, but on the other hand if EDEngineer knew what the user was intending to use all those materials for, then it could add extra functionality such as producing an optimal route to visit the specific engineers required to apply all the expeffects, for example.
Sorry I got confused while replying. Forget about the FormattedName of entry data, it's unrelated and only used to parse logs in order to update the cargo in real time.
Blueprints are identified by their name and type, as well as a coriolis GUID. https://github.com/msarilar/EDEngineer/blob/master/EDEngineer/Resources/Data/blueprints.json
There is currently no dedicated field for them to store the "official" name from FDEV. I think the first time I got confronted to these official names was when I digged into the current ship's fitting. It's not working in an ideal way right now: it gets the current ship mods from the logs (so it's FDEV names) and tries to find the related blueprint from the json file I got.
Adding the real name (like "TechnicalName" or something like that) to the blueprints would allow an exact mapping instead. It would also make it easy for other websites to interact with the local API.
Feel free to start tackling it, I'll add the matching properties C# side once the json is ready.
FYI here's the bit that finds blueprints by guid in the local API https://github.com/msarilar/EDEngineer/blob/master/EDEngineer.Server/Server.fs#L263