Implementing: AA/Character Traits

EQ2Emulator Development forum.

Moderator: Team Members

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

Re: Character Traits

Post by Zcoretri » Mon Oct 31, 2011 4:13 pm

John Adams wrote:You guys are kicking ass! Thank you for getting involved. This is a very good sign ;)

Now if I can just get you to commit your efforts to SVN, we'll be golden. No sense duplicating the effort, you both (all) have write access. Don't worry if something is wrong, or buggy. It's SVN. We can always revert ;)


As for DB/table modifications, you can continue to post your tables for now since my DB update scripts (on the portal) seem to re-write themselves day to day and break. Not sure what's up there.
I didn't know if Jabantiz had SVN access so i went ahead and merged his diff file and committed.

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

Re: Character Traits

Post by Jabantiz » Mon Oct 31, 2011 4:18 pm

I missed that part of the pm john had sent me, thought I just had access to the other svns, now I know.

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

Re: Character Traits

Post by Jabantiz » Mon Oct 31, 2011 7:22 pm

I added the ability to group traits together. The way it was trait choices were listed in order of level. Now it will sort them by group (each group will be sorted by level) so the list can be made to look like live (all stat traits grouped together, followed by all the resist traits and so on).

Required sql

Code: Select all

ALTER TABLE `spell_traits`
	ADD COLUMN `tier` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `isInate`,
	ADD COLUMN `group` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `tier`
The tier field needed to be added for the class training portion of the list. This should be the last change to this table I need to make.

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 » Tue Nov 01, 2011 6:42 am

I gave you all DB Updater access too. Give the module a try (if you dare), see if we can keep the committed code in sync with the DB.

Remember, table structure changes require you to bump the MINOR_VERSION value in version.h to match the version # supplied after the DB Update commit. If you need more instruction on this, let me know. Scat, Z and I can assist.

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 » Mon Nov 07, 2011 7:09 am

Anyone going to submit the SQL tables needed for Traits? The committed code is now throwing errors that it cannot find tables.

Not sure if the structures presented here are the correct ones, or I'd do it myself.

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

Re: Character Traits

Post by Zcoretri » Mon Nov 07, 2011 10:00 am

Yeah...I will do it when I get home tonight. I will also submit some data for the tables also.

John...at the moment, the spell ID's for the traits are starting at 1000000, would you like them to be something different?

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 » Tue Nov 08, 2011 6:43 am

Zcoretri wrote:John...at the moment, the spell ID's for the traits are starting at 1000000, would you like them to be something different?
No that should be okay, keeping them up above the other normal spell class ranges. Do Traits have race/class combos? Maybe we could group them by race_id like we do with spells. Once we get more data, we can take a look at it closer.

Thanks, Z.

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

Re: Character Traits

Post by Zcoretri » Tue Nov 08, 2011 9:09 am

Could not create the new table last night, it was throwing an error.

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

Re: Character Traits

Post by Jabantiz » Tue Nov 08, 2011 1:57 pm

Sorry I never got around to this, have had no free time over the past week or so to work on this. I just tried to do the update but I got the following error.
SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')COLLATE='utf8_general_ci'ENGINE=InnoDBROW_FORMAT=DEFAULTAUTO_INCREMENT=0' at line 1 [1064]
As I said I am not that good with sql, I use Heidi for all my database work and that is where I got the following create statement from so I have no idea what is wrong.

Code: Select all

CREATE TABLE `spell_traits` (
	`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
	`spell_id` INT(10) UNSIGNED NOT NULL DEFAULT '0',
	`level` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
	`class_req` TINYINT(3) UNSIGNED NOT NULL DEFAULT '255',
	`race_req` TINYINT(3) UNSIGNED NOT NULL DEFAULT '255',
	`isInate` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
	`tier` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
	`group` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
	PRIMARY KEY (`id`),
	INDEX `FK_spell_traits` (`spell_id`),
	CONSTRAINT `FK_spell_traits` FOREIGN KEY (`spell_id`) REFERENCES `spells` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
ROW_FORMAT=DEFAULT
AUTO_INCREMENT=0;

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 » Wed Nov 09, 2011 6:57 am

Ok, I will see if I can identify the bug *this time*. I swear, sometimes I stripslashes, sometimes I addslashes, sometimes I do nothing, and there is always an error at one point or another.

Thanks for trying.

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 » Wed Nov 09, 2011 8:30 am

Jabantiz wrote:I use Heidi
Well there's your problem. Heidi sucks ;) (personal story, nevermind me... heh) I use SQLYog Enterprise, and it's fairly badass.

The script should be fixed. Please re-submit your query above, and add the data, and report any new errors to me here. The bug (this time) was that I am removing CONSTRAINT lines from the query before inserting them into our updates DB, and it was leaving a trailing comma.

(keep committing CONSTRAINTs, i only remove them because our db update database can't handle them. they are still pushed to the world DBs regardless).

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

Re: Character Traits

Post by Jabantiz » Wed Nov 09, 2011 1:18 pm

Did a copy and paste of the sql I posted above and now I get this error
SQL ERROR [ mysqli ]

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=DEFAULTAUTO_INCREMENT=0' at line 1 [1064]

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 » Wed Nov 09, 2011 2:37 pm

Make sure the copy/paste doesn't remove necessary white spaces. I'll try it myself right now, same steps.


Edit: Worked for me without editing a byte. Not sure why it wouldn't work for you. We can leave my submit there, and just bump the version.h to 41.

Try submitting the sample data to this new table when you are ready.

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

Re: Character Traits

Post by Jabantiz » Wed Nov 09, 2011 3:28 pm

My sample data was just generic stuff I entered to test with, Zcoretri probably has better more live like data then I do but I will still submit mine if you want it.

EDIT: updated version.h and comitted it to the dev svn

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

Re: Character Traits

Post by Zcoretri » Wed Nov 09, 2011 9:12 pm

Jabantiz wrote:My sample data was just generic stuff I entered to test with, Zcoretri probably has better more live like data then I do but I will still submit mine if you want it.

EDIT: updated version.h and comitted it to the dev svn
I got some good data...just polishing it up and will add it in...soon :mrgreen:

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests