Log in

View Full Version : Faction causing crash


Theeper
02-23-2009, 06:22 AM
I'm using PeQ 283 and rev 355 on an XP machine.

I emptied the faction_list, npc_faction and npc_faction_entries tables. With them empty, the server runs fine and everything cons indifferent.

So, I created a couple simple factions and set them to be KoS to each other. I also set the npc_faction_id's for every npc to be either 1 or 2.


INSERT INTO `faction_list` (`id`, `name`, `base`, `mod_c1`, `mod_c2`, `mod_c3`, `mod_c4`, `mod_c5`, `mod_c6`, `mod_c7`, `mod_c8`, `mod_c9`, `mod_c10`, `mod_c11`, `mod_c12`, `mod_c13`, `mod_c14`, `mod_c15`, `mod_r1`, `mod_r2`, `mod_r3`, `mod_r4`, `mod_r5`, `mod_r6`, `mod_r7`, `mod_r8`, `mod_r9`, `mod_r10`, `mod_r11`, `mod_r12`, `mod_r14`, `mod_r60`, `mod_r75`, `mod_r108`, `mod_r120`, `mod_r128`, `mod_r130`, `mod_r161`, `mod_d140`, `mod_d201`, `mod_d202`, `mod_d203`, `mod_d204`, `mod_d205`, `mod_d206`, `mod_d207`, `mod_d208`, `mod_d209`, `mod_d210`, `mod_d211`, `mod_d212`, `mod_d213`, `mod_d214`, `mod_d215`, `mod_d216`) VALUES
(1, 'Faction 1', -100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(2, 'Faction 2', -100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

INSERT INTO `npc_faction` (`id`, `name`, `primaryfaction`, `ignore_primary_assist`) VALUES
(1, 'NPC Faction 1', 1, 0),
(2, 'NPC Faction 2', 2, 0);

INSERT INTO `npc_faction_entries` (`npc_faction_id`, `faction_id`, `value`, `npc_value`) VALUES
(1, 1, -30, 1),
(1, 2, 10, -1),
(2, 1, 10, -1),
(2, 2, -30, 1);


This causes a zone crash when I con a mob on either faction. I can con mobs that don't have a faction set, but not ones that do. Anyone see anything wrong with these ?

bad_captain
02-23-2009, 03:01 PM
I am having a similar problem. I was able to log in when i was running rev 350, but after changing to rev 355 (and now 356), I can't even get zones to come up. I receive this error:

[02.23. - 13:41:21] [ZONE__INIT_ERR] Loading npcs faction lists FAILED!

I have tried with and without the added columns from the following sql statements:

ALTER TABLE `faction_list` ADD COLUMN `mod_c16` smallint(6) NOT NULL default '0' AFTER `mod_c15`;
ALTER TABLE `faction_list` ADD COLUMN `mod_r330` smallint(6) NOT NULL default '0' AFTER `mod_r161`;

I doubt this is related, but at the same time, I am receiving errors where it can't find or interpret rules (but they are there.) All 3 are related to aggro...

[02.23. - 13:40:52] [RULES__ERROR] Unable to find rule 'Spells:BardSpellAggroMod'
[02.23. - 13:40:52] [RULES__ERROR] Unable to interpret rule record for Spells:BardSpellAggroMod
[02.23. - 13:40:52] [RULES__ERROR] Unable to find rule 'Spells:PetSpellAggroMod'
[02.23. - 13:40:52] [RULES__ERROR] Unable to interpret rule record for Spells:PetSpellAggroMod
[02.23. - 13:40:52] [RULES__ERROR] Unable to find rule 'Spells:SpellAggroModifier'
[02.23. - 13:40:52] [RULES__ERROR] Unable to interpret rule record for Spells:SpellAggroModifier

I've tried wiping the db and starting over, but that hasn't helped. I am using the most recent peq db, downloaded earlier today.

bad_captain
02-23-2009, 03:29 PM
I deleted all records from npc_factions and npc_faction_entries. I also did not receive the errors, and was able to load my zones.. Looks like one of the values in one of those two tables is causing the problem.

Theeper
02-23-2009, 05:26 PM
You answered my question bad_captain. I overlooked those faction_list table updates. Thank you.

Andrew80k
02-23-2009, 05:37 PM
I am having a similar problem. I was able to log in when i was running rev 350, but after changing to rev 355 (and now 356), I can't even get zones to come up. I receive this error:

[02.23. - 13:41:21] [ZONE__INIT_ERR] Loading npcs faction lists FAILED!

I have tried with and without the added columns from the following sql statements:

ALTER TABLE `faction_list` ADD COLUMN `mod_c16` smallint(6) NOT NULL default '0' AFTER `mod_c15`;
ALTER TABLE `faction_list` ADD COLUMN `mod_r330` smallint(6) NOT NULL default '0' AFTER `mod_r161`;

I doubt this is related, but at the same time, I am receiving errors where it can't find or interpret rules (but they are there.) All 3 are related to aggro...

[02.23. - 13:40:52] [RULES__ERROR] Unable to find rule 'Spells:BardSpellAggroMod'
[02.23. - 13:40:52] [RULES__ERROR] Unable to interpret rule record for Spells:BardSpellAggroMod
[02.23. - 13:40:52] [RULES__ERROR] Unable to find rule 'Spells:PetSpellAggroMod'
[02.23. - 13:40:52] [RULES__ERROR] Unable to interpret rule record for Spells:PetSpellAggroMod
[02.23. - 13:40:52] [RULES__ERROR] Unable to find rule 'Spells:SpellAggroModifier'
[02.23. - 13:40:52] [RULES__ERROR] Unable to interpret rule record for Spells:SpellAggroModifier

I've tried wiping the db and starting over, but that hasn't helped. I am using the most recent peq db, downloaded earlier today.
Typically this usually means you have a mismatch in your database version versus your code version.

bad_captain
02-23-2009, 06:09 PM
That's what I assume, but I'm not sure how since there haven't been any documented changes to those tables within the last 2 days (I had it running on rev 350 two days ago).

Is there a db schema available from anyone who is running a server?

I am using the default peq db with all required sql scripts, as well as changes listed only in the changelog. I'm not sure what I'm doing wrong.

Andrew80k
02-23-2009, 06:47 PM
You have to be careful about applying the svn changes and updating your db. Make sure that when you update your db check to make sure you NEED to add the svn sql files. Often times those are meant for folks that don't want to update the db entirely and just want to make their old db compatible. You may need to do both, but you may not. As for the Schema, there used to be one in the wiki, but I don't know how current it is. I think if you use peq that CD had one on the projecteq.net site, I'm not sure how current that is either.

Did you back up your database before you started the update process? I'm not sure how you'd get out of sync either, since those haven't been changed in a while that I can recall.

bad_captain
02-25-2009, 10:37 AM
Well, I finally figured it out.. I was missing the following sql change from 09/07/2007:

alter table npc_faction add column ignore_primary_assist tinyint(3) not null default 0;

I'm not sure how I had it in before, but not now. Oh, well. It all works now.

I guess my next question is why these sql changes from 2 years ago aren't included in the default db installation? It's a bit tedious to go through the changelog to try and find all sql code not already included in the source scripts, or at least in the numbered revision sql scripts.

Thanks for the help, though!