schemas/README: Give examples of LoadGame for Horizons/Odyssey flags

This commit is contained in:
Athanasius 2022-01-20 11:40:41 +00:00
parent 7819eff826
commit 853c309df0

View File

@ -245,17 +245,6 @@ Each `message` object must have, at bare minimum:
will be much more than this. Consult the
[schemas and their documentation](./).
Where the schema allows for them, add the `horizons` and `odyssey`
keys with boolean values. `null` is not allowed in the values, so if
you cannot determine a value do not include that key at all. The best
source of these is the `LoadGame` event from journals. It's present
both in the PC local files and the CAPI journal data. If you're
composing a shipyard or outfitting message from CAPI data then it is
possible to synthesise the `horizons` flag. For now consult the function
`capi_is_horizons()` in
[EDMarketConnector:plugins/eddn.py](https://github.com/EDCD/EDMarketConnector/blob/stable/plugins/eddn.py)
for a method to achieve this.
Because the first versions of some schemas were defined when only the CAPI
data was available, before Journal files existed, many of the key names chosen
in the schemas are based on the equivalent in CAPI data, not Journal events.
@ -279,6 +268,39 @@ changes to your code.
It is also advisable to Watch this repository on GitHub so as to be aware
of any changes to schemas.
#### `horizons` and `odyssey` flags
Where the schema allows for them, add the `horizons` and `odyssey`
keys with boolean values. `null` is not allowed in the values, so if
you cannot determine a value do not include that key at all. The best
source of these is the `LoadGame` event from journals. It's present
both in the PC local files and the CAPI journal data. If you're
composing a shipyard or outfitting message from CAPI data then it is
possible to synthesise the `horizons` flag. For now consult the function
`capi_is_horizons()` in
[EDMarketConnector:plugins/eddn.py](https://github.com/EDCD/EDMarketConnector/blob/stable/plugins/eddn.py)
for a method to achieve this.
As of 2022-01-22 the following was observed for the `LoadGame` events as
present in CAPI-sourced Journal files (which were confirmed to match the
PC-local files for these events):
- PC Odyssey Client, game version `4.0.0.1002`:
```json
{ "timestamp":"2022-01-20T11:15:22Z", "event":"LoadGame", "FID":"F<elided>", "Commander":"<elided>", "Horizons":true, "Odyssey":true,...
```
- PC Horizons Client, game version `3.8.0.403`, no `Odyssey` key was
present:
```json
{ "timestamp":"2022-01-20T11:20:17Z", "event":"LoadGame", "FID":"F<elided>", "Commander":"<elided>", "Horizons":true,...
```
- PC 'base' Client, game version `3.8.0.403`, no `Odyssey` key was
present:
```json
{ "timestamp":"2022-01-20T11:22:54Z", "event":"LoadGame", "FID":"F<elided>", "Commander":"<elided>", "Horizons":false,...
```
### Server responses
There are three possible sources of HTTP responses when sending an upload
to EDDN.