-
Notifications
You must be signed in to change notification settings - Fork 88
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
Companion Mode + New Flow #716
base: main
Are you sure you want to change the base?
Companion Mode + New Flow #716
Conversation
artosimonyan
commented
Feb 28, 2025
•
edited
Loading
edited
- Companion mode returns to Koolo
- Companions wait until a leader has created a game. Will NOT join if leader started the game prior to companion launch.
- Completely revamped creating/joining games logic
- Greatly improved online check logic and eliminated a lot of edge cases
- Improved failure to select Character with maximum attempts and a client restart.
- Companion mode returns to Koolo - Completely revamped creating/joining games logic - Greatly improved online check logic and eliminated a lot of edge cases - Improved failure to select Character with maximum attempts and a client restart.
} | ||
|
||
// ResetCompanionGameInfoEvent is sent when the Leader finishes a game, preventing the companions from joining it | ||
func ResetCompanionGameInfo(be BaseEvent, leader string) ResetCompanionGameInfoEvent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just call it GameFinished or whatever? the responsibility of reseting the companion game info is based on the handler, maybe the GameFinished event can be used for other stuff too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have GameFinished event which we use for other stats. The idea here is to separate them with other events that we can use, even outside of the bot (ea discord integrations etc), specifically for companion to allow for more customization and actions.
The Leader seems to be idling in Lobby after X amount of runs. It can vary. I've been testing this and have seen nothing in logs, so it must be silent errors or an edge case. It can take 1 hour, it can take 8 hours, but eventually it stops. More logs through the process could help. |
After testing it for a few days with groups, there is an issue where the Leader stops creating games (it usually doesn't take much time, can be less than an hour, but it can take more time). You can also have cases where the companion doesn't get the join request (it will skip a run and join the following one), and where a companion can get a join request for a previous game (it will try to join an old game name). If you restart the app, then it will start working normally again for some time. |
I didn't notice any such issues @davidfvsilva. I recommend adding some comments on your end of every single step in out of game flow and see what's wrong. I won't be adding that in the PR as it will cause a LOT of logs that we don't really need for everyone once pushed to main. If you can find a way to reproduce it, let me know. There's literally no reason aside something local on your end or some edge case why it will just stop working randomly after a few hours. |
I also encountered the issue where the leader stops creating games, but this was not a new bug for me so hard to say if the companion feature created the issue or not. I switched to not creating lobby games to solve this in the past, so I never went deeper with it.. but I don't think this is something we can get around with in companion mode, unless we switch to friend list joining perhaps? |
So ... it's just a problem when the leader creates Lobby games? If so, just create normal ones. And by stops do you mean he does nothing (idles for 10+ minutes) or what? I really need you to provide more information here and not vague explanations |
it will idle indefinitely in lobby like I mentioned before. Unfortunately, there isn't anything noticeable in the logs. |
same, it will sit in the game creation lobby indefinitely. The leader has the "Create Lobby Games" option checked on my end. |
@Antizerg @davidfvsilva, test pressing escape to get back to the character selection screen and let me know if that will make it start doing stuff again. |
you need to manually enter a game to get it running again. from a distance you can also, stop-start the bot with a discord command |
[companion receiving wrong game number from the leader]thank you for this excellent feature. there is a problem with leader-companion communication unfortunately. it is happening occasionally NOT all the time :( leader is running correctly but companion can receive "incorrect game name" when the next game is created by a leader, which makes companion to join previous game, and not the new game where the leader is. in a log it looks like this: level=INFO msg="Companion join game event received" supervisor=xxx leader=xx name=xx0 password=x In reality for leader the game name is "xx1" but companion received 0 instead 1 in a games name...:( and also I observed that sometimes companion is receiving an empty game name+password "from the leader" here what it's looks like in a log... level=INFO msg="[Companion] Idling in character selection screen while waiting for Leader to create new game" supervisor=xxx also happens randomly, something might be going on In game name+password communication in a companion's part of the program... could this be looked into please and may be corrected? upd. 1st game is mostly usually correct (but not always - empty game name+pass situation), (companion getting and using correct game number) but with time, leader start sending or companion begin receiving wrong number in a game's name...for some reason... -maybe. clear cache before sending/receiving game name by a companion? to get in state like this a first game... when game number is counting up, something is going off... |