[Relz] NPC Friendly Fire

Post » Fri Apr 01, 2011 5:13 am

Found a second problem situation - watching arena fights. The combatants are not members of te Yellow Team and Blue Team respectively, but instead they are both members of the ArenaSpectatorCombatants "Arena Spectator Combatants" [FACT:0001E65B]


Uh, now that is CLEARLY a situation where it makes sense they share a faction, yet it makes sense that they fight.

Arena fighting is a different beast than "real" fights, so that′s something even I think should be handled specifically by this mod. The only problem is that there′s mods that add arenas...I wonder if it would be enough to check if the cell name contains "arena", and skip any looping altogether? This way the extra check wouldn′t take place inside the loop for every NPC, but only once per sweep.
User avatar
Robyn Howlett
 
Posts: 3332
Joined: Wed Aug 23, 2006 9:01 pm

Post » Thu Mar 31, 2011 11:59 pm

Also, with the fix I had in mind, part of the reason I was talking about adding stuff to the ini file was so that new issues could be added to the ini rather than having to update the mod. I figured that eventually we would run into mod conflicts and it would be impossible to accommodate everybody, so I was thinking that new conditions could be added to the ini.

I felt that the variables would be along the lines of questID and something to identify the combatants (probably two actor references). Basically if these conditions were met, the fight would not be aborted. I'd appreciate your thoughts on this... I haven't had a chance to look at it yet, though.
User avatar
BethanyRhain
 
Posts: 3434
Joined: Wed Oct 11, 2006 9:50 am

Post » Thu Mar 31, 2011 7:07 pm

Well, this particular incident was easily avoided by just replaing the faction that ArenaYellowCombatant "Yellow Team Combatant" [NPC_:0002ACD1] belongs to to that of ArenaYellowTeam "Arena Yellow Team" [FACT:00028A85]
User avatar
MatthewJontully
 
Posts: 3517
Joined: Thu Mar 08, 2007 9:33 am

Post » Fri Apr 01, 2011 4:40 am

Also, with the fix I had in mind, part of the reason I was talking about adding stuff to the ini file was so that new issues could be added to the ini rather than having to update the mod. I figured that eventually we would run into mod conflicts and it would be impossible to accommodate everybody, so I was thinking that new conditions could be added to the ini.

I felt that the variables would be along the lines of questID and something to identify the combatants (probably two actor references). Basically if these conditions were met, the fight would not be aborted. I'd appreciate your thoughts on this... I haven't had a chance to look at it yet, though.


Hmm...now that′s actually a very good idea. Now I see why you were talking about using the INI - anyone could support the list of exceptions, even users that have no idea how to use CS. :goodjob:


Here′s my stormings about the subject:

-The quest script has an array variable called, say, exceptionList. It′s used to store actor names (or sufficient parts of the actor name)

-There′s a separate "ini" file, with commands like:

call functionAddException "ActorName"


for every actor that needs to be skipped. The function stores the actor names in the array. During gameplay, if the NPC name includes the store name string ("nameIncludes") the script skips him.

(you can′t use "let" in INI files, but think we can use string literals as parameters, so that way the ini should insert directly to the array. Using csv-style delimitted string is another option, but I have done this with DR6 and learned that without using "let" you can′t have long enough strings to make it useful)



I think this would be a sufficient compromise, since the exception list could be maintained and distributed separately, maybe by active users, which would work around the issue of me being unable to keep supporting this mod. Also from my point of view it′s an "universal" fix that avoids slipping down that infamous slope. :)
User avatar
Kanaoka
 
Posts: 3416
Joined: Fri Jun 16, 2006 2:24 pm

Post » Fri Apr 01, 2011 1:03 am

Could you add factions to the exception list in the ini? If you can, than you could add the city factions and the arena factions and that'd probably avoid 90% of any problems this mod might cause.
User avatar
Lisa Robb
 
Posts: 3542
Joined: Mon Nov 27, 2006 9:13 pm

Post » Thu Mar 31, 2011 10:17 pm

