Page 1 of 1

Color preferences for premium users

Posted: 21 May 2020, 21:51
by Mistergos
Hi there

I have predefined colors in my game corresponding to material.

I have listed thes colours in my gamesinfos.inc.php :

Code: Select all

$gameinfos = array(
'player_colors' => array( "ea3a3c", "f4eb22", "63a9dc", "54a94a", "f69822" ,"9c68ac"),
'favorite_colors_support' => true,
 )
From my game.game.php, i call for reattribution :

Code: Select all

        self::reattributeColorsBasedOnPreferences( $players, $gameinfos['player_colors'] );
        self::reloadPlayersBasicInfos();
Unfortunately, i have bugs with green preference that reallocate to my blue, and yellow preference that reallocate to my orange.
Is there anyway i can influence the reallocation?

Thanks for your time

Re: Color preferences for premium users

Posted: 22 May 2020, 09:27
by A-dam
Hi,

the code itself looks good to me. The problem I see here is probably related to the colours you defined in gameoptions.

According to this http://en.doc.boardgamearena.com/Main_g ... references only given colours are supported which are completely different from your colours...

Dont know if it is able to customize the reallocation. Also I would pay attention to how player colour setting is connected to token colour..

Anyway, this is testable in Studio, just set some colour preferences to some of your accounts and start a game with them..

Adam

Re: Color preferences for premium users

Posted: 22 May 2020, 18:31
by Mistergos
Ok thanks.
I think i will overcharge the default reallocation method to change to my own color settings.