Hello
How and where should I define that the game is played with teams?
How should I get the teams of the current game?
How and where should I define that the game is played with teams?
How should I get the teams of the current game?
Code: Select all
'losers_not_ranked' => true,Thanks.ufm wrote: ↑10 January 2024, 13:53 Currently, such a feature doesn't exist in BGA framework.
For now, the only possible course of action is:
- Set 'losers_not_ranked' to true
- Set the scores of all teammates in a team equal
How to get the list of teammates depends on the game and you.
If all teams sit alternately, you could use player_no in player db table. If not, you may have to add a column.
The BGA documentation says options are in gameoptions.jsonRicardoRix wrote: ↑10 January 2024, 14:14 that's a game option:
https://en.doc.boardgamearena.com/Optio ... ences.json
You would do well to read some documentation, or follow a tutorial:
https://en.doc.boardgamearena.com/Studi ... _reference
and you can download the coinche project.
Game options change (Optional!)
gameoptions.inc.php is now considered legacy, and gameoptions.json and gamepreferences.json are recommended for new projects:
The wiki and the template project have been updated: https://en.doc.boardgamearena.com/Optio ... ences.json
Any questions/problems can come to me, or can be asked here.
The format of the json files matches the format of the old php files
We realise there are some drawbacks (sorry!):
No comments in the JSON file, meaning you have to check the wiki for examples
No PHP constants in the JSON file, meaning magic numbers
However, we hope it's good for BGA because:
Simpler to parse (for robots and humans)
Easier to check for errors (we could perhaps use an XSLT one day)
No need to run game-specific PHP code on the metasite
NOTE: Switching is totally optional, and the legacy files will still work for existing projects, and for those who know about them.