Could you add factions to the exception list in the ini? If you can, than you could add the city factions and the arena factions and that'd probably avoid 90% of any problems this mod might cause.


Hmm, if the $-operator in Obse can translate the faction references to strings so that they can be compared with the strings in the INI, then yes.

But, here′s the problem:


The current system, aiming for simplicity, simply checks if the NPCs share ANY faction. And if kept as simple as possible, this extra check would simply skip if ANY of the faction the NPC belongs to is on the list.

So if city faction is on the list, it means this mod wouldn′t protect city guards from fighting each other, if they are in city faction, cause that′s on the skip list - even though they shouldn′t fight because they share the GUARD faction (I assume here they are in both).

So I don′t think adding all the city factions on the list would be a good idea, for the obvious reason - you would render this mod useless in the face of every citizen NPC. :P
User avatar
WTW
 
Posts: 3313
Joined: Wed May 30, 2007 7:48 pm

Post » Fri Apr 01, 2011 2:09 am

Well it's nice to see that you haven't given up on this mod at least. It certainly serves a purpose in the game.
User avatar
gemma king
 
Posts: 3523
Joined: Fri Feb 09, 2007 12:11 pm

Post » Fri Apr 01, 2011 10:00 am

So I don′t think adding all the city factions on the list would be a good idea, for the obvious reason - you would render this mod useless in the face of every citizen NPC. :P

I'm actually fine with this mod ignoring city faction npcs. As I stated earlier, I don't think being from the same city should be enough deterrent to stop people from fighting if they really wanna go at. And besides, how often do you see normal citizens get into fights anyway?

The guards are a big problem though. Guards are typically the biggest offenders when it comes to random oblivion npcs fighting to the death for no good reason, and thus they benefit the most from this mod. Unfortunately they are all also members of their respective city factions, so ignoring those factions would let them keep killing each other over accidental friendly fire, as you said.

Curse those guards, always foiling my plans!
User avatar
Kevan Olson
 
Posts: 3402
Joined: Tue Oct 16, 2007 1:09 am

Post » Fri Apr 01, 2011 10:55 am

Well it's nice to see that you haven't given up on this mod at least. It certainly serves a purpose in the game.


Well since I didn′t plan to make this a project, the biggest problem here was figuring out something that helps with the "conflicts" or pulling the mod, in otherwords I need to be able to get on with other stuff, one way or another.

Since I think adding a simple system that allows any party, even pure users to easily add exceptions to the list, is an adequate compromise in this situation and doesn′t require more work than the mod originally did, I consider the problem solved. I′ll update the mod this week. :)
User avatar
City Swagga
 
Posts: 3498
Joined: Sat May 12, 2007 1:04 am

Post » Fri Apr 01, 2011 2:19 am

Yes, I think we're on the right track here. I was also thinking that the actor references would be stored in an array. The one thing to remember with this is that the ini file would only have the exceptions. The normal behaviour of this mod is to STOP fights between members of the same faction - that would include guards and NPC's. We are only trying to deal with the exceptions in the game when a scripted fight needs to occur, like the arena or poor Aldos in Cheydinhal.

I'm hoping that names would be enough, because we can't use form ID's. Even for something like Aldos, we only want the fight to continue at the specific point in that quest, so we might need to account for the target of his ire. If for some reason he got in a fight with someone before that, the fight should be stopped.

And yes, the whole point of this is that players themselves could edit the ini file with the details of whatever encounters they want to have happen. You could also have a central repository if people find common cases as well.

@Jupiah - actually fights between citizens are actually pretty common (and happen in cities too) and that's what this mod is trying to stop.

I like your ideas Skycaptain - did you want me to put something together or did you want to play with it some more?
User avatar
Sam Parker
 
Posts: 3358
Joined: Sat May 12, 2007 3:10 am

Post » Fri Apr 01, 2011 6:33 am

