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

Save additional metadata in game results #747

Closed
Askaholic opened this issue Mar 15, 2021 · 1 comment · Fixed by #782
Closed

Save additional metadata in game results #747

Askaholic opened this issue Mar 15, 2021 · 1 comment · Fixed by #782
Assignees

Comments

@Askaholic
Copy link
Collaborator

Motivation

There are some use cases in modded games where the game results may be more nuanced than simply victory, defeat, or draw. For example in phantom games, the results will also include whether or not the player was a phantom. See #663.

For galactic war an army may become defeated by recalling, and it is important that a distinction can be made between a recall defeat and an acu death, as gw includes perma death.

Therefore it would be nice if we could save additional metadata with game result reports and include it in the post game rabbitmq messages. We should just extend the current format similar to how phantomx has already done it by parsing game results as a space-separated list of values where the last value is an integer score and the second to last value is either defeat, victory or draw indicating the result for rating purposes.

Format specification

Pseudo-ebnf:

{<text> }defeat|victory|draw <integer>

Where <text> is some lowercase ascii text without whitespace and <integer> is an ascii representation of an integer.

Regex:

([a-z0-9]+ )*(defeat|victory|draw) -?[0-9]+

Handling

The server should not do any special handling of metadata, however it should pass the metadata along in post-game rabbitmq messages so that other services may be able to implement special handling for certain meta tags.

@eoinnoble
Copy link
Contributor

You can assign this one to me.

eoinnoble added a commit to eoinnoble/server that referenced this issue Apr 26, 2021
eoinnoble added a commit to eoinnoble/server that referenced this issue Apr 29, 2021
eoinnoble added a commit to eoinnoble/server that referenced this issue May 9, 2021
Askaholic pushed a commit that referenced this issue May 29, 2021
* Feature/#747 Save additional metadata in game results

First pass, saving work

* Cleaning up bits and pieces

* Fix missing line in imports

* Simplify metadata conflicy resolution

* Remove un-needed import

* Army results are not the same as team results

* Army results should be broadcast regardless of game validity

* Rename test

* Team outcomes should always be calculated

* Add integration test

* Make isort happy

* Tighten up integration test

* Add 2v1 integration test

* Army results should be dicts

* Remove un-needed import

* Remove un-needed print statements

* Clean up type hints

* Appease isort

* Change ArmyResult field name

* Appease isort again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants