Template:SCurveTable
This template generates a table of calculated values for a given S-curve within a specified range.
For a more in-depth look at what S-curves are and how they are used in-game, see Logistic Scaling.
Examples[edit]
A table with no rounding[edit]
{{SCurveTable |height=5 |k=.5 |midpoint=7 |xleft=1 |xright=11 |Round=no |Condition=A Player of Chess |Effect={{IL|Well-Placed Pawn}} multiplier }}
A Player of Chess | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
---|---|---|---|---|---|---|---|---|---|---|---|
multiplier | 0.237 | 0.379 | 0.596 | 0.912 | 1.345 | 1.888 | 2.5 | 3.112 | 3.655 | 4.088 | 4.404 |
A non-compact table with rounding[edit]
{{SCurveTable |height=-56 |k=2 |midpoint=7 |y_offset=70 |xleft=1 |xright=10 |Round=yes |Condition=Mired in Mail |Effect={{IL|Watchful}} CP }}
Mired in Mail | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
---|---|---|---|---|---|---|---|---|---|---|
CP | 70 | 70 | 70 | 70 | 69 | 63 | 42 | 21 | 15 | 14 |
A compact table[edit]
{{SCurveTable |height=-56 |k=2 |midpoint=7 |y_offset=70 |xleft=1 |xright=10 |compact=yes |Round=yes |Condition=Mired in Mail |Effect={{IL|Watchful}} CP }}
Mired in Mail | ≤1–4 | 5 | 6 | 7 | 8 | 9 | ≥10 |
---|---|---|---|---|---|---|---|
CP | 70 | 69 | 63 | 42 | 21 | 15 | 14 |
A compact table with lowcap[edit]
{{SCurveTable |height=-56 |k=2 |midpoint=7 |y_offset=70 |xleft=1 |xright=10 |compact=yes |lowcap=yes |Round=yes |Condition=Mired in Mail |Effect={{IL|Watchful}} CP }}
Mired in Mail | 1–4 | 5 | 6 | 7 | 8 | 9 | ≥10 |
---|---|---|---|---|---|---|---|
CP | 70 | 69 | 63 | 42 | 21 | 15 | 14 |
A table that shows ending condition values[edit]
{{SCurveTable |height=-56 |k=2 |midpoint=6 |y_offset=70 |xleft=0 |xright=9 |compact=yes |lowcap=yes |Round=yes |show_ending_condition=yes |Condition=Mired in Mail |Effect={{IL|Watchful}} CP }}
Starting Mired in Mail | 0–3 | 4 | 5 | 6 | 7 | 8 | ≥9 |
---|---|---|---|---|---|---|---|
CP | 70 | 69 | 63 | 42 | 21 | 15 | 14 |
Ending Mired in Mail | 1–4 | 5 | 6 | 7 | 8 | 9 | ≥10 |
A table that shows ending condition values, with a condition increase other than 1[edit]
{{SCurveTable |height=-56 |k=2 |midpoint=6 |y_offset=70 |xleft=0 |xright=9 |compact=yes |lowcap=yes |Round=yes |show_ending_condition=yes |condition_increase=2 |Condition=Mired in Mail |Effect={{IL|Watchful|Appearance=W}} and {{IL|Dangerous|Appearance=D}} CP }}
Starting Mired in Mail | 0–3 | 4 | 5 | 6 | 7 | 8 | ≥9 |
---|---|---|---|---|---|---|---|
W and D CP | 70 | 69 | 63 | 42 | 21 | 15 | 14 |
Ending Mired in Mail | 2–5 | 6 | 7 | 8 | 9 | 10 | ≥11 |
A table with decreasing x[edit]
{{SCurveTable |height=-56 |k=2 |midpoint=7 |y_offset=70 |xleft=10 |xright=1 |Round=yes |Condition=Mired in Mail |Effect={{IL|Watchful}} CP }}
Mired in Mail | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
---|---|---|---|---|---|---|---|---|---|---|
CP | 14 | 15 | 21 | 42 | 63 | 69 | 70 | 70 | 70 | 70 |
A multi-row table[edit]
{{SCurveTable |height=-56 |k=2 |midpoint=7 |y_offset=70 |xleft=1 |xright=10 |max_columns=5 |Round=yes |Condition=Mired in Mail |Effect={{IL|Watchful}} CP }}
Mired in Mail | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|
CP | 70 | 70 | 70 | 70 | 69 |
Mired in Mail | 6 | 7 | 8 | 9 | 10 |
CP | 63 | 42 | 21 | 15 | 14 |
Parameters[edit]
This template generates a table of calculated values for a given S-curve within a specified range.
Parameter | Description | Type | Status | |
---|---|---|---|---|
height | height | The numerator of the logistic function. Equal to the value approached as x approaches +∞ minus the value approached as x approaches -∞.
| Number | suggested |
k | k | The logistic growth rate. A constant that determines how steep the curve is.
| Number | suggested |
midpoint | midpoint | The x value at the S-curve's midpoint.
| Number | suggested |
y_offset | y_offset | The constant to add to the logistic function. If height is positive this will be the lower bound of the function whereas if height is negative this will be the upper bound.
| Number | suggested |
xleft | xleft xmin | The first x value to show on the table.
| Number | suggested |
xright | xright xmax | The last x value to show on the table.
| Number | suggested |
Condition | Condition | Name of the Quality whose value is input to the S-curve.
| Page | required |
Condition alias | Condition alias | How the condition will be displayed on the header row.
| Line | optional |
Use Condition | Use Condition | If 'yes', Condition will employ the {{Use}} template. Otherwise the {{IL}} template will be used.
| Line | suggested |
show_ending_condition | show_ending_condition | If set to 'yes', will add an extra row showing the resulting value of the condition quality, for actions that depend on a quality and also increase it.
| Line | optional |
condition_increase | condition_increase | The amount that the condition quality increases on each action. Has no effect if show_ending_condition is not 'yes'.
| Line | optional |
Effect | Effect | Description of the S-curve output.
| Line | required |
Round | Round | If set to 'yes', results will be rounded to the nearest integer, using round-to-even where relevant. Otherwise results will simply be truncated to three decimal places.
| Line | optional |
max_columns | max_columns | The maximum number of data columns per table row. If not set, arbitrarily many columns will be allowed. Be careful using with compact=yes since significantly varying widths can result in jarring spacing.
| Number | optional |
compact | compact | If set to 'yes', x values with the same output will be grouped into a range rather than have separate columns. Typically only makes sense if Round is also set to 'yes'.
| Line | optional |
lowcap | lowcap | If set to 'yes', the '≤' will never be added to the xleft column. Intended for when xleft represents the lowest observable value of Condition. Has no effect if compact is not 'yes'.
| Line | optional |
highcap | highcap | If set to 'yes', the '≥' will never be added to the xright column. Intended for when xright represents the highest observable value of Condition. Has no effect if compact is not 'yes'.
| Line | optional |