Yes, I think we're on the right track here. I was also thinking that the actor references would be stored in an array. The one thing to remember with this is that the ini file would only have the exceptions. The normal behaviour of this mod is to STOP fights between members of the same faction - that would include guards and NPC's. We are only trying to deal with the exceptions in the game when a scripted fight needs to occur, like the arena or poor Aldos in Cheydinhal.

I'm hoping that names would be enough, because we can't use form ID's. Even for something like Aldos, we only want the fight to continue at the specific point in that quest, so we might need to account for the target of his ire. If for some reason he got in a fight with someone before that, the fight should be stopped.

And yes, the whole point of this is that players themselves could edit the ini file with the details of whatever encounters they want to have happen. You could also have a central repository if people find common cases as well.

@Jupiah - actually fights between citizens are actually pretty common (and happen in cities too) and that's what this mod is trying to stop.

I like your ideas Skycaptain - did you want me to put something together or did you want to play with it some more?


Since the exceptions are pretty few in the end, and the fights aren′t that common, I think it′s pretty much the same (and less work and easier manage) if we simply exclude those actor from the reach of this mod altogether. After all, quest related NPCs are the ones that are going to end up on the list, and those are usually protected by their essential status.

They won′t end up being able to beat up everyone else either, since the mod simply allows the fight from BOTH participants if either one is on the list. So if Aldos attacks anyone, at any point, this mod wont interfere. Since the mod WILL keep anyone else from beating each other thus preventing the triggering of overall chaos, Aldos will simply get gang-banged by those that decide to help his target, without anyone beating those that beat him.

What I′m saying is that skipping those actors totally doesn′t mean they are allowed to freely slaughter everyone else under the influence of this mod, either. :)
User avatar
Emilie Joseph
 
Posts: 3387
Joined: Thu Mar 15, 2007 6:28 am

Post » Fri Apr 01, 2011 4:24 am

I wasn't sure if Aldos was essential up to the point in the quest when the fight happens. Stopping to think about it, however, I guess he would have to be. I think we should still allow for a target though, in the interest of future issues. In Aldos case, I think we could set the target to "any".

So did you want me to look at implementing this stuff or did you want to take a look at it?
User avatar
DarkGypsy
 
Posts: 3309
Joined: Tue Jan 23, 2007 11:32 am

Post » Fri Apr 01, 2011 1:32 am

So what about frenzy? That spell will be petty useless with this mod loaded. Maybe you could set the ini to ignore any npcs who have had their aggression increased by a spell or power?
User avatar
Hope Greenhaw
 
Posts: 3368
Joined: Fri Aug 17, 2007 8:44 pm

Post » Thu Mar 31, 2011 7:25 pm

Also, how would this exception list affect performance of the mod?
User avatar
Roisan Sweeney
 
Posts: 3462
Joined: Sun Aug 13, 2006 8:28 pm

Post » Fri Apr 01, 2011 8:24 am

So what about frenzy? That spell will be petty useless with this mod loaded. Maybe you could set the ini to ignore any npcs who have had their aggression increased by a spell or power?


Well that doesn′t include the ini (which is for allowing users to add "hardcoded" exceptions), but is rather about adding to the overall logic of the mod.

I don′t know how frenzy works, techically, but if it can be detected by a simple check to the aggression (current value > base value) then I can add check for it. If the only acceptable way requires checking the active effects on the NPC, my personal opinion is that it′s not worth the trouble and extra code running, meaning it will be a "known bug".

Also, how would this exception list affect performance of the mod?


Not at all really. These kind of string and array operations are fast, and we are talking about few loaded NPCs and few exceptions on the list.

But this is also a slippery slope, if you double 10 lines of code it′s fine, if you double that you have already quadrupled the original amount. That′s why any check should be a single operation check, like checking actor value, checking if the name is on the list, or checking if the NPC shares ANY faction at all with his combat target.


Anything like comparing every faction of one NPC to every faction of the second NPC, or looping active effect lists of every NPC on top of looping the NPCs should not be used here or we are suddenly running 100+ lines of code per NPC looped, when the original code is around 10. Even though the script runs only once a second, and could be running less often, all the operations take place during one frame and we don′t want the system to choke once every second.
User avatar
Portions
 
