Spells structures

Discussions of the design and development of in-game content.

Moderator: Team Members

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Spells structures

Post by John Adams » Thu Jul 31, 2008 7:41 pm

I have parsed a fairly large listing of EQ2 spells and added them to my DB to begin editing. I am not 100% sure these are all accurate, but it's a good start.
This was the source of my data: http://www.eq2ref.com/abilities/
I have the `spells` and `spell_classes` tables populated, but data needs to be added to complete the functionality. I also have a web-based spells editor I am almost ready to release (privately, of course) for you guys to pick a class and clean 'er up. Just give me a bit to finish it, but you can look over the data in the spells_structs.sql file I just put on SVN.
So naturally, I have questions about spells now. :)
First off, I am interested in what these other two tables and their values stand for:
`spell_data`
Field: `index_field` - no idea
Field: `value_type` - I think I know what this is for
Field: `value`
Field: `value2`
These last two... Are these the parameters that get passed to LUA when casting the spell?
`spell_visual_effect`
Field: `percentage` - is this the chance this will cast? or how effective it is?
Field: `description` - is this what shows up in the Examine text?
Field: `bullet` - no idea
`spell_classes`
This seems pretty self-explanatory, except for the duplicate of `level` in spells and spell_classes. Are these necessarily duped?
`spells`
Are the `version` and `sub_version` fields - are those internal (EQ2Emu) stats, or something tied to SOE to validate the data?
I have peeked through the code and cannot seem to find what `type` means, though I got `cast_type`, target_type and spell_book_type figured out. Regarding `target_type` - Are there some values missing from the Enum? For instance, the Paladin has a spell that casts a Rune on someone, but I do not see Group Member, only Group AE. Etc...
Icons: Is there a list of Icons somewhere, or do we have to dig them up somehow? If so, where?
`class_skill` - is this the "Adept I, II..." kinda ranking?
`mastery_skill` - and "Mastery I, II"?
`tier` - is this "Common, Legendary, Heroic"?
If so, we might enum them too?
Lastly (for now hah) `spell_visual` - effect? Wouldn't this be handled by `spell_display_effects`?
I know it gets tiring answering all my questions, but thank you in advance, anyone who knows. :)

Tyr
Posts: 32
Joined: Tue Jul 15, 2008 7:13 am

Post by Tyr » Thu Jul 31, 2008 7:52 pm

well, first off - http://eq2emulator.net/wiki/index.php/Developing_Spells
The spell icons can be found in "Sony\EverQuest II\UI\Default\images\icons"
i am not 100% sure but i think "Mastery_Skill" is a 0 or 1 option that says if its a "Master Strike" spell, you know L&L quests.
i am 99.5% sure that "Class_Skill" is for what class can use the spell, you know, Assassin, Templar, Mystic, ect.
And I have an 80 paladin on live. I don’t know wth you mean by "rune" but I don’t have anything that casts a "rune" on someone unless by "rune" you mean ward.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Thu Jul 31, 2008 9:33 pm

Hah, well ain't I just a dumbass for not looking in our own Wiki? I'm certain you enjoyed pointing that out. Grats you.
I'll look it over, maybe it'll answer most of my questions.
Edit: After looking over the Wiki, everything it says I already knew. My questions stand unanswered, though I think I get what the icon values are now. Thanks.

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

Post by Zcoretri » Thu Jul 31, 2008 10:33 pm

I have already compiled a list of spell icons for nearly all the classes and I forwarded them onto to chrrox a while ago.
Image

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Fri Aug 01, 2008 10:03 am

Nice work. Is that in some DB/spreadsheet/CSV format for easy parsing? If so, I'd like to take a look and automatically update the spell entries I have. Could you shove it onto our SVN?
Thanks,
-J

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

Post by Zcoretri » Fri Aug 01, 2008 10:20 am

OK, I uploaded a zip file to the SVN.
What you will find in the zip file John, is an Excel file for each class. The only ones that are not done in my files are Guardian and Ranger because someone else was to do those.
Image

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Fri Aug 01, 2008 10:36 am

Thank you, I will take a look at them this weekend. I hope to have a Spell Editor ready too, for any final tidying up.
Edit: Zcoretri, do you have a preference to preserve your "spell_id" (the ID column in your tables)? Or can I re-ID them during an import? Not sure if you have already built the other spell_* tables yet as well.
Last edited by John Adams on Fri Aug 01, 2008 11:00 am, edited 1 time in total.

falseknight
Posts: 5
Joined: Fri Dec 07, 2007 3:40 pm

Post by falseknight » Fri Aug 01, 2008 10:48 am

I haven't played live in a long time and I've mostly been watching this project from a distance but I was thinking I may be able to help.
Recovery may be the amount of time after casting before you can cast a different spell, or after being interrupted before you can attempt to recast, in live it's set for a very short time, like a split second.
I think the class skill value may have something to do with the old timey skills like evocations, divinations, conjuration, etc. Used to be, when you successfuly cast a spell, you had a chance to get skillups in these skills and if your skill was too far below the level of the spell/ability you were trying to use you had a greater chance to fizzle. Eventually, SOE took away the skillups in these areas and automatically raised each skill to cap when you gained a level. And now I can't remember them even being in the skill window last time I played. Of course each class had their own set of skills like this so I'm sure they also determined which classes could use each ability. I think they may also have had something to do with resistability and damage etc... but that was a long time ago and maybe I'm getting my games mixed up.
About the level value, some spells like certain mez's, charms etc can only be used on MOB's a certain level or below, perhaps this has something to do with that?
Well, I really don't know much about programming or databases or anything like that, so if it souns like I'm talking out of my backside, no need to flame me, just trying to help.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Spells structures

Post by LethalEncounter » Fri Aug 01, 2008 12:30 pm

John Adams wrote: `spell_data`
Field: `index_field` - no idea
Field: `value_type` - I think I know what this is for
Field: `value`
Field: `value2`
These last two... Are these the parameters that get passed to LUA when casting the spell?
index_field is used to specify the order of the arguments in the cast() LUA function. Take for example the Sprint spell:
id,spell_id,index_field,value_type,value,value2
1,1,0,FLOAT,.1,0
2,1,1,FLOAT,40,0
The LUA cast function:
function cast(Caster, Target, PowerCost, SpeedValue)
In spells, Caster and Target are always given in the cast function and any additional parameters need to be setup via the database. The order of these parameters is set via the index_field in the spell_data table. The first index always starts with 0, the second 1, etc. With the values above, when the cast function for Sprint is called the PowerCost variable will be set to .1 and the SpeedValue will be set to 40. Value2 was originally designed to be the value range but I dont think it was ever used. If you want a value range you can always specify 2 separate parameters, one as the min and the second as the max.
John Adams wrote: `spell_visual_effect`
Field: `percentage` - is this the chance this will cast? or how effective it is?
Field: `description` - is this what shows up in the Examine text?
Field: `bullet` - no idea
The spell_visual_effect table is obsolete. It was replaced with spell_display_effects. The spell_display_effects table is also only for displaying information about a spell. The actual spell is created using the LUA scripts and spell_data table.
John Adams wrote: `spell_classes`
This seems pretty self-explanatory, except for the duplicate of `level` in spells and spell_classes. Are these necessarily duped?
You are right. Since classes can get spells as different levels the real level that should be used is the one in spell_classes instead of the one in spells. In fact the one in spells is ignore I believe it just hasnt been removed yet.
John Adams wrote: `spells`
Are the `version` and `sub_version` fields - are those internal (EQ2Emu) stats, or something tied to SOE to validate the data?
They are actually values inside of the spell display packet. The client actually keeps track of multiple packet versions (similar to what I created that allows multiple versions to connect to the same server - although on a much smaller scale). This is what these are, although the fields in the database are obsolete and aren't used.
John Adams wrote: I have peeked through the code and cannot seem to find what `type` means, though I got `cast_type`, target_type and spell_book_type figured out.
Good question. I'm not entirely sure. It is used, but I havent messed with it in quite a while and I dont seem to have any notes about what this field does.
John Adams wrote: Regarding `target_type` - Are there some values missing from the Enum? For instance, the Paladin has a spell that casts a Rune on someone, but I do not see Group Member, only Group AE. Etc...
There is a value in the packet that modifies the target_type and gives additional target types. I am going to rework how I handled that because they use the same values.
John Adams wrote: `class_skill` - is this the "Adept I, II..." kinda ranking?
`mastery_skill` - and "Mastery I, II"?
`tier` - is this "Common, Legendary, Heroic"?
class_skill - is the skill id (from the skills table) that the player needs in order to use the spell).
mastery_skill - I'm not sure
tier - Apprentice I, II, etc
John Adams wrote: Lastly (for now hah) `spell_visual` - effect? Wouldn't this be handled by `spell_display_effects`?
Another obsolete table that is not used.
John Adams wrote: I know it gets tiring answering all my questions, but thank you in advance, anyone who knows. :)
A little, but the more questions you ask the more people learn about the system and the more they can help if they are so inclined :P

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Spells structures

Post by John Adams » Fri Aug 01, 2008 12:56 pm

LethalEncounter wrote:
John Adams wrote: I know it gets tiring answering all my questions, but thank you in advance, anyone who knows. :)
A little,
Uh, standing right here!!1 ;)

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

Re: Spells structures

Post by Zcoretri » Fri Aug 01, 2008 1:02 pm

LethalEncounter wrote: index_field is used to specify the order of the arguments in the cast() LUA function. Take for example the Sprint spell:
id,spell_id,index_field,value_type,value,value2
1,1,0,FLOAT,.1,0
2,1,1,FLOAT,40,0
The LUA cast function:
function cast(Caster, Target, PowerCost, SpeedValue)
In spells, Caster and Target are always given in the cast function and any additional parameters need to be setup via the database. The order of these parameters is set via the index_field in the spell_data table. The first index always starts with 0, the second 1, etc. With the values above, when the cast function for Sprint is called the PowerCost variable will be set to .1 and the SpeedValue will be set to 40. Value2 was originally designed to be the value range but I dont think it was ever used. If you want a value range you can always specify 2 separate parameters, one as the min and the second as the max.
After extensive study I found that Value2 is ignored and you have to create another index to get a range.
On that note, I have been doing some content cleanup on JA's server. I have created some simple lua scripts for some NPC's that just respond back from a hail :D , so John you will find them in the DB SVN if you would like to add them in :D
I noticed some NPC's respond back with random dialog everytime you hail them so I programmed that in to these spawnscripts.
I have also spotted some bugs, should I just use the /bug feature on JA's server? or list them here on the forum.
Image

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Fri Aug 01, 2008 1:04 pm

Try the /bug feature first. If it doesnt work, list them on the bug forum. John had problems with the /bug feature but it was probably just his old client version.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Spells structures

Post by John Adams » Fri Aug 01, 2008 4:15 pm

Zcoretri wrote:On that note, I have been doing some content cleanup on JA's server. I have created some simple lua scripts for some NPC's that just respond back from a hail :D , so John you will find them in the DB SVN if you would like to add them in
I will add these immediately! My server has also been restarted to get the new opcodes, and I have the 5016L client, so I'll try the /bug command again.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Fri Aug 01, 2008 4:24 pm

Crap. /bug is STILL not working for me. wtf... i r nub.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Fri Aug 01, 2008 7:58 pm

Another quickie about spell "tiers".
Are we supposed to add 1 `spells` table entry for Apprentice I - IV, Adept I - III, and Master I-II? So, 9 individual records for the same spell (Faithful Swing for instance, for Pally), just with different Tier and spell_data?

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests