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:RawToTable"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m (also, you need to use backslashes with foreachtag)
(you also need to use #delay and #eval with foreachtag if you're passing the parameter into a template that uses other parser functions)
Line 27: Line 27:
 
|style="border:1px #AAA solid;padding:0.2em;text-align:center;"|{{#if:{{#df_tag:{{{1}}}|PETVALUE}}|{{Cgr|Y}}|{{Cgr|N}}}}
 
|style="border:1px #AAA solid;padding:0.2em;text-align:center;"|{{#if:{{#df_tag:{{{1}}}|PETVALUE}}|{{Cgr|Y}}|{{Cgr|N}}}}
 
|style="border:1px #AAA solid;padding:0.2em;text-align:center;"|{{#if:{{#df_tag:{{{1}}}|TRAINABLE}}|{{Cgr|Y}}|{{Cgr|N}}}}
 
|style="border:1px #AAA solid;padding:0.2em;text-align:center;"|{{#if:{{#df_tag:{{{1}}}|TRAINABLE}}|{{Cgr|Y}}|{{Cgr|N}}}}
|style="border:1px #AAA solid;padding:0.2em;font-size: 100%;background: black;color:{{fgcolor|{{{color|2:0:0}}}}};text-align:center;"|{{#df_foreachtag:{{{1}}}|BIOME|{{bIcon|\2}}}} {{#iferror: {{#ifexpr: ({{#df_tag:{{{1}}}|COMMON_DOMESTIC}}) = 1 |{{bIcon|DOMESTIC}}}}|}}
+
|style="border:1px #AAA solid;padding:0.2em;font-size: 100%;background: black;color:{{fgcolor|{{{color|2:0:0}}}}};text-align:center;"|{{#eval:{{#df_foreachtag:{{{1}}}|BIOME|{{#delay:bIcon|\2}}}}}} {{#iferror: {{#ifexpr:({{#df_tag:{{{1}}}|COMMON_DOMESTIC}}) = 1|{{bIcon|DOMESTIC}}}}|}}
 
|style="border:1px #AAA solid;padding:0.2em;text-align:center;"|N/A
 
|style="border:1px #AAA solid;padding:0.2em;text-align:center;"|N/A
 
|style="border:1px #AAA solid;padding:0.2em;text-align:center;"|{{#df_tagvalue:{{{1}}}|PETVALUE|0}}
 
|style="border:1px #AAA solid;padding:0.2em;text-align:center;"|{{#df_tagvalue:{{{1}}}|PETVALUE|0}}

Revision as of 16:29, 10 April 2011


Usage:

  {{RawToTable | <single creature raw file> | <place a 1 here if you want to get source> }}


This will automatically fill in most values of the creature table, reading the raws.


Ex: {{RawToTable|{{raw|DF2010:creature_large_ocean.txt|CREATURE|WALRUS}}|1}}



Symbol Name Hostile? Food? Swims? Flies? Magma-safe? Tamable? Trainable? Biome Adult mass (g) Pet Value
not found not found 1N.gif N/A 1N.gif 1N.gif 1N.gif 1N.gif 1N.gif N/A not found

<span style="width:Expression error: Unrecognized word "found".%; height:6px; background:#ff5; float:left; padding:0; margin:0;">