Sunday, October 7, 2012

Procedurally generated spells?

I played a lot of Borderlands 2 in the past weeks (great game, by the way) and noticed that the procedurally generated weapons are the greatest motivator in that game. I wondered if I should do something similar with the spells. Instead of having a number of predefined spells, players could find scrolls with spells which have randomized attributes.

Spells aren't learned anymore. Instead of that spells are items which are dragged&dropped in and out of the spellbook while in towns. Spells will still have a wisdom capacity they use and swapping will be impossible outside of towns, so players need to think carefully about how to design their spell palette. When each spell is unique and can only be used by one character, each character will have an unique playing style.

Balancing this will be really hard, but in the end it could be really worth it.

Input for randomization:
  • Element
  • Skill level requirement (primary indicator of the "power level")
  • Rarity
    • Rarity means more special effects, better chance for a more obscure area of effect, more extreme values for range and casting time and a chance for more damage.
Randomized attributes:
  • Damage (proportional to level requirement)
  • Range
  • Casting time (lower is better)
  • Area of effect
    • Single target (most frequent)
    • Splash damage with range X
    • Splash damage with range X, targets the floor 
    • Line damage (damages anything in a direct line between caster and target)
    • Chain damage (damages X enemies, each apart a distance of Y)
  • Special effects
    • Vampiric (steals HP)
    • Ethereal (damages MP instead of HP)
    • DoT (when combined with splash damage, it's an area denial spell)
    • Causes status effects
      • Curse (stat debuff)
      • Snare (reduce move speed)
      • Silence
Attributes calculated from those listed above
  • Mana cost
  • Wisdom cost
  • NPC value

To make all this a bit easier to balance, I could use a "building block" system where each spell has some randomized basic attributes and then gets a number of random blocks which modify it further.

  1. Start out with normal mana cost, damage, wisdom cost and range.
  2. Multiply mana cost, wisdom cost and damage with the level.
  3. Randomize all attributes just a tiny bit for some micro-variety
  4. For each rarity level:
    1. Do a "trade-off" - make one attribute worse by 25%, improve another by 25%
  5. Calculate base name based on the trade-offs made
    1. Good damage: Blast
    2. Good range: Arrow
    3. Good damage, bad range: Shock
    4. Good range, bad damage: Hex
    5. Good damage and range: Strike
    6. Bad damage and range: Trick
    7. Normal damage and range: Bolt
  6. For each rarity level above 1, do one of these bricks (discard duplicates). Each one increases cast time, mana cost and wisdom cost by a different amount.
    • Change the AoE (overrides the base name)
    • Make vampiric
    • Make ethereal
    • Add DoT
    • Cause a status effect on the enemy (multiple different ones are allowed, but not the same multiple times)
  7. Generate the name: [adjectives for bricks] [element] [base name]

No comments:

Post a Comment