Jump to content

Template:GameValue: Difference between revisions

From Bconomy Wiki
Add GameValue template for game-data values
 
GameReferenceSync (talk | contribs)
Synchronize public game reference data
 
Line 1: Line 1:
<includeonly><span class="bc-game-value" data-bc-key="{{{1}}}">{{{2|}}}</span></includeonly><noinclude>
<includeonly>{{#invoke:GameData|value}}</includeonly><noinclude>
Shows a number or name that comes from the game's own data.
Displays a current reference value from the running game, synchronized every 30 minutes.


== Usage ==
<pre>{{GameValue|farm.cropsDieTime}}</pre>
<code><nowiki>{{GameValue|key|default}}</nowiki></code>


* <code>key</code> names the value in the game data. Keys match the placeholder names used by the in-game Manual, for example <code>minBet</code> or <code>slotsJackpotMultiple</code>.
Keys use the manual path with dots, followed by the placeholder name, for example <code>items.market.marketPriceStep</code>. Browse [[GameData:Reference.json]] for available keys. Durations, numbers and generated Markdown are formatted from the feed's explicit format. Unknown keys display an error and place the article in [[:Category:Pages with missing game references]]. Literal fallback arguments are not used.
* <code>default</code> is the text wiki readers see. Write it already formatted, for example <code>10,000</code>.
 
The template renders <code><nowiki><span class="bc-game-value" data-bc-key="key">default</span></nowiki></code>. When the game client shows a wiki page, it replaces the default with the current value. Update the default when a value changes in the game.
 
== Example ==
<code><nowiki>The min bet is {{GameValue|minBet|10,000}} chips.</nowiki></code>
 
The min bet is {{GameValue|minBet|10,000}} chips.
</noinclude>
</noinclude>

Latest revision as of 21:44, 3 November 2026

Displays a current reference value from the running game, synchronized every 30 minutes.

{{GameValue|farm.cropsDieTime}}

Keys use the manual path with dots, followed by the placeholder name, for example items.market.marketPriceStep. Browse GameData:Reference.json for available keys. Durations, numbers and generated Markdown are formatted from the feed's explicit format. Unknown keys display an error and place the article in Category:Pages with missing game references. Literal fallback arguments are not used.