Color preferences for premium users

Game development with Board Game Arena Studio
Post Reply
User avatar
Mistergos
Posts: 79
Joined: 18 September 2011, 16:59

Color preferences for premium users

Post 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
User avatar
A-dam
Posts: 107
Joined: 28 September 2013, 18:15

Re: Color preferences for premium users

Post 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
User avatar
Mistergos
Posts: 79
Joined: 18 September 2011, 16:59

Re: Color preferences for premium users

Post by Mistergos »

Ok thanks.
I think i will overcharge the default reallocation method to change to my own color settings.
Post Reply

Return to “Developers”