Template:SCurveTable/doc

From Fallen London Wiki (Staging)

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 Chess1234567891011
multiplier0.2370.3790.5960.9121.3451.8882.53.1123.6554.0884.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 Mail12345678910
CP70707070696342211514

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–456789≥10
CP70696342211514

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 Mail1–456789≥10
CP70696342211514

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 Mail0–345678≥9
CP70696342211514
Ending Mired in Mail1–456789≥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 Mail0–345678≥9
W and D CP70696342211514
Ending Mired in Mail2–5678910≥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 Mail10987654321
CP14152142636970707070

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 Mail12345
CP7070707069
Mired in Mail678910
CP6342211514

Parameters[edit]

This template generates a table of calculated values for a given S-curve within a specified range.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
heightheight

The numerator of the logistic function. Equal to the value approached as x approaches +∞ minus the value approached as x approaches -∞.

Default
1
Numbersuggested
kk

The logistic growth rate. A constant that determines how steep the curve is.

Default
1
Numbersuggested
midpointmidpoint

The x value at the S-curve's midpoint.

Default
0
Numbersuggested
y_offsety_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.

Default
0
Numbersuggested
xleftxleft xmin

The first x value to show on the table.

Default
0
Numbersuggested
xrightxright xmax

The last x value to show on the table.

Default
xleft
Numbersuggested
ConditionCondition

Name of the Quality whose value is input to the S-curve.

Example
Artisan of the Red Science
Pagerequired
Condition aliasCondition alias

How the condition will be displayed on the header row.

Example
AotRS
Lineoptional
Use ConditionUse Condition

If 'yes', Condition will employ the {{Use}} template. Otherwise the {{IL}} template will be used.

Default
'yes' if on the main namespace, 'no' elsewhere
Example
yes
Linesuggested
show_ending_conditionshow_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.

Default
no
Example
yes
Lineoptional
condition_increasecondition_increase

The amount that the condition quality increases on each action. Has no effect if show_ending_condition is not 'yes'.

Default
1
Example
2
Lineoptional
EffectEffect

Description of the S-curve output.

Example
{{IL|Watchful}} CP
Linerequired
RoundRound

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.

Default
no
Example
yes
Lineoptional
max_columnsmax_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.

Example
10
Numberoptional
compactcompact

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'.

Default
no
Example
yes
Lineoptional
lowcaplowcap

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'.

Default
no
Example
yes
Lineoptional
highcaphighcap

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'.

Default
no
Example
yes
Lineoptional