Spell Cost Formula

(Difference between revisions)
 Revision as of 07:30, 9 November 2009 (edit)m (touch-up)← Previous diff Revision as of 08:32, 9 November 2009 (edit) (undo) (aha, that's where that quirk comes from.)Next diff → Line 1: Line 1: SL = (guild level / 2 + 0.5), rounded down (min 1, max 255)
SL = (guild level / 2 + 0.5), rounded down (min 1, max 255)
- Spell Cost = (StartSpellLevel * SpellPointRatio * BaseMod^2 * 1.9 / SL) - 1, rounded down (minimum cost is StartSpellLevel * BaseMod) + Spell Cost = (StartSpellLevel * SpellPointRatio * BaseMod^2 * 1.9 / SL) - 0.0001, rounded down (minimum cost is StartSpellLevel * BaseMod) SL is the character's Spell Level for a given guild. SL is the character's Spell Level for a given guild. Line 7: Line 7: BaseMod is the "Spell Class Base Modifier" value for a given spell class in a specific guild (click "Show Spell Data"). BaseMod is the "Spell Class Base Modifier" value for a given spell class in a specific guild (click "Show Spell Data"). + + The "- 0.0001" term is caused by internal loss of precision when storing integers as floating-point decimals: 209 is stored as "208.9999...", causing it to be rounded down to 208.

[[Mordor Spoilers|Back to Mordor Spoilers]] [[Mordor Spoilers|Back to Mordor Spoilers]]

Revision as of 08:32, 9 November 2009

SL = (guild level / 2 + 0.5), rounded down (min 1, max 255)
Spell Cost = (StartSpellLevel * SpellPointRatio * BaseMod^2 * 1.9 / SL) - 0.0001, rounded down (minimum cost is StartSpellLevel * BaseMod)

SL is the character's Spell Level for a given guild.

StartSpellLevel and SpellPointRatio are the values named for each given spell in Wabbit's Editor.

BaseMod is the "Spell Class Base Modifier" value for a given spell class in a specific guild (click "Show Spell Data").

The "- 0.0001" term is caused by internal loss of precision when storing integers as floating-point decimals: 209 is stored as "208.9999...", causing it to be rounded down to 208.