v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Template:Token"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(rmv default value 'c' of {{{2}}}; this prevents {{token/guess type}} from working, instead defaulting to Creature token)
(moving non-template stuff to doc)
Line 35: Line 35:
 
|#default={{token/guess type|{{{1|}}}}}
 
|#default={{token/guess type|{{{1|}}}}}
 
}}#{{{1|}}}}}}|{{#if:{{{3|}}}||[}}{{{1}}}{{#if:{{{3|}}}|]]:{{{3}}}]|]]]}}</code><noinclude>
 
}}#{{{1|}}}}}}|{{#if:{{{3|}}}||[}}{{{1}}}{{#if:{{{3|}}}|]]:{{{3}}}]|]]]}}</code><noinclude>
{{documentation}}
+
{{documentation}}</noinclude>
==To do==
 
* Add {{tl|text anchor}} to token tables (JS):
 
:<pre style="white-space:pre-wrap">$('#wpTextbox1').val($('#wpTextbox1').val().replace(/\|-\s*\n\|\s*([A-Z_]+)\s*\n/g, function(m, a){return '|-\n| {{text anchor|'+a+'}}\n'}));</pre>
 
:To check for missed rows:
 
:<pre>$('#wikiPreview tr').has('.text-anchor').hide()</pre>
 
 
 
==Examples==
 
*{{token|ATTACK|am}} (ammo)
 
*{{token|ARMORLEVEL|ar}} (armor)
 
*{{token|SPEED|c}} (creature)
 
*{{token|MANNERISM_EYE}} (argument not defined, guesses mannerism)
 
*{{token|NAME|c|cat:cats:cat}}
 
</noinclude>
 

Revision as of 11:53, 10 October 2021

[{{{1}}}]