Ideas for Stendhal/Magic

From Arianne
Jump to navigation Jump to search


Ideas for Stendhal

Mostly implemented


Related pages

Previous discussions from meetings

Defining spells

  • Spells should be configurable via XML Green-tick.png
    • works so far see light.xml for example in CVS
  • Spells should follow the natures defined via the former DamageType Green-tick.png
  • Spells have limitations
    • limited casting frequency (cool down time)Green-tick.png
    • wearing special equipmentGreen-tick.png (example in code)
    • spells should need knowledge to learn for casting them (partly Green-tick.png)
  • Spells are separated into 2 parts:
    • The spell itself defining nature, mana use, cool down time and other possible prerequisites like equipment Green-tick.png
    • Spell's effect defining what the spell does i.e. a simple healing spell just uses a healing effect that could be reused for a mass healing spell affecting all players in range Green-tick.png
    • Effects that temporarily affect entity's attributes need changes to other classes, as it seems more reasonable to store changes separately. For example an effect boosting a player's attack should not simply adjust the player's attribute but the method calculating atk should consider such additional effects

Spell Ideas

Sorted

  • Light
    • Heal - Heal another player Heal.png Green-tick.png - unless they have engaged in PvP within the last 10 minutes
    • Mass heal - heal multiple players around - unless they have engaged in PvP within the last 10 minutes
    • Mana - Mana give for another player from own bottle Heal blue.png
    • Shield of Light - Increase defense for some time Green-tick.png
    • Knowing - The player has the ability to know what's happened now at this place Knowing.png
    • Adding a sound around the player (should somehow fit to the nature)
  • Dark
    • Lifedrain - Draining health from the enemy to heal yourself Drain.png Green-tick.png
    • Become - Forcing an enemy to fight at your side for short time Become.png - (make sense when you under attack from more than one enemy)
    • Adding a sound around the player (should somehow fit to the nature)
  • Ice
    • Freeze - Slow down an enemy for some time Freeze.png Green-tick.png
    • Snow Storm - Push away enemies should depend on the size of the enemy
    • Adding a sound around the player (should somehow fit to the nature)
  • Fire
    • Fireball - Ranged attack on one enemy Fireball.png Green-tick.png
    • Explosion - Ranged attack on several enemies + pushing away the enemies around ( + damaging yourself a bit)
    • Lava - Ranged attack on several enemies Lava.png - stronger than explosion ^^
    • Power - Boost skills for short time New Power spell.png
    • Adding a sound around the player (should somehow fit to the nature)

Unsorted

    • Teleport away (to a random choice from preset locations)
    • Cloak of invisibility for short time
perhaps only for non-players and only for creature whos level is not much above the caster's level
    • Weaken creature
    • Summon friendly creature
    • Raise dead creature
    • Revive player (i.e. if you are near corpse you can bring them back so they don't have to walk from afterlife - require confirm from dead player)
    • Return to private house
    • Make campfire
  • Vanity spells (no actual affect except some temporary change to appearance, etc) these may be good ones to introduce at the beginning for testing the system as they would have less effect on game play
    • A drawing effect on the player like a sparkle
    • Colour a pet / sheep
    • Different outfit
  • Walk through walls (care needed to be sure disallowed areas aren't reachable, perhaps only to certain preset portals or if there is a path - just might be a long path without the shortcut)

Needed Changes To Entities

Some spell like Freeze or Weaken Creature temporarily affect specific attributes of an entity. As it is reasonable not to change the attributes themselves, it is necessary to add attribute modifiers to an entity. But as this is not the only kind of effects, that can be applied to an entity, this is documented on a separate page

Learning Spells

Learning spells should be a two step thing. First you have to solve a quest and then you can learn spells from a wizard in exchange of money. There should be one quest per nature and the quests should be startable by the fitting wizard then. As a rough scheme the learning quests could be a combination of collector and kill quest. For example it could be like “bring 5 carbuncles and kill a red dragon” if a someone wants to learn about fire magic.

There could be another quest, that enables the four other quests and rewards you with the necessary items like spellbook or magic wand. The starting NPC could also sell those items if you lost them after having solved that quest: Stendhal Quest Ideas/Learn about magic

A shop for each nature is available after solving the learning quest for each nature. In those shops players will be able to buy new spells.

  • Learning spells
    • Quests per nature that allow player to buy spells from a shop
    • Reward of those quests could be a first spell additionally to being allowed to buy

GUI integration

The client has to support casting spells in several ways. First of all there is need for displaying spells and functionality for casting and target selection. Furthermore it is desirable to add some visual effects for a casted spell and even more some sound effects for that.

As a very first step it is helpful to be able to test spells without having the full infrastructure available. So there is a script called SummonSpell to obtain spells for a player and there's also a simple slash command that enables a tester to cast a spell at a desired target.

  • Client Integration
    • Client server communication Green-tick.png
    • Small images to represent a spell
    • Images for
      • spellbook
      • magic wand
      • magician's robe
      • magician's hat
    • GUI integration
      • Show spells
      • Cast spells
      • visual effects
        • showing when someone is healed for example
      • sound effects

Allow early testing Green-tick.png

For being able to test as early as possible there is some code that enables to test the already implemented spells. There are basically three steps to consider:

  • Equip the testing player with a spell via the script SummonSpell:
/script SummonSpell.class [character] [spell name]
  • Provide mana to the testing player (first one rises the base value and second alter gives actual mana):
/alter [character] base_mana add 1000
/alter [character] mana add 1000
  • Use spell via slash action cast (the spell id can be found in the attributes list when inspecting the spell in the spells panel - for example [id=22], same for creatures as target):
/cast [spell id] [target name or id]
  • Casting spells is also possible via mouse and keyboard:
    • select spell via shortcut control + number displayed on spell / click on spell to select
    • cast spell at target via click
  • Seeing spells client side needs the feature spells enabled for the testing player (keyed slot !features needs an entry for spells)
/script EnableFeature.class [character] spells

This can be undone by the DisableFeature script:

/script DisableFeature.class [character] spells

Ideas on casting spells via GUI

  • The spell to be casted should be activated in the spell slot by left-clicking on it (it is then highlighted).
  • Casting the spell to an entity could be done by using SHIFT + click or via context menu ("cast fireball").
  • Healing spells and area effect spells should not be repeated after casting them.
  • Attacking spells should be casted repeatedly until the target is dead. To stop casting the spell you can use the "stop attack" action in the context menu or change the active spell.

Graphic Ideas

Spellnatures.png Spell natures (ice, fire, light, dark)
Knowing.png Example for the spell "knowing"
Heal.png Example for the spell "heal"
Heal blue.png Example for the spell "mana"
New Power spell.png Example for the spell "power"
Fireball.png Example for the spell "fireball" - scary :)
Lava.png Example for the spell "lava"
Freeze.png Example for the spell "freeze"
Drain.png Example for the spell "drain" - or something else :)
Become.png Example for the spell "become"
Manapotion.png A bottle of mana
Magicwand.gif A magic wand

Balancing

  • Spells use mana
    • necessary attributes called mana and base_mana are already there Green-tick.png
  • Mana should be regenerated
    • via potions
    • slowly when no attacks are aiming at the player
  • cooldown time Green-tick.png
  • necessary equipment
    • magician's robe
    • magic wand
    • magician's hat
    • spellbook

Mages

The player is not going to have to decide his class to be a mage in order to be able to use magic. We are not going to have a strict line, between warrior and mage. Players might be 80% warrior 20% mage because they happen to fight 80% of the time and only use magic 20% of the time Our implementation of magic, the balancing above, is what will ensure, that the player can't be overpowerful or combine brute force with magic, effectively.


TODO

  • add more spells and effects as examples
  • extend entity classes with an entity based attribute value manipulator value effect
  • add graphics for spells
  • add spell book to client
  • add graphics for magician's equipment
  • develop quests to learn magic (one per nature)
    • dark
    • light
    • fire
    • ice
  • Check if SellerBehaviour could deal with spells