<?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=Jiiru</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=Jiiru"/>
	<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/Special:Contributions/Jiiru"/>
	<updated>2026-11-03T11:23:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=BgaDice&amp;diff=31368</id>
		<title>BgaDice</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=BgaDice&amp;diff=31368"/>
		<updated>2026-09-09T10:26:14Z</updated>

		<summary type="html">&lt;p&gt;Jiiru: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Studio_Framework_Navigation}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&#039;&#039;&#039;bga-dice&#039;&#039;&#039; is a javascript component to display dice.&lt;br /&gt;
&lt;br /&gt;
The lib will handle associated animations (roll animation, moving between stocks).&lt;br /&gt;
&lt;br /&gt;
To see how its work and access examples of source code (via browser dev tools) see&lt;br /&gt;
&#039;&#039;&#039;[https://x.boardgamearena.net/data/game-libs/bga-dice/1.x/demo/index.html Demo]&#039;&#039;&#039;  &lt;br /&gt;
&lt;br /&gt;
For comprehensive API docs see&lt;br /&gt;
&#039;&#039;&#039;[https://x.boardgamearena.net/data/game-libs/bga-dice/1.x/docs/index.html Doc]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Load the lib:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
const BgaAnimations = await importEsmLib(&#039;bga-animations&#039;, &#039;1.x&#039;); // the library uses bga-animations so this is required!&lt;br /&gt;
const BgaDice = await importEsmLib(&#039;bga-dice&#039;, &#039;1.x&#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This line should be placed on top of the JS file, before any class declaration.&lt;br /&gt;
&lt;br /&gt;
Legacy way;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define([&lt;br /&gt;
    &amp;quot;dojo&amp;quot;,&amp;quot;dojo/_base/declare&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/core/gamegui&amp;quot;,&lt;br /&gt;
    &amp;quot;ebg/counter&amp;quot;,&lt;br /&gt;
    getLibUrl(&#039;bga-animations&#039;, &#039;1.x&#039;), // the lib uses bga-animations so this is required!&lt;br /&gt;
    getLibUrl(&#039;bga-dice&#039;, &#039;1.x&#039;),&lt;br /&gt;
],&lt;br /&gt;
function (dojo, declare, gamegui, counter, BgaAnimations, BgaDice) { // note that the index of `BgaAnimations` must match the index of the define array&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In your game setup:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        // create the animation manager, and bind it to the `gameui.bgaAnimationsActive()` function&lt;br /&gt;
        this.animationManager = new BgaAnimations.Manager({&lt;br /&gt;
            animationsActive: () =&amp;gt; this.bga.gameui.bgaAnimationsActive(),&lt;br /&gt;
        });&lt;br /&gt;
&lt;br /&gt;
        // create the dice manager&lt;br /&gt;
        this.diceManager = new BgaDice.Manager({&lt;br /&gt;
            animationManager: this.animationManager,&lt;br /&gt;
            type: &#039;my-game-die&#039;,&lt;br /&gt;
        });&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Only setup an animation manager if you don&#039;t already have one, else re-use the same one.&lt;br /&gt;
&lt;br /&gt;
Example of usage:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        // create the stock, in the game setup&lt;br /&gt;
        this.dieStock = new BgaDice.LineStock(this.diceManager, document.getElementById(&#039;dice-stock&#039;));&lt;br /&gt;
        this.dieStock.addDice(gamedatas.dice); // dice should be something like [{ id: 1, face: 5, location: &#039;table&#039; }]&lt;br /&gt;
&lt;br /&gt;
async notif_rollDice(args) {&lt;br /&gt;
    await this.dieStock.rollDice(args.rolledDice); // similar form as above, but with a different face value.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Look at the demo page and the demo source code for a list of all possibilities!&lt;br /&gt;
&lt;br /&gt;
== Versioning ==&lt;br /&gt;
The lib is using semver, so you can require 1.x to be sure to have the last fixes without risking a breaking change. Any breaking change will be noted on the Changelog section.&lt;br /&gt;
&lt;br /&gt;
== Using with TypeScript ==&lt;br /&gt;
If you use TypeScript and this lib, you can download the &#039;&#039;&#039;[https://x.boardgamearena.net/data/game-libs/bga-dice/1.x/dist/bga-dice.d.ts d.ts]&#039;&#039;&#039; file to put in on your game folder to benefit from auto-completion. Depending on the way you build, you might need to remove the last line (the export instruction) to be able to use it.&lt;br /&gt;
&lt;br /&gt;
If your game class is not declared on the define callback, you will need to modify it with this trick (to avoid a &amp;quot;ReferenceError: BgaAnimations is not defined&amp;quot; error) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define([&lt;br /&gt;
        &amp;quot;dojo&amp;quot;,&lt;br /&gt;
        &amp;quot;dojo/_base/declare&amp;quot;,&lt;br /&gt;
        &amp;quot;ebg/core/gamegui&amp;quot;,&lt;br /&gt;
        &amp;quot;ebg/counter&amp;quot;,&lt;br /&gt;
        &amp;quot;ebg/stock&amp;quot;,&lt;br /&gt;
        getLibUrl(&#039;bga-animations&#039;, &#039;1.x&#039;),&lt;br /&gt;
    ],&lt;br /&gt;
function (dojo, declare, gamegui, counter, stock, BgaAnimations) {&lt;br /&gt;
    (window as any).BgaAnimations = BgaAnimations; //trick&lt;br /&gt;
    return declare(&amp;quot;bgagame.reforest&amp;quot;, ebg.core.gamegui, new Reforest());&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&#039;&#039;&#039;1.0.2&#039;&#039;&#039;: more logs for dice element not matching a card / accept keyed objects in addition to arrays on inputs&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1.0.1&#039;&#039;&#039;: Fix documentation&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;1.0.0&#039;&#039;&#039;: Initial version&lt;br /&gt;
&lt;br /&gt;
[[Category:Studio]]&lt;/div&gt;</summary>
		<author><name>Jiiru</name></author>
	</entry>
	<entry>
		<id>https://en.doc.boardgamearena.com/index.php?title=Gamehelparctic&amp;diff=22327</id>
		<title>Gamehelparctic</title>
		<link rel="alternate" type="text/html" href="https://en.doc.boardgamearena.com/index.php?title=Gamehelparctic&amp;diff=22327"/>
		<updated>2024-08-28T13:48:05Z</updated>

		<summary type="html">&lt;p&gt;Jiiru: /* Game End */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Arctic is a collection game where you will create a personal pile with Animal cards from the Arctic landscape.&lt;br /&gt;
&lt;br /&gt;
=== OVERVIEW ===&lt;br /&gt;
The objective of the game is to score the most points by:&lt;br /&gt;
&lt;br /&gt;
- Creating the longest possible sequence of consecutive cards for each animal from the Arctic landscape,&lt;br /&gt;
&lt;br /&gt;
- Diversifying your sequences,&lt;br /&gt;
&lt;br /&gt;
- Advancing your secret totem animal as far as possible.&lt;br /&gt;
&lt;br /&gt;
Important Rules:&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; An animal only counts once, only its longest sequence is considered.&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; A sequence requires at least two cards.&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; The scoring rules for all three ways to earn points are the same: 1=0pt, 2=1pt, 3=3pt, 4=6pt, 5=10pt, 6=15pt. You can find this scoring table on the Landscape.&lt;br /&gt;
&lt;br /&gt;
=== GAME TURN ===&lt;br /&gt;
Each turn, you must:&lt;br /&gt;
&lt;br /&gt;
1 • Add Animal cards to your pile and take a Power card.&lt;br /&gt;
&lt;br /&gt;
2 • Move the Animal tokens on the Landscape.&lt;br /&gt;
&lt;br /&gt;
3 • Draw cards into your hand.&lt;br /&gt;
&lt;br /&gt;
IMPORTANT: The most important card is the visible card on top of your pile. It determines your turn&#039;s characteristics, such as how many cards you will draw this turn, which animals you will move, and how many cards you will place during the next turn. This visible card changes every turn.&lt;br /&gt;
&lt;br /&gt;
1 • Choose from your Hand a number of cards equal to the placement value on your visible Animal card and place them on top of your personal pile in the order of your choice. Take the Power card corresponding to the main animal on your visible Animal card. Keep this Power card until someone takes it from you. (Power card details are on pages 10-11 of the rules.)&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; If you don&#039;t have enough cards in your hand, draw the necessary cards from the common draw pile and add them to your Penalty zone.&lt;br /&gt;
&lt;br /&gt;
2 • Move the Animal tokens on the Landscape corresponding to the main animal and the companion animal on your visible Animal card.&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; The Animal tokens always move in opposite directions unless they are both on one of the two ends of the Landscape (cards 0 and 15).&lt;br /&gt;
&lt;br /&gt;
3 • Draw from the River a number of cards equal to the draw value on your visible Animal card.&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; You can only have a maximum of 7 cards in your hand at the end of your turn. If you have more than 7, discard the excess cards of your choice into your Penalty zone.&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; Final Scoring: For each card in your Penalty zone at the end of the game, deduct 1 point from your score.&lt;/div&gt;</summary>
		<author><name>Jiiru</name></author>
	</entry>
</feed>