Posts: 3499
Joined: Thu Jun 14, 2007 1:47 am

Post » Fri Apr 01, 2011 4:33 am

Well that doesn′t include the ini (which is for allowing users to add "hardcoded" exceptions), but is rather about adding to the overall logic of the mod.

I don′t know how frenzy works, techically, but if it can be detected by a simple check to the aggression (current value > base value) then I can add check for it. If the only acceptable way requires checking the active effects on the NPC, my personal opinion is that it′s not worth the trouble and extra code running, meaning it will be a "known bug".

Relevant pages from the Unnofficial Elder Scrolls Wiki. Not very technical, but it's the best I could find.
http://www.uesp.net/wiki/Oblivion:Aggression
http://www.uesp.net/wiki/Oblivion:Frenzy

It looks like a simple aggression check would work for most npcs. Frenzy works by temporarily increasing aggression, and apparently most npcs never change their base aggression. Highwaymen and Mythic Dawn agents seem to be among the few that do, highwaymen if you don't pay them, Mythic Dawn agents as you progress the main story line. I'm not sure if a simple aggression check would work for them.
User avatar
Solina971
 
Posts: 3421
Joined: Thu Mar 29, 2007 6:40 am

Post » Fri Apr 01, 2011 6:15 am

Thanks for the replies Sky. :D
User avatar
Melanie
 
Posts: 3448
Joined: Tue Dec 26, 2006 4:54 pm

Post » Fri Apr 01, 2011 11:03 am

Relevant pages from the Unnofficial Elder Scrolls Wiki. Not very technical, but it's the best I could find.
http://www.uesp.net/wiki/Oblivion:Aggression
http://www.uesp.net/wiki/Oblivion:Frenzy

It looks like a simple aggression check would work for most npcs. Frenzy works by temporarily increasing aggression, and apparently most npcs never change their base aggression. Highwaymen and Mythic Dawn agents seem to be among the few that do, highwaymen if you don't pay them, Mythic Dawn agents as you progress the main story line. I'm not sure if a simple aggression check would work for them.


Thanks for info! :)

It′s not a problem if they change their base aggression stepwise, what matters is if the frenzy works by adding temporarily their non-base aggression, and thus it can be compared to the base aggression to see if it′s over the base value. I think this is the case, and I can′t imagine any other situations where the non-base aggression would change (unless some quests use it to trigger attacks - but then we don′t want to interfere anyways, so skipping situations where aggression is over the base value seems to be a valid skipping qualifier).
User avatar
Eire Charlotta
 
Posts: 3394
Joined: Thu Nov 09, 2006 6:00 pm

Post » Fri Apr 01, 2011 7:55 am

Another possible bug, although it might be more of a feature. In vanilla oblivion, if an npc commits a crime they can't go to jail, only pay the fine or resist arrest. Since most npcs don't carry much gold, this, on the rare occasion it occurs, can result in guards executing low-responsibility npcs for stealing a loaf of bread, for example. I'm assuming this mod would prevent the guard from attacking the guilty npc (since they'll usually share a city faction), which is a lot more immersive than the alternative, but I'm wondering how this would work out in game (I haven't experienced it yet). Would the guard keep confronting the npc only for the mod to keep calming him down? And will this interfere with crime overhaul mods like Reneers Guard Overhaul that give the guards the ability to send random npcs to jail just like they do with the player?
User avatar
Isaiah Burdeau
 
Posts: 3431
Joined: Mon Nov 26, 2007 9:58 am

Post » Fri Apr 01, 2011 10:52 am

I think that if you are running RGO, you won't need this mod. As you point out, NPC's stealing food is the main reason fights break out amongst NPC's and since Reneer's already has a mechanism for preventing their death, I wouldn't think you'd run this mod as well. RGO might even have a mechanism for preventing NPC vs NPC fights in those instances - I honestly don't know.

