Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2009, 12:27 PM
litlamzetiv
Fire Beetle
 
Join Date: Jun 2009
Location: Alaska
Posts: 12
Default Quest Giver Faction Issue if($faction >=1000)

I want players to have to kill nagafen before they can go to Karnor. The method I've chosen to do this with is faction. The steps I've taken are as follows:
  1. [TABLE: Faction List] Created a new faction (ID: 1993 called RED DRAGON SLAYERS.
  2. [TABLE: npc_faction_entries] Modified npc_faction_id 23 (nagafen) to also have a faction ID 19938 value of 1500 and npc_value of 0.
  3. [TABLE: npc_types] I created an NPC in soltemple and modified his npc_faction_id in this table to be 19938.
  4. Modified the quest for this mob to the following:
sub EVENT_SAY
{
if($text=~/slain/i) {
$npc->SetAppearance(0);
if($faction >=1000) {
quest::say("Yes, Chronicler Crinklespark told me all about your feat in conquering the great lord Nagafen. I hear that the first to try were a bunch of crazy gnomish wizards, though I hope you managed to complete the task without quite as much bloodshed. Have you [performed the other tasks] as instructed?");
}
}
}
I'm sort of at a loss as to why that doesn't work. I've confirmed the following:
  1. Killing Nagafen properly gives a message that my faction 19938 has increased.
  2. My character has the proper value for the faction [Table: faction_values].

Do I also need to somehow add an entry for the quest NPC in [Table: npc_faction] in order to set his primary faction to 19938? I wouldn't figure this was necessary, because when I use the NPC and Loot Editor, it shows the npc_faction_id properly; however, when I con the mob (even after killing nagafen). If this is what I need to do, what does the value mean? Is that just an arbitrary unique number I can assign? Does it use "name" as a lockup in some other table?

While I'm at it, is there a way for a quest to check more than one faction, or can it really only compare the faction against the primary faction of the quest giver? I'm under the assumption that it can only do one, but if it could do several, that'd be downright handy.

Thanks in advance.

-Rob
Reply With Quote
  #2  
Old 07-08-2009, 12:40 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

The $faction variable does not give the quest NPC the actual faction points, it gives a number from 1-9, representing the faction message the user would get when conning the NPC.

However, for some reason, the current numbers are out of whack once you get below indifferent:

File: faction.h
Code:
enum FACTION_VALUE {
	FACTION_ALLY = 1,
	FACTION_WARMLY = 2,
	FACTION_KINDLY = 3,
	FACTION_AMIABLE = 4,
	
    FACTION_INDIFFERENT = 5,
    
    FACTION_APPREHENSIVE = 9,
    FACTION_DUBIOUS = 8,
    FACTION_THREATENLY = 7,
    FACTION_SCOWLS = 6
};
File: faction.cpp
Code:
	if(character_value >=  1101) return FACTION_ALLY;
	if(character_value >=   701 && character_value <= 1100) return FACTION_WARMLY;
	if(character_value >=   401 && character_value <=  700) return FACTION_KINDLY;
	if(character_value >=   101 && character_value <=  400) return FACTION_AMIABLE;
	if(character_value >=     0 && character_value <=  100) return FACTION_INDIFFERENT;
	if(character_value >=  -100 && character_value <=   -1) return FACTION_APPREHENSIVE;
	if(character_value >=  -700 && character_value <= -101) return FACTION_DUBIOUS;
	if(character_value >=  -999 && character_value <= -701) return FACTION_THREATENLY;
	if(character_value <= -1000) return FACTION_SCOWLS;
	return FACTION_INDIFFERENT;
I'm not aware of a way for a quest script to check faction against a different NPC.
Reply With Quote
  #3  
Old 07-08-2009, 12:43 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

Quote:
Originally Posted by Shendare View Post
However, for some reason, the current numbers are out of whack once you get below indifferent:
That's the way it is on live, unfortunately.
Reply With Quote
  #4  
Old 07-08-2009, 12:45 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

http://www.eqemulator.net/wiki/wikka...=QuestTutorial

$faction values are only 1 through 9, so you need to set the primary faction on your zoner(i assume this is how you are keeping people out of karnors?) to the one you are using for Nagafen (Ring of Scale?)
__________________
The Realm
Reply With Quote
  #5  
Old 07-08-2009, 12:48 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Quote:
Originally Posted by gaeorn View Post
That's the way it is on live, unfortunately.
What?? Verant defying logic? You're kidding!
Reply With Quote
  #6  
Old 07-08-2009, 01:46 PM
litlamzetiv
Fire Beetle
 
Join Date: Jun 2009
Location: Alaska
Posts: 12
Default

Thanks for the insight. The faction levels thing is good to know, but that isn't what's stopping the quest from working. Though I've taken the faction hit from killing naggy now, the mob still cons me as dubious (although the table shows me at 1500 with the faction which should be max ally). That's where the problem lies for me--though I appreciate you nipping my next question in the bud where it comes to faction levels.

So, why does the mob not con as ally to me if I have it done that way? Congdar seems to be pointing me in the right direction, but I thought I'd already done that. I don't want the "zoner" mob to be on ring of scale faction, but on the new faction I created (1993 and I thought I'd done that, but it doesn't seem to have taken. Could you elaborate as to how to properly perform this step?
Reply With Quote
  #7  
Old 07-08-2009, 02:10 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Perhaps you're not utilizing the faction tables correctly.

npc_types.npc_faction_id corresponds to npc_faction.id

npc_faction.primaryfaction corresponds to faction_list.id

faction_list.id corresponds to faction_values.faction_id

So, when character # 1 cons Nagafen (npc_types.id 32040), the server sees that Nagafen has a npc_faction_id of 23.

The server checks the npc_faction record for id 23 and sees that the primary faction for this entry is 226.

The server checks the faction_list table for id 226 and builds a starting faction value from the base, race, class, and deity modifiers in the record.

The server then checks the faction_values table record matching character id #1 and faction_id # 226, adding the user-accomplished current_value number to the starting faction value from faction_list.

The server then adds in any further modifiers such as worn item faction adjustments and spell-related faction adjustments.

The final modified number determines the individual character's standing with the NPC being conned.
Reply With Quote
  #8  
Old 07-08-2009, 02:38 PM
litlamzetiv
Fire Beetle
 
Join Date: Jun 2009
Location: Alaska
Posts: 12
Default

Yeah, that's gotta be the breakdown. I was omitting an entry in faction_values for the factions I'd created.

I really appreciate you guys taking the time to break this all down in detail to a n00b.

<3
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:02 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