Skip to content

Adding New Spell

Reinisch edited this page Dec 30, 2019 · 2 revisions

This is a step-by-step guide on how to add a new spell to the game.

All game settings are implemented with Scriptable Objects, this allows easy modifications at runtime even on server with connected players. Assets and scriptable objects can be created anywhere in the project by right clicking any folder or file in Project Window and selecting any asset in Create menu item. Menu paths for these objects are specified by attribute CreateAssetMenu on asset's class. For example to create SpellInfo select Create/GameData/Spells/SpellInfo in asset menu.

For any asset mentioned below, instead of creating new, already existing assets can be duplicated by selecting and pressing Ctrl+D

Creating Spell Info

  • Navigate to Assets/Settings/Balance/Spells and optionally create new folder for your spell
  • Create new Spell Info through asset context menu Create/GameData/Spells/SpellInfo
  • Create any new Spell Effect Info for Spell Info through asset menu Create/GameData/Spells/Effects/...
  • Add new Spell Effect Info asset to list Spell Info "Spell Effect Infos"
  • Optional: Rename Spell Info as "[Spell Name] Spell", for Frost Bolt: "Frost Bolt Spell"
  • Optional: Rename Spell Effect Info as "[Spell Name] Effect [Spell Effect]", for Frost Bolt damage: "Frost Bolt Effect Damage"
  • Configure Spell Info and Spell Effects properties
  • Select your Effect assets then drag and drop Spell Asset into bottom field of the inspector and press add to parent

Spells should have at least one Spell Effect to work properly. There is currently no limit for effect amount.

That's it! New spell is created, it should automatically add itself to game balance containers, and self-assign new id. However this is only meta data, to be properly handled on client it requires Visual Effect Info, Sound Info and Tooltip Info, spell should also be added to Class Info to allow casting only for certain class.

Creating Visual Spell Info

  • Navigate to Assets/Settings/Visuals/Effect Visuals Spell
  • Create new Spell Visual Info, context menu - Create/GameData/Visuals/Spell Visual Info
  • Configure icon, cast and impact effects and projectile if needed
  • For auras: Spell Aura Info in Create/GameData/Visuals/Aura Visual Info configured the same way

Creating Spell Sound Info

  • Navigate to Assets/Settings/Sound/Spell Sound Infos
  • Create new Spell Sound Settings, context menu - Create/GameData/Sound/Spell Sound Info
  • Sound Entries are created like other settings by copying or in asset menu

Creating Tooltip Info

  • Navigate to Assets/Settings/Localization/Tooltips/Spell
  • Create new Spell Tooltip Info, context menu - Create/GameData/Tooltips/Spell Tooltip Info)
  • Values in description can be referenced dynamically to avoid updating numbers when balance changes
  • New Localized Strings for descriptions and names are created like other settings by copying or in asset menu
  • Press "Save Changes" button on localized strings to update all language data

Updating Class Info

  • Navigate to Assets/Settings/Balance/Classes/
  • Select any Class Info and add your new Spell to the list Class Spells

Update Photon Bolt Version

To avoid other players with different spells or other conflicting data from joining your game Photon Bolt Version can be incremented here.

Clone this wiki locally