Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Database/World Building

Archive::Database/World Building Archive area for General Discussion's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-29-2004, 04:19 AM
inkubus
Hill Giant
 
Join Date: Feb 2002
Posts: 146
Default Factions not working 5.5dr-1

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
Reply With Quote
  #2  
Old 02-29-2004, 07:26 AM
inkubus
Hill Giant
 
Join Date: Feb 2002
Posts: 146
Default

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
Reply With Quote
  #3  
Old 02-29-2004, 12:14 PM
inkubus
Hill Giant
 
Join Date: Feb 2002
Posts: 146
Default

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
Reply With Quote
  #4  
Old 02-29-2004, 04:20 PM
tcsmyworld's Avatar
tcsmyworld
Discordant
 
Join Date: Feb 2002
Posts: 452
Default

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.
__________________
Founder PEQ (ProjectEQ)
Reply With Quote
  #5  
Old 03-03-2004, 04:37 AM
tcsmyworld's Avatar
tcsmyworld
Discordant
 
Join Date: Feb 2002
Posts: 452
Default

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
__________________
Founder PEQ (ProjectEQ)
Reply With Quote
  #6  
Old 03-03-2004, 07:37 AM
Shawn319
Demi-God
 
Join Date: Jan 2002
Posts: 2,073
Default

ALTER TABLE `npc_types` ADD `qglobal` INT(2) UNSIGNED DEFAULT "0" NOT NULL;
__________________
Shawn319
Semi-Retired EQ Addict

(Retired)EQEmu Lead Tester
(Retired)EQEmu Tech Support

(Retired)Host/ServerOP - [LIVE] Official EQEmu Test Server
(Retired)Host/ServerOP - Shawn319's All-GM Dev Test Server
(Retired)ServerOP - EQEmu Beta Server
(Retired)ServerOP - GuildWars Server
(Retired)ServerOP - Raid Addicts
--------------------------
Reply With Quote
  #7  
Old 03-07-2004, 09:36 AM
inkubus
Hill Giant
 
Join Date: Feb 2002
Posts: 146
Default

Great, thanks that's resolved the problem.
Reply With Quote
  #8  
Old 03-13-2004, 11:59 AM
ghostrider
Fire Beetle
 
Join Date: Mar 2004
Posts: 1
Default

So where do we put this line?
enter it directly into the mysql prompt command line?

Im just new to mysql, thanks info
Reply With Quote
  #9  
Old 03-13-2004, 12:03 PM
Monrezz's Avatar
Monrezz
Dragon
 
Join Date: Mar 2003
Location: #loc
Posts: 745
Default

Yes.
__________________

kRPG Profile
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:49 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3