NPC vs NPC background battles

Post » Mon Nov 08, 2010 4:19 am

i'd like to know how to get NPCs to fight each other when the player isn't standing there watching them in the same cell. currently if two NPCs from separate factions attack each other, the player then leaves the cell as the battle is starting - upon returning the two NPCs have simply stopped fighting and are walking away from each other! how can i get them to continue pummeling each other to death even if the player leaves and enters a different world space in the middle of their battle. i'd like for the player to be able to return to the world space later to see how the battle played out (find out who the winner was).

Oblivion is made so that all events pretty much happen when the player is there to watch them. this functionality i'm requesting runs contrary to that behavior.

i know there is an easy enough way to hard code it so that one NPC simply wins and the other loses. i don't want that.

i know there is a way to randomly chose which NPC wins. i don't want that either.

i would like it so the two NPCs are wandering around in remote cells in real time (that is, remote from the player), they run into each other, fight it out, and the victor leaves.

the point here is to create faction battles, and then have the player stumble upon victims from time to time. and i don't want it simulated. i want persistent NPCs who run into each other and fight it out while the player is no where near them.
User avatar
Euan
 
Posts: 3376
Joined: Mon May 14, 2007 3:34 pm

Post » Mon Nov 08, 2010 5:22 pm

For that, the NPCs would have to be set as persistent references, which I believe they are by default (someone please correct me if I'm wrong). You would also have to make sure the 'No Low Level Processing' flag is unchecked. There is a potential downside to that: when the 'No Low Level Processing' flag is unchecked on any NPC, that NPC can't be added to a leveled list.
User avatar
Tamara Primo
 
Posts: 3483
Joined: Fri Jul 28, 2006 7:15 am

Post » Mon Nov 08, 2010 7:33 pm

Just tried this. Even stepped out into another world-space and waited for 8 hours (game time) and then returned. They were standing there next to each other when i entered and started to initiate combat again. You'd think after 8 hours someone would be dead.

If you recall the vanilla quests where you can enter a room where a battle is about to start, realize you aren't prepared, and then leave immediately to go get supplies. In the process you get sidetracked, level up a few times, complete a few other quests, and then remember you forgot to finish what you were originally doing. You return to the battlegrounds only to find the battle has not progressed by even one second and picks up right where you left it many months ago in game time. THIS is what I'm attempting to override.
User avatar
Nana Samboy
 
Posts: 3424
Joined: Thu Sep 14, 2006 4:29 pm

Post » Mon Nov 08, 2010 12:28 pm

I believe you could put an evp (evaluate package) on the door.
Try this:

Begin OnActivate[Actor1REF].evp[Actor2REF].evp;This should keep them fightingActivate;This should activate the door to take the player to the connected doorEnd


If the activate command doesn't work, you could put an XMarkerHeading on each side of the door and add this script to each of the doors.
Place a reference ID on each of the markers and use this script:

Begin OnActivatePlaySound DRSWoodenOpenPlayer.Moveto [XMarkerHeading 1 ID]PlaySound DRSWoodenClose;Simulates the door effectEnd


For the other door change the Reference ID from XMarkerHeading 1 ID to XMarkerHeading 2 ID
User avatar
Chloe Mayo
 
Posts: 3404
Joined: Wed Jun 21, 2006 11:59 pm

Post » Mon Nov 08, 2010 6:01 am

No good. The door works just fine with the .evp's but because the actors are in a different world space they stop fighting.

Makes me wonder if the player was on one end of Tamriel and these two guys were on the other end (while both the fight and the player were still in the same world space) if the fight would go ahead and resolve itself. in other words the ability to move from world space to world space was so this "pause the battle till the player returns" type of behavior would be possible.
User avatar
Dona BlackHeart
 
Posts: 3405
Joined: Fri Dec 22, 2006 4:05 pm

Post » Mon Nov 08, 2010 6:25 pm

Well, that didn't work either. Created a test land bridge that was QUITE long. Put a door at each end of it that allowed teleportation from one end to the other. Set my two combatants up on one end. As soon as they engaged in combat I stepped through the door effectively teleporting about a mile away or so. Waited 8 hours and then returned. Exact same behavior from the AI. They were standing there like they were hanging out waiting for me to come back and watch them pummel each other to death. Oh well.
User avatar
Richard Thompson
 
Posts: 3302
Joined: Mon Jun 04, 2007 3:49 am


Return to IV - Oblivion