Our current Spell Data is 100% from SOE API data feed, which means it's missing a ton of data. If the spell from SOE has an associating "RAW" data record (from Collects), there is a link on Spells tab to refresh the data, though RAW data may be outdated already... so keep that in mind.
To start, open the editor and click on Spells, and choose Type = All. This will enable 2 other fields for Classification (also set to All) and Player Class. Pick the class of the spells you plan to work on for this session.
- Note: For now, we should only work on player class spells from level's 1 through 50
Once you get a grid of spells filtered to your liking, pick a spell to work on by clicking it's Spell_ID in the left-most column
WARNING!!!
The FIRST thing you need to do is check the LUA Script field.
WARNING!!!
WARNING!!!
The FIRST thing you need to do is check the LUA Script field.
WARNING!!!
If this says ANYTHING other than "Your/Relative/Path/To/The/Spell" then
DO NOT SAVE on the Spells tab until you create the LUA script first!
We'll get back to LUA building shortly.
Click on the Script tab

The Script editor should show the Name of the spell being created "
Taunting Blow", and in (parens) should show the relative path to the script (
Spells/Fighter/Warrior/Guardian/TauntingBlow.lua). The script engine will build a starting header, and populate the body with the same data from the `spell_display_effects` table for this spell+tier - this is to help you develop the script, seeing what the net Effects are.
A few notes about the buttons along the bottom, as they vary --
Create: This button only shows up when there is NO LUA Script on the drive nor already linked to the spell - it's brand new.
Re-Link: This button only shows up when there IS a LUA Script, but it is not yet linked to the spell itself (in the `lua_script` field).
Rebuild: This button is always present, in case your spell is linked to a very old script and you wish to start over again. NOTE: This PERMANENTLY erases the script from the disk and re-writes it like it was a Create. Use with caution.
Off to the right are some basic templates you can use to insert. Since this is a Melee Damage + Taunt spell, I can click Damage to the right, and get a damage function cast() inserted automatically.

Now all I have to add is the Taunt component and click "Create".
So Step 1 is to create the LUA script (even if empty for now) and link it to the spell - only because previously this was done automatically and with the tons of new data, I didn't have time to fix that.
With the spell Script set,
Click on the Spell tab

Pointing out the few items that need changing here, if you know the proper messaging for Success, Effect and Fades, type it in - otherwise these defaults are used.
The only other 2 pieces of data required on this page is the Spell Visual (the impressive animation effect) and setting the spell to is_active.
Click on Tiers
There are between 1 and 10 tiers for every spell/ability. Their data varies ever-so-slightly from Tier to Tier. You will notice this easily in this step.
First, a word about the 3 Apprentice tiers.
- Normally, the first Apprentice tier of any ability is given to you by your Class, or leveling up - automatically. All other tiers are Spellscrolls you purchase or create through crafting.
This is important to understand because there are NO ITEMS for Apprentice Tier 1 spells/abilities in which to parse data from the SOE API Items list (for Resistiblity and range, for instance)
This means, when you SOE the Apprentice tiers, you MUST click Tier 2's SOE button ONLY, and it will update both Tier's 1 and 3 as well. You must then FIX the Tier 1 "given_by" value back to Class manually.
Clicking SOE for all the tiers will fix the Range, Resistiblity, radius, range, power, etc... though at this time they should all be accurate to SOE API data. I do this merely to get Range,
since without Range, the spells won't work in-game.
Click SOE all the way down all 9 tiers. You'll know they are done because the float for Recast becomes a whole number. One the Tiers are done, we move on.
Click on Effects
Review the entries for Spell Display Effects data closely, and make a quick determination of how many elements your LUA function will need. Some can be consolidated, if for example a spell will add 1.8% to Slashing, Crushing and Piercing... that is 1 param (1.8%) and you would use the same parameter 3 times. We'll cover LUA later...
The reason you need to take a look at this first is because the next step will be building the data parameters that are going to be send to LUA. You need to know how many parameters you will need. Once you have a game plan --
Click on Data
Data is where you will add all the parameters. From the above example, I know I need 5 parameters... 1 for DamageType (melee). 2 for Min/Max damage. and 2 for Min/Max taunt.
Now, I can waste time picking each data type, index value, and data value and inserting 5 rows manually here --
Or, I can use the Display Effects Parser that, at least for the simpler spells, cuts this work into 1/10th as much data entry.
Here you see the 5 elements I know I need for this spell.

I can simply click Submit on Tier 1, Effect 0,0, and 3 pieces of data will be entered at once.
Now you see, melee (13) of between 3 and 6 are my first 3 params ready to be sent to the LUA script.
I do the same thing for the Taunt values in Tier 1, and Tier 1 is complete. Rinse, Repeat for all the spell tiers on this spell and you have all your data ready to go.
Click on Classes
Just a quick check to ensure the classes required to use this spell are set properly. 99% of the time it will be correct.
IMPORTANT: See this note below
Finally...
Click on the Script tab
Now we're back to the LUA part. You can click Rebuild here if you made any changes to the Spell Display Effects data, so you can build the reference comments to work from.
Since I knew I needed a damage type, min/max for damage and min/max for a taunt, I added 5 params to my function cast() line:

I then build out my script using whatever logic makes sense to me to get the job done. LUA, like any other language, has 10 ways to do the same thing, so pick what works best for you, or work together to create a standard.
Couple notes
- about what >> I << chose to do... I preserve the notes, and move them to where the component is being evaluated. Only for a reminder to the next guy, that this is why we're doing this.
I also chose to NOT create a local variable, especially if it's only used once, to do min/max math.randoms(). A SpellDamage(Target, DmgType, math.random(MinVal, MaxVal)) works just as well.
I also like 4 spaces, not tabs, in my indents. Not 2, not 3, not 16... 4 seems clean.
I also like leaving a NPC Say in the script when functionality cannot be completed (the Not Implemented template button). This shouts out that something isn't implemented, so we get reminded to add the feature.
I also recommend leaving the spell to is_active = false unless at least 50% of it's functionality can be completed - and consider the functional part actually useful... ie., if it grants you Moon Jump after completely healing all players in the zone, and the heal part doesn't work, then perhaps that one can remain inactive.
Anything that cannot be done should be brought up to the C++/LUA developers to see if they have time to whip up the feature you need to finish your spell. A "sudden resurrection on death" effect would really surprise a player if they died and, well, stayed dead.
Any questions before you get started? If not, dive in. But please announce what Class you plan to work on, and how far you plan to take it.