startcondition otheroption doesn't like arrays

Game development with Board Game Arena Studio
Post Reply
User avatar
galehar
Posts: 136
Joined: 29 March 2015, 00:12

startcondition otheroption doesn't like arrays

Post by galehar »

I have an option for which some values only work with some specific values of another option. So, it looks like this (I've simplified it, the real version is worse):

Code: Select all

'startcondition' => [
3 => ['type' => 'otheroptionisnot', 'id' => 100, 'value' => [2,3],
      'message' => totranslate('6 player draft option requires Brink of War')]
]
This doesn't work.

However, this works.

Code: Select all

'startcondition' => [
3 => ['type' => 'otheroptionisnot', 'id' => 100, 'value' => 2,
      'message' => totranslate('6 player draft option requires Brink of War')],
     ['type' => 'otheroptionisnot', 'id' => 100, 'value' => 3,
      'message' => totranslate('6 player draft option requires Brink of War')]
]
So, just to let you know that there's a workaround if you run into the same issue. Not sure how to properly report the bug though. The "web site" bug report is so flooded I doubt it can be used to manage framework issues.
User avatar
Victoria_La
Posts: 665
Joined: 28 December 2015, 20:55

Re: startcondition otheroption doesn't like arrays

Post by Victoria_La »

Why do you think it does support array? If it is not document - it does not, if it is ducumented - maybe you can correct it
Not all option support array of values.
User avatar
galehar
Posts: 136
Joined: 29 March 2015, 00:12

Re: startcondition otheroption doesn't like arrays

Post by galehar »

The doc for startcondition says
otheroption conditions ensure another option is set to this given values. That works the same as in displaycondition.
And in displaycondition, it does support array. So it looks like a bug.
User avatar
fafa-fr
Posts: 383
Joined: 22 December 2013, 21:58

Re: startcondition otheroption doesn't like arrays

Post by fafa-fr »

galehar wrote: 23 January 2021, 19:30 The "web site" bug report is so flooded I doubt it can be used to manage framework issues.
Framework bugs or suggestions can be managed in the Studio bug report system (https://en.studio.boardgamearena.com/bugs)
Post Reply

Return to “Developers”