Can't make zombie mode work

Game development with Board Game Arena Studio
Post Reply
User avatar
JudgeWhyMe
Posts: 36
Joined: 08 August 2012, 17:14

Can't make zombie mode work

Post by JudgeWhyMe »

Hello

When I make a player quit, I have the following message:
Can't manage zombie player in this game state (9)

It is a multiplayer state

Per the [url="https://en.doc.boardgamearena.com/Troub ... game_state]troubleshooting[/url"] page:
To correct this error, either add "zombiePass" => ## to the transitions array or work out why the game is in a state it should not be in.

I added the zombiePass transition in my state machine, but I still habe the error.

What can I do to investigate this problem?

Thanks
User avatar
cheval_raye
Posts: 101
Joined: 19 March 2020, 17:48

Re: Can't make zombie mode work

Post by cheval_raye »

You don't actually need to add "zombiePass" => ### to your state transition.

You need to implement the function zombieTurn in your game PHP class (mainly to skip the player's turn and transition to another state). For a multiplayer state, you usually want to call

Code: Select all

$this->gamestate->setPlayerNonMultiactive( $player_id, $next_state )
where "$next_state" is the name of the transition, which needs to be in your state machine.
User avatar
JudgeWhyMe
Posts: 36
Joined: 08 August 2012, 17:14

Re: Can't make zombie mode work

Post by JudgeWhyMe »

Thanks for the answer. I don't have this error anymore.

It is not possible for this game to continue when a player quits, so if a player quits, the game should end.

However, it seems the zombie mode dos not allow to trigger game end

Is there a way to end the game anyway?
User avatar
cheval_raye
Posts: 101
Joined: 19 March 2020, 17:48

Re: Can't make zombie mode work

Post by cheval_raye »

Code: Select all

$this->gamestate->jumpToState(99);
will trigger game end
User avatar
JudgeWhyMe
Posts: 36
Joined: 08 August 2012, 17:14

Re: Can't make zombie mode work

Post by JudgeWhyMe »

So, I am trying to make zombie mode a little bit more than just ending the game after all. It seems to me that zombie mode is quite similar to solo mode in the game (which was not considered at first, but now may be a thing), so I am trying to go in this direction.

However, I have the following error at some point:
Error during skip-turn execution: This game has been cancelled. Please leave the game.
JudgeWhyMe1 quits the game
JudgeWhyMe1 quits the game
Unexpected error: BGA main website do not respond (reference: GS1 19/08 09:34:20)
All players (with a positive clock) chose to abandon this game.
I didn't see any documentation on this. What is this error, and how can I fix it?

Edit: to add some context to the error, it raises in this condition:
I click on an icon, triggering a js event
In this event associated method, I make a call to bgaPerformAction
Traces seems to show that this call to bgaPerformAction instruction is executed

I see in that server side receive this call, but then I have the followsing message:
< tableInfosChanged
<lots of data>
< zombieModeFail
[]


Thanks
aartb
Posts: 4
Joined: 27 October 2022, 23:21

Re: Can't make zombie mode work

Post by aartb »

How does your zombie code currently look?
User avatar
JudgeWhyMe
Posts: 36
Joined: 08 August 2012, 17:14

Re: Can't make zombie mode work

Post by JudgeWhyMe »

I realised that my zombie code was probably the cause of a blocking error at the end of the game. I will try to correct this problem first and then I'll share it

Edit - 08/26/2025: after rewriting it entirely, I don't have these error messages any more
Post Reply

Return to “Developers”