I'm not sure what happens when a guard confronts an NPC in a game without RGO. I thought somebody had tested this earlier in the thread, but I'm not sure.
User avatar
sally R
 
Posts: 3503
Joined: Mon Sep 25, 2006 10:34 pm

Post » Fri Apr 01, 2011 8:50 am

I think that if you are running RGO, you won't need this mod. As you point out, NPC's stealing food is the main reason fights break out amongst NPC's and since Reneer's already has a mechanism for preventing their death, I wouldn't think you'd run this mod as well. RGO might even have a mechanism for preventing NPC vs NPC fights in those instances - I honestly don't know.

I'm not sure what happens when a guard confronts an NPC in a game without RGO. I thought somebody had tested this earlier in the thread, but I'm not sure.



If you read my replies earlier, while running the Extended xxxx mods I had a fight break out in the IC marketplace inn. It becomes much more crowded in there during the dinner evening rush. One npc set off a chain reaction for some reason and 3 npc's died. I remember hearing multiple shouts of thief, etc. I was running RGO at the time too.
User avatar
Eve(G)
 
Posts: 3546
Joined: Tue Oct 23, 2007 11:45 am

Post » Thu Mar 31, 2011 11:21 pm

If you read my replies earlier, while running the Extended xxxx mods I had a fight break out in the IC marketplace inn. It becomes much more crowded in there during the dinner evening rush. One npc set off a chain reaction for some reason and 3 npc's died. I remember hearing multiple shouts of thief, etc. I was running RGO at the time too.


Yes, I read your replies earlier, and as SkyCaptain said in reply to your earlier post:

Well it stops them from fighting, if they are in the same faction. I doubt that′s the case there.

But sounds like your real problem is that the NPCs start fighting in the first place. Even if they are in different factions, they obviously should not start fighting without a reason (but I can′t tell from script the they shouldn′t fight, unless they are in the same faction). (Some) mod adding NPCs in that location has a fault, that should be fixed.


I've never used RGO, but since it changes the base handling of NPC crime, I would not recommend running it with this mod.
User avatar
Charlotte Lloyd-Jones
 
Posts: 3345
Joined: Fri Jun 30, 2006 4:53 pm

Post » Fri Apr 01, 2011 4:48 am

I think that if you are running RGO, you won't need this mod. As you point out, NPC's stealing food is the main reason fights break out amongst NPC's and since Reneer's already has a mechanism for preventing their death, I wouldn't think you'd run this mod as well. RGO might even have a mechanism for preventing NPC vs NPC fights in those instances - I honestly don't know.

Okay, but there's still friendly fire npc fights, and I'm pretty sure RGO doesn't stop those. On more than a few occasions I've seen guards and adventurers get into fights with bandits and dremora in the wilderness, accidentally shoot each other in the back with arrows, and turn on each other once their enemies were dead.
User avatar
emma sweeney
 
Posts: 3396
Joined: Fri Sep 22, 2006 7:02 pm

Post » Fri Apr 01, 2011 5:56 am

Okay, but there's still friendly fire npc fights, and I'm pretty sure RGO doesn't stop those. On more than a few occasions I've seen guards and adventurers get into fights with bandits and dremora in the wilderness, accidentally shoot each other in the back with arrows, and turn on each other once their enemies were dead.


Yes, well once again, unless those adventurers and guards are in the same faction, this mod won't help you anyway. Try running it with RGO then and see what happens. Might be fine - I just don't know.
User avatar
Elea Rossi
 
Posts: 3554
Joined: Tue Mar 27, 2007 1:39 am

Post » Fri Apr 01, 2011 8:28 am

Might have missed it in the thread as "ini" is frustrating to search for, but I wonder if it's an issue that the ini doesn't have an ini extension? It's named NPCFF ini.txt - shouldn't that be NPCFF.ini rather? Seems odd but perhaps it's OK? :unsure:
User avatar
Mel E
 
Posts: 3354
Joined: Mon Apr 09, 2007 11:23 pm

PreviousNext

Return to IV - Oblivion