Difference between revisions of "Template:Stat Factors Table Row"
Jump to navigation
Jump to search
(Template:% with rouning 2) |
|||
Line 1: | Line 1: | ||
<includeonly>|- | <includeonly>|- | ||
! {{{1}}} | ! {{{1}}} | ||
− | | | + | | {{{2|{{#vardefine: tempValue | {{#expr: {{#var: skillBase}} + {{#var: skillBonus}}*{{{1}}}}} }} {{%|{{#ifexpr: {{#var: tempValue}} > {{#var: statMax}} | {{#var: statMax}} | {{#ifexpr: {{#var: tempValue}} < {{#var: statMin}} | {{#var: statMin}} | {{#var: tempValue}} }} }} | 2 }}}}}<!-- |
-->{{#ifexpr: {{#var: resultCols}} >= 2 | | -->{{#ifexpr: {{#var: resultCols}} >= 2 | | ||
− | <td>{{#vardefine: tempValue | {{#expr: ({{#var: skillBase}} + {{#var: skillBonus}}*{{{1}}})*(1+({{#var: capImportance}}*{{#ifexpr: {{#var: capLimit}} >= 1.25 | 0.25 | ({{#var: capLimit}} - 1) }} ))}} }} {{%|{{#ifexpr: {{#var: tempValue}} > {{#var: statMax}} | {{#var: statMax}} | {{#ifexpr: {{#var: tempValue}} < {{#var: statMin}} | {{#var: statMin}} | {{#var: tempValue}} }} }} | 2 }}</td> | + | <td>{{#vardefine: tempValue | {{#expr: {{{2|({{#var: skillBase}} + {{#var: skillBonus}}*{{{1}}}) }}}*(1+({{#var: capImportance}}*{{#ifexpr: {{#var: capLimit}} >= 1.25 | 0.25 | ({{#var: capLimit}} - 1) }} ))}} }} {{%|{{#ifexpr: {{#var: tempValue}} > {{#var: statMax}} | {{#var: statMax}} | {{#ifexpr: {{#var: tempValue}} < {{#var: statMin}} | {{#var: statMin}} | {{#var: tempValue}} }} }} | 2 }}</td> |
}}<!-- | }}<!-- | ||
-->{{#ifexpr: {{#var: resultCols}} >= 3 | | -->{{#ifexpr: {{#var: resultCols}} >= 3 | | ||
− | <td>{{#vardefine: tempValue | {{#expr: ({{#var: skillBase}} + {{#var: skillBonus}}*{{{1}}})*(1+({{#var: capImportance}}*{{#ifexpr: {{#var: capLimit}} >= 1.5 | 0.5 | ({{#var: capLimit}} - 1) }} ))}} }} {{%|{{#ifexpr: {{#var: tempValue}} > {{#var: statMax}} | {{#var: statMax}} | {{#ifexpr: {{#var: tempValue}} < {{#var: statMin}} | {{#var: statMin}} | {{#var: tempValue}} }} }} | 2 }}</td> | + | <td>{{#vardefine: tempValue | {{#expr: {{{2|({{#var: skillBase}} + {{#var: skillBonus}}*{{{1}}}) }}}*(1+({{#var: capImportance}}*{{#ifexpr: {{#var: capLimit}} >= 1.5 | 0.5 | ({{#var: capLimit}} - 1) }} ))}} }} {{%|{{#ifexpr: {{#var: tempValue}} > {{#var: statMax}} | {{#var: statMax}} | {{#ifexpr: {{#var: tempValue}} < {{#var: statMin}} | {{#var: statMin}} | {{#var: tempValue}} }} }} | 2 }}</td> |
}}</includeonly><noinclude>{{Documentation}}</noinclude> | }}</includeonly><noinclude>{{Documentation}}</noinclude> |
Revision as of 04:08, 11 May 2023
This template generates the table rows for the Template: Stat Factors Table. See that page for details on template function.
Examples
As this template is not intended for use without its parent, the parent is used below.
{{Stat Factors Table}}
on the Butchery Efficiency page would produce:
Cooking Skill Level | Butchery Efficiency | ||
---|---|---|---|
100% Manipulation | 125% Manipulation | 150% Manipulation | |
0 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
1 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
2 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
3 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
4 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
5 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
6 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
7 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
8 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
9 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
10 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
11 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
12 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
13 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
14 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
15 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
16 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
17 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
18 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
19 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
20 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% |
{{Stat Factors Table|Animal Gather Speed}}
on any page would produce:
Animals Skill Level | Animal Gather Speed | ||
---|---|---|---|
100% Manipulation | 125% Manipulation | 150% Manipulation | |
0 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
1 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
2 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
3 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
4 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
5 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
6 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
7 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
8 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
9 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
10 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
11 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
12 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
13 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
14 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
15 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
16 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
17 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
18 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
19 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% | |
20 | Expression error: Unexpected < operator.% | Expression error: Unexpected < operator.% |
Example when limit is 100%:
{{Stat Factors Table|Arrest Success Chance}}
it produces:
Social Skill Level | Arrest Success Chance |
---|---|
0 | |
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 |
Example when limit is >100% but <125%: Note: Research Speed is not an appropriate use of the template, as it relies equally on two different capacities, however, at the time of writing no compatible example of an inter-column limit exists:
{{Stat Factors Table|Research Speed }}
on any page would produce:
Intellectual Skill Level | Research Speed | |
---|---|---|
100% Manipulation | 110%+ Manipulation | |
0 | Expression error: Unexpected < operator.% | |
1 | Expression error: Unexpected < operator.% | |
2 | Expression error: Unexpected < operator.% | |
3 | Expression error: Unexpected < operator.% | |
4 | Expression error: Unexpected < operator.% | |
5 | Expression error: Unexpected < operator.% | |
6 | Expression error: Unexpected < operator.% | |
7 | Expression error: Unexpected < operator.% | |
8 | Expression error: Unexpected < operator.% | |
9 | Expression error: Unexpected < operator.% | |
10 | Expression error: Unexpected < operator.% | |
11 | Expression error: Unexpected < operator.% | |
12 | Expression error: Unexpected < operator.% | |
13 | Expression error: Unexpected < operator.% | |
14 | Expression error: Unexpected < operator.% | |
15 | Expression error: Unexpected < operator.% | |
16 | Expression error: Unexpected < operator.% | |
17 | Expression error: Unexpected < operator.% | |
18 | Expression error: Unexpected < operator.% | |
19 | Expression error: Unexpected < operator.% | |
20 | Expression error: Unexpected < operator.% |
Example when skills have to be specifically defined:
{{Stat Factors Table|Plant Harvest Yield|l0=0.60|l1=0.70|l2=0.75|l3=0.80|l4=0.85|l5=0.90|l6=0.95|l7=0.98|l8=1.00|l9=1.01|l10=1.02|l11=1.03|l12=1.04|l13=1.05|l14=1.06|l15=1.07|l16=1.08|l17=1.09|l18=1.10|l19=1.12|l20=1.13}}
it produces:
Plants Skill Level | Plant Harvest Yield | ||
---|---|---|---|
100% Manipulation | 125% Manipulation | 150% Manipulation | |
0 | 0.60 | 64.5% | 69% |
1 | 0.70 | 75.25% | 80.5% |
2 | 0.75 | 80.63% | 86.25% |
3 | 0.80 | 86% | 92% |
4 | 0.85 | 91.38% | 97.75% |
5 | 0.90 | 96.75% | 103.5% |
6 | 0.95 | 102.13% | 109.25% |
7 | 0.98 | 105.35% | 112.7% |
8 | 1.00 | 107.5% | 115% |
9 | 1.01 | 108.58% | 116.15% |
10 | 1.02 | 109.65% | 117.3% |
11 | 1.03 | 110.73% | 118.45% |
12 | 1.04 | 111.8% | 119.6% |
13 | 1.05 | 112.88% | 120.75% |
14 | 1.06 | 113.95% | 121.9% |
15 | 1.07 | 115.03% | 123.05% |
16 | 1.08 | 116.1% | 124.2% |
17 | 1.09 | 117.18% | 125.35% |
18 | 1.10 | 118.25% | 126.5% |
19 | 1.12 | 120.4% | 128.8% |
20 | 1.13 | 121.48% | 129.95% |
The above documentation is transcluded from Template:Stat Factors Table Row/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |