setting payoffs

154 views
Skip to first unread message

Laura Galdikiene

unread,
May 24, 2022, 2:38:36 AM5/24/22
to oTree help & discussion
Hi! here is my question. I have a 2 player game (one shot, no rounds). I set the payoffs after the game in a wait page 
class ResultsWaitPage(WaitPage): after_all_players_arrive = set_payoffs
and show the results in a separate app.

But now I want to give a bonus also to those whose partner dropped out and they could not continue with the game and take them straight to the results page. But this means that they never arrive to this wait page and I won't have their bonus in player.payoff. is there a way to overcome this and make sure that all participants arrive to the page where payoffs are set?

I'd appreciate your help.

Best,
Laura

Luis Avalos Trujillo

unread,
May 24, 2022, 5:00:01 PM5/24/22
to oTree help & discussion
Hi Laura,

One workaround could be to assign a default payoff to all players upon arrival. If the player arrives to the ResultsWaitPage, then update their payoffs according to whatever rule you have. If they never make it there they will have the default.

I hope this helps.

Luis

Laura Galdikiene

unread,
May 25, 2022, 1:07:21 AM5/25/22
to Luis Avalos Trujillo, oTree help & discussion
Thank you! This is how I did in the end

From: 'Luis Avalos Trujillo' via oTree help & discussion <ot...@googlegroups.com>
Sent: Wednesday, May 25, 2022 12:00:01 AM
To: oTree help & discussion <ot...@googlegroups.com>
Subject: [oTree] Re: setting payoffs
 
--
You received this message because you are subscribed to the Google Groups "oTree help & discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to otree+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/otree/05ddc6f3-cb4b-4e3d-b534-bcd571d8c250n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages