Difference between revisions of "Template:Melee Hit Chance/curve"
Jump to navigation
Jump to search
(allow the template to take expressions) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{# | + | <includeonly>{{#vardefine:baseScore|{{#expr:{{{1|}}} }} }}{{#switch: {{#expr: floor({{#var:baseScore}}/10)}} |
− | | -2 = {{#expr: ({{ | + | | -2 = {{#expr: ({{#var:baseScore}} + 20) * 0.005 + 0.05}} |
− | | -1 = {{#expr: ({{ | + | | -1 = {{#expr: ({{#var:baseScore}} + 10) * 0.04 + 0.1}} |
− | | 0 = {{#expr: {{ | + | | 0 = {{#expr: {{#var:baseScore}} * 0.03 + 0.5}} |
− | | 1 = {{#expr: ({{ | + | | 1 = {{#expr: ({{#var:baseScore}} - 10) * 0.01 + 0.8}} |
− | | 2 | 3 = {{#expr: ({{ | + | | 2 | 3 = {{#expr: ({{#var:baseScore}} - 20) * 0.003 + 0.9}} |
− | | 4 | 5 = {{#expr: ({{ | + | | 4 | 5 = {{#expr: ({{#var:baseScore}} - 40) * 0.001 + 0.96}} |
− | | #default = {{#ifexpr: {{ | + | | #default = {{#ifexpr: {{#var:baseScore}} >= 60 | 0.98 | 0.05}} |
}}</includeonly><noinclude>{{Documentation wanted}} | }}</includeonly><noinclude>{{Documentation wanted}} | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 29: | Line 29: | ||
==== Testing ==== | ==== Testing ==== | ||
+ | * 1+4: {{Melee Hit Chance/curve|1+4}} | ||
+ | * 5: {{Melee Hit Chance/curve|5}} | ||
* -23: {{Melee Hit Chance/curve|-23}} | * -23: {{Melee Hit Chance/curve|-23}} | ||
* -20: {{Melee Hit Chance/curve|-20}} | * -20: {{Melee Hit Chance/curve|-20}} | ||
Line 42: | Line 44: | ||
* 99999: {{Melee Hit Chance/curve|99999}} | * 99999: {{Melee Hit Chance/curve|99999}} | ||
* asdf: {{Melee Hit Chance/curve|asdf}} | * asdf: {{Melee Hit Chance/curve|asdf}} | ||
− | </noinclude> | + | [[Category:Math templates]]</noinclude> |
Latest revision as of 11:21, 24 April 2023
This page has been marked as needing documentation of its function and purpose. You can help RimWorld Wiki by creating it here |
Modified Melee Skill | Curve Point |
---|---|
-20 | 0.05 |
-10 | 0.10 |
0.0 | 0.50 |
10 | 0.80 |
20 | 0.90 |
40 | 0.96 |
60 | 0.98 |
Testing[edit]
- 1+4: 0.65
- 5: 0.65
- -23: 0.05
- -20: 0.05
- -15: 0.075
- -3: 0.38
- 0: 0.5
- 8: 0.74
- 15: 0.85
- 25: 0.915
- 50: 0.97
- 59: 0.979
- 60: 0.98
- 99999: 0.98
- asdf: Expression error: Unexpected < operator.