Designing Spells

Creating the Spells and Abilities for EQ2Emulator

Moderator: Team Members

Post Reply
Dello0000
Posts: 175
Joined: Fri May 30, 2014 9:18 am
EQ2Emu Server: MHM Laneth
Characters: Dello - Dellos
Location: Scotland!
Contact:

Re: Designing Spells

Post by Dello0000 » Fri Jun 06, 2014 4:40 am

Iv completed the guardian lvl 1-100 combat arts to be cast while moving to reflect live.
Berserker arts can wait until skills are ready to be activated.
Iv completed the monk lvl 1-100 combat arts to be cast while moving to reflect live.
Iv completed the Bruiser lvl 1-100 combat arts to be cast while moving to reflect live.

I cant test to see if any of the changes iv made work because i can't get onto the dev server yet, and i fear it will be too laggy anyway. So until i can test myself i may need a hand :)

Testing Required.
Berserker Rupture II activated. [Spell ID: 40171]
Bruiser AoE Beatdown II activated. [Spell ID: 70009]


Side note, can someone explain how the lua scripts work.
For instance, Mend 1 and 2 are a set heal where as mend 3 is a percent heal, but the lua just has "-- Heals target for 21 - 25" and is used as the governing script for all 3.
Also the effects tab, is that just tooltip or is that actual values?

Cheers.
I cant see it killing the server but it may have an incorrect tooltip. Muhahaha :twisted:

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Designing Spells

Post by Jabantiz » Fri Jun 06, 2014 12:16 pm

Dello0000 wrote: Monk heal Mend updated from 6 - 8 to 21 - 25. [Spell ID: 60112]
Monk heal Mend II updated from 4 - 5 to 47 - 58. [Spell ID: 60113]
Where did these updated values come from? We pull info from data.soe.com which is as close to unmodified base values that we can get and has been mostly accurate, if the values are from live then the character stats effect the examine giving a higher then base values.
Dello0000 wrote: Side note, can someone explain how the lua scripts work.
For instance, Mend 1 and 2 are a set heal where as mend 3 is a percent heal, but the lua just has "-- Heals target for 21 - 25" and is used as the governing script for all 3.
Also the effects tab, is that just tooltip or is that actual values?

Cheers.
We try to use 1 script for a spell line as most spell lines are the same from start to end, in the case of mend where it changes from amounts to percent we would probably need to make a new spell script.

Effects tab is what you see when you examine the spell, either mouse over or right click examine.

Dello0000
Posts: 175
Joined: Fri May 30, 2014 9:18 am
EQ2Emu Server: MHM Laneth
Characters: Dello - Dellos
Location: Scotland!
Contact:

Re: Designing Spells

Post by Dello0000 » Fri Jun 06, 2014 1:09 pm

Jabantiz wrote:
Dello0000 wrote: Monk heal Mend updated from 6 - 8 to 21 - 25. [Spell ID: 60112]
Monk heal Mend II updated from 4 - 5 to 47 - 58. [Spell ID: 60113]
Where did these updated values come from? We pull info from data.soe.com which is as close to unmodified base values that we can get and has been mostly accurate, if the values are from live then the character stats effect the examine giving a higher then base values.
Mend I
http://eq2.zam.com/db/ability.html?eq2a ... a8cb372752
Mend II
http://eq2.zam.com/db/ability.html?eq2a ... 066432b1a8

Given that a level 10 heal spell was only healing for 4 - 5hp with a 3min cooldown i thought it strange :p
Jabantiz wrote:
Dello0000 wrote: Side note, can someone explain how the lua scripts work.
For instance, Mend 1 and 2 are a set heal where as mend 3 is a percent heal, but the lua just has "-- Heals target for 21 - 25" and is used as the governing script for all 3.
Also the effects tab, is that just tooltip or is that actual values?

Cheers.
We try to use 1 script for a spell line as most spell lines are the same from start to end, in the case of mend where it changes from amounts to percent we would probably need to make a new spell script.

Effects tab is what you see when you examine the spell, either mouse over or right click examine.
So where does the actual damage get put?
If one lua is used for all the same spells in the tree (Mend I - Mend VII for instance) how is it getting its numbers?
I cant see it killing the server but it may have an incorrect tooltip. Muhahaha :twisted:

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Designing Spells

Post by Jabantiz » Fri Jun 06, 2014 1:29 pm

Ok 9-11 hp heal on a level 10 master probably isn't right, and highly doubt stats could modify it that much. I see the changes you made are only on effects, you will need to change the values on the data tab as well for any actual change to the spell. Effects is just visual, data is what makes the spell work so on mend II you see 3 values for each tier (5, 6, 12 on apprentice 1) looking at the cast function in the spell script will tell you what the values are for.

Code: Select all

function cast(Caster, Target, MinVal, MaxVal, CureLvls)
Every cast function will have Caster, Target so you can ignore those, any thing after that is the data so in this case 5 = MinVal, 6 = MaxVal, 12 = CureLevels so to update the spell we want to change the MinVal and MaxVal to mimic the changes you made to the effects tab so you want to change 5 to 47 and 6 to 48.

