mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-10 08:06:36 +00:00
Updated NPCAggro (markdown)
+4
-3
@@ -24,7 +24,8 @@ Lets create a new faction. For this example, the NPCs on this faction will be K
|
|||||||
3. Create new [faction_list_mod](https://github.com/EQEmu/Server/wiki/faction_list_mod) entries to account for the Erudite loving aspect.<br>
|
3. Create new [faction_list_mod](https://github.com/EQEmu/Server/wiki/faction_list_mod) entries to account for the Erudite loving aspect.<br>
|
||||||
So we wanted our new NPCs to like Erudites. We do this by adding an entry to faction_list_mod. This applies to any and all NPCs that refer back to the new faction__list entry. So we add an entry, using the faction_list value we created in step 1, a mod_name ([rcd]#) and a value. We want erudites to be amiable to start. So we need to get them from -1000 up to at least 101. Depending on where you want them in the amiable range, the mod would be something like 1101+. So the new entry would be (id, (step 1 id), 1101, r3). Erudites are race 3.
|
So we wanted our new NPCs to like Erudites. We do this by adding an entry to faction_list_mod. This applies to any and all NPCs that refer back to the new faction__list entry. So we add an entry, using the faction_list value we created in step 1, a mod_name ([rcd]#) and a value. We want erudites to be amiable to start. So we need to get them from -1000 up to at least 101. Depending on where you want them in the amiable range, the mod would be something like 1101+. So the new entry would be (id, (step 1 id), 1101, r3). Erudites are race 3.
|
||||||
4. Create how the new npc_faction reacts to other NPCS and PCs via [npc_faction_entries](https://github.com/EQEmu/Server/wiki/npc_faction_entries).
|
4. Create how the new npc_faction reacts to other NPCS and PCs via [npc_faction_entries](https://github.com/EQEmu/Server/wiki/npc_faction_entries).
|
||||||
So we decided we want the NPCs under the new npc_faction umbrella to attack other NPCs whose primary faction_list faction is Heretic (143). To do this, we add an npc_faction_entries entry. For us, this would be (step 2 id, 143, 5, -1, 0). This indicates that all NPCs under the umbrella we created in step 2, will attack NPCs that are under any umbrella that has a primary_faction of 143. The -1 indicates attack. If we changed that to 1 it would mean assist. A 0 in that field would mean ignore. The faction_hit is set to +5 so that if a PC kills one of our mobs, their faction with Heretic will go up. We also need to add a line for our own faction, so that PCs killing our NPCs will lose faction for that. That entry would look like (step 2 id, step 1 id, 10, 1, 0).
|
So we decided we want the NPCs under the new npc_faction umbrella to attack other NPCs whose primary faction_list faction is Heretic (143). To do this, we add an npc_faction_entries entry. For us, this would be (step 2 id, 143, 5, -1, 0). This indicates that all NPCs under the umbrella we created in step 2, will attack NPCs that are under any umbrella that has a primary_faction of 143. The -1 indicates attack. If we changed that to 1 it would mean assist. A 0 in that field would mean ignore. The faction_hit is set to +5 so that if a PC kills one of our mobs, their faction with Heretic will go up. We also need to add a line for our own faction, so that PCs killing our NPCs will lose faction for that. That entry would look like (step 2 id, step 1 id, 10, 1, 0).<br>
|
||||||
5. Added more npc_faction_entries for the faction hits if you kill these NPCs.
|
As the npc_faction_entries documentation mentions, these table entries serve dual purpose and might be better served as separate tables.<br>
|
||||||
6. Assign NPCs to the new npc_faction in the npc_types table.
|
6. Assign NPCs to the new npc_faction in the npc_types table.
|
||||||
7. Since we want these NPCs to attack other NPCs (Heretics), change the npc_types entry for any NPC assigned to this faction so npc_aggro is set to 1.
|
Simply change the npc_faction_id field for your NPCs to the new id from step 2.
|
||||||
|
7. Since we want these NPCs to attack other NPCs, change the npc_types entry for any NPC assigned to this faction so npc_aggro is set to 1. This field must be set to enable these NPCs to agro other NPCs.
|
||||||
Reference in New Issue
Block a user