PDA

View Full Version : NPC Faction Question


WildcardX
03-18-2006, 09:14 AM
I have notes for the following, although I can't recall where I copied this from...

Ally = 1101 or greater
Warmly = 701 thru 1100
Kindly = 401 thru 700
Amiable = 101 thru 400
Indifferent = 0 thru 100
Apprehensive = -100 thru -1
Dubious = -700 thru -101
Threatenly = -999 thru -701
K.O.S. = -1000 or lesser

Now take a faction group from the database, say "The_Statue_of_Rallos_Zek". In the database this faction group looks like the following:

name value npc_value id
Claws of Veeshan 10 0 42
King Tormax -30 1 179
Kromrif -30 1 188
Kromzek -30 1 189

So my question is, how do you work out these numbers to figure out how NPC's in this faction group will respond to any npc belonging to this faction table. I assume the first chart I listed above is accurate and still used today. Anyone know?

RangerDown
03-18-2006, 10:26 AM
First, let me nitpick a little and tell you to call your last entry "scowling" as it should be. Threatening is also KOS, and you imply that it isn't when you do it the way you did.

The "npc_value" field now determines how an npc will act when near another npc of a certain faction. "value" only indicates the amount of faction the player will gain or lose after killing the npc. value used to dictate npc-to-npc behavior as well, but there are too many situations where npc reactions to certain factions differ from faction hits, so we add the npc_value field.

If the npc_value field is:
positive (>0): the npc will assist other npc's of this faction when they are attacked
0: Neutral
negative (<0): The npc will attack other npc's of this faction

Note that the npc_aggro should also be set to non-zero in the npc's entry in the npc_types table for npc-to-npc aggro to work. (NPC assisting will still work even if npc_aggro = 0) However, I don't recommend blindly turning on npc_aggro across the board -- do it only on npc's you really want to aggro other npc's, else you will experience big-time performance issues.

WildcardX
03-18-2006, 11:24 AM
Thanks for the info.

I understand what you illustrated about how the "value" column is how much faction is gained/lost by a player for killing a mob and how if "npc_value" column is greater than 0, the NPC will assist and if it is less than zero, then the NPC will attack.

But how does that relate to the faction category table I listed above? On that table, values greater than zero would be "Indifferent" thru "Ally", while negative values would be "Apprehensive" thru "Scowling". As you stated, only "Threatenly" and "Scowling" are K.O.S.

Does the value of npc_value relate to the faction categories table in any way? If so, that is what I don't understand at the moment.

RangerDown
03-18-2006, 11:09 PM
The npc_value field handles only npc-to-npc interaction. For player interaction, the npc's primary faction should correspond to an ID from the faction_list table, and it's in that faction_list record that the npc's behavior toward players is dictated. It's a combination of the "base" value, then the class, race, and deity-specific modifier fields. The effective faction can be modified by faction hits players have incurred as well, which is stored in the faction_values table.

WildcardX
03-19-2006, 03:19 AM
Got it. Thanks for clearing that up for me.