Hope this makes sense.

Dello0000
Posts: 175
Joined: Fri May 30, 2014 9:18 am
EQ2Emu Server: MHM Laneth
Characters: Dello - Dellos
Location: Scotland!
Contact:

Re: Designing Spells

Post by Dello0000 » Fri Jun 06, 2014 2:01 pm

Yeah Mend 1 and 2 were way off, seemed like mend 2 was actually mend 1 and mend 1 was mend 2 but with a second number missing...

9 - 10 was actually the master for 90 - 100 or something like that for mend 2.

But i totally get what your saying!

Code: Select all

function cast(Caster, Target, MinVal, MaxVal, CureLvls)
    -- Heals target for 21 - 25
    --     This effect cannot be critically applied.
    -- The healing of this spell cannot be modified except by direct means
    SpellHeal("Heal", MinVal, MaxVal, 0, 2, 1)

    -- Dispels 7 levels of noxious hostile effects on target
    CureByType(CureLvls, 3);
end
If it was a maxhp buff for instance, the lua would look something like this?

function cast(Caster, Target, MaxVal)
-- Increeses max health by 1000
SetMaxHP("Health", MaxVal, 0, 2, 1)
end

And under data id add 1 line (apprentice) with |index_field 0|value_type INT|value 1000| Given that the Caster and Target fields would be ignored.?

I'v highlighted a few bits in red because i don't know why they get added or if it was for something else.

I know this will take a while to get the hang off but if i can get the basics of why things are there i can just check http://www.eq2emulator.net/wiki/index.p ... lFunctions for actual param's

[EDIT] Wish there was a save all button on the Data tab, adding each one and saving it right after is time consuming :p
I cant see it killing the server but it may have an incorrect tooltip. Muhahaha :twisted:

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Designing Spells

Post by Jabantiz » Fri Jun 06, 2014 2:19 pm

Each function can take different parameters in the case of SetMaxHP() it only takes 2 params, a target and the value so it would be

Code: Select all

SetMaxHP(Target, MaxVal)
however that sets the max value, doesn't add to it.

For most stat boosts you will want to use AddSpellBonus(), this will add to the targets current stats so to add max hp it would be

Code: Select all

AddSpellBonus(Target, 606, MaxVal)
I got 606 from the reference list.

Almost all functions on http://www.eq2emulator.net/wiki/index.p ... lFunctions should be linked to a detailed page showing what parameters it needs and what they do.
And under data id add 1 line with the value at "1000" Given that the Caster and Target fields wouldn't be there all i would need in the SetMaxHP value.?
That is correct.

Dello0000
Posts: 175
Joined: Fri May 30, 2014 9:18 am
EQ2Emu Server: MHM Laneth
Characters: Dello - Dellos
Location: Scotland!
Contact:

Re: Designing Spells

Post by Dello0000 » Fri Jun 06, 2014 2:29 pm

Jabantiz wrote:For most stat boosts you will want to use AddSpellBonus
I tried 606, but i was missing some other parameters and i didn't do anything with the data.
Id really need to get into the dev server to try this out because my servers acting up, or maybe its my client, i dunno but without trial and error im getting nowhere fast lol, so if you could and if its ok, could you pm me with the ip and anything else ill need to know regarding that server.

So basically this would be how it looks?

Code: Select all

function cast(Caster, Target, MaxVal)
    -- Increases max health by 1000
    AddSpellBonus(Target, 606, MaxVal)
end

Code: Select all

|index_field 0|value_type INT|value 1000|
Obv in the case of the guardian it would be stamina so it would really look like

Code: Select all

function cast(Caster, Target, MaxVal)
    -- Increases max Stamina by 1000 until canceled.
    AddSpellBonus(Target, 1, MaxVal)
end

Code: Select all

|index_field 0|value_type INT|value 1000|
duration_until_cancel = true
friendly_spell = true
group_spell = true
I cant see it killing the server but it may have an incorrect tooltip. Muhahaha :twisted:

Dello0000
Posts: 175
Joined: Fri May 30, 2014 9:18 am
EQ2Emu Server: MHM Laneth
Characters: Dello - Dellos
Location: Scotland!
Contact:

Re: Designing Spells

Post by Dello0000 » Fri Jun 06, 2014 2:56 pm

Ok, iv added damage values and so on for the Bruiser's Beatdown II, used the visual from beatdown 1 along with any other info that was missing.
I cant see it killing the server but it may have an incorrect tooltip. Muhahaha :twisted:

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Designing Spells

Post by Jabantiz » Fri Jun 06, 2014 3:01 pm

The dev server is EQ2 DB Project, all you need to do is make a char on it, even though it is locked you can still make a char on it, and tell me the char name so I can flag you to enter even though it is locked.

Both of your scripts look fine. I should point out that we do not have support for every single stat yet and some may not even update in the character screen, attributes will work though if you want to see your results.

