PDA

View Full Version : Highkeep Guards on Strike?


John C
08-04-2018, 11:17 PM
For some reason, the guards in High Keep appear to be on strike. If I train out with Goblins, they watch them beat on me and take absolutely no action to help.

Before I go looking for myself, does anyone know what causes guards to help or not help? Is it tied to faction? NPC guard flag?

Thanks.

dagulus2
08-05-2018, 05:12 AM
Ok, so to make a 'guard' work you need a few things:

1) The npc_aggro fag in npc_types has to be set to 1.
2) The faction attached to the guard has to have a line telling it to attack the target faction. This is denoted in npc_faction_entries by a -1 in the npc_value and the faction number of what you want the guard to attack in the faction_id. For reference the faction for the Pickclaw Goblins is 249.
3) The creature you want the guard to attack must have a faction attached.

Finally: There appears to be a hard limit to how may factions any npc can keep track of, so if you have added several factions before 249 in the Highkeep Guards faction tables, there will be a cut of point where they just ignore the later ones.

I hope this helps.

Cusser
08-05-2018, 05:40 AM
In the source code (features.h)


//max factions per npc faction list
#define MAX_NPC_FACTIONS 20

dagulus2
08-05-2018, 05:54 AM
In the source code (features.h)


//max factions per npc faction list
#define MAX_NPC_FACTIONS 20


Thanks, that's something I have wanted to know for years.