Page 3 of 11
Re: Character Traits
Posted: Thu Nov 10, 2011 6:45 am
by John Adams
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.
Re: Character Traits
Posted: Thu Nov 10, 2011 6:59 pm
by Zcoretri
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.
Re: Character Traits
Posted: Fri Nov 11, 2011 5:49 pm
by Jabantiz
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?
Re: Character Traits
Posted: Fri Nov 11, 2011 7:26 pm
by Zcoretri
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?
Re: Character Traits
Posted: Fri Nov 11, 2011 7:31 pm
by Jabantiz
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?
Re: Character Traits
Posted: Sat Nov 26, 2011 8:25 am
by John Adams
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.
Re: Character Traits
Posted: Tue Nov 29, 2011 5:31 pm
by Jabantiz
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.
Re: Character Traits
Posted: Thu Dec 01, 2011 1:12 pm
by John Adams
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.
Re: Character Traits
Posted: Thu Dec 29, 2011 3:38 pm
by John Adams
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?
Re: Character Traits
Posted: Thu Dec 29, 2011 4:12 pm
by Jabantiz
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.
Re: Character Traits
Posted: Thu Dec 29, 2011 4:42 pm
by Zcoretri
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.
Re: Character Traits
Posted: Thu Dec 29, 2011 4:54 pm
by John Adams
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
Re: Character Traits
Posted: Thu Dec 29, 2011 5:02 pm
by Jabantiz
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.
Re: Character Traits
Posted: Fri Dec 30, 2011 8:09 am
by John Adams
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

)
Re: Character Traits
Posted: Fri Dec 30, 2011 8:41 am
by John Adams
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!