Implementing: AA/Character Traits

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
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: Character Traits

Post by John Adams » Thu Nov 10, 2011 6:45 am

Z, is that data from parser? I haven't run Traits on our logs in some time, but if that's where you're getting it from, I can help you out if you need.

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

Re: Character Traits

Post by Zcoretri » Thu Nov 10, 2011 6:59 pm

John Adams wrote:Z, is that data from parser? I haven't run Traits on our logs in some time, but if that's where you're getting it from, I can help you out if you need.
Some of it is from the parser, yes.

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

Re: Character Traits

Post by Jabantiz » Fri Nov 11, 2011 5:49 pm

Added support for class training in the trait list, however not sure if I am giving the player the spell right or if higher tiers of spells don't work correctly. I copied a spell in my db, in this case flash of steel, and bumped the tier to 5. I then went through all the spell tables duplicating and bumping values for that spell for the new tier. I then use the following code to give the spell to the player.

Code: Select all

Spell* spell = master_spell_list.GetSpell(trait->spellID, trait->tier);
client->GetPlayer()->AddSpellBookEntry(trait->spellID, trait->tier, client->GetPlayer()->GetFreeSpellBookSlot(spell->GetSpellData()->spell_book_type), spell->GetSpellData()->spell_book_type, true);
The spell shows up in the character_spells table, both the original and the higher tier, but the spell book still contains the original lower tier one. Is there something I am missing or does this not work yet?

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

Re: Character Traits

Post by Zcoretri » Fri Nov 11, 2011 7:26 pm

I'm trying to get the abilities portion going.

As far as the spells, will have to take a closer look at what you are doing here. Are you trying to replace an existing spell with a higher tier?

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

Re: Character Traits

Post by Jabantiz » Fri Nov 11, 2011 7:31 pm

I was just trying to add a new spell but I guess Live replaces the old spell doesn't it, never really payed attention on Live when I selected a spell.

EDIT: I tried to replace the spell by calling RemoveSpellBookEntry() and then calling AddSpellBookEntry() right after but I get the same result as before, the original spell is in the spell book but both are in the database in the character_spells table. All this should do is upgrade a spell you currently have the same way an adept book would, is there something that I am missing?

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: Character Traits

Post by John Adams » Sat Nov 26, 2011 8:25 am

There was a problem with the character_spells UNIQUE indexing on that table, once upon a time. It was on char_id, spell_id and tier I believe. I think we had to drop "tier" from the UNIQUE to get spell_id 'x' to upgrade to a new tier. Not sure if that's your problem, nor if we ever updated the database in the updater.

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

Re: Character Traits

Post by Jabantiz » Tue Nov 29, 2011 5:31 pm

It was my fault, I assumed calling RemoveSpellBookEntry and AddSpellBookEntry would update everything but it never sends the updated spellbook to the client, have to do that manually.

On a side note, is there already a command to see spell effects? I know there is animtest but that isn't for spell effects. I made one really quick becuase at first glance I couldn't find one and I didn't have the time to search through all the commands to find one. If there isn't such a command do you want me to submit it and if so what do you want it called, I named it spellanim for now.

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: Character Traits

Post by John Adams » Thu Dec 01, 2011 1:12 pm

Yeah, on our test server you can go into the world and type /useability 1 - 2335. That will fire off the spell effects that we know of (as of about a year or so ago).

I built that table using table `reference_spell_effects`, just to get the IDs to demonstrate the different spells visual effects in-game.

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: Character Traits

Post by John Adams » Thu Dec 29, 2011 3:38 pm

Small bug with either the code or Traits spell data (Zcoretri?)

Your data had all spell_tiers for these entries left at 0 (zero), and World seems to expect a 1 at least. I fixed it by setting all 1,000,000 or greater spell_id's to tier 1. Is this correct?

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

Re: Character Traits

Post by Jabantiz » Thu Dec 29, 2011 4:12 pm

I know when examining a trait the client forces tier 1, don't know if I hardcoded that in some where as well or not. I broke my server working on 1096, get opcode is missing messages after changing some upcodes in the db last night, thing is it worked great last night won't work today with no new changes. As soon as I get my server working again I will look at this.

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

Re: Character Traits

Post by Zcoretri » Thu Dec 29, 2011 4:42 pm

John Adams wrote:Small bug with either the code or Traits spell data (Zcoretri?)

Your data had all spell_tiers for these entries left at 0 (zero), and World seems to expect a 1 at least. I fixed it by setting all 1,000,000 or greater spell_id's to tier 1. Is this correct?
Yes

EDIT: I changed mine, and now I throw an error.

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: Character Traits

Post by John Adams » Thu Dec 29, 2011 4:54 pm

Is all this Traits work *only* for the 1096 client, or should it work also with the 1008 (6118L pre-SF) client we currently support?

I noticed 2 more things, using this older client;
1) When I dinged 10 to see my racial traits, they showed up fine. When I clicked one, it asked me if I wanted to make this my Level 0 trait. When I said Yes, I got an error: Unhandled command: accept_advancement So does this mean setting the advancement is not quite ready? If not, that's fine.

2) While the Racial traits lit up (became available) when I dinged 10, the Character Traits for level 8 did not. Again, 6118L client (data 1008).


Thought I'd ask if it's the Client, or the code, before I go looking into it further.

Thanks

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

Re: Character Traits

Post by Jabantiz » Thu Dec 29, 2011 5:02 pm

It is the code. I didn't start working with 1096 until I finished the traits. All my testing I did with the Traits was with the SF Client. As for the command it is in the code, it might not be in the DB though.

Code: Select all

INSERT INTO `commands` (`id`, `type`, `command`, `subcommand`, `handler`, `required_status`) VALUES (285, 0, 'accept_advancement', '', 293, 0);
If that is in the DB already with the correct value then it is probably the code again.

Not sure why the character traits were not available at level 10, unless you did /level then there is an odd delay before those highlight, like a several min delay, not sure what is causing it or how to fix it to be honest.

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: Character Traits

Post by John Adams » Fri Dec 30, 2011 8:09 am

I did do /level 10, so I'll mess with it more this weekend.

accept_advancement is in the `commands` table, but the wrong handler value is still in there (999). I'll fix this one.

I'm going to ask (all) you guys to be more on top of the DB updates please, when you make changes and are happy with your results, get this data updated for all servers via DB Updater. Just keep notes of the DB schema and data changes you make while implementing something, then at the end, be sure to commit those changes (if the stupid script doesn't bomb out...)

If you are uncomfortable making those changes, shoot me a PM with your queries or data changes, and I will do it (if it's in a post, I'll probably glaze over it ;))

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: Character Traits

Post by John Adams » Fri Dec 30, 2011 8:41 am

Sorry, one more thing. Are there any LUA scripts that go with making these work? Or are all the bonuses hard-coded based on the spells* data?

Annnnd... are there supposed to be any "maintained spells" icons or anything when you chose some racial trait that makes you more diplomatic and such? I thought they were all passive, so I wasn't sure if they maintained icons even so...

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests