Quote:
i'm doing a little DB work on factions and I'm confused about how the tables "npc_faction" and "npc_faction_entries" relate.. what field is the "key" that ties these 2 tables together?
Also, what field is the actual faction value that determines how a mob will con to a player? is it in the "primaryfaction" field? or the "value" field?
|
The tables are linked by npc_faction.id=npc_faction_entries.npc_faction_id
You're correct, the 'primaryfaction' field determines how a mob cons to a player.
The npc_faction_entries table serves two purposes: 1) a list of faction hits the player will take when killing a mob of that faction ID, and 2) determines which mobs hate each other and which mobs like each other.
If you would take a positive hit for Faction A by killing Mob B, then Faction A hates Mob B and will kill it. If you would take a negative hit for Faction A for killing Mob B, then Faction A likes Mob B and will assist it in combat.