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

Player list to do #115

Open
1 of 9 tasks
connorhsm opened this issue Jul 31, 2023 · 4 comments
Open
1 of 9 tasks

Player list to do #115

connorhsm opened this issue Jul 31, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@connorhsm
Copy link
Member

connorhsm commented Jul 31, 2023

https://github.com/twohoursonelife/dictator/blob/master/dictator/cogs/stats.py

Importanter:

  • - Run a secondary grouping check after grouping by Eve IDs to then group by Family names
  • - >1024 chars will break it due to message size limit (~75 living families)
  • - Logic to decide family name
  • - Group unnamed families
  • - player_list_request needs error handling on s.connect() for ConnectionRefusedError when the server is offline, ideally also message admins when this happens
  • - Function is getting too large and needs to be split

Nice to haves:

  • - Untangle the existing spaghetti of methods: verify... parse... process.. format...
  • - Actual objects/types instead of everything a string
  • - Reduce the number of loops
@connorhsm connorhsm added enhancement New feature or request help wanted Extra attention is needed labels Jul 31, 2023
@Eboubaker
Copy link
Contributor

How >1024 chars break it?

@connorhsm
Copy link
Member Author

connorhsm commented Jul 31, 2023

The Discord side breaks, message limit of 1024 characters. Need to implement pagination or alternate solutions to summarise. Such as "...and 4 other families with 5 total players"

@connorhsm connorhsm self-assigned this Aug 18, 2023
@connorhsm
Copy link
Member Author

Added task to run a secondary grouping after grouping by Eve ID to group by family name, this prevents excessive names showing during events or other uncommon cases where multiple Eves each name one another, resulting in them all having the same Family name but appearing in game-stats as:
image

Moon's analysis https://discord.com/channels/423293333864054833/945265603093082152/1186317817709076561

So there is some spaghetti around the names in the server. It saves Lastname and (full) Name separately. A bug happens when a named mother's (EVE MOON) unnamed baby get named by somone with a different lastname (EVE BOT). Then the server has Lastname = MOON, and Name = BABY BOT.

Game-stat uses Eve ID to group families, all good

Target-family uses Lastname, can be different from the displayed name as stated above

Hetuw uses Name. And it groups families in the following way: Separate My family from others by Eve ID, then group other families by last name (extracted from Name) (so lumping unrelated families with same name)
.
OHOL changed it so that adopted babies keep biological mother's lastname (unless that mother doesn't have one at the time) (in all case Lastname will be the same as in Name), probably will get that over here.

That leaves the difference between Game-stat and Hetuw solely coming from how Hetuw groups the families -- Lumping all same-name-different-Eve families together vs not.

Target-family ignores blood relations, uses Lastname only.

So it is okay to lump all the Christmas families together then. (By this I mean, first group by Eve ID, then lump the resulting numbers together if the family name is the same)

@connorhsm
Copy link
Member Author

connorhsm commented Jan 13, 2024

Need to improve result when game server is offline, it simply never updates from the last report. Time of image is 8:35.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants