Page 2 of 11
Re: Character Traits
Posted: Mon Oct 31, 2011 4:13 pm
by Zcoretri
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.
Re: Character Traits
Posted: Mon Oct 31, 2011 4:18 pm
by Jabantiz
I missed that part of the pm john had sent me, thought I just had access to the other svns, now I know.
Re: Character Traits
Posted: Mon Oct 31, 2011 7:22 pm
by Jabantiz
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.
Re: Character Traits
Posted: Tue Nov 01, 2011 6:42 am
by John Adams
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.
Re: Character Traits
Posted: Mon Nov 07, 2011 7:09 am
by John Adams
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.
Re: Character Traits
Posted: Mon Nov 07, 2011 10:00 am
by Zcoretri
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?
Re: Character Traits
Posted: Tue Nov 08, 2011 6:43 am
by John Adams
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.
Re: Character Traits
Posted: Tue Nov 08, 2011 9:09 am
by Zcoretri
Could not create the new table last night, it was throwing an error.
Re: Character Traits
Posted: Tue Nov 08, 2011 1:57 pm
by Jabantiz
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;
Re: Character Traits
Posted: Wed Nov 09, 2011 6:57 am
by John Adams
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.
Re: Character Traits
Posted: Wed Nov 09, 2011 8:30 am
by John Adams
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).
Re: Character Traits
Posted: Wed Nov 09, 2011 1:18 pm
by Jabantiz
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]
Re: Character Traits
Posted: Wed Nov 09, 2011 2:37 pm
by John Adams
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.
Re: Character Traits
Posted: Wed Nov 09, 2011 3:28 pm
by Jabantiz
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
Re: Character Traits
Posted: Wed Nov 09, 2011 9:12 pm
by Zcoretri
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
