-
Notifications
You must be signed in to change notification settings - Fork 59
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
Proposal: Schema for Outfitting #20
Comments
Here is a sample message in the proposed schema. |
Those properties should have their own schemas, not going in the commodities. I'll draft both schema if needed quickly. They should be coherent with commodity v2, but we might add that id as an additional properties, as it will not block v2 subscribers. |
+1 for "should be its own schema". (If necessary/desirable we can move the station information section into a shared schema somewhere so that it can be reused.) Extra bonus points for using numeric IDs rather than text to identify the modules - had this information been available when v2 was being drafted it would certainly have been used there. @AnthorNet makes a good point about the conversion table, though. Ideally, if we lived in a world where Frontier Developments acknowledged that they have a third-party developer community that are eager to add value to their game, they'd publish that themselves. I don't think that should stop us, though. Not sure about taking ownership of the conversion table ourselves though - I'd much rather push FD into releasing the information, or at least keep it community-sourced. |
OK here are separate schema for outfitting and ships - both using integer IDs. There's a lot of commonality with the v2 commodity schema (basically a cut and paste), but I haven't tried to split that commonality out into a shared sub-schema - I'm not sure it's worth the complication. In the absence of Frontier documenting a third-party API and/or ID tables, someone else has to host community-sourced tables, otherwise the proposed schema are unusable in practice. I'm suggesting that it is most logical and convenient for publishers and subscribers for this project to maintain a master set of those tables, but it's not essential. |
Have you check the proposal on issue #16 ? |
@AnthorNet |
Some comments on your draft 33d1b1e: I suggest removing the "minItems" restriction on modules , so that "modules": [] can indicate the absence of outfitting services. Since you've made the "name" string mandatory, the "fdId" field is redundant. I suggest removing "fdId". To make it easier for subscribers to parse the messages I suggest adding category (required), subtype (optional), class (required) and rating (required) fields instead of bundling everything into the name field. See this table for the suggested use of these fields. (The 'subtype' field in that table is ugly - it holds ship type for armour modules, mount type for weapons, and guidance type for missile weapons. Alternatively I guess one could have different objects in the schema for armour, weapons etc). |
Are they really a distinction with subtype ingame ? |
Yes. For example 34 Pegasi/Webb Port currently offers Reactive armour for Sidewinder, Type-6, Type-7 and Asp, but not for any other ships. If I'm flying a Vulture and am looking for Reactive Armour then the distinction matters to me. Edit: If you really don't like a subype field then this info could be bundled into the name field. e.g. for armour: |
Effectively, I was just trying to find some good solution if we have to rely on other source than the API. But since it's not shown in game... I guess we will have to stick with that. |
Difficult. The user could report what armour is available just for the ship that they're flying. |
Just have a quick look and sounds good to me as long as everything can be populated from API Json, and ingame. Thx |
I've updated this table to reflect (I think) a complete list of currently available modules, with fields consistent with the outfitting schema that I'm suggesting in pull request #22. |
I'd like to propose an addition to the schema to carry station outfitting data. The proposed change to the schema is below - basically it just adds an optional "modules" property which is an array of integer IDs.
The semantics of the "modules" array is that it represents the availability of outfitting at the station at the time of reporting. Each element in the array is an integer ID which represents a module available in the station's outfitting screen. An empty "modules" array indicates that the station does not provide outfitting. (Publishers that do not provide outfitting info should therefore omit the "modules" property rather than supply an empty array).
Here is a not-quite exhaustive list of mappings from IDs to modules. I'd like to also propose that the EDDN project own and maintain this list.
Some Q&A:
Q: Why use integer IDs rather than strings (like we do for the commodity names)?
A: Using IDs does add an extra level of complexity/indirection, but offers some advantages over strings:
Q: For consistency, why not convert the commodities array to also use integer IDs instead of string names?
A: Converting the commodities array to use IDs would be a barrier to adoption. The proposed schema change is narrowly scoped in order to be trivial for subscribers to adopt - subscribers can just handle the proposed schema identically to the v2 schema by ignoring the new "modules" property. They can then choose to exploit the outfitting data encapsulated in the "modules" property later, or not at all.
Q: What about prices?
A: Unlike commodities, module prices don't typically vary from station to station. They may vary according to other factors including the player's allegiance, ranking, discounts etc but these are necessarily player-specific.
Q: What if the station provides outfitting, but doesn't have a commodities market?
A: The publisher should supply an empty "commodities" array.
Q: What about shipyard info (c.f. issue #16) ?
A: A new "ships" property could work in the same way and have similar semantics to the proposed "modules" property. Here is a not-quite exhaustive list of mappings from IDs to ships.
The proposed addition to the schema:
The text was updated successfully, but these errors were encountered: