gameoption trouble

Game development with Board Game Arena Studio
Post Reply
User avatar
n_e_s_s_u_n_o
Posts: 93
Joined: 08 January 2021, 15:10

gameoption trouble

Post by n_e_s_s_u_n_o »

Hello everyone,
it's 2 weeks that I cannot use gameoption, when I do a Reload Game Options Configuration I always get part of my file and

array (
200 =>
array (
'name' => totranslate('Display tooltips'),
'needReload' => false,
'generic' => true,
'values' =>
array (
0 =>
array (
'name' => totranslate('Enabled'),
),
1 =>
array (
'name' => totranslate('Disabled'),
),
),
),
)

that I never put in my file. Of course addressing all the other options doesn't work anymore.
I have this problem with all my Gameoption files.
Anyone can help?
Thank you.
Paolo
User avatar
Tisaac
Posts: 2743
Joined: 26 August 2014, 21:28

Re: gameoption trouble

Post by Tisaac »

n_e_s_s_u_n_o wrote: 27 April 2021, 08:00 Hello everyone,
it's 2 weeks that I cannot use gameoption, when I do a Reload Game Options Configuration I always get part of my file and

array (
200 =>
array (
'name' => totranslate('Display tooltips'),
'needReload' => false,
'generic' => true,
'values' =>
array (
0 =>
array (
'name' => totranslate('Enabled'),
),
1 =>
array (
'name' => totranslate('Disabled'),
),
),
),
)

that I never put in my file. Of course addressing all the other options doesn't work anymore.
I have this problem with all my Gameoption files.
Anyone can help?
Thank you.
Paolo
This is standard user preference handled by BGA framework, this is not the source of your issue.
Please post your full gameoptions.php
User avatar
n_e_s_s_u_n_o
Posts: 93
Joined: 08 January 2021, 15:10

Re: gameoption trouble

Post by n_e_s_s_u_n_o »

here is my full gameoption.inc.php except for initial comments:

<?php

$game_options = array(
100 => array(
'name' => totranslate('must get if possibile'),
'values' => array(1 => array( 'name' => totranslate('always')),
2 => array( 'name' => totranslate('optional')),
),
'default' => 2
),
200 => array(
'name' => totranslate('card type'),
'values' => array(1 => array( 'name' => totranslate('Bresciane')),
2 => array( 'name' => totranslate('French')),
),
'default' => 1
),
);


and this is the log result of button Reload Game Options Configuration:

Reloading game options for game cicerabigiapb
New gameoptions.inc.php is now in place:


array (
100 =>
array (
'name' => totranslate('must get if possibile'),
'values' =>
array (
1 =>
array (
'name' => totranslate('always'),
),
2 =>
array (
'name' => totranslate('optional'),
),
),
'default' => 2,
),
)
array (
200 =>
array (
'name' => totranslate('Display tooltips'),
'needReload' => false,
'generic' => true,
'values' =>
array (
0 =>
array (
'name' => totranslate('Enabled'),
),
1 =>
array (
'name' => totranslate('Disabled'),
),
),
),
)
User avatar
thoun
Posts: 1621
Joined: 10 December 2020, 22:25

Re: gameoption trouble

Post by thoun »

Try with id 101 instead of 200, which is id of bga framework option, it probably override your option
User avatar
n_e_s_s_u_n_o
Posts: 93
Joined: 08 January 2021, 15:10

Re: gameoption trouble

Post by n_e_s_s_u_n_o »

Thanks, it's strange becouse yesterday I try with id 150 and didn't work as well. Using 101 works. Thank you
User avatar
n_e_s_s_u_n_o
Posts: 93
Joined: 08 January 2021, 15:10

Re: gameoption trouble

Post by n_e_s_s_u_n_o »

Still trouble. When I refer to this.prefs in .js it contains only the 200 option, my 100 and 101 are not present.

Any hint?

Thank you
Paolo
User avatar
Tisaac
Posts: 2743
Joined: 26 August 2014, 21:28

Re: gameoption trouble

Post by Tisaac »

Did you add them to game options or user prefs ?
User avatar
n_e_s_s_u_n_o
Posts: 93
Joined: 08 January 2021, 15:10

Re: gameoption trouble

Post by n_e_s_s_u_n_o »

They are in gameoptions.inc.php. Then I define 2 variable with index 100 and 101 in initGameStateLabels.
User avatar
n_e_s_s_u_n_o
Posts: 93
Joined: 08 January 2021, 15:10

Re: gameoption trouble

Post by n_e_s_s_u_n_o »

Sorry misunderstand documentation. Move to user pref.
Post Reply

Return to “Developers”