Template:Combat level/doc

From Darkan
Revision as of 05:44, 17 November 2012 by imported>Blaze fire12
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Documentation This is a documentation subpage for Template:Combat level.
It contains usage information, categories, and other content that is not part of the original template page.

The combat level template returns the combat level based on the specified combat components. The formula is the result of a large reverse engineering activity using player contributed data. See the Combat Formula Thread on the RuneScape forums for more details. The formula is remarkably accurate. The Combat level description shows the formula used in this template. It contains several non-linear components (various floor operations), which complicate reverse engineering as different skill levels can still produce the same combat level. The reported error margin in the combat formula (under 0.6%) can be explained by accidental typing errors in some of the skill level contributions used in the reverse engineering project.

Usage

{{ Combat level | combat level parameters | Name=username }} The combat parameters follow the Template:User stats format. Note that when a parameter is absent, then if the "Name" is specified, a dynamic lookup is attempted, otherwise the template will use a default value of 10 for Hitpoints and 1 for all other skill levels.

An optional DP parameter may also be specified determine the number of decimal places to use for the returned combat level (can be 0, 1, 2 or 3). The default is 0 decimal places.

Example

The following template call describes a new player without any combat experience. These also are the default values that the template uses when the parameter is absent or misspelled.

{{Combat level
|Attack=1
|Defence=1
|Strength=1
|Constitution=10
|Prayer=1
|Ranged=1
|Magic=1
|Summoning=1
}}

The template text above produces the following result: 3

The table shows that a starting player will have a combat level of 3. Another example shows a slightly more advanced player:

{{Combat level|Attack=92|Defence=84|Strength=91
|Constitution=92|Prayer=73|Ranged=87|Magic=98|Summoning=18}}

gives the following result: 114

On a free to play world, the combat level of this player can be obtained by including:

{{Combat level|Attack=92|Defence=84|Strength=91
|Constitution=92|Prayer=73|Ranged=87|Magic=98|Summoning=1}}

This gives the following result: 112 So the additional combat levels derived from the Summoning skill are not visible on the free to play worlds.

The following example shows the same advanced player but showing the combat level to 2 decimal places:

{{Combat level|Attack=92|Defence=84|Strength=91
|Constitution=92|Prayer=73|Ranged=87|Magic=98|Summoning=18|DP=2}}

gives the following result: 114.72

How it works

The gory details of the template are viewable by entering the edit mode for this page. The template also has no way of assigning default values for input parameters, mandating that prior to using an input parameter, the template needs to check if the variable is set during the call or set that input variable at its default value.