Dello0000
Posts: 175
Joined: Fri May 30, 2014 9:18 am
EQ2Emu Server: MHM Laneth
Characters: Dello - Dellos
Location: Scotland!
Contact:

Re: Designing Spells

Post by Dello0000 » Fri Jun 06, 2014 3:19 pm

Jabantiz wrote:The dev server is EQ2 DB Project, all you need to do is make a char on it, even though it is locked you can still make a char on it, and tell me the char name so I can flag you to enter even though it is locked.
cl_ls_address www.eq2emulator.net is what i was after :p when i made my other char i didn't see the dev world. So thought the login ip was different.

So each char i make will need to be allowed in one at a time instead of just allowing the account? Ill make enough chars to last me a while.

Dello - Guardian
Zerk - Berserker
Della - Monk
Fisty - Bruiser
I cant see it killing the server but it may have an incorrect tooltip. Muhahaha :twisted:

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Designing Spells

Post by Jabantiz » Fri Jun 06, 2014 3:23 pm

Account will be flagged after the first character is, set all those chars up so they should be able to log in to the dev server.

When ever you make changes to a spell and want to test them in game you will need to do "/reload spells" so the changes take effect.

Dello0000
Posts: 175
Joined: Fri May 30, 2014 9:18 am
EQ2Emu Server: MHM Laneth
Characters: Dello - Dellos
Location: Scotland!
Contact:

Re: Designing Spells

Post by Dello0000 » Fri Jun 06, 2014 3:32 pm

Jabantiz wrote:do "/reload spells" so the changes take effect.
Thanks! ill get on that now. Ill also take a look at the server crashing spells in particular and if i cant see a way to stop them crashing the server ill deactivate them until what they are trying to do is implemented. will make it easy to see what ones require work and what ones work fine.
I cant see it killing the server but it may have an incorrect tooltip. Muhahaha :twisted:

Dello0000
Posts: 175
Joined: Fri May 30, 2014 9:18 am
EQ2Emu Server: MHM Laneth
Characters: Dello - Dellos
Location: Scotland!
Contact:

Re: Designing Spells

Post by Dello0000 » Sat Jun 07, 2014 5:25 am

Woo! my first (second or third) Spell!

Guardians *Battle Tactics I* is working 100%!

Added visuals.
Changed the script to a working one.
Added code to remove effects upon buff ending.
Fixed tooltip.
Added data for spell books.

This time yesterday i was clueless but i think iv got the hang of it.

Ps, whats the difference between Float and Int?
I see a lot of active spells use INT and buffs use FLOAT.
http://eq2emulator.net:9301/eq2db/edito ... spell_data I think iv worked it out, FLOAT is for decimals? I should really have known that one given that I've used cheat engines lol.

[EDIT] Ill continue working fully with guardian skills until they are all done if no one has any objections.

[WORKING]
Battle Tactics I - VII
Overpower I - VIII
Bash I - VIII
Provoke I - VII
Taunting Blow I - IX



[EDIT] Thank you!

Revised script:

This look like it would work? (Dont wanna kill the server.)

Code: Select all

function cast(Caster, Target, Stats, DefSkills, SkillAmt)

    AddSpellBonus(Target, 0, Stats)
    -- Increases Slashing, Piercing and Crushing of caster.
    AddSkillBonus(Target, GetSkillIDByName("Slashing"), OffSkillAmts)
    AddSkillBonus(Target, GetSkillIDByName("Piercing"), OffSkillAmts)
    AddSkillBonus(Target, GetSkillIDByName("Crushing"), OffSkillAmts)
    -- Decreases Defense of caster by 1.8
    AddSkillBonus(Target, GetSkillIDByName("Defense"), DefSkills)
end

function remove(Caster, Target)
    RemoveSkillBonus(Target)
    RemoveSpellBonus(Target)
end
Also think the world has bugged out, i cant log in "already have a char logged in" and iv waited a while now.
I cant see it killing the server but it may have an incorrect tooltip. Muhahaha :twisted:

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: Designing Spells

Post by Zcoretri » Sat Jun 07, 2014 9:13 am

The skill ID for Defense should be 609880714
There is also a LUA function that will return the ID for you if you know the skill name

Code: Select all

AddSkillBonus(Target, GetSkillIDByName("Crushing"), SkillAmt)

Dello0000
Posts: 175
Joined: Fri May 30, 2014 9:18 am
EQ2Emu Server: MHM Laneth
Characters: Dello - Dellos
Location: Scotland!
Contact:

Re: Designing Spells

Post by Dello0000 » Sat Jun 07, 2014 10:43 am

Yeah Zcoretri, you will need to tell me how your looking them ID's up.
Is there a reference page i could look at to find the different ID'd for damage types?
IE: Inflicts 10 - 20 crushing damage on target
The crushing damage type ID would be 1
And i think slashing is 13
Also the ID's for defense and slashing and so on, get skill id by name doesn't seem to work when i try it, in fact the whole spell wont cast so it would be good to have some reference :)
I cant see it killing the server but it may have an incorrect tooltip. Muhahaha :twisted:

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests