View Full Version : Factions not working 5.5dr-1
inkubus
02-29-2004, 04:19 AM
Hi
I've just tested the latest version of EQemu from CVS and can't seem to get any mobs to affect the faction_values table. There doesn't seem to be any faction hits and most mobs appear to be indifferent at least.
I created two new factions, good/evil and set the npc_factions to them. I've also set all npcs to be good/evil based on their race.
I can see a range of indifferent to amiable. The faction hits don't work from npc_faction_values and no message in game either with a GM and non-GM.
Any suggestions anyone?
Many thanks
InKy
inkubus
02-29-2004, 07:26 AM
After lots of checking and help from Rogean it looks as if EQEmu isn't checking the faction id when spawning mobs. If you do a #viewnpctype <id> it lists it as factionid = 0. Even though there is an entry in npc_faction_id in npc_types.
I'm wondering if the column has changed? Agro works perfectly if I #ai factionid <id>.
Thanks in advance
InKy
inkubus
02-29-2004, 12:14 PM
In database.cpp I see the following:
/* if (RunQuery(query, MakeAnyLenString(&query, "SELECT faction_id, value, primary_faction FROM npc_faction WHERE npc_id = %i", tmpNPCType.npc_id), errbuf, &result2)) {
safe_delete_array(query);
int i = 0;
while((row2 = mysql_fetch_row(result2))) {
if (atoi(row2[2]) && i != 0) {
tmpNPCType.factionid[i] = tmpNPCType.factionid[0];
tmpNPCType.factionvalue[i] = tmpNPCType.factionvalue[0];
tmpNPCType.factionid[0] = atoi(row2[0]);
tmpNPCType.factionvalue[0] = atoi(row2[1]);
}
else {
tmpNPCType.factionid[i] = atoi(row2[0]);
tmpNPCType.factionvalue[i] = atoi(row2[1]);
}
i++;
if (i >= MAX_NPC_FACTIONS) {
cerr << "Error in DBLoadNPCTypes: More than MAX_NPC_FACTIONS factions returned, npcid=" << tmpNPCType.npc_id << endl;
break;
}
}
mysql_free_result(result2);
}*/
Since this is all commented out it explains my faction problems. However, since I wasn't aware of any change to the npc_types table I was never aware.
How can I correct my npc_type table to allow factions to function?
Many thanks
tcsmyworld
02-29-2004, 04:20 PM
I went into the source and looked too , it seems that everywhere it refers to faction it is commented out , is there a reason for this???
Makes for some really boring game play when the npcs just stand there like idiots.
tcsmyworld
03-03-2004, 04:37 AM
It seems that when the new qglobals field was added it was, for some reason, tied to faction.
To get faction working again , make sure you have the qglobals field in the npc_types table.
sql statement in Shawn319's post following this one :)
Shawn319
03-03-2004, 07:37 AM
ALTER TABLE `npc_types` ADD `qglobal` INT(2) UNSIGNED DEFAULT "0" NOT NULL;
inkubus
03-07-2004, 09:36 AM
Great, thanks that's resolved the problem.
ghostrider
03-13-2004, 11:59 AM
So where do we put this line?
enter it directly into the mysql prompt command line?
Im just new to mysql, thanks info :)
Monrezz
03-13-2004, 12:03 PM
Yes.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.