<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.doc.boardgamearena.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Inaofr</id>
	<title>Board Game Arena - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.doc.boardgamearena.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Inaofr"/>
	<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/Special:Contributions/Inaofr"/>
	<updated>2026-12-02T14:39:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpstoneage&amp;diff=30428</id>
		<title>Gamehelpstoneage</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpstoneage&amp;diff=30428"/>
		<updated>2026-06-28T17:19:28Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: /* Mammoth Herd */ Indicate the cancelling of 2p/3p limitation at the mammoth position&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
You are the leader of a tribe during the Stone Age and must decide where to allocate your members to gather resources, build huts, and grow your civilization. While you advance, don&#039;t forget to keep your tribe fed or you will lose points.&lt;br /&gt;
&lt;br /&gt;
==Gameplay==&lt;br /&gt;
&lt;br /&gt;
Each player starts with 5 people and 12 food. &lt;br /&gt;
&lt;br /&gt;
Each round has 3 phases. &lt;br /&gt;
&lt;br /&gt;
==== Phase 1: Place Workers ====&lt;br /&gt;
&lt;br /&gt;
In turn order, each player assigns one or more workers to a place. Each place (except for the Hunting Grounds) has a set capacity. Only one tribe can occupy a place at a time. And if your tribe occupies the space, you cannot add more people from your tribe later. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Variations Based on Number of Players&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Two Players&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Only 2 out of 3 places in the village (&#039;&#039;Tool Maker (tools)&#039;&#039;, &#039;&#039;Hut (gain worker)&#039;&#039;, and &#039;&#039;Field (increase food production)&#039;&#039;) may be occupied per turn. &lt;br /&gt;
&lt;br /&gt;
Only 1 player may place people in any of the resource areas (&#039;&#039;Forest&#039;&#039; (wood), &#039;&#039;Clay Pit&#039;&#039; (brick), &#039;&#039;Quarry&#039;&#039; (stone), and &#039;&#039;River&#039;&#039; (gold)).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Three Players&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Only 2 out of 3 places in the village (&#039;&#039;Tool Maker (tools)&#039;&#039;, &#039;&#039;Hut (gain worker)&#039;&#039;, and &#039;&#039;Field (increase food production)&#039;&#039;) may be occupied per turn (like a two-player game).&lt;br /&gt;
&lt;br /&gt;
Only 2 player may place people in any of the resource areas (&#039;&#039;Forest&#039;&#039; (wood), &#039;&#039;Clay Pit&#039;&#039; (brick), &#039;&#039;Quarry&#039;&#039; (stone), and &#039;&#039;River&#039;&#039; (gold)).&lt;br /&gt;
&lt;br /&gt;
==== Phase 2: Remove People and Gain Resources====&lt;br /&gt;
&lt;br /&gt;
In turn order, each player removes their people from each place and gains/pays for the benefits of that place. &lt;br /&gt;
&lt;br /&gt;
The following formula determines the number of resources received: For each worker placed, a die is rolled. The total of all dice is divided by the resource&#039;s &amp;quot;value&amp;quot; (the rarer the resource, the higher the number). The resulting whole number (remainder ignored) is the total resources received.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Places&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:auto;&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
!| Name || Resource || Capacity || Description&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Hunting Grounds&#039;&#039;&#039; || Food || -- || Roll dice equal to # of workers placed. Dice total ÷ &#039;&#039;&#039;2&#039;&#039;&#039; = # of food received&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Forest&#039;&#039;&#039; || Wood || 7 || Roll dice equal to # of workers placed. Dice total ÷ &#039;&#039;&#039;3&#039;&#039;&#039; = # of wood received&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Clay Pit&#039;&#039;&#039; || Brick || 7|| Roll dice equal to # of workers placed. Dice total ÷ &#039;&#039;&#039;4&#039;&#039;&#039; = # of bricks received&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Quarry&#039;&#039;&#039; || Stone || 7 || Roll dice equal to # of workers placed. Dice total ÷ &#039;&#039;&#039;5&#039;&#039;&#039; = # of stones received&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;River&#039;&#039;&#039; || Gold || 7 || Roll dice equal to # of workers placed. Dice total ÷ &#039;&#039;&#039;6&#039;&#039;&#039; = # of gold bars received&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Tool maker&#039;&#039;&#039; ||Tool || 1 || Gain a tool. Each player can only have 3 tools, but each can be upgraded (up to 3 times) by placing a worker here. &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Hut&#039;&#039;&#039; ||+1 Worker || 2 || Gain 1 worker. &#039;&#039;Exactly&#039;&#039; 2 people must be placed here. Max of 10 workers.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Field&#039;&#039;&#039; ||+1 food production || 1 || Increase your food production by 1. &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Buildings&#039;&#039;&#039; ||Buy buildings || 7 || Buy buildings with resources. Buildings are worth VP.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Civilization&#039;&#039;&#039; || Civilization card || 1 || Pay the # of resources based on its slot to gain its immediate effect and scoring benefits. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Tools&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Tools are used to increase the number of resources gained. By using the tool, its value (1-4) is added to the dice total. Each tool can only be used once per turn. The whole value of the tool must be used (i.e. you cannot add less than 4 to a total when using a level 4 tool). Some Civilization cards grant &amp;quot;single-use&amp;quot; tools. These are lost after use and don&#039;t count for scoring.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Buildings&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Pay the cost to gain the Building and receive the points listed in the top-left corner. If this number is a ?, points are equal to the total value of the resources used to acquire this building. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:auto;&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
!| Resource || Value &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Wood&#039;&#039;&#039; || 3&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Brick&#039;&#039;&#039; || 4&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Stone&#039;&#039;&#039; || 5&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Gold&#039;&#039;&#039; || 6&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;u&amp;gt;Civilization Cards&amp;lt;/u&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Each card has an &#039;&#039;immediate effect&#039;&#039; (usually granting a resource) and a &#039;&#039;scoring multiplier&#039;&#039;. See &#039;&#039;&#039;End Game&#039;&#039;&#039; for how Civilization Cards are scored. &lt;br /&gt;
&lt;br /&gt;
==== Phase 3: Feed People====&lt;br /&gt;
&lt;br /&gt;
To feed your people, you must be able to discard enough food equal to # of workers minus food production number. If you have less food than this, you may substitute any resource. If you still don&#039;t have enough for your workers, you lose all food and are given a -10 point penalty.&lt;br /&gt;
&lt;br /&gt;
====Ending the Round====&lt;br /&gt;
&lt;br /&gt;
All Civilization Cards are moved to the right and new cards are put in the empty spaces. The next player becomes the starting player and a new round begins. &lt;br /&gt;
&lt;br /&gt;
==Game End==&lt;br /&gt;
&lt;br /&gt;
The game ends when either:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;margin:1em 0;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;One stack of buildings is empty when a round ends. (The number of building stacks is equal to the number of players).&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;There are insufficient Civilization Cards to fill each slot when a round begins.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Scoring====&lt;br /&gt;
&lt;br /&gt;
Civilization Cards with a &#039;&#039;&#039;green&#039;&#039;&#039; lower background are culture cards. They have 1 of 8 different symbols. At the end of the game, score is determined by grouping cards into sets with all different symbols, squaring the number of cards in each set, and adding them together. For example, a player has 1 card with a tablet, 1 card with pottery, 2 cards with a sundial, and 3 cards with a loom. This forms one set of four symbols (tablet, pottery, sundial, loom), one set of two symbols (sundial, loom) and one set of one symbol (the third loom). The player scores 16 (4&amp;amp;sup2;) for the first set, 4 (2&amp;amp;sup2;) for the second set and 1 for the third set, for a total of 21 points.&lt;br /&gt;
&lt;br /&gt;
Civilization Cards with a &#039;&#039;&#039;sand&#039;&#039;&#039; background are specialized workers: farmers, tool makers, hut builders, and shamans. These are scored as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;margin:1em 0;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;# of cards with &#039;&#039;farmers&#039;&#039; x food production number&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;# of cards with &#039;&#039;tool makers&#039;&#039; x total value of tools&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;# of cards with &#039;&#039;hut builders&#039;&#039; x # of buildings&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;# of cards with &#039;&#039;shamans&#039;&#039; x workers&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The total from Civilization Cards is added to the VP printed on your buildings, plus 1 point for each remaining resource.&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
====Harsh Winter====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;margin:1em 0;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Certain buildings allow you to spend an extra stone to score 5 points.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;You can spend an extra gold when purchasing a Civilization Card to score 6 points.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Wild Animals====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;margin:1em 0;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Four &amp;quot;wild animal&amp;quot; cards are shuffled into the Civilization Cards.&lt;br /&gt;
  &amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;When revealed, wild animals subtract 1, 2, or 3 from all dice rolls.&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Players must collectively place X people on the card to drive it off, where X = number of players.&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;After driving off a wild animal, each player rolls 1 die per person placed on it and receives the rewards.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Igloos====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;margin:1em 0;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Spend 3 resources of the same type to buy an igloo, which awards points like a building but does not count for the end-game building bonus.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The New Huts====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;margin:1em 0;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Adds new buildings that grant fewer points when built but grant a bonus, such as gaining a resource each round or +1 worker/tool/food production). These do count for the end-game building bonus.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Mammoth Herd====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;margin:1em 0;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;At the beginning of each round, a mammoth appears on the place shown by the top-most bonus tile.&lt;br /&gt;
  &amp;lt;li&amp;gt;Players who place people there can spend 1 food or resource per person to try to tame the mammoth.&lt;br /&gt;
  &amp;lt;li&amp;gt;Each player who places people to tame the mammoth rolls 1 die per person.&lt;br /&gt;
  &amp;lt;li&amp;gt;The player with the highest single die is the &amp;quot;mammoth tamer&amp;quot;. The mammoth tamer can choose to take the &amp;quot;1&amp;quot; or &amp;quot;all&amp;quot; bonus, as shown on the back of the bonus tile. &lt;br /&gt;
  &amp;lt;li&amp;gt;The other players who rolled are &amp;quot;challengers&amp;quot;. Challengers take the &amp;quot;all&amp;quot; bonus.&lt;br /&gt;
  &amp;lt;li&amp;gt;At the end of the game, the player with the most mammoth tiles scores 10 points.&amp;lt;li&amp;gt;2 or 3 players game: all players might place workers at the mammoth location (the 2p/3p game limitation is cancelled at the mammoth location).&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====The Expansion====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;margin:1em 0;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&#039;&#039;&#039;New Good:&#039;&#039;&#039; Jewelry &lt;br /&gt;
  &amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;1 tooth = 1 jewelry, 1 ring = 3 jewelry&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Jewelry does not count as a resource or food&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A player can trade resources &#039;&#039;&#039;or&#039;&#039;&#039; jewelry for buildings and Civilization Cards&lt;br /&gt;
    &amp;lt;li&amp;gt;Jewelry is acquired at the Hunting Grounds and has the same value as food. You &#039;&#039;can&#039;&#039; gain a combination of food and jewelry&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&#039;&#039;&#039;New Place:&#039;&#039;&#039; Merchant&lt;br /&gt;
  &amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Like the hut, this place requires exactly 2 people and is worth no points at the end of the game.&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;When this place is used, you gain 2 jewelry and your merchant level increases by 2. This represents the player&#039;s ability to trade.&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;The merchant exists in the village. In a 4-player game, only 3 of the 4 places can be visited. Rules for the 2-3 player game remain the same (only 2 village spaces can be visited per round).&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&#039;&#039;&#039;New Mechanic:&#039;&#039;&#039; Trading&lt;br /&gt;
  &amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;A player can trade resources/jewelry once per round, regardless of whether they put any workers on the merchant&lt;br /&gt;
    &amp;lt;li&amp;gt;A player can only trade in order to buy a Civilization Card or a building (except for an igloo)&lt;br /&gt;
    &amp;lt;li&amp;gt;If also playing with the &#039;&#039;Harsh Winter&#039;&#039; variant, the extra stone/gold cannot be obtained with a trade&lt;br /&gt;
    &amp;lt;li&amp;gt;The ratio of goods traded depends on your merchant level. &lt;br /&gt;
    &amp;lt;li&amp;gt;A player cannot trade if their merchant level is 0. (Meaning the merchant must be visited at least once before any trading can occur.)&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&#039;&#039;&#039;New Civilization Card slot&#039;&#039;&#039; &lt;br /&gt;
  &amp;lt;ul class=&amp;quot;bulletlist&amp;quot; style=&amp;quot;padding-inline-start:40px;&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;There is now a fifth slot for Civilization Cards. Cards here cost 3 jewelry. &lt;br /&gt;
    &amp;lt;li&amp;gt;A player can spend 3 more jewelry to buy the topmost face-down Civilization Card without applying its immediate effect.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=BGA_Code_Sharing&amp;diff=29514</id>
		<title>BGA Code Sharing</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=BGA_Code_Sharing&amp;diff=29514"/>
		<updated>2026-04-21T17:05:28Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: /* Projects on studio */ Add d case (Stone Age case, een asked me to not make it public for this reason)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
This page is for listing of externally hosted bga projects, tools and resources, as well as internal project&lt;br /&gt;
intended for sharing&lt;br /&gt;
&lt;br /&gt;
== Community shared components, pens, etc ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NAME&lt;br /&gt;
! CODE LINK&lt;br /&gt;
! DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Dice models and animation&lt;br /&gt;
|-&lt;br /&gt;
| Die: 4 sided &lt;br /&gt;
| https://codepen.io/mrkiffie/pen/doVZgW  ; https://codepen.io/VictoriaLa/pen/JjZNezr&lt;br /&gt;
| code pen&lt;br /&gt;
|-&lt;br /&gt;
| Die: 6 sided &lt;br /&gt;
| https://github.com/elaskavaia/bga-sharedcode ; https://codepen.io/VictoriaLa/pen/QWBBbwz&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Die: 8 sided &lt;br /&gt;
| https://codepen.io/VictoriaLa/pen/YzMPeGq&lt;br /&gt;
| code pen&lt;br /&gt;
|-&lt;br /&gt;
| Die: 12 sided (dodecahedron) &lt;br /&gt;
| https://codepen.io/VictoriaLa/pen/xxLLxOP &amp;lt;nowiki/&amp;gt;  https://codepen.io/hoursgoby/pen/GRwQzxo&lt;br /&gt;
| Code pen&lt;br /&gt;
|- &lt;br /&gt;
| Die: 20 sided &lt;br /&gt;
| https://codepen.io/vicentemundim/details/cenIh&lt;br /&gt;
| Code pen&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Moving object using CSS animation (mostly)&lt;br /&gt;
|-&lt;br /&gt;
| Phantom object move on oversurface &lt;br /&gt;
| https://codepen.io/VictoriaLa/pen/gORvdJo&lt;br /&gt;
| This technique creates clone of the object it moves it on another surface. It works well when parents that css transform applies such as scale and rotate&lt;br /&gt;
|-&lt;br /&gt;
| Move object directly using positioning &lt;br /&gt;
| https://codepen.io/VictoriaLa/pen/dyzgKVX&lt;br /&gt;
| This technique is modification of BGA framework method to allow mobile object not to have absolute position before or after the move (and uses css animation not dojo). Methods slideToObjectRelative, attachToNewObjectNoDestroy&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Responsive layout, zoom and navigation for game boards&lt;br /&gt;
|-&lt;br /&gt;
|Flex Layout&lt;br /&gt;
|https://codepen.io/VictoriaLa/pen/XWjJJgG&lt;br /&gt;
|Example on how to create flexible layout just by using css&lt;br /&gt;
|-&lt;br /&gt;
|Zoom&lt;br /&gt;
|[https://github.com/thoun/bga-zoom/ Repo]&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;[https://thoun.github.io/bga-zoom/demo/index.html Demo] (visible on Knarr, Azul, Abyss, ...)&lt;br /&gt;
|Allow the user to zoom on the game board. Include the controls to zoom, and handle the scale applied to the HTML element.&lt;br /&gt;
|-&lt;br /&gt;
|Jump to&lt;br /&gt;
|[https://github.com/thoun/bga-jump-to/ Repo]&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;[https://thoun.github.io/bga-jump-to/demo/index.html Demo] (visible on Knarr, Elawa)&lt;br /&gt;
|Add floating controls to quickly jump to a player&#039;s table&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Algorithms&lt;br /&gt;
|-&lt;br /&gt;
|Hex grid&lt;br /&gt;
|tapestry,Tumbleweed,gaia project,Gold West&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Shortest path on hex grid&lt;br /&gt;
|memoir 44&lt;br /&gt;
| Dijkstra&lt;br /&gt;
|-&lt;br /&gt;
|Largest area on hex grid&lt;br /&gt;
|tapestry, ...&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Largest area on square grid&lt;br /&gt;
|king domino, ...&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Tetris pieces&lt;br /&gt;
|patchwork, ...&lt;br /&gt;
|Matrix manupations to rotate, flip and fit tetris pieces&lt;br /&gt;
|-&lt;br /&gt;
|Line of sights on hex grid&lt;br /&gt;
|memoir 44&lt;br /&gt;
|Find intersecting hexes on a line between two cells&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Alternative implementations of BGA modules&lt;br /&gt;
|-&lt;br /&gt;
|Scrollmap with zoom&lt;br /&gt;
|https://github.com/yansnow78/bga_scrollmap&lt;br /&gt;
|you can find it in cacao, ginkgopilis, sagani, bigmonster,dominoes, Carcassonne hunters and gatherers and many others. &amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt; improvements compare to scrollmap:&lt;br /&gt;
- add zoom capabilities &lt;br /&gt;
&lt;br /&gt;
- add possibility to adjust pan delta to tile size when clicking on arrows&lt;br /&gt;
&lt;br /&gt;
- allow zoom with scroll wheel. only allow zoom with wheel if alt or ctrl or shift are pressed by default.  add possibility to select which key need to be pressed when zooming with wheel&lt;br /&gt;
&lt;br /&gt;
- allow pan/scroll and pinch zoom on smartphone. only allow 2 fingers to start scrolling by default, one finger is for page scrolling&lt;br /&gt;
&lt;br /&gt;
- make clickable area of buttons a bit bigger on smartphone&lt;br /&gt;
&lt;br /&gt;
- improve animation between game board and player bards thanks to an animation_div&lt;br /&gt;
&lt;br /&gt;
- add support to long click on buttons (continuous scroll or zoom or enlarge/reduce until button released)&lt;br /&gt;
|-&lt;br /&gt;
|Scrollmap Plus &lt;br /&gt;
|patchwork&lt;br /&gt;
|Implementation with some bugs fixed, improved drag support and ability to use only one direction (i.e. only horizontal like carousel). Found in modules/extscrollmap.js&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Assorted stuff&lt;br /&gt;
|-&lt;br /&gt;
|Help&lt;br /&gt;
|[https://github.com/thoun/bga-help/ Repo]&amp;lt;nowiki&amp;gt; | &amp;lt;/nowiki&amp;gt;[https://thoun.github.io/bga-help/demo/index.html Demo] (visible on Knarr)&lt;br /&gt;
|Add floating help buttons at the bottom left corner of the screen&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Projects ==&lt;br /&gt;
&lt;br /&gt;
Add the game name, a link to repository and nickname of the developer on bga (same as used for dev forum), and short description. See [[Tools_and_tips_of_BGA_Studio#Version_Control]] for some suggestions on how and where to publish your code externally. Also see the [https://github.com/topics/boardgamearena boardgamearena] topic on github.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important notice about artwork on BGA Open Source projects: original hi-resolution images from publishers must not be published on the repositories. In addition, it is better to specify that the images derivated from publishers artwork are copyrighted and cannot be licensed under a free license like Creative Commons.&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! NON-GAME PROJECTS&lt;br /&gt;
! CODE LINK&lt;br /&gt;
! DEVELOPER&lt;br /&gt;
! COMMENT&lt;br /&gt;
|-&lt;br /&gt;
| Shared Code (not a game)&lt;br /&gt;
| https://github.com/elaskavaia/bga-sharedcode&lt;br /&gt;
| Victoria_La&lt;br /&gt;
| Examples of various game components and PHP stubs of framework code to make IDE happy&lt;br /&gt;
|-&lt;br /&gt;
| Vanilla Typescipt template (not a game)&lt;br /&gt;
| https://github.com/elaskavaia/bga-dojoless&lt;br /&gt;
| Victoria_La&lt;br /&gt;
| Project template for typescript and using minimal dojo, good for vscode - type checking, auto-complete, navigation&lt;br /&gt;
|-&lt;br /&gt;
| BoardGameArena Workbench (not a game)&lt;br /&gt;
| https://github.com/danielholmes/bga-workbench&lt;br /&gt;
| Daniel Holmes (dhau)&lt;br /&gt;
|-&lt;br /&gt;
|BGA-boilerplate&lt;br /&gt;
|https://github.com/bga-devs/tisaac-boilerplate/&lt;br /&gt;
|Tisaac (and Vincentt ?)&lt;br /&gt;
|Main boilerplate with extended &amp;quot;basic&amp;quot; function and code structure&lt;br /&gt;
|-&lt;br /&gt;
|BGA Type Safe Template&lt;br /&gt;
|https://github.com/NevinAF/bga-ts-template&lt;br /&gt;
|NevinAF&lt;br /&gt;
|Full typing of all BGA Framework components.&lt;br /&gt;
|-&lt;br /&gt;
|Undo functionality&lt;br /&gt;
|https://github.com/Ginso/UndoFunctions&lt;br /&gt;
|Ginso&lt;br /&gt;
|Code for adding undo functionality that also allows undoing single actions and not just the whole turn.&lt;br /&gt;
Also contains a class that wraps DB functions and adds a parsing functionality for numbers, bools and json&lt;br /&gt;
|-&lt;br /&gt;
! GAME&lt;br /&gt;
! CODE LINK&lt;br /&gt;
! DEVELOPER&lt;br /&gt;
! COMMENT&lt;br /&gt;
|-&lt;br /&gt;
| 99 (Trick-taking Card Game)&lt;br /&gt;
| https://github.com/ekelly/bga-ninetynine&lt;br /&gt;
| QuasarDukeDev&lt;br /&gt;
|-&lt;br /&gt;
| Abandon All Artichokes&lt;br /&gt;
| https://github.com/0-wiz-0/bga-abandonallartichokes&lt;br /&gt;
| __wiz__, rojomojo&lt;br /&gt;
|-&lt;br /&gt;
| Assyria &lt;br /&gt;
| https://github.com/sebastien-prudhomme/bga-assyria&lt;br /&gt;
| daikinee &lt;br /&gt;
|-&lt;br /&gt;
| Aura&lt;br /&gt;
| https://github.com/micahstairs/bga-aura&lt;br /&gt;
| Micah Stairs (micahstairs)&lt;br /&gt;
|-&lt;br /&gt;
| Bandido &lt;br /&gt;
| https://github.com/opheliehb/BandidoBGA&lt;br /&gt;
| ophelopede &amp;amp; Harkle &lt;br /&gt;
|-&lt;br /&gt;
| The Battle for Hill 218&lt;br /&gt;
| https://github.com/danielholmes/battle-for-hill-218&lt;br /&gt;
| Daniel Holmes (dhau)&lt;br /&gt;
|-&lt;br /&gt;
| Bonbons&lt;br /&gt;
| https://github.com/AntonioSoler/bga-bonbons&lt;br /&gt;
| Morgalad &lt;br /&gt;
|-&lt;br /&gt;
|Big Monster&lt;br /&gt;
|https://github.com/nmatton/bigmonster&lt;br /&gt;
|nicotacotac&lt;br /&gt;
|-&lt;br /&gt;
| Bonsai&lt;br /&gt;
| https://github.com/PhilipDavis/BGA-Bonsai&lt;br /&gt;
| Philip Davis (pdw3)&lt;br /&gt;
| Action stack for client-side undo system; generator functions to model complex turn workflows; infinite hex grid with auto resizing; all data in a single JSON blob; animated scorepad&lt;br /&gt;
|-&lt;br /&gt;
| Canosa&lt;br /&gt;
| https://codeberg.org/halibut/Canosa&lt;br /&gt;
| junibegood&lt;br /&gt;
|-&lt;br /&gt;
|Cóatl&lt;br /&gt;
|https://github.com/AbelTiborToth/bga-coatl&lt;br /&gt;
|Doctor Neo Cortex&lt;br /&gt;
|-&lt;br /&gt;
| Coinche&lt;br /&gt;
| https://github.com/drasill/bga-coinche&lt;br /&gt;
| Draasill&lt;br /&gt;
|-&lt;br /&gt;
|Copenhagen&lt;br /&gt;
|https://github.com/JoeProgram/bga-copenhagen&lt;br /&gt;
|JoeProgram&lt;br /&gt;
|-&lt;br /&gt;
| Coup: City State&lt;br /&gt;
| https://github.com/quietmint/bga-coupcitystate&lt;br /&gt;
| quietmint&lt;br /&gt;
|-&lt;br /&gt;
|Deep Regrets&lt;br /&gt;
|https://github.com/JamesGames7/bga-deepRegrets&lt;br /&gt;
|JamesGames7&lt;br /&gt;
|-&lt;br /&gt;
|Dice Hospital : Emergency Roll&lt;br /&gt;
|https://github.com/firgon/dicehospitaler&lt;br /&gt;
|firgon&lt;br /&gt;
|-&lt;br /&gt;
| Dice Summoners&lt;br /&gt;
| https://github.com/eoincos/bga-dicesummoners&lt;br /&gt;
| eoincos&lt;br /&gt;
|-&lt;br /&gt;
| Dungeon Roll&lt;br /&gt;
| https://github.com/MartinGoulet/bga-dungeonroll&lt;br /&gt;
| MGoulet&lt;br /&gt;
|-&lt;br /&gt;
| Egyptian Ratscrew&lt;br /&gt;
| https://github.com/0BuRner/bga-egyptianratscrew&lt;br /&gt;
| 0BuRner&lt;br /&gt;
|-&lt;br /&gt;
| Eruption&lt;br /&gt;
| https://github.com/AndyKerrison/bga-eruption&lt;br /&gt;
| Andy_K&lt;br /&gt;
|-&lt;br /&gt;
| A Fistful Of Gold&lt;br /&gt;
| https://bitbucket.org/Joel_L/fistfulofgold&lt;br /&gt;
| Brainchild&lt;br /&gt;
|-&lt;br /&gt;
| Fled&lt;br /&gt;
| https://github.com/PhilipDavis/BGA-Fled&lt;br /&gt;
| Philip Davis (pdw3)&lt;br /&gt;
| All data in a single JSON blob&lt;br /&gt;
|-&lt;br /&gt;
|Flip Freighters&lt;br /&gt;
|https://github.com/joesimpson/bga-flipfreighters&lt;br /&gt;
|joesimpson&lt;br /&gt;
|-&lt;br /&gt;
| Florenza: The Card Game&lt;br /&gt;
| https://github.com/alberto-bottarini/bga-florenza&lt;br /&gt;
| tarini &lt;br /&gt;
|-&lt;br /&gt;
| For-Ex&lt;br /&gt;
| https://github.com/Fnordistan/forex&lt;br /&gt;
| AmadanNaBriona&lt;br /&gt;
|-&lt;br /&gt;
| Get the MacGuffin&lt;br /&gt;
| https://github.com/mizutismask/bga-get-the-MacGuffin&lt;br /&gt;
| mizutismask&lt;br /&gt;
|-&lt;br /&gt;
| Hardback&lt;br /&gt;
| https://github.com/quietmint/bga-hardback&lt;br /&gt;
| quietmint&lt;br /&gt;
|-&lt;br /&gt;
| Hearts &#039;&#039;&#039;(Tutorial)&#039;&#039;&#039;&lt;br /&gt;
| https://github.com/elaskavaia/bga-heartsla&lt;br /&gt;
| Victoria_La&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Homesteaders&lt;br /&gt;
| https://github.com/npatron/bga-homesteaders&lt;br /&gt;
| TheBoot&lt;br /&gt;
|-&lt;br /&gt;
| Incan Gold&lt;br /&gt;
| https://github.com/AntonioSoler/bga-incangold&lt;br /&gt;
| Morgalad &lt;br /&gt;
|-&lt;br /&gt;
| In the Year of the Dragon (10th Anniversary Edition)&lt;br /&gt;
| https://github.com/Fnordistan/ityotd&lt;br /&gt;
| AmadanNaBriona&lt;br /&gt;
|-&lt;br /&gt;
| Just Desserts&lt;br /&gt;
| https://github.com/mizutismask/bga-just-desserts&lt;br /&gt;
| mizutismask&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| The King&#039;s Guild&lt;br /&gt;
| https://github.com/AdamNovotny/BGG-KingsGuild&lt;br /&gt;
| A-dam&lt;br /&gt;
|-&lt;br /&gt;
| The Lady and the Tiger (Doors)&lt;br /&gt;
| https://github.com/Fnordistan/ladyandthetiger&lt;br /&gt;
| AmadanNaBriona&lt;br /&gt;
|-&lt;br /&gt;
|Linkage&lt;br /&gt;
|https://github.com/ShaPhi7/linkage&lt;br /&gt;
|ShaPhi7&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Love Letter&lt;br /&gt;
|https://github.com/ShaPhi7/loveletter&lt;br /&gt;
|ShaPhi7&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Mapmaker: The Gerrymandering Game&lt;br /&gt;
| https://github.com/gzhang01/bga-mapmaker&lt;br /&gt;
| gkz&lt;br /&gt;
|-&lt;br /&gt;
| Marco Polo&lt;br /&gt;
| https://github.com/rcitaliano/MarcoPolo&lt;br /&gt;
| rcitaliano&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Monster Lands&lt;br /&gt;
| https://github.com/JamesGames7/bga-monsterlands&lt;br /&gt;
| James_Games&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Nile&lt;br /&gt;
| https://github.com/AndyKerrison/bga-nile&lt;br /&gt;
| Andy_K&lt;br /&gt;
|-&lt;br /&gt;
|Ninjan&lt;br /&gt;
|https://github.com/dorukkicikoglu/bga-ninjan&lt;br /&gt;
|fenadoruk&lt;br /&gt;
|-&lt;br /&gt;
| Noir: Killer vs Inspector&lt;br /&gt;
| https://bitbucket.org/chhuang76/bga_noirkvi&lt;br /&gt;
| ch huang&lt;br /&gt;
|-&lt;br /&gt;
|Now Boarding&lt;br /&gt;
|https://github.com/quietmint/bga-nowboarding&lt;br /&gt;
|quietmint&lt;br /&gt;
|-&lt;br /&gt;
|Odin&lt;br /&gt;
|https://github.com/dorukkicikoglu/bga-odin&lt;br /&gt;
|fenadoruk&lt;br /&gt;
|-&lt;br /&gt;
| Penny Press&lt;br /&gt;
| https://github.com/AdamNovotny/bga-blooms&lt;br /&gt;
| A-dam&lt;br /&gt;
|-&lt;br /&gt;
| Perikles&lt;br /&gt;
| https://github.com/Fnordistan/perikles&lt;br /&gt;
| AmadanNaBriona&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| P.I.&lt;br /&gt;
| https://gitlab.com/fa81/bga-pi, https://github.com/hellp/bga-pi (mirror)&lt;br /&gt;
| Fabian Neumann (fa81)&lt;br /&gt;
|-&lt;br /&gt;
| President&lt;br /&gt;
| https://github.com/quaresma95/president&lt;br /&gt;
| quaresma95&lt;br /&gt;
|-&lt;br /&gt;
| Santorini&lt;br /&gt;
| https://github.com/AntonioSoler/bga-santorini&lt;br /&gt;
| Morgalad, quietmint, Tisaac&lt;br /&gt;
|-&lt;br /&gt;
| Tablut&lt;br /&gt;
| https://github.com/Lucas-C/tablut&lt;br /&gt;
| Lucas-C &amp;amp; ntaffore&lt;br /&gt;
|-&lt;br /&gt;
| Takara Island&lt;br /&gt;
| https://github.com/AntonioSoler/bga-takaraisland&lt;br /&gt;
| Morgalad&lt;br /&gt;
|-&lt;br /&gt;
| Taluva&lt;br /&gt;
| https://github.com/quietmint/bga-taluva&lt;br /&gt;
| Morgalad &amp;amp; quietmint&lt;br /&gt;
|-&lt;br /&gt;
| Teotihuacan: City of Gods&lt;br /&gt;
| https://github.com/Trompetenhut/bga-teotihuacan&lt;br /&gt;
| Trompetenhut&lt;br /&gt;
|-&lt;br /&gt;
| Texas 42 (domino game, still under development)&lt;br /&gt;
| https://github.com/ishermandom/bga-42&lt;br /&gt;
| Stardust Spikes, Jason Turner-Maier, Ilya Sherman&lt;br /&gt;
|-&lt;br /&gt;
| Tic Tac Match&lt;br /&gt;
| https://github.com/leocaseiro/bga-tictacmatch&lt;br /&gt;
| Leo Caseiro&lt;br /&gt;
|-&lt;br /&gt;
| Trick of the Rails&lt;br /&gt;
| https://github.com/Fnordistan/trickoftherails&lt;br /&gt;
| AmadanNaBriona&lt;br /&gt;
|-&lt;br /&gt;
| Uptown&lt;br /&gt;
| https://github.com/elliotkendall/bga-uptown&lt;br /&gt;
| SpottedShroom&lt;br /&gt;
|-&lt;br /&gt;
| Via Magica&lt;br /&gt;
| https://github.com/christopherburke/bga_viamagica&lt;br /&gt;
| CuriousTerran&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Projects on studio ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Any developer can add themselves to a project as read-only from https://studio.boardgamearena.com/#!projects page (almost any project).&lt;br /&gt;
&lt;br /&gt;
If it is not visible: a) it has no bgg id b) it is already published (use radio button to switch) c) it is an old game not developed on studio d) it is an old game which code should not be copied.&lt;br /&gt;
&lt;br /&gt;
== Other useful resources ==&lt;br /&gt;
&lt;br /&gt;
Moved to [[Tools_and_tips_of_BGA_Studio]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Studio]]&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_stoneage&amp;diff=29277</id>
		<title>Bugsclarification stoneage</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_stoneage&amp;diff=29277"/>
		<updated>2026-04-04T15:45:32Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please do not report if your bug match one of the followings.&lt;br /&gt;
&lt;br /&gt;
A frequent &amp;quot;won’t fix&amp;quot;: sometimes you are not notified of a game update because of a lost message over the Internet. It can results in wrong situation display and in not being notified that it is your turn to play. These is linked to BGA framework and will not be fixed at the Stone Age code level. Please upvote this BGA website [https://boardgamearena.com/bug?id=201639 report].&lt;br /&gt;
&lt;br /&gt;
Here is a list of frequent &amp;quot;not a bug&amp;quot; reports: the user was just not knowing the actual rule.&lt;br /&gt;
* Can not put a worker at x place: check the placement limitation rules for two or three players game (and even four players if you are using the trade expansion).&lt;br /&gt;
* Did not get the two (might be one with the trade expansion) wild resources of the civilization card: you got it on your player board, you have to click on the wild resource icon to choose them.&lt;br /&gt;
* Did not get the card bonus in game: when buying a card face down, you receive only the end game bonus, not the in game bonus.&lt;br /&gt;
* Did not get the free wood/clay/stone of the bought hut (new huts expansion): the free resource is not granted at buy but at start of each following turns.&lt;br /&gt;
* Could not insulate bought hut (harsh winter variant): only huts of the standard game and costing three defined resources (not wild resources) can be insulated.&lt;br /&gt;
* Can not trade to buy an igloo: trade is allowed to buy a hut or a card, igloos are not huts nor cards.&lt;br /&gt;
* Can not trade to buy hut or card, different normal causes here:&lt;br /&gt;
** you can trade only one time per game turn (a game turn ends when all workers have been removed from playing area),&lt;br /&gt;
** the 2:1, 1:1 or 1:2 trade indicator (depending on your trade level) is not a trade rate, but a trade possibility: for instance for the 1:1, you can trade one resource and only one against another one, you can not trade two or more against the same number,&lt;br /&gt;
** you can not trade one resource against itself, even at trade level 9 or 10 (1:2 trade possibility: you can not trade one wood against one wood and one stone for instance).&lt;br /&gt;
* Did not get the second resource in my 1:2 trade: all resources gain in a trade are used in the linked buy, even if not needed for it, and it does not add points and can not be used to insulate or pay an extra gold in harsh winter variant.&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=BGA_Studio_Migration_Guide&amp;diff=28682</id>
		<title>BGA Studio Migration Guide</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=BGA_Studio_Migration_Guide&amp;diff=28682"/>
		<updated>2026-02-24T22:30:25Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: /* Deprecated translation functions */  clienttranslate is not working in view.php file, all formatting have to be done through notify or UserException formatting or be removed from PHP and rewrote in JavaScript.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is only for people who started long time ago and now need to re-write older projects into more modern versions.&lt;br /&gt;
Also if you trying to fix older game you may have to look here.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
See announcement here https://studio.boardgamearena.com/forum/viewtopic.php?f=12&amp;amp;t=45248&lt;br /&gt;
&lt;br /&gt;
📌 This symbol: direct information about migration&lt;br /&gt;
== Structural changes==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;gameoptions.inc.php&#039;&#039;&#039;&#039;&#039; =&amp;gt; gameoptions.json, gamepreferences.json&lt;br /&gt;
&lt;br /&gt;
Previously, options and preferences were specified in a single gameoptions.inc.php file.&lt;br /&gt;
&lt;br /&gt;
Now options and preferences are 2 json files, follow Migration steps on this page  https://en.doc.boardgamearena.com/Options_and_preferences:_gameoptions.json,_gamepreferences.json#Migration&lt;br /&gt;
&lt;br /&gt;
See [[#User preferences]] and [[#Game options]] for API changes.&lt;br /&gt;
&lt;br /&gt;
When building the game with this file you will see deprecation warning: The file gameoptions.inc.php is deprecated. click &amp;quot;Reload game options configuration&amp;quot; to generate the JSON content you can then put on a gameoptions.json and gamepreferences.json file. Then you can safely delete the gameoptions.inc.php file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;&amp;lt;gamename&amp;gt;.game.php&#039;&#039;&#039;&#039;&#039; =&amp;gt; modules/php/Game.php&lt;br /&gt;
&lt;br /&gt;
Move and refactor, see section [[BGA Studio Migration Guide#Namespaced game class|Namespaced game class]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;gamename&amp;gt;.action.php =&amp;gt; remove&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See section [[BGA Studio Migration Guide#Autowire game actions|Autowire game actions]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;&amp;lt;gamename&amp;gt;.view.php, &amp;lt;gamename&amp;gt;_&amp;lt;gamename&amp;gt;.tpl&#039;&#039;&#039;&#039;&#039; =&amp;gt; remove&lt;br /&gt;
&lt;br /&gt;
See section [[BGA Studio Migration Guide#Removal of view and template|Removal of view and template]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;gameinfos.inc.php&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
File still there. Deprecated keys &#039;&#039;&#039;designer&#039;&#039;&#039;, &#039;&#039;&#039;artist&#039;&#039;&#039;, &#039;&#039;&#039;year&#039;&#039;&#039;, &#039;&#039;&#039;presentation&#039;&#039;&#039;, &#039;&#039;&#039;tags&#039;&#039;&#039;, &#039;&#039;&#039;complexity&#039;&#039;&#039;, &#039;&#039;&#039;strategy&#039;&#039;&#039;, &#039;&#039;&#039;luck&#039;&#039;&#039;, &#039;&#039;&#039;diplomacy&#039;&#039;&#039;, &#039;&#039;&#039;is_beta&#039;&#039;&#039; are no longer in use. Please remove these keys and use the Game Metadata Manager instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;material.inc.php&#039;&#039;&#039;&#039;&#039; =&amp;gt; optional&lt;br /&gt;
&lt;br /&gt;
See section [[#Material]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;states.inc.php&#039;&#039;&#039;&#039;&#039; =&amp;gt; modules/php/States&lt;br /&gt;
&lt;br /&gt;
See section [[#States]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;stats.inc.php&#039;&#039;&#039; =&amp;gt; stats.json&lt;br /&gt;
&lt;br /&gt;
Deprecation warning: The file stats.inc.php is deprecated. click &amp;quot;Reload statistics configuration&amp;quot; to generate the JSON content you can then put on a stats.json file. Then you can safely delete the stats.inc.php file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;gamename&amp;gt;.js&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Equivalent file is in modules/js/Game.js, it is ES6 js class (yay) and no dojo mess. &lt;br /&gt;
There are also massive API changes, see bottom sections&lt;br /&gt;
&lt;br /&gt;
==IDE Support==&lt;br /&gt;
A new _ide_helper.php file is now provided in every project dir, allowing IDE to provide syntax error highlighting for the framework functions. This file is regularly updated to match the latest framework updates.&lt;br /&gt;
&lt;br /&gt;
Same with bga-framework.d.ts for those using TypeScript.&lt;br /&gt;
&lt;br /&gt;
📌 Sync the files from the FTP dir to your local copy to benefit from it. Most of the IDE like Visual Studio Code should handle _ide_helper.php if you already followed https://en.doc.boardgamearena.com/Setting_up_BGA_Development_environment_using_VSCode&lt;br /&gt;
&lt;br /&gt;
==Game configuration ==&lt;br /&gt;
&lt;br /&gt;
===User preferences===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Access to user preferences and listener: https://en.doc.boardgamearena.com/Game_interface_logic:_yourgamename.js#User_preferences&lt;br /&gt;
&lt;br /&gt;
📌 &lt;br /&gt;
*If you had a custom function called &amp;lt;code&amp;gt;setupPreferences()&amp;lt;/code&amp;gt; reading the &amp;lt;select&amp;gt; values, you can now use &amp;lt;code&amp;gt;onGameUserPreferenceChanged&amp;lt;/code&amp;gt; instead.&lt;br /&gt;
*If you had a copy of the user preferences on a DB table, it&#039;s not needed anymore. Remove all support of writing to this table. Replace access to this table with&lt;br /&gt;
        $pref = $this-&amp;gt;userPreferences-&amp;gt;get($playerId, $prefCode) ?? $defaultValue;&lt;br /&gt;
*If you used $this-&amp;gt;player_preferences - replace the use with use of proper API&lt;br /&gt;
&lt;br /&gt;
====Instant cssPref on user preferences====&lt;br /&gt;
A reload is not needed anymore to apply cssPref on a user preference change.&lt;br /&gt;
&lt;br /&gt;
📌 Remove forceReload: true if it was only set to update the cssPref. The player will appreciate to not reload the whole page!&lt;br /&gt;
&lt;br /&gt;
===Game options===&lt;br /&gt;
&lt;br /&gt;
New functions to access the table options (game options) without hassle&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/Options_and_preferences:_gameoptions.json,_gamepreferences.json#Game_Options&lt;br /&gt;
&lt;br /&gt;
📌 &lt;br /&gt;
*Remove declaration of game options  from &amp;quot;&amp;lt;code&amp;gt;initGameStateLabels&amp;lt;/code&amp;gt;&amp;quot;&lt;br /&gt;
* Instead of using &amp;lt;code&amp;gt;$this-&amp;gt;getGameStateValue&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;table_globals&amp;lt;/code&amp;gt; use&lt;br /&gt;
 $this-&amp;gt;tableOptions-&amp;gt;get(int $optionId)&lt;br /&gt;
&lt;br /&gt;
This new object can also return the Real-time/Turn-based setting: https://en.doc.boardgamearena.com/Main_game_logic:_Game.php#Reflexion_time&lt;br /&gt;
&lt;br /&gt;
==Server parts (php, sql, etc)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===PHP migration===&lt;br /&gt;
&lt;br /&gt;
Oct 2025: The migration was made from PHP7.4 to PHP8.4 new syntax and functions.&lt;br /&gt;
&lt;br /&gt;
New projects are generated using the strict mode&lt;br /&gt;
&lt;br /&gt;
📌 &lt;br /&gt;
&lt;br /&gt;
*Replace all &amp;lt;code&amp;gt;self::&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;$this-&amp;gt;&amp;lt;/code&amp;gt;   - The new project template has been updated to remove this bad practice (that may be unsupported in a future PHP version)&lt;br /&gt;
&lt;br /&gt;
*Add &amp;lt;code&amp;gt;declare(strict_types=1);&amp;lt;/code&amp;gt; to all .php files and fix compiler warnings (if you use IDE it will detect it before upload).&lt;br /&gt;
&lt;br /&gt;
===Namespaced game class===&lt;br /&gt;
Game class from &#039;&#039;&#039;&#039;&#039;&amp;lt;gamename&amp;gt;.game.php&#039;&#039;&#039;&#039;&#039; are now namespaced (and moved to modules/php/Game.php) and can autoload other classes of the same namespace&lt;br /&gt;
&lt;br /&gt;
[[Main game logic: Game.php#Creating other classes]]&lt;br /&gt;
&lt;br /&gt;
📌 The class file should be moved to modules/php/Game.php and adopted&lt;br /&gt;
&lt;br /&gt;
(In examples below YourGameName is NOT verbatim its your game name)&lt;br /&gt;
&lt;br /&gt;
* Move YourGameName.game.php to modules/php (create this dir if does not exists)&lt;br /&gt;
* Rename to Game.php&lt;br /&gt;
* Find the place below the copyright and add&lt;br /&gt;
&lt;br /&gt;
      declare(strict_types=1);&lt;br /&gt;
      namespace Bga\Games\YourGameName;&lt;br /&gt;
&lt;br /&gt;
* Remove &lt;br /&gt;
  require_once APP_GAMEMODULE_PATH . &amp;quot;module/table/table.game.php&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
* Find you class declaration change YouGameName to Game (verbatim) and change extends&lt;br /&gt;
&lt;br /&gt;
   class Game extends \Bga\GameFramework\Table&lt;br /&gt;
&lt;br /&gt;
* All references to non-namespaced classes in this file should be defined on top of the file with &amp;quot;use&amp;quot;, for example &amp;quot;use \BgaUserException;&amp;quot; as it is this non-namespaced exception is used in the zombieTurn function.&lt;br /&gt;
&lt;br /&gt;
* All includes with relative path will need to be updated too.&lt;br /&gt;
&lt;br /&gt;
* The material.inc.php to have be moved and included directly (see below)&lt;br /&gt;
&lt;br /&gt;
Multiple functions of &amp;quot;Table&amp;quot; base class are now deprecated, see how to migrate in corresponding section&lt;br /&gt;
&lt;br /&gt;
* notifyAllPlayers&lt;br /&gt;
* notifyPlayer&lt;br /&gt;
* mysql_fetch_assoc&lt;br /&gt;
** Deprecation warning:  mysql_fetch_assoc function detected. It is deprecated, and may be removed someday. Please replace it by standard framework DB functions!&lt;br /&gt;
* Table (class access without namespace)&lt;br /&gt;
* isMutiactiveState (misspelled version)&lt;br /&gt;
* State management functions (getState, state, getPrivateState)&lt;br /&gt;
* Player information functions (getActivePlayerName, getCurrentPlayerName, getCurrentPlayerColor)&lt;br /&gt;
* Game mode functions (isAsync, isRealtime)&lt;br /&gt;
* Exception classes (feException, BgaUserException, etc.)&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
===Material===&lt;br /&gt;
Material file &#039;&#039;&#039;material.inc.php&#039;&#039;&#039; is now optional. You can define all your material directly in php class. If you still like to keep it, and using namespaced Game.php you have to move it to subfolder and include directly [[Game material description: material.inc.php#Move it to modules/php]]&lt;br /&gt;
&lt;br /&gt;
=== Autowire game actions===&lt;br /&gt;
Simplify the action calls by removing  &#039;&#039;&#039;&amp;lt;gamename&amp;gt;.action.php&#039;&#039;&#039;  file&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/Main_game_logic:_Game.php#Actions_%28autowired%29&lt;br /&gt;
&lt;br /&gt;
📌 Autowired actions needs to start with &amp;quot;act&amp;quot;, so it&#039;s risky to change them (if you change all actions names in the states.php, game, action and JS file, Real-time players will call the old name until they refresh. So, it needs to be done in two steps with duplicates on back side, or to be deployed when there is no Realt-time table running.&lt;br /&gt;
&lt;br /&gt;
When migration is done, the action.php file can be deleted.&lt;br /&gt;
&lt;br /&gt;
Deprecation warning: Actions detected on .action.php file. You can now use [[Main game logic: Game.php#Actions (autowired)|Auto-wired actions]] to avoid pass-through functions in .action.php file. If you transform your project to use only auto-wired actions, you can then delete the .action.php file.&lt;br /&gt;
&lt;br /&gt;
=== Notifications===&lt;br /&gt;
Functions notifyAllPlayers and notifyPlayer from main game.php are deprecated&lt;br /&gt;
&lt;br /&gt;
📌 Replace &amp;lt;code&amp;gt;$this-&amp;gt;notifyAllPlayers&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;all&amp;lt;/code&amp;gt; &lt;br /&gt;
and Replace &amp;lt;code&amp;gt;$this-&amp;gt;notifyPlayer&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;$this-&amp;gt;bga-&amp;gt;notify-&amp;gt;player&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Notification Decorators====&lt;br /&gt;
New notify function that handles decorators, reducing the duplicate code on notification args.&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/Main_game_logic:_Game.php#Notification_decorators&lt;br /&gt;
&lt;br /&gt;
====Notification args consistency====&lt;br /&gt;
Previously, when you sent an arg that was transformed by format_string_recursive or bgaFormatText, the args object was mutated and you got the transformed value in the notif_ handler.&lt;br /&gt;
&lt;br /&gt;
The solution was to send the values in 2 different names like this:&lt;br /&gt;
&lt;br /&gt;
 [&lt;br /&gt;
  &#039;roundNumber&#039; =&amp;gt; $roundNumber, // number, to update the round counter&lt;br /&gt;
  &#039;round_number&#039; =&amp;gt; $roundNumber, // number that will be transformed to string by bgaFormatText, when shown in bold in the logs&lt;br /&gt;
 ]&lt;br /&gt;
📌 Do not duplicate the value, as the notif_ handler will now get unmutated args&lt;br /&gt;
&lt;br /&gt;
===Deprecated getGameName===&lt;br /&gt;
The getGameName() function is now useless in the Game PHP file and can be deleted&lt;br /&gt;
&lt;br /&gt;
📌 Delete the getGameName function in the Game PHP file.&lt;br /&gt;
&lt;br /&gt;
Deprecation warning: getGameName function detected. It is deprecated. You can delete it, it is not used anymore&lt;br /&gt;
&lt;br /&gt;
===State Management Functions===&lt;br /&gt;
Several state-related functions have been deprecated in favor of more explicit methods:&lt;br /&gt;
&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;state()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;$this-&amp;gt;getCurrentMainState()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;$this-&amp;gt;getCurrentState(int $playerId)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;$this-&amp;gt;getState()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;$this-&amp;gt;getCurrentMainStateId()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;$this-&amp;gt;getCurrentStateId(int $playerId)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;$this-&amp;gt;getPrivateState($playerId)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;$this-&amp;gt;getCurrentState($playerId)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;$this-&amp;gt;gamestate-&amp;gt;states&amp;lt;/code&amp;gt; access with &amp;lt;code&amp;gt;$this-&amp;gt;getCurrentMainState()&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;$this-&amp;gt;getCurrentState(int $playerId)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;$this-&amp;gt;isMutiactiveState()&amp;lt;/code&amp;gt; (misspelled) with &amp;lt;code&amp;gt;$this-&amp;gt;isMultiactiveState()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Player Information Functions===&lt;br /&gt;
Several functions for getting player information are deprecated in favor of more flexible methods:&lt;br /&gt;
&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;$this-&amp;gt;getActivePlayerName()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;$this-&amp;gt;getPlayerNameById($activePlayerId)&amp;lt;/code&amp;gt; using $activePlayerId magic parameter&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;$this-&amp;gt;getCurrentPlayerName()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;$this-&amp;gt;getPlayerNameById($currentPlayerId)&amp;lt;/code&amp;gt; using $currentPlayerId magic parameter&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;$this-&amp;gt;getCurrentPlayerColor()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;$this-&amp;gt;getPlayerColorById($currentPlayerId)&amp;lt;/code&amp;gt; using $currentPlayerId magic parameter&lt;br /&gt;
&lt;br /&gt;
===Game Mode Functions===&lt;br /&gt;
Functions to check game mode (turn-based vs real-time) have been moved to tableOptions:&lt;br /&gt;
&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;$this-&amp;gt;isAsync()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;$this-&amp;gt;tableOptions-&amp;gt;isTurnBased()&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;$this-&amp;gt;isRealtime()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;$this-&amp;gt;tableOptions-&amp;gt;isRealTime()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Exception Classes===&lt;br /&gt;
Old exception classes are deprecated in favor of namespaced versions:&lt;br /&gt;
&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;feException&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;\Bga\GameFramework\UserException&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;\Bga\GameFramework\SystemException&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;\Bga\GameFramework\VisibleSystemException&amp;lt;/code&amp;gt; depending on your need&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;BgaUserException&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;\Bga\GameFramework\UserException&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;BgaSystemException&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;\Bga\GameFramework\SystemException&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;BgaVisibleSystemException&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;\Bga\GameFramework\VisibleSystemException&amp;lt;/code&amp;gt;&lt;br /&gt;
* Remove usage of &amp;lt;code&amp;gt;FEX_NOCODE&amp;lt;/code&amp;gt; constant - new exception classes don&#039;t need error codes&lt;br /&gt;
&lt;br /&gt;
===Namespace for Base Classes===&lt;br /&gt;
Old class references without namespaces are deprecated:&lt;br /&gt;
&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;extends Table&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;extends \Bga\GameFramework\Table&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;Deck&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;\Bga\GameFramework\Components\Deck&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Deprecated APP_* Classes ===&lt;br /&gt;
Deprecation warning:&lt;br /&gt;
&lt;br /&gt;
Reference to old APP_* class detected.&lt;br /&gt;
&lt;br /&gt;
We recommend you to use composition instead of extend:&lt;br /&gt;
&lt;br /&gt;
Pass `private Game $game` in the constructor of your object that need to access Table functions&lt;br /&gt;
&lt;br /&gt;
If it&#039;s too complicated, at least replace APP_Object/APP_GameClass by APP_DbObject as APP_Object/APP_GameClass may be removed soon and don&#039;t contain anything more than APP_DbObject.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t hesitate to ask for help in the Dev Discord or in the Dev forum if you don&#039;t know how to do it!&lt;br /&gt;
 class Tokens extends APP_GameClass {  &lt;br /&gt;
becomes:&lt;br /&gt;
 class Tokens extends \APP_DbObject { &lt;br /&gt;
&lt;br /&gt;
=== Deprecated translation functions ===&lt;br /&gt;
&lt;br /&gt;
On php side translation story is simplified&lt;br /&gt;
&lt;br /&gt;
* totranslate function is not longer needed and can be replaced with clienttranslate&lt;br /&gt;
* $this-&amp;gt;_() (or self::_()) can also be replaced with clienttranslate when use for non parameterized strings (but not in deprecated &amp;lt;game&amp;gt;.view.php file):&lt;br /&gt;
&lt;br /&gt;
  throw new UserException(clienttranslate(&#039;You must choose 3 cards&#039;));&lt;br /&gt;
&lt;br /&gt;
UserException is also handling parameterized strings like the notify functions.&lt;br /&gt;
&lt;br /&gt;
All parameterized strings on PHP side have to use either the notify or the UserException formatting. If some parameterized strings are none of these, you have to remove them from PHP and rewrote them in JavaScript using dojo.string.substitute.&lt;br /&gt;
&lt;br /&gt;
See [[Translations]]&lt;br /&gt;
&lt;br /&gt;
=== Deprecated getNew ===&lt;br /&gt;
Function getNew that was only used to create new deck object is now deprecated, use $this-&amp;gt;deckFactory-&amp;gt;createDeck(&#039;&#039;) instead&lt;br /&gt;
&lt;br /&gt;
=== Stats ===&lt;br /&gt;
&lt;br /&gt;
The stats function such as initStat, setStat and getStat are also deprecated in favor of access via the objects &amp;lt;code&amp;gt;$this-&amp;gt;tableStats and $this-&amp;gt;playerStats&amp;lt;/code&amp;gt;&lt;br /&gt;
See https://en.doc.boardgamearena.com/index.php?title=Main_game_logic:_Game.php#Game_statistics&lt;br /&gt;
&lt;br /&gt;
===Legacy===&lt;br /&gt;
New object to access the legacy functions, removing the need to manually decode the JSON result when getting the values.&lt;br /&gt;
&lt;br /&gt;
[[Main game logic: Game.php#Legacy games API|https://en.doc.boardgamearena.com/Main_game_logic:_Game.php#Legacy_games_API]]&lt;br /&gt;
&lt;br /&gt;
📌 Use $this-&amp;gt;legacy-&amp;gt;actionname instead of $this-&amp;gt;actionnameLegacy and remove JSON decoding on getters&lt;br /&gt;
&lt;br /&gt;
===Any Globals===&lt;br /&gt;
New database table and API to handle any type variables instead of numerical values only&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/Main_game_logic:_Game.php#Use_globals&lt;br /&gt;
&lt;br /&gt;
📌 If you had custom tables just for that you can drop them and use standard table&lt;br /&gt;
&lt;br /&gt;
=== Server Counters ===&lt;br /&gt;
2 new counter classes have been added to easily handle the various counters your game might have. You also have 2 prebuilt counters: playerScore and playerScoreAux, to handle the scoring values, so you don&#039;t need to update manually the DB when setting the scores.&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/PlayerCounter_and_TableCounter&lt;br /&gt;
&lt;br /&gt;
📌 Replace setting player_score/player_score_aux using db queries with use of $this-&amp;gt;playerScore and $this-&amp;gt;playerScoreAux. Remove the notifications, or part of notifications, updating the player panel score counter (if you had some custom notification you may still need them).&lt;br /&gt;
===Updated Zombie Mode documentation and recommendations===&lt;br /&gt;
We now recommend making the zombie player playing randomly, instead of passing as a default. A new &amp;quot;Zombie Mode level&amp;quot; field has been added to the Game Metadata Manager, to indicated the Zombie Mode you implemented in your game.&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/Zombie_Mode&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===View and template files: deprecated===&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;&amp;lt;gamename&amp;gt;.view.php, &amp;lt;gamename&amp;gt;_&amp;lt;gamename&amp;gt;.tpl&#039;&#039;&#039;&#039;&#039; are now optional and are not generated anymore on a new project. The new project templates demonstrate how to work without them.&lt;br /&gt;
&lt;br /&gt;
📌 The DOM should be built on the JS side to remove the view/template files, so it can be complicated for old projects using them intensively. It would look like this:&lt;br /&gt;
 this.getGameAreaElement().insertAdjacentHTML(&#039;beforeend&#039;, `&lt;br /&gt;
   &amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt;${_(&#039;My translated text&#039;)}&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;div id=&amp;quot;player-tables&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 `);&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
See more in [[#Access template elements]]&lt;br /&gt;
&lt;br /&gt;
====Forbid access to global BGA variables and direct DB access on action/view files====&lt;br /&gt;
If you did not remove action and view files, you cannot longer use some stuff in them, such $g_user global and db access functions.&lt;br /&gt;
&lt;br /&gt;
A new getCurrentPlayerId() function has been added to those action/view classes for easier migration&lt;br /&gt;
&lt;br /&gt;
📌 Replace $g_user-&amp;gt;get_id() by $this-&amp;gt; getCurrentPlayerId()&lt;br /&gt;
&lt;br /&gt;
Replace DB calls by $this-&amp;gt;game-&amp;gt;DbQuery() (and such...)&lt;br /&gt;
&lt;br /&gt;
===States===&lt;br /&gt;
There is now a way to describe each game state in a State class, that will handle all logic and description of the state. It helps splitting the code into multiple files, instead of one big Game.php file.&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/State_classes:_State_directory&lt;br /&gt;
&lt;br /&gt;
📌 Create a State class for each state of the game (except 1 and 99 if they are still described in states.inc.php), move the state definition in it, and adapt the &amp;quot;st&amp;quot;, &amp;quot;arg&amp;quot;, &amp;quot;actXXX&amp;quot; and &amp;quot;zombie&amp;quot; functions in the class. When all classes are migrated, you can remove the states.inc.php file in the FTP folder.&lt;br /&gt;
&lt;br /&gt;
==== If still using states.php====&lt;br /&gt;
The new class GameStateBuilder helps you build the state machine, allowing auto-completion, and avoid typo errors on state types. Complete example: 📌 https://en.doc.boardgamearena.com/Your_game_state_machine:_states.inc.php&lt;br /&gt;
&lt;br /&gt;
States 1 and 99, that must not be changed, are now optional.&lt;br /&gt;
&lt;br /&gt;
📌 Replace the array definition by GameStateBuilder use. You can remove the declaration of states 1 and 99.&lt;br /&gt;
&lt;br /&gt;
Note: it&#039;s only useful if you don&#039;t migrate to State classes described above&lt;br /&gt;
&lt;br /&gt;
==Client parts (js, html, css) ==&lt;br /&gt;
===Main class===&lt;br /&gt;
File is moved from yourgamename.js to modules/js/Game.js and has a different structure&lt;br /&gt;
https://en.doc.boardgamearena.com/Game_interface_logic:_Game.js&lt;br /&gt;
It won&#039;t be easy to convert this, maybe best just to use old one which still works, but move when you write a new game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Deprecated ajaxcall ===&lt;br /&gt;
Introduced function bgaPerformAction to replace ajaxcall and checkAction combination, with a simpler syntax:&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/Game_interface_logic:_Game.js#Actions&lt;br /&gt;
&lt;br /&gt;
Deprecation warning: The &amp;lt;code&amp;gt;ajaxcall&amp;lt;/code&amp;gt;  function is deprecated, check [[/en.doc.boardgamearena.com/Game interface logic: yourgamename.js#Actions|the]] &amp;lt;code&amp;gt;bgaPerformAction&amp;lt;/code&amp;gt; [[/en.doc.boardgamearena.com/Game interface logic: yourgamename.js#Actions|function]].&lt;br /&gt;
&lt;br /&gt;
📌 Replace combination of checkAction/ajaxcall by bgaPerformAction. Beware of the options (3rd param) if it was an ajaxcall without checkAction.&lt;br /&gt;
&lt;br /&gt;
===New this.bga.* API Structure===&lt;br /&gt;
Many client-side functions have been reorganized into namespaced objects under &amp;lt;code&amp;gt;this.bga&amp;lt;/code&amp;gt; for better organization and discoverability:&lt;br /&gt;
&lt;br /&gt;
====Player Functions (this.bga.players)====&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.isSpectator&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.players.isCurrentPlayerSpectator()&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.isCurrentPlayerActive()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.players.isCurrentPlayerActive()&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.isPlayerActive(player_id)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.players.isPlayerActive(player_id)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.getActivePlayers()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.players.getActivePlayerIds()&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.getActivePlayerId()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.players.getActivePlayerId()&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.getFormattedPlayerName(...)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.players.getFormattedPlayerName(...)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.addAutomataPlayerPanel(...)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.players.addAutomataPlayerPanel(...)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====State Functions (this.bga.states)====&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.on_client_state&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.states.isOnClientState()&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.setClientState(stateName, args)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.states.setClientState(stateName, args)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.restoreServerGameState()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.states.restoreServerGameState()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Status Bar Functions (this.bga.statusBar)====&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.updatePageTitle()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.statusBar.setTitle(title, args)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.removeActionButtons()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.statusBar.removeActionButtons()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Action Functions (this.bga.actions)====&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.checkAction(action, nomessage)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.actions.checkAction(action, nomessage)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.checkPossibleActions(action)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.actions.checkPossibleActions(action)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.bgaPerformAction(...)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.actions.performAction(...)&amp;lt;/code&amp;gt; - Note: catch result is now &amp;lt;code&amp;gt;{ message, args }&amp;lt;/code&amp;gt; instead of just &amp;lt;code&amp;gt;message&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Dialog Functions (this.bga.dialogs)====&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.showMoveUnauthorized()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.dialogs.showMoveUnauthorized()&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.showMessage(msg, type)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.dialogs.showMessage(msg, type)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.confirmationDialog(text, callback, callback_cancel)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.dialogs.confirmation(text)&amp;lt;/code&amp;gt; - Note: now returns a Promise instead of using callbacks&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.multipleChoiceDialog(text, choices, callback)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.dialogs.multipleChoice(text, choices)&amp;lt;/code&amp;gt; - Note: now returns a Promise instead of using callbacks&lt;br /&gt;
&lt;br /&gt;
====Image Functions (this.bga.images)====&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.dontPreloadImage(image)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.images.dontPreloadImage(image)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;this.bga.images.dontPreloadImages([...])&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.ensureSpecificGameImageLoading(imagelist)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.images.preloadImage(image)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;this.bga.images.preloadImages([...])&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Game Area Functions (this.bga.gameArea)====&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.getGameAreaElement()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.gameArea.getElement()&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.addLastTurnBanner(message, args)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.gameArea.addLastTurnBanner(message, args)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.removeLastTurnBanner()&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.gameArea.removeLastTurnBanner()&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.addWinConditionBanner(message, args)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.gameArea.addWinConditionBanner(message, args)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Player Panel Functions (this.bga.playerPanels)====&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.getPlayerPanelElement(playerId)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.playerPanels.getElement(playerId)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.scoreCtrl[player_id]&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.playerPanels.getScoreCounter(player_id)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====User Preferences (this.bga.userPreferences)====&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.getGameUserPreference(pref_id)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.userPreferences.get(pref_id)&amp;lt;/code&amp;gt;&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.setGameUserPreference(pref_id, value)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.userPreferences.set(pref_id, value)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Notification Functions (this.bga.notifications)====&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.bgaSetupPromiseNotifications(...)&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.notifications.setupPromiseNotifications(...)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Animation Functions (this.bga.gameui)====&lt;br /&gt;
📌&lt;br /&gt;
* Replace &amp;lt;code&amp;gt;this.instantaneousMode&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;this.bga.gameui.bgaAnimationsActive()&amp;lt;/code&amp;gt; - Note: logic is reversed (instantaneousMode was true when animations should be skipped, bgaAnimationsActive() returns true when animations should play)&lt;br /&gt;
&lt;br /&gt;
===Access to DOM elements ===&lt;br /&gt;
New functions getPlayerPanelElement(player_id) and this.getGameAreaElement()&lt;br /&gt;
&lt;br /&gt;
Note: These functions are now deprecated in favor of &amp;lt;code&amp;gt;this.bga.playerPanels.getElement(playerId)&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;this.bga.gameArea.getElement()&amp;lt;/code&amp;gt;. See [[#New this.bga.* API Structure]] above.&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/Game_interface_logic:_Game.js#Adding_stuff_to_player%27s_panel&lt;br /&gt;
&lt;br /&gt;
📌 Code like dojo.place(html, player_board_${player.id}); would be replaced by this.bga.gameArea.getElement().insertAdjacentHTML(&#039;beforeend&#039;, html);&lt;br /&gt;
===Notification setup===&lt;br /&gt;
Notifications can now be automatically scanned and called without needing to register them one by one. They&#039;ll handle Promises, so they end synchronously when the Promise resolves.&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;bgaSetupPromiseNotifications&amp;lt;/code&amp;gt; is now deprecated in favor of &amp;lt;code&amp;gt;this.bga.notifications.setupPromiseNotifications&amp;lt;/code&amp;gt;. See [[#New this.bga.* API Structure]] above.&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/Game_interface_logic:_Game.js#Notifications&lt;br /&gt;
&lt;br /&gt;
A wait function has been added to return a Promise when a delay is passed (compatible with fast-replay mode)&lt;br /&gt;
&lt;br /&gt;
A new utility function has been added to support Promises for old Dojo animations&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/Game_interface_logic:_Game.js#Animation_Callbacks&lt;br /&gt;
&lt;br /&gt;
📌 Dojo.subscribe calls in setupNotifications must be removed if using promise-based notification setup. Notif_ function should be async and return a Promise, make sure they wait for the expected amount of time if the sync setup was using a numerical duration&lt;br /&gt;
&lt;br /&gt;
If you used Dojo animation, make them Promise compatible with &amp;quot;await this.bgaPlayDojoAnimation(dojoAnim);&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Status bar manipulation===&lt;br /&gt;
Function to change the title from the JS&lt;br /&gt;
&lt;br /&gt;
Note: &amp;lt;code&amp;gt;this.statusBar.*&amp;lt;/code&amp;gt; methods are now available via &amp;lt;code&amp;gt;this.bga.statusBar.*&amp;lt;/code&amp;gt; for consistency. See [[#New this.bga.* API Structure]] above.&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/Game_interface_logic:_yourgamename.js#Title_bar&lt;br /&gt;
&lt;br /&gt;
📌 Replace direct title div manipulation with this.bga.statusBar.setTitle(title: string, args?: object), and benefit from replacement of ${actplayer}/${you}/... (see example in the link above).&lt;br /&gt;
&lt;br /&gt;
This also includes a new function to create action buttons, that are more screen-reader compatible than the previous version. The new button parameters also allow you to set a confirm popin or an autoclick for confirmation buttons&lt;br /&gt;
&lt;br /&gt;
📌 Replace this.addActionButton by this.bga.statusBar.addActionButton. Notice the parameters have changed, so they need to be adapted too! Remove manual setActionTimer or manual confirm with the new parameters.&lt;br /&gt;
&lt;br /&gt;
===Dojo usage===&lt;br /&gt;
Dojo usage has been reduced to minimum in the new project template and the doc, as native JS is now able to do almost the same things, with better performance and more knowledge for newcomers of the native (vanilla) JS.&lt;br /&gt;
&lt;br /&gt;
📌 Replace dojo by vanilla JS where possible&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Dojo API &lt;br /&gt;
! Category&lt;br /&gt;
! Description&lt;br /&gt;
! Vanilla JS Replacement&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.byId(&amp;quot;id&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| DOM Selection&lt;br /&gt;
| Selects a single DOM element by its ID.&lt;br /&gt;
| &amp;lt;code&amp;gt;document.getElementById(&amp;quot;id&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.query(&amp;quot;selector&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| DOM Selection&lt;br /&gt;
| Selects a collection of DOM elements using CSS selectors.&lt;br /&gt;
| &amp;lt;code&amp;gt;document.querySelectorAll(&amp;quot;selector&amp;quot;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;document.querySelector(&amp;quot;selector&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.connect(node, &amp;quot;onclick&amp;quot;, fn)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Event Handling&lt;br /&gt;
| Connects an event handler to a DOM element.&lt;br /&gt;
| &amp;lt;code&amp;gt;node.addEventListener(&amp;quot;click&amp;quot;, fn)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.disconnect(handle)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Event Handling&lt;br /&gt;
| Removes an event handler created with &amp;lt;code&amp;gt;dojo.connect&amp;lt;/code&amp;gt;.&lt;br /&gt;
| &amp;lt;code&amp;gt;handle.remove()&amp;lt;/code&amp;gt; for event listeners, or &amp;lt;code&amp;gt;node.removeEventListener(&amp;quot;click&amp;quot;, fn)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.stopEvent(evt)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Event Handling&lt;br /&gt;
| Prevents propagation and default action for an event.&lt;br /&gt;
| &amp;lt;code&amp;gt;evt.preventDefault(); evt.stopPropagation();&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.place(node, parent, &amp;quot;last&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| DOM Manipulation&lt;br /&gt;
| Places a DOM node inside a parent node at a specific position.&lt;br /&gt;
| &amp;lt;code&amp;gt;parent.appendChild(node)&amp;lt;/code&amp;gt;, when using raw html &amp;lt;code&amp;gt;parent.insertAdjacentHTML(&#039;beforeend&#039;, html)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.create(&amp;quot;tag&amp;quot;, props, parent)&amp;lt;/code&amp;gt;&lt;br /&gt;
| DOM Manipulation&lt;br /&gt;
| Creates a new DOM element with optional properties.&lt;br /&gt;
| &amp;lt;code&amp;gt;document.createElement(&amp;quot;tag&amp;quot;)&amp;lt;/code&amp;gt;, then set properties and use &amp;lt;code&amp;gt;parent.appendChild()&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.style(node, &amp;quot;color&amp;quot;, &amp;quot;red&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Styling&lt;br /&gt;
| Sets an inline CSS property on a DOM node. &amp;lt;b&amp;gt;CAUTION:&amp;lt;/b&amp;gt; &amp;lt;code&amp;gt;dojo.style(node, &amp;quot;left&amp;quot;)&amp;lt;/code&amp;gt; (and &amp;quot;right&amp;quot;, &amp;quot;width&amp;quot;, etc) return lengths in pixels as numbers, not the set CSS style.&lt;br /&gt;
| &amp;lt;code&amp;gt;node.style.color = &amp;quot;red&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.hasClass(node, &amp;quot;className&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Styling&lt;br /&gt;
| Checks if a DOM node has a specific CSS class.&lt;br /&gt;
| &amp;lt;code&amp;gt;node.classList.contains(&amp;quot;className&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.addClass(node, &amp;quot;className&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Styling&lt;br /&gt;
| Adds a CSS class to a DOM node.&lt;br /&gt;
| &amp;lt;code&amp;gt;node.classList.add(&amp;quot;className&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.removeClass(node, &amp;quot;className&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Styling&lt;br /&gt;
| Removes a CSS class from a DOM node.&lt;br /&gt;
| &amp;lt;code&amp;gt;node.classList.remove(&amp;quot;className&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.forEach(array, fn)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Array Utilities&lt;br /&gt;
| Iterates over an array.&lt;br /&gt;
| &amp;lt;code&amp;gt;array.forEach(fn)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.map(array, fn)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Array Utilities&lt;br /&gt;
| Transforms an array by applying a function to each element.&lt;br /&gt;
| &amp;lt;code&amp;gt;array.map(fn)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.fadeOut, dojo.fadeIn&amp;lt;/code&amp;gt;&lt;br /&gt;
| Animations&lt;br /&gt;
| Various animations&lt;br /&gt;
| Use https://en.doc.boardgamearena.com/BgaAnimations or CSS animations&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;dojo.hitch(this, &amp;quot;functionName&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Variable scoping&lt;br /&gt;
| Binds &amp;lt;code&amp;gt;this&amp;lt;/code&amp;gt; (or other variable) in a callback&lt;br /&gt;
| &amp;lt;code&amp;gt;functionName.bind(this)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;dojo.destroy(node)&amp;lt;/code&amp;gt;&lt;br /&gt;
|DOM Manipulation&lt;br /&gt;
|Destroys a DOM element&lt;br /&gt;
|&amp;lt;code&amp;gt;node.remove()&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;dojo.indexof(array,value)&amp;lt;/code&amp;gt;&lt;br /&gt;
|Array Utilities&lt;br /&gt;
|index of the item in the array,&lt;br /&gt;
|&amp;lt;code&amp;gt;array.indexof(value) or array.indexof(test)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;dojo.string.substitute&amp;lt;/code&amp;gt;&lt;br /&gt;
|String Utilities&lt;br /&gt;
|template substitution&lt;br /&gt;
|&amp;lt;code&amp;gt;Use JS template strings, i.e. `&amp;lt;div id=${id}&amp;gt;&amp;lt;/div&amp;gt;`. Note: not suitable for translations if variables are used inside&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Sound loading===&lt;br /&gt;
New functions load/play have been added for the sounds:&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/Game_interface_logic:_yourgamename.js#Sounds&lt;br /&gt;
&lt;br /&gt;
📌 Replace template loading of sounds and global function playSound&lt;br /&gt;
&lt;br /&gt;
===Formatting of log message using bgaFormatText===&lt;br /&gt;
This function, if defined, will allow you to insert HTML in the logs without overriding format_string_recursive. Example: 📌https://en.doc.boardgamearena.com/BGA_Studio_Cookbook#Define_this.bgaFormatText%28%29_method&lt;br /&gt;
&lt;br /&gt;
📌 Replace the override of format_string_recursive by bgaFormatText (the last line will change)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Automata player panel===&lt;br /&gt;
A new framework function to add a player panel for your game automas https://en.doc.boardgamearena.com/Game_interface_logic:_yourgamename.js#Adding_a_player_panel_for_an_automata&lt;br /&gt;
&lt;br /&gt;
📌 Replace manually created automata player panel with this new function&lt;br /&gt;
&lt;br /&gt;
===New JS libraries===&lt;br /&gt;
New JS libraries are created to help you design your games, especially for components that you will find on numerous games. See [[Studio#BGA Studio game components reference]]&lt;br /&gt;
&lt;br /&gt;
📌 Replace manually created animation, stocks, etc with components (check the link above, don&#039;t want to duplicate it here)&lt;br /&gt;
&lt;br /&gt;
===CSS imports===&lt;br /&gt;
Default BGA imports are auto-included, if you find this code and comment in .css you can delete it&lt;br /&gt;
  @import url(../../../css/csslayer.css);&lt;br /&gt;
  /* Note: you must not use any @import directive other than this one */&lt;br /&gt;
&lt;br /&gt;
===Future support of dark mode===&lt;br /&gt;
BGA doesn&#039;t support dark mode yet. To have some games compatible when we do, we added a theme data tag you can use as described here:&lt;br /&gt;
&lt;br /&gt;
https://en.doc.boardgamearena.com/Game_interface_stylesheet:_yourgamename.css#Support_of_the_Dark_mode&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_stoneage&amp;diff=28306</id>
		<title>Bugsclarification stoneage</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_stoneage&amp;diff=28306"/>
		<updated>2026-01-29T21:30:13Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: Add a link on a report on the website.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please do not report if your bug match one of the followings.&lt;br /&gt;
&lt;br /&gt;
A frequent &amp;quot;won’t fix&amp;quot;: sometimes you are not notified of a game update because of a lost message over the Internet. It can results in wrong situation display and in not being notified that it is your turn to play. These is linked to BGA framework and will not be fixed at the Stone Age code level. Please upvote this BGA website [https://boardgamearena.com/bug?id=201639 report].&lt;br /&gt;
&lt;br /&gt;
Here is a list of frequent &amp;quot;not a bug&amp;quot; reports: the user was just not knowing the actual rule.&lt;br /&gt;
* Can not put a worker at x place: check the placement limitation rules for two or three players game (and even four players if you are using the trade expansion).&lt;br /&gt;
* Did not get the two (might be one with the trade expansion) wild resources of the civilization card: you got it on your player board, you have to click on the wild resource icon to choose them.&lt;br /&gt;
* Did not get the free wood/clay/stone of the bought hut (new huts expansion): the free resource is not granted at buy but at start of each following turns.&lt;br /&gt;
* Could not insulate bought hut (harsh winter variant): only huts of the standard game and costing three defined resources (not wild resources) can be insulated.&lt;br /&gt;
* Can not trade to buy an igloo: trade is allowed to buy a hut or a card, igloos are not huts nor cards.&lt;br /&gt;
* Can not trade to buy hut or card, different normal causes here:&lt;br /&gt;
** you can trade only one time per game turn (a game turn ends when all workers have been removed from playing area),&lt;br /&gt;
** the 2:1, 1:1 or 1:2 trade indicator (depending on your trade level) is not a trade rate, but a trade possibility: for instance for the 1:1, you can trade one resource and only one against another one, you can not trade two or more against the same number,&lt;br /&gt;
** you can not trade one resource against itself, even at trade level 9 or 10 (1:2 trade possibility: you can not trade one wood against one wood and one stone for instance).&lt;br /&gt;
* Did not get the second resource in my 1:2 trade: all resources gain in a trade are used in the linked buy, even if not needed for it, and it does not add points and can not be used to insulate or pay an extra gold in harsh winter variant.&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_stoneage&amp;diff=28305</id>
		<title>Bugsclarification stoneage</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_stoneage&amp;diff=28305"/>
		<updated>2026-01-29T21:24:38Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please do not report if your bug match one of the followings.&lt;br /&gt;
&lt;br /&gt;
A frequent &amp;quot;won’t fix&amp;quot;: sometimes you are not notified of a game update because of a lost message over the Internet. It can results in wrong situation display and in not being notified that it is your turn to play. These is linked to BGA framework and will not be fixed at the Stone Age code level.&lt;br /&gt;
&lt;br /&gt;
Here is a list of frequent &amp;quot;not a bug&amp;quot; reports: the user was just not knowing the actual rule.&lt;br /&gt;
* Can not put a worker at x place: check the placement limitation rules for two or three players game (and even four players if you are using the trade expansion).&lt;br /&gt;
* Did not get the two (might be one with the trade expansion) wild resources of the civilization card: you got it on your player board, you have to click on the wild resource icon to choose them.&lt;br /&gt;
* Did not get the free wood/clay/stone of the bought hut (new huts expansion): the free resource is not granted at buy but at start of each following turns.&lt;br /&gt;
* Could not insulate bought hut (harsh winter variant): only huts of the standard game and costing three defined resources (not wild resources) can be insulated.&lt;br /&gt;
* Can not trade to buy an igloo: trade is allowed to buy a hut or a card, igloos are not huts nor cards.&lt;br /&gt;
* Can not trade to buy hut or card, different normal causes here:&lt;br /&gt;
** you can trade only one time per game turn (a game turn ends when all workers have been removed from playing area),&lt;br /&gt;
** the 2:1, 1:1 or 1:2 trade indicator (depending on your trade level) is not a trade rate, but a trade possibility: for instance for the 1:1, you can trade one resource and only one against another one, you can not trade two or more against the same number,&lt;br /&gt;
** you can not trade one resource against itself, even at trade level 9 or 10 (1:2 trade possibility: you can not trade one wood against one wood and one stone for instance).&lt;br /&gt;
* Did not get the second resource in my 1:2 trade: all resources gain in a trade are used in the linked buy, even if not needed for it, and it does not add points and can not be used to insulate or pay an extra gold in harsh winter variant.&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_stoneage&amp;diff=27880</id>
		<title>Bugsclarification stoneage</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Bugsclarification_stoneage&amp;diff=27880"/>
		<updated>2025-12-28T20:01:38Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: Page creation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a list of frequent &amp;quot;not a bug&amp;quot; reports, where the bug is in fact on the user side: the user was just not knowing the actual rule.&lt;br /&gt;
* Can not put a worker at x place: check the placement limitation rules for two or three players game (and even four players if you are using the trade expansion).&lt;br /&gt;
* Did not get the two (might be one with the trade expansion) wild resources of the civilization card: you got it on your player board, you have to click on the wild resource icon to choose them.&lt;br /&gt;
* Did not get the free wood/clay/stone of the bought hut (new huts expansion): the free resource is not granted at buy but at start of each following turns.&lt;br /&gt;
* Could not insulate bought hut (harsh winter variant): only huts of the standard game and costing three defined resources (not wild resources) can be insulated.&lt;br /&gt;
* Can not trade to buy an igloo: trade is allowed to buy a hut or a card, igloos are not huts nor cards.&lt;br /&gt;
* Can not trade to buy hut or card, different normal causes here:&lt;br /&gt;
** you can trade only one time per game turn (a game turn ends when all workers have been removed from playing area),&lt;br /&gt;
** the 2:1, 1:1 or 1:2 trade indicator (depending on your trade level) is not a trade rate, but a trade possibility: for instance for the 1:1, you can trade one resource and only one against another one, you can not trade two or more against the same number,&lt;br /&gt;
** you can not trade one resource against itself, even at trade level 9 or 10 (1:2 trade possibility: you can not trade one wood against one wood and one stone for instance).&lt;br /&gt;
* Did not get the second resource in my 1:2 trade: all resources gain in a trade are used in the linked buy, even if not needed for it, and it does not add points and can not be used to insulate or pay an extra gold in harsh winter variant.&lt;br /&gt;
&lt;br /&gt;
Also a frequent &amp;quot;won’t fix&amp;quot;: sometimes you are not notified of a game update because of a lost message over the Internet. It can results in wrong situation display and in not being notified that it is your turn to play. These is linked to BGA framework and will not be fixed at the Stone Age code level (it could but it would be excessively complicated and unstable toward BGA framework changes).&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpstoneage&amp;diff=8217</id>
		<title>Gamehelpstoneage</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpstoneage&amp;diff=8217"/>
		<updated>2021-05-09T14:32:35Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: Describe more precisely the rules for trading (see https://boardgamearena.com/bug?id=35396).&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
Gain the most Victory Points by the end of the game. &lt;br /&gt;
&lt;br /&gt;
There are two ways to gain points:&lt;br /&gt;
&lt;br /&gt;
* Acquiring buildings during the game for either a fixed or variable amount&lt;br /&gt;
* Acquiring Civilization cards during the game that give extra points at the end of the game&lt;br /&gt;
&lt;br /&gt;
== Rules summary ==&lt;br /&gt;
&lt;br /&gt;
Each round is divided into 3 phases, which are executed in the order described:&lt;br /&gt;
* The players take turns placing their people on the game board.&lt;br /&gt;
* The players use the actions of their placed people all at once in turn order.&lt;br /&gt;
* The players feed their people.&lt;br /&gt;
&lt;br /&gt;
== Phase 1: ==&lt;br /&gt;
===Place People on the Board===&lt;br /&gt;
&lt;br /&gt;
In turn order, one area at a time, players place one or more of their people in the different areas of the board. Each &amp;quot;ring&amp;quot; in each area of the board can only be occupied by one person. The exception to this rule is the hunting ground which can be occupied by as many people of any color every turn.&lt;br /&gt;
&lt;br /&gt;
====Special Considerations When Playing With Fewer Than 4 Players====&lt;br /&gt;
&lt;br /&gt;
When playing with &#039;&#039;&#039;2 or 3 players&#039;&#039;&#039;: Of the non-resource areas (Tool Maker, Hut and Field) only two may be occupied per turn. The third place remains empty until the next round. &lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;&#039;3 players&#039;&#039;&#039;: Of the resource areas (Forest, Clay Pit, Quarry and River) only 2 players may place people in each round, even if there are additional spaces for additional people.&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;&#039;2 players&#039;&#039;&#039;: Of the resource areas (Forest, Clay Pit, Quarry and River) only 1 player may place people in each round, even if there are additional spaces for additional people.&lt;br /&gt;
&lt;br /&gt;
All remaining rules remain unchanged when playing with fewer than 4 players.&lt;br /&gt;
&lt;br /&gt;
== Phase 2: ==&lt;br /&gt;
===Use the Actions of Your Placed People===&lt;br /&gt;
&lt;br /&gt;
In turn order each player uses all of his placed people in any order. During this phase, the following actions may be used:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Hunting Grounds (Food), Forest (Wood), Clay Pit (Brick), Quarry (Stone), and River (Gold)&#039;&#039;&#039;: Roll 1 dice per person placed and acquire resources according to the number rolled (1 Food for each full 2 on Hunting Grounds, 1 Wood for each full 3 on Forest, 1 Brick for each full 4 on Clay Pit, 1 Stone for each full 5 on Quarry, 1 Gold for each full 6 on River).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Field&#039;&#039;&#039;: Placing a person in the Field increases your Agriculture Level. Each turn during the Feeding Phase, your Agriculture Level is subtracted from the amount of people you have. A higher agriculture level allows you to more easily sustain your population.  You may have a maximum agriculture level of 10.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Tool Maker&#039;&#039;&#039;: Placing a person on the Tool Maker adds one new Tool to your player board. You only have 3 tools on your player board, and each subsequent person placed on the Tool Maker upgrades one of your tools to the next level. You have a maximum of 3 level 4 tools.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Hut&#039;&#039;&#039;: Place two People on the Hut to gain an extra Person to place (and feed) for the rest of the game.  You may have a maximum of 10 people.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Building Card&#039;&#039;&#039;: Buy the building with the resources shown on the Building Card, scoring the point value shown in the top-left corner (A question mark in the top-left corner is explained below).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Civilization Card&#039;&#039;&#039;: Buy the card with a number of resources (of any kind) depending on its position in the Civilization Card Track (1 to 4 resources depicted above the card). The immediate effect of the card is applied when purchase. The bottom half of Civilization Card is used for scoring at the end of the game.&lt;br /&gt;
&lt;br /&gt;
===Resources===&lt;br /&gt;
&lt;br /&gt;
Hunting Grounds, Forest, Clay Pit, Quarry, and River:&lt;br /&gt;
Roll 1 dice per Person placed in that area and take the corresponding resources:&lt;br /&gt;
&lt;br /&gt;
* 1 Food for each full 2 on Hunting Grounds,&lt;br /&gt;
* 1 Wood for each full 3 on Forest,&lt;br /&gt;
* 1 Brick for each full 4 on Clay Pit,&lt;br /&gt;
* 1 Stone for each full 5 on Quarry,&lt;br /&gt;
* 1 Gold for each full 6 on River.&lt;br /&gt;
&lt;br /&gt;
You may use tools to increase the dice result and take more resources.  Each of your tool must be used all at once, and can be used once per turn.  Some cards give you single-use tools which are lost after they are used, and don&#039;t count for final scoring.&lt;br /&gt;
&lt;br /&gt;
===Buildings===&lt;br /&gt;
&lt;br /&gt;
Pay the building cost to get the Building and receive the Point Value listed in the top-left corner of the card.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;If the building cost is Not Fixed&#039;&#039;: If there is a question mark in the corner of the card, you win points for each of the resources used to acquire this building. The values of each resource correspond to the numbers it requires when people are placed on them:&lt;br /&gt;
* Each Wood is worth 3 Points,&lt;br /&gt;
* Each Brick is worth 4 Points,&lt;br /&gt;
* Each Stone is worth 5 Points,&lt;br /&gt;
* Each Gold is worth 6 Points.&lt;br /&gt;
&lt;br /&gt;
===Civilization Card Details===&lt;br /&gt;
&lt;br /&gt;
Each Civilization Card acquired brings an immediate advantage (depicted on the top half of the card) and some multiplier for final scoring (depicted on the bottom half of the card).&lt;br /&gt;
&lt;br /&gt;
Place the mouse cursor on each card to see details in the tooltip. &lt;br /&gt;
&lt;br /&gt;
Note that at the list of your acquired civilization cards you will see only the bottom half of each card, for the top half is no longer relevant.&lt;br /&gt;
&lt;br /&gt;
== Phase 3: ==&lt;br /&gt;
===Feed Your People===&lt;br /&gt;
&lt;br /&gt;
Each Agriculture Level automatically counts as 1 Food during this phase.&lt;br /&gt;
&lt;br /&gt;
You must provide 1 Food per Person.&lt;br /&gt;
&lt;br /&gt;
In the event that you don&#039;t have enough food, you may use any resource to feed your people.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t manage (or choose not) to feed your people by the means above, you lose all of your food and 10 points as a penalty.&lt;br /&gt;
&lt;br /&gt;
===Game End===&lt;br /&gt;
&lt;br /&gt;
The game ends when either:&lt;br /&gt;
&lt;br /&gt;
* One Building Stack is empty at the end of a round, or&lt;br /&gt;
* There are insufficient Civilization cards to fill the 4 spots at the beginning of a round.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The final number of points for each player is decided by the conditions below: &lt;br /&gt;
&lt;br /&gt;
* Points earned during the game by acquiring Buildings or Civilization, minus Food Penalties,&lt;br /&gt;
* Multipliers denoted at the bottom halves of Civilization Cards collected,&lt;br /&gt;
* Each Resource that a Player has leftover on his Player Board Scores 1 Point.&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
===Harsh Winter===&lt;br /&gt;
* Spend an extra stone when building certain buildings to score 5 points.&lt;br /&gt;
* Spend an extra gold when purchasing cards to score 6 points.&lt;br /&gt;
&lt;br /&gt;
===Wild Animals===&lt;br /&gt;
* Four animal cards are shuffled into the civilization deck. When revealed, animals stay in play until driven off, subtracting 1, 2, or 3 from all dice rolls. &lt;br /&gt;
* Players must collectively place a total of X people on the card to drive it off (X = number of players). &lt;br /&gt;
* After driving off a wild animal, each player rolls 1 dice per person placed on it and receive the rewards.&lt;br /&gt;
&lt;br /&gt;
===Igloos===&lt;br /&gt;
* Spend 3 resources of the same type to buy an igloo, which awards points like a building but does not count for the end-game building bonus.&lt;br /&gt;
&lt;br /&gt;
===The New Huts===&lt;br /&gt;
* Adds new buildings that grant fewer points when built in exchange for a bonus (gain a wood/brick/stone each round, or +1 worker/tool/agriculture level). These do count for the end-game building bonus.&lt;br /&gt;
&lt;br /&gt;
===Mammoth Herd===&lt;br /&gt;
* At the beginning of each round, a mammoth appears on the resource shown by the top-most bonus tile.&lt;br /&gt;
* Players who place their people there can also spend 1 food or resource per person to tame the mammoth.&lt;br /&gt;
* Each player who place people to tame the mammoth roll 1 dice per person.&lt;br /&gt;
* The player with the highest single dice is the mammoth tamer. Others are challengers.&lt;br /&gt;
* The mammoth tamer can choose to take the 1 or all bonus. Others take the all bonus.&lt;br /&gt;
* At the end of the game, the player with the most mammoth tile scores 10 points.&lt;br /&gt;
&lt;br /&gt;
===The Expansion===&lt;br /&gt;
* A new location is available on the board: Merchant. 2 people are needed to use this place. When using, increase the merchant level by 2 and gain 2 jewelry.&lt;br /&gt;
* Once per round, for buying a card or a building, players can trade resources or jewelry to receive one or two resources or jewelry, depending on their levels. However, a player cannot trade if he is on space 0.&lt;br /&gt;
* The rules for Hunting Grounds has changed: for each full 2, 1 food or 1 jewelry can be taken.&lt;br /&gt;
* There is a new space for civilization cards: 3 jewelry is needed to buy a card on that space. After that, 3 extra jewelry can be spent to buy the topmost face down civilization card without applying its immediate effect.&lt;br /&gt;
* Jewelry is not a resource, therefore it can not be used to feed people and is worth nothing at the end of the game.&lt;br /&gt;
* When there are only 4 people, only 3 non-resource places are available each round. When there are only 2-3, 2 are available.&lt;br /&gt;
* Trade is not allowed for buying an igloo.&lt;br /&gt;
* The extra stone and extra gold of the Harsh Winter variant can not be obtained with a trade.&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelpstoneage&amp;diff=8216</id>
		<title>Gamehelpstoneage</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelpstoneage&amp;diff=8216"/>
		<updated>2021-05-09T14:16:23Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: /* Mammoth Herd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Goal ==&lt;br /&gt;
&lt;br /&gt;
Gain the most Victory Points by the end of the game. &lt;br /&gt;
&lt;br /&gt;
There are two ways to gain points:&lt;br /&gt;
&lt;br /&gt;
* Acquiring buildings during the game for either a fixed or variable amount&lt;br /&gt;
* Acquiring Civilization cards during the game that give extra points at the end of the game&lt;br /&gt;
&lt;br /&gt;
== Rules summary ==&lt;br /&gt;
&lt;br /&gt;
Each round is divided into 3 phases, which are executed in the order described:&lt;br /&gt;
* The players take turns placing their people on the game board.&lt;br /&gt;
* The players use the actions of their placed people all at once in turn order.&lt;br /&gt;
* The players feed their people.&lt;br /&gt;
&lt;br /&gt;
== Phase 1: ==&lt;br /&gt;
===Place People on the Board===&lt;br /&gt;
&lt;br /&gt;
In turn order, one area at a time, players place one or more of their people in the different areas of the board. Each &amp;quot;ring&amp;quot; in each area of the board can only be occupied by one person. The exception to this rule is the hunting ground which can be occupied by as many people of any color every turn.&lt;br /&gt;
&lt;br /&gt;
====Special Considerations When Playing With Fewer Than 4 Players====&lt;br /&gt;
&lt;br /&gt;
When playing with &#039;&#039;&#039;2 or 3 players&#039;&#039;&#039;: Of the non-resource areas (Tool Maker, Hut and Field) only two may be occupied per turn. The third place remains empty until the next round. &lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;&#039;3 players&#039;&#039;&#039;: Of the resource areas (Forest, Clay Pit, Quarry and River) only 2 players may place people in each round, even if there are additional spaces for additional people.&lt;br /&gt;
&lt;br /&gt;
With &#039;&#039;&#039;2 players&#039;&#039;&#039;: Of the resource areas (Forest, Clay Pit, Quarry and River) only 1 player may place people in each round, even if there are additional spaces for additional people.&lt;br /&gt;
&lt;br /&gt;
All remaining rules remain unchanged when playing with fewer than 4 players.&lt;br /&gt;
&lt;br /&gt;
== Phase 2: ==&lt;br /&gt;
===Use the Actions of Your Placed People===&lt;br /&gt;
&lt;br /&gt;
In turn order each player uses all of his placed people in any order. During this phase, the following actions may be used:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Hunting Grounds (Food), Forest (Wood), Clay Pit (Brick), Quarry (Stone), and River (Gold)&#039;&#039;&#039;: Roll 1 dice per person placed and acquire resources according to the number rolled (1 Food for each full 2 on Hunting Grounds, 1 Wood for each full 3 on Forest, 1 Brick for each full 4 on Clay Pit, 1 Stone for each full 5 on Quarry, 1 Gold for each full 6 on River).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Field&#039;&#039;&#039;: Placing a person in the Field increases your Agriculture Level. Each turn during the Feeding Phase, your Agriculture Level is subtracted from the amount of people you have. A higher agriculture level allows you to more easily sustain your population.  You may have a maximum agriculture level of 10.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Tool Maker&#039;&#039;&#039;: Placing a person on the Tool Maker adds one new Tool to your player board. You only have 3 tools on your player board, and each subsequent person placed on the Tool Maker upgrades one of your tools to the next level. You have a maximum of 3 level 4 tools.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Hut&#039;&#039;&#039;: Place two People on the Hut to gain an extra Person to place (and feed) for the rest of the game.  You may have a maximum of 10 people.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Building Card&#039;&#039;&#039;: Buy the building with the resources shown on the Building Card, scoring the point value shown in the top-left corner (A question mark in the top-left corner is explained below).&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Civilization Card&#039;&#039;&#039;: Buy the card with a number of resources (of any kind) depending on its position in the Civilization Card Track (1 to 4 resources depicted above the card). The immediate effect of the card is applied when purchase. The bottom half of Civilization Card is used for scoring at the end of the game.&lt;br /&gt;
&lt;br /&gt;
===Resources===&lt;br /&gt;
&lt;br /&gt;
Hunting Grounds, Forest, Clay Pit, Quarry, and River:&lt;br /&gt;
Roll 1 dice per Person placed in that area and take the corresponding resources:&lt;br /&gt;
&lt;br /&gt;
* 1 Food for each full 2 on Hunting Grounds,&lt;br /&gt;
* 1 Wood for each full 3 on Forest,&lt;br /&gt;
* 1 Brick for each full 4 on Clay Pit,&lt;br /&gt;
* 1 Stone for each full 5 on Quarry,&lt;br /&gt;
* 1 Gold for each full 6 on River.&lt;br /&gt;
&lt;br /&gt;
You may use tools to increase the dice result and take more resources.  Each of your tool must be used all at once, and can be used once per turn.  Some cards give you single-use tools which are lost after they are used, and don&#039;t count for final scoring.&lt;br /&gt;
&lt;br /&gt;
===Buildings===&lt;br /&gt;
&lt;br /&gt;
Pay the building cost to get the Building and receive the Point Value listed in the top-left corner of the card.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;If the building cost is Not Fixed&#039;&#039;: If there is a question mark in the corner of the card, you win points for each of the resources used to acquire this building. The values of each resource correspond to the numbers it requires when people are placed on them:&lt;br /&gt;
* Each Wood is worth 3 Points,&lt;br /&gt;
* Each Brick is worth 4 Points,&lt;br /&gt;
* Each Stone is worth 5 Points,&lt;br /&gt;
* Each Gold is worth 6 Points.&lt;br /&gt;
&lt;br /&gt;
===Civilization Card Details===&lt;br /&gt;
&lt;br /&gt;
Each Civilization Card acquired brings an immediate advantage (depicted on the top half of the card) and some multiplier for final scoring (depicted on the bottom half of the card).&lt;br /&gt;
&lt;br /&gt;
Place the mouse cursor on each card to see details in the tooltip. &lt;br /&gt;
&lt;br /&gt;
Note that at the list of your acquired civilization cards you will see only the bottom half of each card, for the top half is no longer relevant.&lt;br /&gt;
&lt;br /&gt;
== Phase 3: ==&lt;br /&gt;
===Feed Your People===&lt;br /&gt;
&lt;br /&gt;
Each Agriculture Level automatically counts as 1 Food during this phase.&lt;br /&gt;
&lt;br /&gt;
You must provide 1 Food per Person.&lt;br /&gt;
&lt;br /&gt;
In the event that you don&#039;t have enough food, you may use any resource to feed your people.&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t manage (or choose not) to feed your people by the means above, you lose all of your food and 10 points as a penalty.&lt;br /&gt;
&lt;br /&gt;
===Game End===&lt;br /&gt;
&lt;br /&gt;
The game ends when either:&lt;br /&gt;
&lt;br /&gt;
* One Building Stack is empty at the end of a round, or&lt;br /&gt;
* There are insufficient Civilization cards to fill the 4 spots at the beginning of a round.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The final number of points for each player is decided by the conditions below: &lt;br /&gt;
&lt;br /&gt;
* Points earned during the game by acquiring Buildings or Civilization, minus Food Penalties,&lt;br /&gt;
* Multipliers denoted at the bottom halves of Civilization Cards collected,&lt;br /&gt;
* Each Resource that a Player has leftover on his Player Board Scores 1 Point.&lt;br /&gt;
&lt;br /&gt;
== Variants ==&lt;br /&gt;
===Harsh Winter===&lt;br /&gt;
* Spend an extra stone when building certain buildings to score 5 points.&lt;br /&gt;
* Spend an extra gold when purchasing cards to score 6 points.&lt;br /&gt;
&lt;br /&gt;
===Wild Animals===&lt;br /&gt;
* Four animal cards are shuffled into the civilization deck. When revealed, animals stay in play until driven off, subtracting 1, 2, or 3 from all dice rolls. &lt;br /&gt;
* Players must collectively place a total of X people on the card to drive it off (X = number of players). &lt;br /&gt;
* After driving off a wild animal, each player rolls 1 dice per person placed on it and receive the rewards.&lt;br /&gt;
&lt;br /&gt;
===Igloos===&lt;br /&gt;
* Spend 3 resources of the same type to buy an igloo, which awards points like a building but does not count for the end-game building bonus.&lt;br /&gt;
&lt;br /&gt;
===The New Huts===&lt;br /&gt;
* Adds new buildings that grant fewer points when built in exchange for a bonus (gain a wood/brick/stone each round, or +1 worker/tool/agriculture level). These do count for the end-game building bonus.&lt;br /&gt;
&lt;br /&gt;
===Mammoth Herd===&lt;br /&gt;
* At the beginning of each round, a mammoth appears on the resource shown by the top-most bonus tile.&lt;br /&gt;
* Players who place their people there can also spend 1 food or resource per person to tame the mammoth.&lt;br /&gt;
* Each player who place people to tame the mammoth roll 1 dice per person.&lt;br /&gt;
* The player with the highest single dice is the mammoth tamer. Others are challengers.&lt;br /&gt;
* The mammoth tamer can choose to take the 1 or all bonus. Others take the all bonus.&lt;br /&gt;
* At the end of the game, the player with the most mammoth tile scores 10 points.&lt;br /&gt;
&lt;br /&gt;
===The Expansion===&lt;br /&gt;
* A new location is avaliable on the board: Merchant. 2 people are needed to use this place. When using, increase the merchant level by 2 and gain 2 jewelry.&lt;br /&gt;
* Once per round, players can trade with the rate on their levels. However, a player cannot trade if he is on space 0.&lt;br /&gt;
* The rules for Hunting Grounds has changed: for each full 2, 1 food or 1 jewelry can be taken.&lt;br /&gt;
* There is a new space for civilization cards: 3 jewelry is needed to buy a card on that space. After that, 3 extra jewelry can be spent to buy the topmost facedown civilization card without applying its immediate effect.&lt;br /&gt;
* Jewelry is not a resource, therefore it can not be used to feed people and is worth nothing at the end of the game.&lt;br /&gt;
* When there are only 4 people, only 3 non-resource places are avaliable each round. When there are only 2-3, 2 are avaliable.&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Translations&amp;diff=6104</id>
		<title>Translations</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Translations&amp;diff=6104"/>
		<updated>2020-11-08T13:29:52Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: /* On server side (PHP) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using BGA Studio, the game you create is ready to be translated to each language by the BGA community. To make this possible, you only need to specify which string must be translated and how to combine them.&lt;br /&gt;
&lt;br /&gt;
== How translation works? ==&lt;br /&gt;
&lt;br /&gt;
When developing your game, all strings must be in English. Strings must be coherent with the English version of the game.&lt;br /&gt;
&lt;br /&gt;
Before the release of the game, BGA team will do the French translation of the game.&lt;br /&gt;
&lt;br /&gt;
After the release of the game, the BGA players community will translate the game in every language.&lt;br /&gt;
&lt;br /&gt;
== What should be translated? ==&lt;br /&gt;
&lt;br /&gt;
Every text that can be visible by the player when the game is running normally. This includes tooltips, texts on cards, error messages, ...&lt;br /&gt;
&lt;br /&gt;
This does NOT include error messages that are not supposed to happen (unexpected errors).&lt;br /&gt;
&lt;br /&gt;
== What rules should I follow for the original English strings? ==&lt;br /&gt;
&lt;br /&gt;
For a coherent and homogeneous interface, here are some rules about ending a sentence with a final dot &#039;.&#039;&lt;br /&gt;
&lt;br /&gt;
* As a general rule:&lt;br /&gt;
** If a sentence is displayed isolated in the interface =&amp;gt; no final dot&lt;br /&gt;
** If a sentence is followed or could be followed by another sentence in the same interface space =&amp;gt; final dot.&lt;br /&gt;
&lt;br /&gt;
* In detail:&lt;br /&gt;
** No final dot:&lt;br /&gt;
*** button labels&lt;br /&gt;
*** section titles&lt;br /&gt;
*** menu elements&lt;br /&gt;
*** links triggering an isolated action&lt;br /&gt;
*** anything that is not a full sentence&lt;br /&gt;
*** current action in the status bar&lt;br /&gt;
** Final dot:&lt;br /&gt;
*** complete explanation sentence, that can be chained with another sentence&lt;br /&gt;
** We can tolerate a dot or no dot (but it should be consistent inside the game) for:&lt;br /&gt;
*** isolated tooltip / isolated small sentence&lt;br /&gt;
*** game log (no dot is usually preferable)&lt;br /&gt;
*** error messages (except if more than one sentence in the error message =&amp;gt; final dot mandatory in this case)&lt;br /&gt;
&lt;br /&gt;
Otherwise, you should try to follow as closely as possible the general style and format (including capitalization) used in the English rulebook and game material of the game.&lt;br /&gt;
&lt;br /&gt;
== Focus on translating notifications ==&lt;br /&gt;
&lt;br /&gt;
Usually, translating a website is simple: you just call a function on every string you have to translate, and the string is translated in the player&#039;s language. On Board Game Arena, this is exactly the same with the &amp;quot;_( string )&amp;quot; function.&lt;br /&gt;
&lt;br /&gt;
However, there is one difference on BGA: notifications. The server is sending notifications to players, and most of the time the notifications are the same for every players, no matter what language each player is using. This is why notifications are translated on client side in the proper language, even if the strings are defined on server side.&lt;br /&gt;
&lt;br /&gt;
== WARNING: how to make sure your strings will be translated ==&lt;br /&gt;
&lt;br /&gt;
For each game, our translation tool is doing a full scan of the code, looking for translator markers like &amp;quot;_()&amp;quot; or &amp;quot;clientranslate()&amp;quot;... (see below the list of translation markers).&lt;br /&gt;
&lt;br /&gt;
If your original string is not &amp;quot;physically&amp;quot; inside one of this marker, it won&#039;t be translated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Examples: the following strings will be translated:&lt;br /&gt;
    var mystring_translated = _(&amp;quot;my string&amp;quot;);       // JS&lt;br /&gt;
    $mystring_translated = self::_(&amp;quot;my string&amp;quot;);    // PHP&lt;br /&gt;
    $mystring_translated = sprintf( self::_(&amp;quot;my string with an %s argument&amp;quot;), $argument );   // PHP&lt;br /&gt;
&lt;br /&gt;
    // Examples: the following strings WILL NOT be translated:&lt;br /&gt;
    $my_string = &amp;quot;my string&amp;quot;;&lt;br /&gt;
    $not_translated = self::_( $my_string );   // The original string is not bordered by a translator marker =&amp;gt; no translation&lt;br /&gt;
    $not_translated = self::_( sprintf( &amp;quot;my string with a %s argument&amp;quot;, $argument ) ); // Same thing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to not make translators crazy ;) ==&lt;br /&gt;
&lt;br /&gt;
* When you need the same string twice, try to reuse exactly the same string (with the same case) to minimize the number of strings.&lt;br /&gt;
* Do not mark as translatable a game element that does not have to be translated (ex: if the name of a monster on a card is &amp;quot;Zzzzz&amp;quot;, maybe there&#039;s no need to translate it).&lt;br /&gt;
* Words does not come in the same order in each language. Thus, when you have to translate a string with an argument, do not write something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;self::_(&amp;quot;First part of the string, &amp;quot;).$argument.&#039; &#039;.self::_(&amp;quot;second part of the string&amp;quot;)&amp;lt;/pre&amp;gt;&lt;br /&gt;
Write instead:&lt;br /&gt;
&amp;lt;pre&amp;gt;sprintf( self::_(&amp;quot;First part of the string, %s second part of the string&amp;quot;), $argument )&amp;lt;/pre&amp;gt;&lt;br /&gt;
(or the equivalent &amp;quot;dojo.string.substitute&amp;quot; in Javascript)&lt;br /&gt;
* When translators are going to translate your game, the most difficult task for them is to get the context of the string to be translated. The more the string is a short insignificant string, the more difficult is the task for them. As a rule of thumb, try to avoid insignificant short strings. You can also leave a comment on what is the context of the string in the translation program (English to English) if you are the developer of the game.&lt;br /&gt;
* The BGA translation policy is to be flexible on grammar... We prefer to write &amp;quot;player gets 1 coin(s)&amp;quot; than write two versions of the same string for plural and singular - it reduces the number of strings to translate.&lt;br /&gt;
* Instead of writing nice strings like &amp;quot;With the effect of ZZZ, player XXX gets a new YYY&amp;quot;, which is very difficult to translate, write strings like &amp;quot;ZZZ: XXX gets YYY&amp;quot;.&lt;br /&gt;
* Use present tense instead of past, i.e. &amp;quot;player gets wood&amp;quot; instead of &amp;quot;player got wood&amp;quot;&lt;br /&gt;
* Avoid using gender specific pronouns, i.e.  instead of &amp;quot;player returns card to *his* hand&amp;quot; use &amp;quot;player returns card to *their* hand&amp;quot; or just avoid using it, i.e. &amp;quot;player picks up the card&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== On client side (Javascript) ==&lt;br /&gt;
&lt;br /&gt;
On client side, things are quite simple: you just have to use the &amp;quot;_()&amp;quot; function for all strings you want to translate.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Get a string in player&#039;s language:&lt;br /&gt;
var translated = _(&amp;quot;original english string&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Get a string in player&#039;s language with parameter:&lt;br /&gt;
var translated = dojo.string.substitute( _(&amp;quot;You can pick ${p} cards and discard ${d}&amp;quot;), {&lt;br /&gt;
    p: 2,&lt;br /&gt;
    d: 4&lt;br /&gt;
} );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; in Javascript strings to translate, you should never use &#039;\n&#039;, &#039;\t&#039; or such, as it will break the translation bundle and result in all the Javascript translation to fail. In any case, the strings will result in HTML code, and such character codes won&#039;t have any impact on the HTML rendering. You should use HTML markup instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ANOTHER WARNING:&#039;&#039;&#039; you cannot use this function _() in the javascript object constructor, but you can achieve the same if you use it the setup method&lt;br /&gt;
&lt;br /&gt;
== On server side (PHP) ==&lt;br /&gt;
&lt;br /&gt;
On PHP side, you can use 3 different functions to specify that a string must be translated.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;clienttranslate( &amp;quot;my string to translate&amp;quot; ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function is &#039;&#039;&#039;transparent&#039;&#039;&#039;: it will return the original English string without any change. It&#039;s only purpose is to mark this string as &amp;quot;must be translated&amp;quot;, and to make sure the translated version of the string will be available on client side.&lt;br /&gt;
&lt;br /&gt;
In general, you use clienttranslate:&lt;br /&gt;
* On your states.inc.php, for field &amp;quot;description&amp;quot; and &amp;quot;descriptionmyturn&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;quot;description&amp;quot; =&amp;gt; clienttranslate(&#039;${card_name}: ${actplayer} must discard 4 identical energies&#039;),&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On &amp;quot;material.inc.php&amp;quot;, when defining texts for game material that must be displayed on client side.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;card_types = array(&lt;br /&gt;
&lt;br /&gt;
     1 =&amp;gt; array(&lt;br /&gt;
        &#039;name&#039; =&amp;gt; clienttranslate(&amp;quot;Amulet of Air&amp;quot;), // Thus, we can use &amp;quot;_( card_name )&amp;quot; on Javascript side.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* When sending a notification with &amp;quot;notifyAllPlayers&amp;quot; or &amp;quot;notifyPlayer&amp;quot;, for the game log string and all game log arguments that need a translation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // A game log string with no argument:&lt;br /&gt;
     self::notifyAllPlayers( &#039;pickLibraryCards&#039;, clienttranslate(&amp;quot;Everyone draw cards from his library&amp;quot;), array() );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a consequence there is no point passing variables to this function, i.e.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    notif=&amp;quot;foo&amp;quot;; self::notifyAllPlayers( &#039;log&#039;, clienttraslate(notif)); // BAD&lt;br /&gt;
    notif=clienttranslate(&amp;quot;foo&amp;quot;); self::notifyAllPlayers( &#039;log&#039;, notif); // GOOD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Translating arguments is a little bit more complex. It is using the &amp;quot;i18n&amp;quot; special argument as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 // In the following example, we translate the game log itself, but also the &amp;quot;card_name&amp;quot; argument:&lt;br /&gt;
&lt;br /&gt;
 self::notifyAllPlayers( &#039;winPoints&#039;, clienttranslate(&#039;${card_name}: ${player_name} gains ${points} point(s)&#039;), array(&lt;br /&gt;
                &#039;i18n&#039; =&amp;gt; array( &#039;card_name&#039; ),     // &amp;lt;===== We specify here that &amp;quot;card_name&amp;quot; argument must be translated&lt;br /&gt;
                &#039;player_id&#039; =&amp;gt; $player_id,&lt;br /&gt;
                &#039;player_name&#039; =&amp;gt; self::getActivePlayerName(),&lt;br /&gt;
                &#039;points&#039; =&amp;gt; $points,&lt;br /&gt;
                &#039;card_name&#039; =&amp;gt; $this-&amp;gt;card_types[8][&#039;name&#039;] // &amp;lt;==== Here, we provide original English string.&lt;br /&gt;
            ) ); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To ensure the translation of the i18n argument will be made, clienttranslate must have been used somewhere, for instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;card_types = array(&lt;br /&gt;
...&lt;br /&gt;
     8 =&amp;gt; array(&lt;br /&gt;
        &#039;name&#039; =&amp;gt; clienttranslate(&amp;quot;Amulet of Fire&amp;quot;),&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pay attention when using &#039;i18n&#039; argument when translating argument for client : do NOT use same argument for both translation AND key code for client side action (like using &#039;card_name&#039; to move it on player board as described in the example). It&#039;s pretty obvious in the example, but it can be very tricky when translation is made at the end of the development (which is often the case). Use explicit argument name like &#039;card_name_translated&#039; by example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; you should NEVER use concatenation with clienttranslate, as it would result in a different string to translate at runtime than the one retrieved statically in the translation system, and so translation would not be applied. If you need to compose a string, use substitution and the i18n parameter (but you also have to pay attention not to compose sentences in a way that is dependent upon the English language specific syntax, or it may be impossible to translate correctly in another language: sometimes, you need multiple full sentences rather than relying on substitution).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;self::_( &amp;quot;my string to translate&amp;quot; ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function returns a string translated in the language of CURRENT user (i.e. player who send the request to the server) (be careful, this is NOT the active player).&lt;br /&gt;
&lt;br /&gt;
Most of the time, you don&#039;t need to translate strings on server side, except on the following 3 situations:&lt;br /&gt;
* When throwing an exception because the player did a forbidden move.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// This will display a translatable red message to the player that just did some wrong action:&lt;br /&gt;
throw new BgaUserException( self::_(&#039;You must choose 3 cards&#039;) );&lt;br /&gt;
&lt;br /&gt;
// ... notice the use of BgaUserException that signals that this exception is &amp;quot;expected&amp;quot;. In theory, all exception that are expected should be translated.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;yourgame.view.php&amp;quot;, when creating the labels for the game interface used in your template (.tpl) file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;tpl[&#039;CARDS_FOR_YEAR_2&#039;] = self::_(&amp;quot;Your cards for year II&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Eventually, in your material.inc.php, if for example you need to use some string elements in your exceptions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// In material.inc.php, $this-&amp;gt;energies[n][&#039;nametr&#039;] has been created with the self::_() method. Now we can do this:&lt;br /&gt;
throw new BgaUserException( self::_(&amp;quot;To execute this action you need more: &amp;quot;).&#039; &#039;.$this-&amp;gt;energies[$resource_id][&#039;nametr&#039;] );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Eventually, in your &amp;quot;getAllDatas&amp;quot; PHP method, as the data return by this method is used only by current user.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;totranslate( &amp;quot;my string to translate&amp;quot; ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function works exactly like &#039;clienttranslate&#039;, except it tells BGA that the string is not needed on client side.&lt;br /&gt;
&lt;br /&gt;
You should not use this function, except on the following cases:&lt;br /&gt;
* Statistics name in stats.inc.php&lt;br /&gt;
* Option names and option values name in gameoptions.inc.php&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Translations&amp;diff=6103</id>
		<title>Translations</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Translations&amp;diff=6103"/>
		<updated>2020-11-08T13:29:37Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: /* On server side (PHP) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using BGA Studio, the game you create is ready to be translated to each language by the BGA community. To make this possible, you only need to specify which string must be translated and how to combine them.&lt;br /&gt;
&lt;br /&gt;
== How translation works? ==&lt;br /&gt;
&lt;br /&gt;
When developing your game, all strings must be in English. Strings must be coherent with the English version of the game.&lt;br /&gt;
&lt;br /&gt;
Before the release of the game, BGA team will do the French translation of the game.&lt;br /&gt;
&lt;br /&gt;
After the release of the game, the BGA players community will translate the game in every language.&lt;br /&gt;
&lt;br /&gt;
== What should be translated? ==&lt;br /&gt;
&lt;br /&gt;
Every text that can be visible by the player when the game is running normally. This includes tooltips, texts on cards, error messages, ...&lt;br /&gt;
&lt;br /&gt;
This does NOT include error messages that are not supposed to happen (unexpected errors).&lt;br /&gt;
&lt;br /&gt;
== What rules should I follow for the original English strings? ==&lt;br /&gt;
&lt;br /&gt;
For a coherent and homogeneous interface, here are some rules about ending a sentence with a final dot &#039;.&#039;&lt;br /&gt;
&lt;br /&gt;
* As a general rule:&lt;br /&gt;
** If a sentence is displayed isolated in the interface =&amp;gt; no final dot&lt;br /&gt;
** If a sentence is followed or could be followed by another sentence in the same interface space =&amp;gt; final dot.&lt;br /&gt;
&lt;br /&gt;
* In detail:&lt;br /&gt;
** No final dot:&lt;br /&gt;
*** button labels&lt;br /&gt;
*** section titles&lt;br /&gt;
*** menu elements&lt;br /&gt;
*** links triggering an isolated action&lt;br /&gt;
*** anything that is not a full sentence&lt;br /&gt;
*** current action in the status bar&lt;br /&gt;
** Final dot:&lt;br /&gt;
*** complete explanation sentence, that can be chained with another sentence&lt;br /&gt;
** We can tolerate a dot or no dot (but it should be consistent inside the game) for:&lt;br /&gt;
*** isolated tooltip / isolated small sentence&lt;br /&gt;
*** game log (no dot is usually preferable)&lt;br /&gt;
*** error messages (except if more than one sentence in the error message =&amp;gt; final dot mandatory in this case)&lt;br /&gt;
&lt;br /&gt;
Otherwise, you should try to follow as closely as possible the general style and format (including capitalization) used in the English rulebook and game material of the game.&lt;br /&gt;
&lt;br /&gt;
== Focus on translating notifications ==&lt;br /&gt;
&lt;br /&gt;
Usually, translating a website is simple: you just call a function on every string you have to translate, and the string is translated in the player&#039;s language. On Board Game Arena, this is exactly the same with the &amp;quot;_( string )&amp;quot; function.&lt;br /&gt;
&lt;br /&gt;
However, there is one difference on BGA: notifications. The server is sending notifications to players, and most of the time the notifications are the same for every players, no matter what language each player is using. This is why notifications are translated on client side in the proper language, even if the strings are defined on server side.&lt;br /&gt;
&lt;br /&gt;
== WARNING: how to make sure your strings will be translated ==&lt;br /&gt;
&lt;br /&gt;
For each game, our translation tool is doing a full scan of the code, looking for translator markers like &amp;quot;_()&amp;quot; or &amp;quot;clientranslate()&amp;quot;... (see below the list of translation markers).&lt;br /&gt;
&lt;br /&gt;
If your original string is not &amp;quot;physically&amp;quot; inside one of this marker, it won&#039;t be translated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Examples: the following strings will be translated:&lt;br /&gt;
    var mystring_translated = _(&amp;quot;my string&amp;quot;);       // JS&lt;br /&gt;
    $mystring_translated = self::_(&amp;quot;my string&amp;quot;);    // PHP&lt;br /&gt;
    $mystring_translated = sprintf( self::_(&amp;quot;my string with an %s argument&amp;quot;), $argument );   // PHP&lt;br /&gt;
&lt;br /&gt;
    // Examples: the following strings WILL NOT be translated:&lt;br /&gt;
    $my_string = &amp;quot;my string&amp;quot;;&lt;br /&gt;
    $not_translated = self::_( $my_string );   // The original string is not bordered by a translator marker =&amp;gt; no translation&lt;br /&gt;
    $not_translated = self::_( sprintf( &amp;quot;my string with a %s argument&amp;quot;, $argument ) ); // Same thing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to not make translators crazy ;) ==&lt;br /&gt;
&lt;br /&gt;
* When you need the same string twice, try to reuse exactly the same string (with the same case) to minimize the number of strings.&lt;br /&gt;
* Do not mark as translatable a game element that does not have to be translated (ex: if the name of a monster on a card is &amp;quot;Zzzzz&amp;quot;, maybe there&#039;s no need to translate it).&lt;br /&gt;
* Words does not come in the same order in each language. Thus, when you have to translate a string with an argument, do not write something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;self::_(&amp;quot;First part of the string, &amp;quot;).$argument.&#039; &#039;.self::_(&amp;quot;second part of the string&amp;quot;)&amp;lt;/pre&amp;gt;&lt;br /&gt;
Write instead:&lt;br /&gt;
&amp;lt;pre&amp;gt;sprintf( self::_(&amp;quot;First part of the string, %s second part of the string&amp;quot;), $argument )&amp;lt;/pre&amp;gt;&lt;br /&gt;
(or the equivalent &amp;quot;dojo.string.substitute&amp;quot; in Javascript)&lt;br /&gt;
* When translators are going to translate your game, the most difficult task for them is to get the context of the string to be translated. The more the string is a short insignificant string, the more difficult is the task for them. As a rule of thumb, try to avoid insignificant short strings. You can also leave a comment on what is the context of the string in the translation program (English to English) if you are the developer of the game.&lt;br /&gt;
* The BGA translation policy is to be flexible on grammar... We prefer to write &amp;quot;player gets 1 coin(s)&amp;quot; than write two versions of the same string for plural and singular - it reduces the number of strings to translate.&lt;br /&gt;
* Instead of writing nice strings like &amp;quot;With the effect of ZZZ, player XXX gets a new YYY&amp;quot;, which is very difficult to translate, write strings like &amp;quot;ZZZ: XXX gets YYY&amp;quot;.&lt;br /&gt;
* Use present tense instead of past, i.e. &amp;quot;player gets wood&amp;quot; instead of &amp;quot;player got wood&amp;quot;&lt;br /&gt;
* Avoid using gender specific pronouns, i.e.  instead of &amp;quot;player returns card to *his* hand&amp;quot; use &amp;quot;player returns card to *their* hand&amp;quot; or just avoid using it, i.e. &amp;quot;player picks up the card&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== On client side (Javascript) ==&lt;br /&gt;
&lt;br /&gt;
On client side, things are quite simple: you just have to use the &amp;quot;_()&amp;quot; function for all strings you want to translate.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Get a string in player&#039;s language:&lt;br /&gt;
var translated = _(&amp;quot;original english string&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Get a string in player&#039;s language with parameter:&lt;br /&gt;
var translated = dojo.string.substitute( _(&amp;quot;You can pick ${p} cards and discard ${d}&amp;quot;), {&lt;br /&gt;
    p: 2,&lt;br /&gt;
    d: 4&lt;br /&gt;
} );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; in Javascript strings to translate, you should never use &#039;\n&#039;, &#039;\t&#039; or such, as it will break the translation bundle and result in all the Javascript translation to fail. In any case, the strings will result in HTML code, and such character codes won&#039;t have any impact on the HTML rendering. You should use HTML markup instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ANOTHER WARNING:&#039;&#039;&#039; you cannot use this function _() in the javascript object constructor, but you can achieve the same if you use it the setup method&lt;br /&gt;
&lt;br /&gt;
== On server side (PHP) ==&lt;br /&gt;
&lt;br /&gt;
On PHP side, you can use 3 different functions to specify that a string must be translated.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;clienttranslate( &amp;quot;my string to translate&amp;quot; ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function is &#039;&#039;&#039;transparent&#039;&#039;&#039;: it will return the original English string without any change. It&#039;s only purpose is to mark this string as &amp;quot;must be translated&amp;quot;, and to make sure the translated version of the string will be available on client side.&lt;br /&gt;
&lt;br /&gt;
In general, you use clienttranslate:&lt;br /&gt;
* On your states.inc.php, for field &amp;quot;description&amp;quot; and &amp;quot;descriptionmyturn&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;quot;description&amp;quot; =&amp;gt; clienttranslate(&#039;${card_name}: ${actplayer} must discard 4 identical energies&#039;),&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On &amp;quot;material.inc.php&amp;quot;, when defining texts for game material that must be displayed on client side.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;card_types = array(&lt;br /&gt;
&lt;br /&gt;
     1 =&amp;gt; array(&lt;br /&gt;
        &#039;name&#039; =&amp;gt; clienttranslate(&amp;quot;Amulet of Air&amp;quot;), // Thus, we can use &amp;quot;_( card_name )&amp;quot; on Javascript side.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* When sending a notification with &amp;quot;notifyAllPlayers&amp;quot; or &amp;quot;notifyPlayer&amp;quot;, for the game log string and all game log arguments that need a translation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // A game log string with no argument:&lt;br /&gt;
     self::notifyAllPlayers( &#039;pickLibraryCards&#039;, clienttranslate(&amp;quot;Everyone draw cards from his library&amp;quot;), array() );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a consequence there is no point passing variables to this function, i.e.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    notif=&amp;quot;foo&amp;quot;; self::notifyAllPlayers( &#039;log&#039;, clienttraslate(notif)); // BAD&lt;br /&gt;
    notif=clienttranslate(&amp;quot;foo&amp;quot;); self::notifyAllPlayers( &#039;log&#039;, notif); // GOOD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Translating arguments is a little bit more complex. It is using the &amp;quot;i18n&amp;quot; special argument as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 // In the following example, we translate the game log itself, but also the &amp;quot;card_name&amp;quot; argument:&lt;br /&gt;
&lt;br /&gt;
 self::notifyAllPlayers( &#039;winPoints&#039;, clienttranslate(&#039;${card_name}: ${player_name} gains ${points} point(s)&#039;), array(&lt;br /&gt;
                &#039;i18n&#039; =&amp;gt; array( &#039;card_name&#039; ),     // &amp;lt;===== We specify here that &amp;quot;card_name&amp;quot; argument must be translated&lt;br /&gt;
                &#039;player_id&#039; =&amp;gt; $player_id,&lt;br /&gt;
                &#039;player_name&#039; =&amp;gt; self::getActivePlayerName(),&lt;br /&gt;
                &#039;points&#039; =&amp;gt; $points,&lt;br /&gt;
                &#039;card_name&#039; =&amp;gt; $this-&amp;gt;card_types[8][&#039;name&#039;] // &amp;lt;==== Here, we provide original English string.&lt;br /&gt;
            ) ); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To ensure the translation of the i18n argument will be made, clienttranslate must have been used somewhere, for instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;card_types = array(&lt;br /&gt;
...&lt;br /&gt;
     8 =&amp;gt; array(&lt;br /&gt;
        &#039;name&#039; =&amp;gt; clienttranslate(&amp;quot;Amulet of Air&amp;quot;),&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pay attention when using &#039;i18n&#039; argument when translating argument for client : do NOT use same argument for both translation AND key code for client side action (like using &#039;card_name&#039; to move it on player board as described in the example). It&#039;s pretty obvious in the example, but it can be very tricky when translation is made at the end of the development (which is often the case). Use explicit argument name like &#039;card_name_translated&#039; by example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; you should NEVER use concatenation with clienttranslate, as it would result in a different string to translate at runtime than the one retrieved statically in the translation system, and so translation would not be applied. If you need to compose a string, use substitution and the i18n parameter (but you also have to pay attention not to compose sentences in a way that is dependent upon the English language specific syntax, or it may be impossible to translate correctly in another language: sometimes, you need multiple full sentences rather than relying on substitution).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;self::_( &amp;quot;my string to translate&amp;quot; ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function returns a string translated in the language of CURRENT user (i.e. player who send the request to the server) (be careful, this is NOT the active player).&lt;br /&gt;
&lt;br /&gt;
Most of the time, you don&#039;t need to translate strings on server side, except on the following 3 situations:&lt;br /&gt;
* When throwing an exception because the player did a forbidden move.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// This will display a translatable red message to the player that just did some wrong action:&lt;br /&gt;
throw new BgaUserException( self::_(&#039;You must choose 3 cards&#039;) );&lt;br /&gt;
&lt;br /&gt;
// ... notice the use of BgaUserException that signals that this exception is &amp;quot;expected&amp;quot;. In theory, all exception that are expected should be translated.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;yourgame.view.php&amp;quot;, when creating the labels for the game interface used in your template (.tpl) file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;tpl[&#039;CARDS_FOR_YEAR_2&#039;] = self::_(&amp;quot;Your cards for year II&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Eventually, in your material.inc.php, if for example you need to use some string elements in your exceptions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// In material.inc.php, $this-&amp;gt;energies[n][&#039;nametr&#039;] has been created with the self::_() method. Now we can do this:&lt;br /&gt;
throw new BgaUserException( self::_(&amp;quot;To execute this action you need more: &amp;quot;).&#039; &#039;.$this-&amp;gt;energies[$resource_id][&#039;nametr&#039;] );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Eventually, in your &amp;quot;getAllDatas&amp;quot; PHP method, as the data return by this method is used only by current user.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;totranslate( &amp;quot;my string to translate&amp;quot; ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function works exactly like &#039;clienttranslate&#039;, except it tells BGA that the string is not needed on client side.&lt;br /&gt;
&lt;br /&gt;
You should not use this function, except on the following cases:&lt;br /&gt;
* Statistics name in stats.inc.php&lt;br /&gt;
* Option names and option values name in gameoptions.inc.php&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Translations&amp;diff=6102</id>
		<title>Translations</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Translations&amp;diff=6102"/>
		<updated>2020-11-08T13:28:45Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: /* On server side (PHP) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using BGA Studio, the game you create is ready to be translated to each language by the BGA community. To make this possible, you only need to specify which string must be translated and how to combine them.&lt;br /&gt;
&lt;br /&gt;
== How translation works? ==&lt;br /&gt;
&lt;br /&gt;
When developing your game, all strings must be in English. Strings must be coherent with the English version of the game.&lt;br /&gt;
&lt;br /&gt;
Before the release of the game, BGA team will do the French translation of the game.&lt;br /&gt;
&lt;br /&gt;
After the release of the game, the BGA players community will translate the game in every language.&lt;br /&gt;
&lt;br /&gt;
== What should be translated? ==&lt;br /&gt;
&lt;br /&gt;
Every text that can be visible by the player when the game is running normally. This includes tooltips, texts on cards, error messages, ...&lt;br /&gt;
&lt;br /&gt;
This does NOT include error messages that are not supposed to happen (unexpected errors).&lt;br /&gt;
&lt;br /&gt;
== What rules should I follow for the original English strings? ==&lt;br /&gt;
&lt;br /&gt;
For a coherent and homogeneous interface, here are some rules about ending a sentence with a final dot &#039;.&#039;&lt;br /&gt;
&lt;br /&gt;
* As a general rule:&lt;br /&gt;
** If a sentence is displayed isolated in the interface =&amp;gt; no final dot&lt;br /&gt;
** If a sentence is followed or could be followed by another sentence in the same interface space =&amp;gt; final dot.&lt;br /&gt;
&lt;br /&gt;
* In detail:&lt;br /&gt;
** No final dot:&lt;br /&gt;
*** button labels&lt;br /&gt;
*** section titles&lt;br /&gt;
*** menu elements&lt;br /&gt;
*** links triggering an isolated action&lt;br /&gt;
*** anything that is not a full sentence&lt;br /&gt;
*** current action in the status bar&lt;br /&gt;
** Final dot:&lt;br /&gt;
*** complete explanation sentence, that can be chained with another sentence&lt;br /&gt;
** We can tolerate a dot or no dot (but it should be consistent inside the game) for:&lt;br /&gt;
*** isolated tooltip / isolated small sentence&lt;br /&gt;
*** game log (no dot is usually preferable)&lt;br /&gt;
*** error messages (except if more than one sentence in the error message =&amp;gt; final dot mandatory in this case)&lt;br /&gt;
&lt;br /&gt;
Otherwise, you should try to follow as closely as possible the general style and format (including capitalization) used in the English rulebook and game material of the game.&lt;br /&gt;
&lt;br /&gt;
== Focus on translating notifications ==&lt;br /&gt;
&lt;br /&gt;
Usually, translating a website is simple: you just call a function on every string you have to translate, and the string is translated in the player&#039;s language. On Board Game Arena, this is exactly the same with the &amp;quot;_( string )&amp;quot; function.&lt;br /&gt;
&lt;br /&gt;
However, there is one difference on BGA: notifications. The server is sending notifications to players, and most of the time the notifications are the same for every players, no matter what language each player is using. This is why notifications are translated on client side in the proper language, even if the strings are defined on server side.&lt;br /&gt;
&lt;br /&gt;
== WARNING: how to make sure your strings will be translated ==&lt;br /&gt;
&lt;br /&gt;
For each game, our translation tool is doing a full scan of the code, looking for translator markers like &amp;quot;_()&amp;quot; or &amp;quot;clientranslate()&amp;quot;... (see below the list of translation markers).&lt;br /&gt;
&lt;br /&gt;
If your original string is not &amp;quot;physically&amp;quot; inside one of this marker, it won&#039;t be translated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    // Examples: the following strings will be translated:&lt;br /&gt;
    var mystring_translated = _(&amp;quot;my string&amp;quot;);       // JS&lt;br /&gt;
    $mystring_translated = self::_(&amp;quot;my string&amp;quot;);    // PHP&lt;br /&gt;
    $mystring_translated = sprintf( self::_(&amp;quot;my string with an %s argument&amp;quot;), $argument );   // PHP&lt;br /&gt;
&lt;br /&gt;
    // Examples: the following strings WILL NOT be translated:&lt;br /&gt;
    $my_string = &amp;quot;my string&amp;quot;;&lt;br /&gt;
    $not_translated = self::_( $my_string );   // The original string is not bordered by a translator marker =&amp;gt; no translation&lt;br /&gt;
    $not_translated = self::_( sprintf( &amp;quot;my string with a %s argument&amp;quot;, $argument ) ); // Same thing&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to not make translators crazy ;) ==&lt;br /&gt;
&lt;br /&gt;
* When you need the same string twice, try to reuse exactly the same string (with the same case) to minimize the number of strings.&lt;br /&gt;
* Do not mark as translatable a game element that does not have to be translated (ex: if the name of a monster on a card is &amp;quot;Zzzzz&amp;quot;, maybe there&#039;s no need to translate it).&lt;br /&gt;
* Words does not come in the same order in each language. Thus, when you have to translate a string with an argument, do not write something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;self::_(&amp;quot;First part of the string, &amp;quot;).$argument.&#039; &#039;.self::_(&amp;quot;second part of the string&amp;quot;)&amp;lt;/pre&amp;gt;&lt;br /&gt;
Write instead:&lt;br /&gt;
&amp;lt;pre&amp;gt;sprintf( self::_(&amp;quot;First part of the string, %s second part of the string&amp;quot;), $argument )&amp;lt;/pre&amp;gt;&lt;br /&gt;
(or the equivalent &amp;quot;dojo.string.substitute&amp;quot; in Javascript)&lt;br /&gt;
* When translators are going to translate your game, the most difficult task for them is to get the context of the string to be translated. The more the string is a short insignificant string, the more difficult is the task for them. As a rule of thumb, try to avoid insignificant short strings. You can also leave a comment on what is the context of the string in the translation program (English to English) if you are the developer of the game.&lt;br /&gt;
* The BGA translation policy is to be flexible on grammar... We prefer to write &amp;quot;player gets 1 coin(s)&amp;quot; than write two versions of the same string for plural and singular - it reduces the number of strings to translate.&lt;br /&gt;
* Instead of writing nice strings like &amp;quot;With the effect of ZZZ, player XXX gets a new YYY&amp;quot;, which is very difficult to translate, write strings like &amp;quot;ZZZ: XXX gets YYY&amp;quot;.&lt;br /&gt;
* Use present tense instead of past, i.e. &amp;quot;player gets wood&amp;quot; instead of &amp;quot;player got wood&amp;quot;&lt;br /&gt;
* Avoid using gender specific pronouns, i.e.  instead of &amp;quot;player returns card to *his* hand&amp;quot; use &amp;quot;player returns card to *their* hand&amp;quot; or just avoid using it, i.e. &amp;quot;player picks up the card&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== On client side (Javascript) ==&lt;br /&gt;
&lt;br /&gt;
On client side, things are quite simple: you just have to use the &amp;quot;_()&amp;quot; function for all strings you want to translate.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Get a string in player&#039;s language:&lt;br /&gt;
var translated = _(&amp;quot;original english string&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Get a string in player&#039;s language with parameter:&lt;br /&gt;
var translated = dojo.string.substitute( _(&amp;quot;You can pick ${p} cards and discard ${d}&amp;quot;), {&lt;br /&gt;
    p: 2,&lt;br /&gt;
    d: 4&lt;br /&gt;
} );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; in Javascript strings to translate, you should never use &#039;\n&#039;, &#039;\t&#039; or such, as it will break the translation bundle and result in all the Javascript translation to fail. In any case, the strings will result in HTML code, and such character codes won&#039;t have any impact on the HTML rendering. You should use HTML markup instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ANOTHER WARNING:&#039;&#039;&#039; you cannot use this function _() in the javascript object constructor, but you can achieve the same if you use it the setup method&lt;br /&gt;
&lt;br /&gt;
== On server side (PHP) ==&lt;br /&gt;
&lt;br /&gt;
On PHP side, you can use 3 different functions to specify that a string must be translated.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;clienttranslate( &amp;quot;my string to translate&amp;quot; ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function is &#039;&#039;&#039;transparent&#039;&#039;&#039;: it will return the original English string without any change. It&#039;s only purpose is to mark this string as &amp;quot;must be translated&amp;quot;, and to make sure the translated version of the string will be available on client side.&lt;br /&gt;
&lt;br /&gt;
In general, you use clienttranslate:&lt;br /&gt;
* On your states.inc.php, for field &amp;quot;description&amp;quot; and &amp;quot;descriptionmyturn&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &amp;quot;description&amp;quot; =&amp;gt; clienttranslate(&#039;${card_name}: ${actplayer} must discard 4 identical energies&#039;),&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On &amp;quot;material.inc.php&amp;quot;, when defining texts for game material that must be displayed on client side.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;card_types = array(&lt;br /&gt;
&lt;br /&gt;
     1 =&amp;gt; array(&lt;br /&gt;
        &#039;name&#039; =&amp;gt; clienttranslate(&amp;quot;Amulet of Air&amp;quot;), // Thus, we can use &amp;quot;_( card_name )&amp;quot; on Javascript side.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* When sending a notification with &amp;quot;notifyAllPlayers&amp;quot; or &amp;quot;notifyPlayer&amp;quot;, for the game log string and all game log arguments that need a translation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     // A game log string with no argument:&lt;br /&gt;
     self::notifyAllPlayers( &#039;pickLibraryCards&#039;, clienttranslate(&amp;quot;Everyone draw cards from his library&amp;quot;), array() );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a consequence there is no point passing variables to this function, i.e.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    notif=&amp;quot;foo&amp;quot;; self::notifyAllPlayers( &#039;log&#039;, clienttraslate(notif)); // BAD&lt;br /&gt;
    notif=clienttranslate(&amp;quot;foo&amp;quot;); self::notifyAllPlayers( &#039;log&#039;, notif); // GOOD&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Translating arguments is a little bit more complex. It is using the &amp;quot;i18n&amp;quot; special argument as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 // In the following example, we translate the game log itself, but also the &amp;quot;card_name&amp;quot; argument:&lt;br /&gt;
&lt;br /&gt;
 self::notifyAllPlayers( &#039;winPoints&#039;, clienttranslate(&#039;${card_name}: ${player_name} gains ${points} point(s)&#039;), array(&lt;br /&gt;
                &#039;i18n&#039; =&amp;gt; array( &#039;card_name&#039; ),     // &amp;lt;===== We specify here that &amp;quot;card_name&amp;quot; argument must be translated&lt;br /&gt;
                &#039;player_id&#039; =&amp;gt; $player_id,&lt;br /&gt;
                &#039;player_name&#039; =&amp;gt; self::getActivePlayerName(),&lt;br /&gt;
                &#039;points&#039; =&amp;gt; $points,&lt;br /&gt;
                &#039;card_name&#039; =&amp;gt; $this-&amp;gt;card_types[8][&#039;name&#039;] // &amp;lt;==== Here, we provide original English string.&lt;br /&gt;
            ) ); &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To ensure the translation of the i18n argument will be made, clienttranslate must have been used somewhere, for instance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;card_types = array(&lt;br /&gt;
     1 =&amp;gt; array(&lt;br /&gt;
        &#039;name&#039; =&amp;gt; clienttranslate(&amp;quot;Amulet of Air&amp;quot;),&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pay attention when using &#039;i18n&#039; argument when translating argument for client : do NOT use same argument for both translation AND key code for client side action (like using &#039;card_name&#039; to move it on player board as described in the example). It&#039;s pretty obvious in the example, but it can be very tricky when translation is made at the end of the development (which is often the case). Use explicit argument name like &#039;card_name_translated&#039; by example.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING:&#039;&#039;&#039; you should NEVER use concatenation with clienttranslate, as it would result in a different string to translate at runtime than the one retrieved statically in the translation system, and so translation would not be applied. If you need to compose a string, use substitution and the i18n parameter (but you also have to pay attention not to compose sentences in a way that is dependent upon the English language specific syntax, or it may be impossible to translate correctly in another language: sometimes, you need multiple full sentences rather than relying on substitution).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;self::_( &amp;quot;my string to translate&amp;quot; ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function returns a string translated in the language of CURRENT user (i.e. player who send the request to the server) (be careful, this is NOT the active player).&lt;br /&gt;
&lt;br /&gt;
Most of the time, you don&#039;t need to translate strings on server side, except on the following 3 situations:&lt;br /&gt;
* When throwing an exception because the player did a forbidden move.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// This will display a translatable red message to the player that just did some wrong action:&lt;br /&gt;
throw new BgaUserException( self::_(&#039;You must choose 3 cards&#039;) );&lt;br /&gt;
&lt;br /&gt;
// ... notice the use of BgaUserException that signals that this exception is &amp;quot;expected&amp;quot;. In theory, all exception that are expected should be translated.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In &amp;quot;yourgame.view.php&amp;quot;, when creating the labels for the game interface used in your template (.tpl) file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$this-&amp;gt;tpl[&#039;CARDS_FOR_YEAR_2&#039;] = self::_(&amp;quot;Your cards for year II&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Eventually, in your material.inc.php, if for example you need to use some string elements in your exceptions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// In material.inc.php, $this-&amp;gt;energies[n][&#039;nametr&#039;] has been created with the self::_() method. Now we can do this:&lt;br /&gt;
throw new BgaUserException( self::_(&amp;quot;To execute this action you need more: &amp;quot;).&#039; &#039;.$this-&amp;gt;energies[$resource_id][&#039;nametr&#039;] );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Eventually, in your &amp;quot;getAllDatas&amp;quot; PHP method, as the data return by this method is used only by current user.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;totranslate( &amp;quot;my string to translate&amp;quot; ):&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This function works exactly like &#039;clienttranslate&#039;, except it tells BGA that the string is not needed on client side.&lt;br /&gt;
&lt;br /&gt;
You should not use this function, except on the following cases:&lt;br /&gt;
* Statistics name in stats.inc.php&lt;br /&gt;
* Option names and option values name in gameoptions.inc.php&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Game_layout:_view_and_template:_yourgamename.view.php_and_yourgamename_yourgamename.tpl&amp;diff=5993</id>
		<title>Game layout: view and template: yourgamename.view.php and yourgamename yourgamename.tpl</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Game_layout:_view_and_template:_yourgamename.view.php_and_yourgamename_yourgamename.tpl&amp;diff=5993"/>
		<updated>2020-10-27T19:10:04Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: /* Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
These 2 files work together to provide the HTML layout of your game.&lt;br /&gt;
&lt;br /&gt;
Using these 2 files, you specify what HTML is rendered in your game client interface.&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;yourgame.tpl&amp;gt;, you can directly write raw HTML that will be displayed by the browser.&lt;br /&gt;
&lt;br /&gt;
Example: extract of &amp;quot;hearts_hearts.tpl&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;myhand_wrap&amp;quot; class=&amp;quot;whiteblock&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;h3&amp;gt;{MY_HAND}&amp;lt;/h3&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;myhand&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WARNING ==&lt;br /&gt;
&lt;br /&gt;
Your view and your template are supposed to generate only the BASE layout of the game&lt;br /&gt;
&lt;br /&gt;
You shouldn&#039;t try to setup the current game situation in the view: this is the role of your Javascript code. Why? Because you&#039;ll have to write Javascript code to put game elements in place anyway, and you don&#039;t want to write it twice :)&lt;br /&gt;
&lt;br /&gt;
Example of things to generate in your view:&lt;br /&gt;
* The overall layout of your game interface (what is displayed where).&lt;br /&gt;
* The board and fixed elements on the board (ex: places for cards, squares, ...).&lt;br /&gt;
&lt;br /&gt;
Example of things that shouldn&#039;t be generate by your view:&lt;br /&gt;
* Game elements that come and go from the game area.&lt;br /&gt;
* Game elements that normally hidden from players (other players cards, cards in the deck).&lt;br /&gt;
&lt;br /&gt;
== phplib template system ==&lt;br /&gt;
&lt;br /&gt;
BGA is using the phplib template system, used for example in PHPbb forums.&lt;br /&gt;
&lt;br /&gt;
More details about how to use phplib template system here:&lt;br /&gt;
https://web.archive.org/web/20170506065401/http://www.phpbuilder.com:80/columns/david20000512.php3&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
In your template (&amp;quot;tpl&amp;quot;) file, you can use variables. Then in your view (&amp;quot;.view.php&amp;quot;) file, you fill these variables with value.&lt;br /&gt;
&lt;br /&gt;
In the example above, &amp;quot;{MY_HAND}&amp;quot; is a variable. As you can see, a variable is uppercase characters border by &amp;quot;{&amp;quot; and &amp;quot;}&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To give a value to this variable in your view.php:&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   // Display a translated version of &amp;quot;My hand&amp;quot; at the place of the variable in the template&lt;br /&gt;
   $this-&amp;gt;tpl[&#039;MY_HAND&#039;] = self::_(&amp;quot;My hand&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   // Display some raw HTML material at the place of the variable&lt;br /&gt;
   $this-&amp;gt;tpl[&#039;MY_HAND&#039;] = self::raw( &amp;quot;&amp;lt;div class=&#039;myhand_icon&#039;&amp;gt;&amp;lt;/div&amp;gt;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WARNING: do not use a variable called {id} as it will interfere with action buttons.&lt;br /&gt;
&lt;br /&gt;
WARNING: do not use a variable called {LB_[whatever]} as any variable starting with LB_ will interfere with the translation system.&lt;br /&gt;
&lt;br /&gt;
== Blocks ==&lt;br /&gt;
&lt;br /&gt;
Using &amp;quot;blocks&amp;quot;, you can repeat a piece of HTML from your template several time.&lt;br /&gt;
&lt;br /&gt;
You should use &amp;quot;blocks&amp;quot; whenever you have a block of HTML that must be repeated many times. For example, for &#039;&#039;Reversi&#039;&#039;, we have to generate 64 (8x8) squares:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(in reversi_reversi.tpl)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;board&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- BEGIN square --&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;square_{X}_{Y}&amp;quot; class=&amp;quot;square&amp;quot; style=&amp;quot;left: {LEFT}px; top: {TOP}px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;!-- END square --&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;div id=&amp;quot;discs&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(in reversi.view.php)&lt;br /&gt;
&lt;br /&gt;
 $this-&amp;gt;page-&amp;gt;begin_block( &amp;quot;reversi_reversi&amp;quot;, &amp;quot;square&amp;quot; );&lt;br /&gt;
        &lt;br /&gt;
 $hor_scale = 64.8;&lt;br /&gt;
 $ver_scale = 64.4;&lt;br /&gt;
 for( $x=1; $x&amp;lt;=8; $x++ )&lt;br /&gt;
 {&lt;br /&gt;
    for( $y=1; $y&amp;lt;=8; $y++ )&lt;br /&gt;
    {&lt;br /&gt;
       $this-&amp;gt;page-&amp;gt;insert_block( &amp;quot;square&amp;quot;, array(&lt;br /&gt;
         &#039;X&#039; =&amp;gt; $x,&lt;br /&gt;
         &#039;Y&#039; =&amp;gt; $y,&lt;br /&gt;
         &#039;LEFT&#039; =&amp;gt; round( ($x-1)*$hor_scale+10 ),&lt;br /&gt;
         &#039;TOP&#039; =&amp;gt; round( ($y-1)*$ver_scale+7 )&lt;br /&gt;
        ) );&lt;br /&gt;
    }        &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanations:&lt;br /&gt;
* You specify a block in your template file, using &amp;quot;BEGIN&amp;quot; and &amp;quot;END&amp;quot; keywords. In the example above, we are creating a block named &amp;quot;square&amp;quot;.&lt;br /&gt;
* In your view, you declare your block using &amp;quot;begin_block&amp;quot; method.&lt;br /&gt;
* Then, you can insert as many block as you want to, using &amp;quot;insert_block&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
The insert_block method takes 2 parameters:&lt;br /&gt;
* the name of the block to insert.&lt;br /&gt;
* an associative array you can use to assign values to template variables of this block. In the example above, there are 4 parameters in the block (X, Y, LEFT and TOP).&lt;br /&gt;
&lt;br /&gt;
== Nested blocks ==&lt;br /&gt;
&lt;br /&gt;
You can use nested blocks. In the example below, we are going to add a mini-board for each player of the game, with 4 card places on each of it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(In template file)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- BEGIN player --&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;miniboard&amp;quot; id=&amp;quot;miniboard_{PLAYER_ID}&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;div class=&amp;quot;card_places&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;!-- BEGIN card_place --&amp;gt;&lt;br /&gt;
            &amp;lt;div id=&amp;quot;card_place_{PLAYER_ID}_{PLACE_ID}&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;!-- END card_place --&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- END player --&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
(In view file)&lt;br /&gt;
&lt;br /&gt;
$this-&amp;gt;page-&amp;gt;begin_block( &amp;quot;mygame_mygame.tpl&amp;quot;, &amp;quot;card_place&amp;quot; ); // Nested block must be declared first&lt;br /&gt;
$this-&amp;gt;page-&amp;gt;begin_block( &amp;quot;mygame_mygame.tpl&amp;quot;, &amp;quot;player&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
foreach( $players as $player_id =&amp;gt; $player )&lt;br /&gt;
{&lt;br /&gt;
    // Important: nested block must be reset here, otherwise the second player miniboard will&lt;br /&gt;
    //  have 8 card_place, the third will have 12 card_place, and so one...&lt;br /&gt;
    $this-&amp;gt;page-&amp;gt;reset_subblocks( &#039;card_place&#039; ); &lt;br /&gt;
&lt;br /&gt;
    for( $i=1; $i&amp;lt;=4; $i++ )&lt;br /&gt;
    {&lt;br /&gt;
       $this-&amp;gt;page-&amp;gt;insert_block( &amp;quot;card_place&amp;quot;, array( &lt;br /&gt;
             &#039;PLAYER_ID&#039; =&amp;gt; $player_id,&lt;br /&gt;
             &#039;PLACE_ID&#039; =&amp;gt; $i&lt;br /&gt;
          )&lt;br /&gt;
       );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    $this-&amp;gt;page-&amp;gt;insert_block( &#039;player&#039;, array( &#039;PLAYER_ID&#039; =&amp;gt; $player_id );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Javascript templates ==&lt;br /&gt;
&lt;br /&gt;
For game elements that come and go from the game area, we suggest you to define a Javascript template.&lt;br /&gt;
&lt;br /&gt;
A Javascript template is defined in your template file like this:&lt;br /&gt;
&lt;br /&gt;
(Reversi Token from Reversi example):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Templates&lt;br /&gt;
&lt;br /&gt;
var jstpl_disc=&#039;&amp;lt;div class=&amp;quot;disc disccolor_${color}&amp;quot; id=&amp;quot;disc_${xy}&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: a section for javascript templates is already available at the end of your template skeleton file.&lt;br /&gt;
&lt;br /&gt;
Then, you can use this javascript template to insert this piece of HTML in your game interface, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    dojo.place( this.format_block( &#039;jstpl_disc&#039;, {&lt;br /&gt;
           xy: x+&#039;&#039;+y,&lt;br /&gt;
           color: color&lt;br /&gt;
    } ) , &#039;discs&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WARNING: always use lowercase for substitution variables in your Javascript templates, in order to avoid collision with phplib template variables (in particular, do not use ${ID}).&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;you must translate&#039;&#039;&#039; any text arguments passed to &#039;&#039;this.format_block()&#039;&#039; that will be rendered on the screen, for example [[Translations#On_client_side_.28Javascript.29|using &amp;quot;_()&amp;quot;]].&lt;br /&gt;
&lt;br /&gt;
== How to access game information from .view.php? ==&lt;br /&gt;
&lt;br /&gt;
From your .view.php, you can access the following:&lt;br /&gt;
&lt;br /&gt;
=== Access current player id===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  global $g_user;&lt;br /&gt;
  $current_player_id = $g_user-&amp;gt;get_id();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Access game object ===&lt;br /&gt;
&lt;br /&gt;
In your view file, &amp;quot;$this-&amp;gt;game&amp;quot; contains an instance of your main game class.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   // Access to some game elements description described in your &amp;quot;material.inc.php&amp;quot;:&lt;br /&gt;
   $my_cards_types = $this-&amp;gt;game-&amp;gt;card_types;&lt;br /&gt;
&lt;br /&gt;
   // Access to any (public) method defined in my .game.php file:&lt;br /&gt;
   $result = $this-&amp;gt;game-&amp;gt;myMethod();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tips: displaying a nice button ==&lt;br /&gt;
&lt;br /&gt;
From time to time, you need to display a standard button in your interface. BGA framework provides you a standard button that you can use directly in your interface:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;#&amp;quot; id=&amp;quot;my_button_id&amp;quot; class=&amp;quot;bgabutton bgabutton_blue&amp;quot;&amp;gt;&amp;lt;span&amp;gt;My blue button&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;#&amp;quot; id=&amp;quot;my_button_id&amp;quot; class=&amp;quot;bgabutton bgabutton_gray&amp;quot;&amp;gt;&amp;lt;span&amp;gt;My gray button&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;#&amp;quot; id=&amp;quot;my_button_id&amp;quot; class=&amp;quot;bgabutton bgabutton_red&amp;quot;&amp;gt;&amp;lt;span&amp;gt;My red button&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;#&amp;quot; id=&amp;quot;my_button_id&amp;quot; class=&amp;quot;bgabutton bgabutton_red bgabutton_big&amp;quot;&amp;gt;&amp;lt;span&amp;gt;My big red button&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: To see it in action, check for example a Coloretto game&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Game_layout:_view_and_template:_yourgamename.view.php_and_yourgamename_yourgamename.tpl&amp;diff=5992</id>
		<title>Game layout: view and template: yourgamename.view.php and yourgamename yourgamename.tpl</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Game_layout:_view_and_template:_yourgamename.view.php_and_yourgamename_yourgamename.tpl&amp;diff=5992"/>
		<updated>2020-10-27T19:09:50Z</updated>

		<summary type="html">&lt;p&gt;Inaofr: Add a warning on variable name.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
These 2 files work together to provide the HTML layout of your game.&lt;br /&gt;
&lt;br /&gt;
Using these 2 files, you specify what HTML is rendered in your game client interface.&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;yourgame.tpl&amp;gt;, you can directly write raw HTML that will be displayed by the browser.&lt;br /&gt;
&lt;br /&gt;
Example: extract of &amp;quot;hearts_hearts.tpl&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  &amp;lt;div id=&amp;quot;myhand_wrap&amp;quot; class=&amp;quot;whiteblock&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;h3&amp;gt;{MY_HAND}&amp;lt;/h3&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;myhand&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== WARNING ==&lt;br /&gt;
&lt;br /&gt;
Your view and your template are supposed to generate only the BASE layout of the game&lt;br /&gt;
&lt;br /&gt;
You shouldn&#039;t try to setup the current game situation in the view: this is the role of your Javascript code. Why? Because you&#039;ll have to write Javascript code to put game elements in place anyway, and you don&#039;t want to write it twice :)&lt;br /&gt;
&lt;br /&gt;
Example of things to generate in your view:&lt;br /&gt;
* The overall layout of your game interface (what is displayed where).&lt;br /&gt;
* The board and fixed elements on the board (ex: places for cards, squares, ...).&lt;br /&gt;
&lt;br /&gt;
Example of things that shouldn&#039;t be generate by your view:&lt;br /&gt;
* Game elements that come and go from the game area.&lt;br /&gt;
* Game elements that normally hidden from players (other players cards, cards in the deck).&lt;br /&gt;
&lt;br /&gt;
== phplib template system ==&lt;br /&gt;
&lt;br /&gt;
BGA is using the phplib template system, used for example in PHPbb forums.&lt;br /&gt;
&lt;br /&gt;
More details about how to use phplib template system here:&lt;br /&gt;
https://web.archive.org/web/20170506065401/http://www.phpbuilder.com:80/columns/david20000512.php3&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
In your template (&amp;quot;tpl&amp;quot;) file, you can use variables. Then in your view (&amp;quot;.view.php&amp;quot;) file, you fill these variables with value.&lt;br /&gt;
&lt;br /&gt;
In the example above, &amp;quot;{MY_HAND}&amp;quot; is a variable. As you can see, a variable is uppercase characters border by &amp;quot;{&amp;quot; and &amp;quot;}&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To give a value to this variable in your view.php:&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   // Display a translated version of &amp;quot;My hand&amp;quot; at the place of the variable in the template&lt;br /&gt;
   $this-&amp;gt;tpl[&#039;MY_HAND&#039;] = self::_(&amp;quot;My hand&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
   // Display some raw HTML material at the place of the variable&lt;br /&gt;
   $this-&amp;gt;tpl[&#039;MY_HAND&#039;] = self::raw( &amp;quot;&amp;lt;div class=&#039;myhand_icon&#039;&amp;gt;&amp;lt;/div&amp;gt;&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WARNING: do not use a variable called {id} as it will interfere with action buttons.&lt;br /&gt;
WARNING: do not use a variable called {LB_[whatever]} as any variable starting with LB_ will interfere with the translation system.&lt;br /&gt;
&lt;br /&gt;
== Blocks ==&lt;br /&gt;
&lt;br /&gt;
Using &amp;quot;blocks&amp;quot;, you can repeat a piece of HTML from your template several time.&lt;br /&gt;
&lt;br /&gt;
You should use &amp;quot;blocks&amp;quot; whenever you have a block of HTML that must be repeated many times. For example, for &#039;&#039;Reversi&#039;&#039;, we have to generate 64 (8x8) squares:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(in reversi_reversi.tpl)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;board&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- BEGIN square --&amp;gt;&lt;br /&gt;
        &amp;lt;div id=&amp;quot;square_{X}_{Y}&amp;quot; class=&amp;quot;square&amp;quot; style=&amp;quot;left: {LEFT}px; top: {TOP}px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;!-- END square --&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &amp;lt;div id=&amp;quot;discs&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(in reversi.view.php)&lt;br /&gt;
&lt;br /&gt;
 $this-&amp;gt;page-&amp;gt;begin_block( &amp;quot;reversi_reversi&amp;quot;, &amp;quot;square&amp;quot; );&lt;br /&gt;
        &lt;br /&gt;
 $hor_scale = 64.8;&lt;br /&gt;
 $ver_scale = 64.4;&lt;br /&gt;
 for( $x=1; $x&amp;lt;=8; $x++ )&lt;br /&gt;
 {&lt;br /&gt;
    for( $y=1; $y&amp;lt;=8; $y++ )&lt;br /&gt;
    {&lt;br /&gt;
       $this-&amp;gt;page-&amp;gt;insert_block( &amp;quot;square&amp;quot;, array(&lt;br /&gt;
         &#039;X&#039; =&amp;gt; $x,&lt;br /&gt;
         &#039;Y&#039; =&amp;gt; $y,&lt;br /&gt;
         &#039;LEFT&#039; =&amp;gt; round( ($x-1)*$hor_scale+10 ),&lt;br /&gt;
         &#039;TOP&#039; =&amp;gt; round( ($y-1)*$ver_scale+7 )&lt;br /&gt;
        ) );&lt;br /&gt;
    }        &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Explanations:&lt;br /&gt;
* You specify a block in your template file, using &amp;quot;BEGIN&amp;quot; and &amp;quot;END&amp;quot; keywords. In the example above, we are creating a block named &amp;quot;square&amp;quot;.&lt;br /&gt;
* In your view, you declare your block using &amp;quot;begin_block&amp;quot; method.&lt;br /&gt;
* Then, you can insert as many block as you want to, using &amp;quot;insert_block&amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
The insert_block method takes 2 parameters:&lt;br /&gt;
* the name of the block to insert.&lt;br /&gt;
* an associative array you can use to assign values to template variables of this block. In the example above, there are 4 parameters in the block (X, Y, LEFT and TOP).&lt;br /&gt;
&lt;br /&gt;
== Nested blocks ==&lt;br /&gt;
&lt;br /&gt;
You can use nested blocks. In the example below, we are going to add a mini-board for each player of the game, with 4 card places on each of it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(In template file)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- BEGIN player --&amp;gt;&lt;br /&gt;
    &amp;lt;div class=&amp;quot;miniboard&amp;quot; id=&amp;quot;miniboard_{PLAYER_ID}&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;div class=&amp;quot;card_places&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;!-- BEGIN card_place --&amp;gt;&lt;br /&gt;
            &amp;lt;div id=&amp;quot;card_place_{PLAYER_ID}_{PLACE_ID}&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;/div&amp;gt;&lt;br /&gt;
            &amp;lt;!-- END card_place --&amp;gt;&lt;br /&gt;
        &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;!-- END player --&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
(In view file)&lt;br /&gt;
&lt;br /&gt;
$this-&amp;gt;page-&amp;gt;begin_block( &amp;quot;mygame_mygame.tpl&amp;quot;, &amp;quot;card_place&amp;quot; ); // Nested block must be declared first&lt;br /&gt;
$this-&amp;gt;page-&amp;gt;begin_block( &amp;quot;mygame_mygame.tpl&amp;quot;, &amp;quot;player&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
foreach( $players as $player_id =&amp;gt; $player )&lt;br /&gt;
{&lt;br /&gt;
    // Important: nested block must be reset here, otherwise the second player miniboard will&lt;br /&gt;
    //  have 8 card_place, the third will have 12 card_place, and so one...&lt;br /&gt;
    $this-&amp;gt;page-&amp;gt;reset_subblocks( &#039;card_place&#039; ); &lt;br /&gt;
&lt;br /&gt;
    for( $i=1; $i&amp;lt;=4; $i++ )&lt;br /&gt;
    {&lt;br /&gt;
       $this-&amp;gt;page-&amp;gt;insert_block( &amp;quot;card_place&amp;quot;, array( &lt;br /&gt;
             &#039;PLAYER_ID&#039; =&amp;gt; $player_id,&lt;br /&gt;
             &#039;PLACE_ID&#039; =&amp;gt; $i&lt;br /&gt;
          )&lt;br /&gt;
       );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    $this-&amp;gt;page-&amp;gt;insert_block( &#039;player&#039;, array( &#039;PLAYER_ID&#039; =&amp;gt; $player_id );&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Javascript templates ==&lt;br /&gt;
&lt;br /&gt;
For game elements that come and go from the game area, we suggest you to define a Javascript template.&lt;br /&gt;
&lt;br /&gt;
A Javascript template is defined in your template file like this:&lt;br /&gt;
&lt;br /&gt;
(Reversi Token from Reversi example):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// Templates&lt;br /&gt;
&lt;br /&gt;
var jstpl_disc=&#039;&amp;lt;div class=&amp;quot;disc disccolor_${color}&amp;quot; id=&amp;quot;disc_${xy}&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&#039;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: a section for javascript templates is already available at the end of your template skeleton file.&lt;br /&gt;
&lt;br /&gt;
Then, you can use this javascript template to insert this piece of HTML in your game interface, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    dojo.place( this.format_block( &#039;jstpl_disc&#039;, {&lt;br /&gt;
           xy: x+&#039;&#039;+y,&lt;br /&gt;
           color: color&lt;br /&gt;
    } ) , &#039;discs&#039; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WARNING: always use lowercase for substitution variables in your Javascript templates, in order to avoid collision with phplib template variables (in particular, do not use ${ID}).&lt;br /&gt;
&lt;br /&gt;
Note that &#039;&#039;&#039;you must translate&#039;&#039;&#039; any text arguments passed to &#039;&#039;this.format_block()&#039;&#039; that will be rendered on the screen, for example [[Translations#On_client_side_.28Javascript.29|using &amp;quot;_()&amp;quot;]].&lt;br /&gt;
&lt;br /&gt;
== How to access game information from .view.php? ==&lt;br /&gt;
&lt;br /&gt;
From your .view.php, you can access the following:&lt;br /&gt;
&lt;br /&gt;
=== Access current player id===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  global $g_user;&lt;br /&gt;
  $current_player_id = $g_user-&amp;gt;get_id();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Access game object ===&lt;br /&gt;
&lt;br /&gt;
In your view file, &amp;quot;$this-&amp;gt;game&amp;quot; contains an instance of your main game class.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   // Access to some game elements description described in your &amp;quot;material.inc.php&amp;quot;:&lt;br /&gt;
   $my_cards_types = $this-&amp;gt;game-&amp;gt;card_types;&lt;br /&gt;
&lt;br /&gt;
   // Access to any (public) method defined in my .game.php file:&lt;br /&gt;
   $result = $this-&amp;gt;game-&amp;gt;myMethod();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tips: displaying a nice button ==&lt;br /&gt;
&lt;br /&gt;
From time to time, you need to display a standard button in your interface. BGA framework provides you a standard button that you can use directly in your interface:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;#&amp;quot; id=&amp;quot;my_button_id&amp;quot; class=&amp;quot;bgabutton bgabutton_blue&amp;quot;&amp;gt;&amp;lt;span&amp;gt;My blue button&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;#&amp;quot; id=&amp;quot;my_button_id&amp;quot; class=&amp;quot;bgabutton bgabutton_gray&amp;quot;&amp;gt;&amp;lt;span&amp;gt;My gray button&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;#&amp;quot; id=&amp;quot;my_button_id&amp;quot; class=&amp;quot;bgabutton bgabutton_red&amp;quot;&amp;gt;&amp;lt;span&amp;gt;My red button&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;a href=&amp;quot;#&amp;quot; id=&amp;quot;my_button_id&amp;quot; class=&amp;quot;bgabutton bgabutton_red bgabutton_big&amp;quot;&amp;gt;&amp;lt;span&amp;gt;My big red button&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: To see it in action, check for example a Coloretto game&lt;/div&gt;</summary>
		<author><name>Inaofr</name></author>
	</entry>
</feed>