- 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.
Difference between revisions of "Template:RawToTable"
m |
|||
(35 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
− | + | {{#switch: {{{mode}}} | |
− | + | |1=<span style="color:#f00;">RawToTable: Copying the text below will yield a specialized hostility table row as a result: </span><nowiki>{{CreatureWorking table row|1|name=[[</nowiki>{{lc:{{#df_tagentry:{{{1}}}|NAME|1}}}}<nowiki>]]</nowiki><nowiki>|symbol=</nowiki>{{#df_tagvalue:{{{1}}}|CREATURE_TILE|?}}<nowiki>|color=</nowiki>{{#df_tagvalue:{{{1}}}|COLOR|7:0:1}}<nowiki>|hostile=</nowiki>{{#if:{{#df_tag:{{{1}}}|LARGE_PREDATOR}}|<nowiki>Y</nowiki>|{{#if:{{#df_tag:{{{1}}}|ATTACK_TRIGGER}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}}}<nowiki>|fighter=</nowiki>{{#if:{{#df_tag:{{{1}}}|LIKES_FIGHTING}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}<nowiki>}}</nowiki> | |
− | + | |2=<span style="color:#f00;">RawToTable: Copying the text below will yield a specialized nutrition table row as a result: </span><nowiki>{{CreatureWorking table row|1|name=[[</nowiki>{{lc:{{#df_tagentry:{{{1}}}|NAME|1}}}}<nowiki>]]</nowiki><nowiki>|symbol=</nowiki>{{#df_tagvalue:{{{1}}}|CREATURE_TILE|?}}<nowiki>|color=</nowiki>{{#df_tagvalue:{{{1}}}|COLOR|7:0:1}}<nowiki>|egg=</nowiki>{{#if:{{#df_tag:{{{1}}}|LAYS_EGGS}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}<nowiki>|milk=</nowiki>{{#if:{{#df_tag:{{{1}}}|MILKABLE}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}<nowiki>|meat=</nowiki>{{#switch:Y|{{#if:{{#df_tagentry:{{{1}}}|ITEMCORPSE||1}}|N|Y}}=<nowiki>N</nowiki>|{{#if:{{#df_tagentry:{{{1}}}|NOMEAT||1}}|N|Y}}=<nowiki>N</nowiki>|{{#if:{{#df_tagentry:{{{1}}}|NOT_BUTCHERABLE||1}}|N|Y}}=<nowiki>N</nowiki>|{{#if:{{#df_tagentry:{{{1}}}|SMALL_REMAINS||1}}|N|Y}}=<nowiki>N</nowiki>|{{#if:{{#df_tagentry:{{{1}}}|INTELLIGENT||1}}|N|Y}}=<nowiki>N</nowiki>|{{#if:{{#df_tagentry:{{{1}}}|CAN_LEARN||1}}|N|Y}}=<nowiki>N</nowiki>|{{#if:{{#df_tagentry:{{{1}}}|CAN_SPEAK||1}}|N|Y}}=<nowiki>N</nowiki>|#default={{#if:{{#if:{{#df_tagentry:{{{1}}}|FISHITEM||1}}||NONEMPTY}}{{#if:{{#df_tagentry:{{{1}}}|FISHITEM||1}}||NONEMPTY}}|<nowiki>Y</nowiki>|<nowiki>N/A</nowiki>}}}}<nowiki>}}</nowiki> | |
− | + | |4=<span style="color:#f00;">RawToTable: Copying the text below will yield a specialized pet value table row as a result: </span><nowiki>{{CreatureWorking table row|4|name=[[</nowiki>{{lc:{{#df_tagentry:{{{1}}}|NAME|1}}}}<nowiki>]]</nowiki><nowiki>|symbol=</nowiki>{{#df_tagvalue:{{{1}}}|CREATURE_TILE|?}}<nowiki>|color=</nowiki>{{#df_tagvalue:{{{1}}}|COLOR|7:0:1}}<nowiki>|tamable=</nowiki>{{#if:{{#df_tag:{{{1}}}|PETVALUE}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}<nowiki>|trainable=</nowiki>{{#if:{{#df_tag:{{{1}}}|TRAINABLE}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}<nowiki>|value=</nowiki>{{#df_tagvalue:{{{1}}}|PETVALUE|0}}<nowiki>}}</nowiki> | |
− | | | + | |5=<span style="color:#f00;">RawToTable: Copying the text below will yield a specialized adult size table row as a result: </span><nowiki>{{CreatureWorking table row|5|name=[[</nowiki>{{lc:{{#df_tagentry:{{{1}}}|NAME|1}}}}<nowiki>]]</nowiki><nowiki>|symbol=</nowiki>{{#df_tagvalue:{{{1}}}|CREATURE_TILE|?}}<nowiki>|color=</nowiki>{{#df_tagvalue:{{{1}}}|COLOR|7:0:1}}<nowiki>|size=</nowiki>{{formatnum:{{CSizeInventory|{{lc:{{#df_tagentry:{{{1}}}|NAME|1}}}}}}}}<nowiki>}}</nowiki> |
− | | | + | |b1=<span style="color:#f00;">RawToTable: Copying the text below will yield a general creature table row as a result: </span><nowiki>{{CreatureWorking table row|b1|name=[[</nowiki>{{lc:{{#df_tagentry:{{{1}}}|NAME|1}}}}<nowiki>]]|symbol=</nowiki>{{#df_tagvalue:{{{1}}}|TILE|?}}<nowiki>|color=</nowiki>{{#df_tagvalue:{{{1}}}|COLOR|7:0:1}}<nowiki>|hostile=</nowiki>{{#if:{{#df_tag:{{{1}}}|LARGE_PREDATOR}}|<nowiki>Y</nowiki>|{{#if:{{#df_tag:{{{1}}}|ATTACK_TRIGGER}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}}}<nowiki>|swims=</nowiki>{{#if:{{#df_tag:{{{1}}}|SWIMS_INNATE}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}<nowiki>|flies=</nowiki>{{#if:{{#df_tag:{{{1}}}|FLIER}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}<nowiki>|size=</nowiki>{{#df_tagvalue:{{{1}}}|SIZE|0}}<nowiki>|value=</nowiki>{{#df_tagvalue:{{{1}}}|PETVALUE|0}}<nowiki>}}</nowiki> |
− | | | + | |#default=<span style="color:#f00;">RawToTable: </span><nowiki>{{CreatureWorking table row|name={{L|</nowiki>{{lc:{{#df_tagentry:{{{1}}}|NAME|1}}}}<nowiki>}}</nowiki><nowiki>|symbol=</nowiki>{{#df_tagvalue:{{{1}}}|CREATURE_TILE|?}}<nowiki>|color=</nowiki>{{#df_tagvalue:{{{1}}}|COLOR|7:0:1}}<nowiki>|hostile=</nowiki>{{#if:{{#df_tag:{{{1}}}|LARGE_PREDATOR}}|<nowiki>Y</nowiki>|{{#if:{{#df_tag:{{{1}}}|ATTACK_TRIGGER}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}}}<nowiki>|swims=</nowiki>{{#if:{{#df_tag:{{{1}}}|SWIMS_INNATE}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}<nowiki>|flies=</nowiki>{{#if:{{#df_tag:{{{1}}}|FLIER}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}<nowiki>|egg=</nowiki>{{#if:{{#df_tag:{{{1}}}|LAYS_EGGS}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}<nowiki>|milk=</nowiki>{{#if:{{#df_tag:{{{1}}}|MILKABLE}}|<nowiki>Y</nowiki>|<nowiki>N</nowiki>}}<nowiki>|meat=</nowiki>{{#switch:Y|{{#if:{{#df_tagentry:{{{1}}}|ITEMCORPSE||1}}|N|Y}}=<nowiki>N</nowiki>|{{#if:{{#df_tagentry:{{{1}}}|NOMEAT||1}}|N|Y}}=<nowiki>N</nowiki>|{{#if:{{#df_tagentry:{{{1}}}|NOT_BUTCHERABLE||1}}|N|Y}}=<nowiki>N</nowiki>|{{#if:{{#df_tagentry:{{{1}}}|SMALL_REMAINS||1}}|N|Y}}=<nowiki>N</nowiki>|{{#if:{{#df_tagentry:{{{1}}}|INTELLIGENT||1}}|N|Y}}=<nowiki>N</nowiki>|{{#if:{{#df_tagentry:{{{1}}}|CAN_LEARN||1}}|N|Y}}=<nowiki>N</nowiki>|{{#if:{{#df_tagentry:{{{1}}}|CAN_SPEAK||1}}|N|Y}}=<nowiki>N</nowiki>|#default={{#if:{{#if:{{#df_tagentry:{{{1}}}|FISHITEM||1}}||NONEMPTY}}{{#if:{{#df_tagentry:{{{1}}}|FISHITEM||1}}||NONEMPTY}}|<nowiki>Y</nowiki>|<nowiki>Y</nowiki>}}}}<nowiki>|size=</nowiki>{{formatnum:{{CSizeInventory|{{lc:{{#df_tagentry:{{{1}}}|NAME|1}}}}}}}}<nowiki>|value=</nowiki>{{#df_tagvalue:{{{1}}}|PETVALUE|0}}<nowiki>|alignment=</nowiki>{{#switch:1|{{#df_tag:{{{1}}}|BENIGN}}=Benign|{{#df_tag:{{{1}}}|GOOD}}=Good|{{#df_tag:{{{1}}}|EVIL}}=Evil|{{#df_tag:{{{1}}}|SAVAGE}}=Savage|#default=Neutral}}<nowiki>}}</nowiki> |
− | + | }}</includeonly><noinclude>{{documentation}}<noinclude> | |
− | | | ||
− | | | ||
− | | | ||
− | | | ||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | | | ||
− | {{ |
Latest revision as of 16:24, 26 July 2011
(view - edit - history - purge) Documentation
Usage:
{{ RawToTable | <single creature raw file> | mode=<table mode>}}
This template will automatically fill in most values of the creature table, reading the raws and then providing you with a preview and source. This should not actually be used outside of preview.
Warning: May be somewhat inaccurate in the meat column. Adult body size cannot be found from a raw file, as multiple body size tags exist and it is impossible to automatically distinguish between them.
Ex:
- {{RawToTable|{{v0.31:Cow/raw}}|mode=1}}
RawToTable: Copying the text below will yield a specialized hostility table row as a result: {{CreatureWorking table row|1|name=[[not found]]|symbol=|color=not found|hostile=N|fighter=N}}
- {{RawToTable|{{v0.31:Dragon/raw}}|mode=2}}
RawToTable: Copying the text below will yield a specialized nutrition table row as a result: {{CreatureWorking table row|1|name=[[not found]]|symbol=|color=not found|egg=Y|milk=N|meat=N/A}}
- {{RawToTable|{{v0.31:Longfin mako shark/raw}}}}
RawToTable: {{CreatureWorking table row|name={{L|not found}}|symbol=|color=not found|hostile=Y|swims=Y|flies=N|egg=N|milk=N|meat=Y|size=|value=500|alignment=Neutral}}