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

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(fix gravitate_body_size formula)
(index all body sizes in reverse; return 0 for non-existent sizes)
Line 1: Line 1:
<includeonly>{{#ifeq:{{tagvalue|{{{1|}}}|GRAVITATE_BODY_SIZE|notfound=0}}|0|{{#expr:{{{3|{{tagentryspec|{{{1|}}}|BODY_SIZE|3|{{{2|-1}}}|notfound=1}}}}} * ({{tagvalue|{{{1|}}}|CHANGE_BODY_SIZE_PERC|notfound=100}}/100)}}|{{#expr:{{{3|{{tagentryspec|{{{1|}}}|BODY_SIZE|3|{{{2|-1}}}|notfound=1}}}}} * ({{tagentryspec|{{{1|}}}|BODY_SIZE|3|-1|notfound=1}} + {{tagvalue|{{{1|}}}|GRAVITATE_BODY_SIZE|notfound=0}}) / ({{tagentryspec|{{{1|}}}|BODY_SIZE|3|-1|notfound=1}} * 2)}}}}</includeonly><noinclude>
+
<includeonly>{{#ifeq:{{tagvalue|{{{1|}}}|GRAVITATE_BODY_SIZE|notfound=0}}|0|{{#expr:{{{3|{{tagentryspec|{{{1|}}}|BODY_SIZE|3|{{#expr:{{{2|2}}}-3}}|notfound=0}}}}} * ({{tagvalue|{{{1|}}}|CHANGE_BODY_SIZE_PERC|notfound=100}}/100)}}|{{#expr:{{{3|{{tagentryspec|{{{1|}}}|BODY_SIZE|3|{{#expr:{{{2|2}}}-3}}|notfound=0}}}}} * ({{tagentryspec|{{{1|}}}|BODY_SIZE|3|-1|notfound=1}} + {{tagvalue|{{{1|}}}|GRAVITATE_BODY_SIZE|notfound=0}}) / ({{tagentryspec|{{{1|}}}|BODY_SIZE|3|-1|notfound=1}} * 2)}}}}</includeonly><noinclude>
 
Usage: <nowiki>{{bodysize | creature raws | growth stage | override}}</nowiki>
 
Usage: <nowiki>{{bodysize | creature raws | growth stage | override}}</nowiki>
  
If growth_stage is omitted, assumes adult body size.
+
growth_stage  
 +
0 -> child
 +
1 -> adolescent
 +
2 -> adult (default)
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Revision as of 23:44, 12 December 2012

Usage: {{bodysize | creature raws | growth stage | override}}

growth_stage 0 -> child 1 -> adolescent 2 -> adult (default)