Frustrated by the City Guards. - by Fallen+Keeper
Fallen+Keeper on 21/4/2005 at 20:59
Am I the only one who misses the calm, realistic nights in T1 and T2? Empty streets and guards that say "How's it going?" when they see you. Here in T3 the guards recnognize you from your footsteps... :erg: Any way how to change it in order to make guards in the city section neutral? Leaving the hammerites and pagans as they are. Is it possibile?
Vivian on 21/4/2005 at 21:21
Wasn't it because you were supposed to be a wanted criminal? with a 'hide out' in a public apartment block that has a wanted poster of you on the wall outside. Hmph.
Bumbleson on 21/4/2005 at 22:07
I can't remember that guards were defaulting to neutral behavior in T1 and T2 :weird:
There were some missions where some guards were neutral until you threatened them with a weapon, but the default was hostility as in TDS...
An AIs attitude towards the player is defined by its faction model. Faction models are under MetaProperty->AIModel->AIFactionModel and are added to an AI under AIPawn. You could create a neutral faction model for all your guards and use a script to change the faction disposition:
Conditions:
Logic OR operator
When this AI sees the player threatening it
When this AI sees the player with weapon drawn
When I see the player hacking/lockpicking
Actions:
Set the faction disposition toward the player to DISPOSITION_HOSTILE for the AI attached to this script.
I don't know if this is enough to make the guard angry. You may have to modify other models as well. Also, the private guard in Garrett's apartment has no such script attached, but gets angry nonetheless when he sees you picking a door. You should analyze this guy's properties and models to find out how it's done properly.
SneaksieDave on 21/4/2005 at 22:18
;)
Just in case that scared you off - the short answer is, yes, it's easily do-able.
Fallen+Keeper on 21/4/2005 at 22:59
So if I can modify that, I can also improve the Enforcers, right? Made them neutral towards the others, and vice versa. No slaughter, then.
Bumbleson on 22/4/2005 at 01:08
Changing the faction model is definitely not enough. I made some guards neutral by default and gave them the above script, but I had to attack them repeatedly before they started to attack me. So there must be more to it than just the faction model.
SneaksieDave on 22/4/2005 at 03:51
Quote Posted by Fallen+Keeper
So if I can modify that, I can also improve the Enforcers, right? Made them neutral towards the others, and vice versa. No slaughter, then.
Open up the metaproperty AIModel->AIFactionModel and you'll see how it's done. You define a faction model by a number, and then tell that faction model how it feels about every other faction model, also determined by number, as hostile, allied or neutral.
What Bumbleson is talking about is apparently more complex, because it involves faction values for Garrett, and faction hits. Those are also somewhere, but I don't recall where exactly I saw them. Attacking them repeatedly was pushing your faction toward them lower and lower, till they became hostile. That may be related to some difficulty I had a while back, where I wanted two AIs to attack each other but ignore others of the same type (like a fistfight in the street, that no one gets involved in) but they always ended up having nosy butt-ins eventually. Also - I'm not sure how to add more faction models. I tried creating a new one and numbering it 99, however there was no way to reference it in the other models - 20 is the highest they go to. And since all 20 are used, that might unfortunately mean replacing, instead of creating, new factions. However, I may have just missed the how-to.