"Off-Screen" Combat and Behavior

Post » Tue Nov 04, 2014 5:34 pm

Is it possible for actors to fight in cells that are not near the player's cell (assuming their factions/packages would necessitate the fight if the player were present)? I would guess that if this is possible the actors would need to be Persistent, but I'm not even sure that this is possible. I've done some searching and have found what almost seems like conflicting information on what actors do and don't do when the player is not present.

As an example, I'd like one group of actors to be on a patrol, spot another group, and then fight them (all without the player being nearby). Let's say the patrolling group defeated the other group, but 2 of their 5 members die. Later, if the player were to go to the patrolling group's destination they would see only the 3 remaining patrolling members. Maybe if the player had been around and participated in the fight all 5 would have made it. I'd like the player to have that kind of consequential choice for this example.

User avatar
Yvonne Gruening
 
Posts: 3503
Joined: Mon Apr 23, 2007 7:31 pm

Post » Tue Nov 04, 2014 6:49 pm

It might be better to script an event that places the corpses and living patrols in the cell as the player character enters based on the conditions of the mod. If you want the see the end of the fight, you could make those NPCs to die have a low health when they spawn so they don't last long.

NPCs can travel from cell to cell when the player is not around, but you only see them if you are in the same cell. Otherwise it is just a script keeping track of where they should be. At least from what I understand. So, there are limitations with what NPCs can do when your not around, but that just helps the CPU from frying itself working on things the PC will never see.

User avatar
DAVId Bryant
 
Posts: 3366
Joined: Wed Nov 14, 2007 11:41 pm

Post » Tue Nov 04, 2014 4:37 am

Thanks for the reply! That seems like it would work for my example, but isn't exactly what I'm looking for. I guess I may have given an example that was too isolated, but basically for my mod to work faking the encounter probably won't cut it. I intended the example to explain what I hoped could be accomplished, not necessarily to find workarounds for that specific situation.

Ok, that's kind of what I was afraid of. I realize that things like combat may not normally be simulated away from the player for performance reasons, but I was hoping there was a way to enable it for select actors (similar to making them Persistent).

User avatar
Mylizards Dot com
 
Posts: 3379
Joined: Fri May 04, 2007 1:59 pm

Post » Tue Nov 04, 2014 9:03 am

Not sure if this really answers your question but I know for a fact that actors can do FULL COMBAT in cells the player is not in themself.
I have seen this happen. For some debugging of my combat mod (years ago) I was tracking every combat action the actors made (all events that related to combat) with an ability type magic effect script they were given. I would sit in one cell and watch my debug messages tell me the complete combat story in real time of other NPCs fighting on the other side of a load door!
Now, it could be that because I had a script on them they were being forced to be persistent, but then that would be true of all actors with scripted magic effect spells.
Also it could only be that this works for "adjacent" cells (cells that border the loaded cell) as I remember reading someplace that they are also loaded into active memory.
But I have a feeling Bethesda has the NPCs doing a heck of a lot more in other cells than we might guess because that was what the Bethesda said they originally wanted to do with their break thru "Radiant AI" for Oblivion many years ago. It would not take all that much of the CPU to process the numbers for that kind of thing. I think the graphics take up a heck of a lot more CPU power. And as you are not seeing them "doing stuff" the graphics would not need to be calculated.
If I were you I would give an actor a script that pops up a messagebox if they get into combat. Give this actor a travel package to walk from one side of the gameworld to the other a few times. See if you get the pop up messages and include scripting to tell you what cell they are in and this will tell you how many cells from the player this can work.
User avatar
Katie Pollard
 
Posts: 3460
Joined: Thu Nov 09, 2006 11:23 pm

Post » Tue Nov 04, 2014 6:10 pm

Fantastic! I was thinking of trying something similar as a test. I'll let you know what my results are.

User avatar
Lifee Mccaslin
 
Posts: 3369
Joined: Fri Jun 01, 2007 1:03 am


Return to V - Skyrim