Jump to content

Broken AI upon reload


ZuTheSkunk

Recommended Posts

Posted

I have a problem with a custom creature.

 

The creature is scripted to walk in a predetermined pattern, stopping briefly on specific spots throughout its patrol. In the event it sees the player, it's supposed to enter a "charge" AI package that forces it to reach the player at all costs. If the creature loses sight of the player for 3 seconds, it ceases charge and resumes its patrol. If the creature reaches the player, the player will blow up.

 

Now, when I startup the game, everything works fine up until getting blown up for the first time. After that, very weird stuff starts happening.

 

First off, when I use the COC console command to enter the cell, the creature is present at a different spot than intended. Second, it just doesn't behave properly. It has difficulty moving, it's stuck facing a specific direction, and seems to be able to only move forward. And sometimes, instead of moving normally, it ends up repeatedly teleporting, a few feet at a time.

 

One weird thing I noticed is that for some reason, I receive 55 XP upon reload. I have no idea why, but I suspect it might have something to do with the problem.

 

I've been trying to find the source of the problem for 5 hours, with no results. If I can't find a solution to this, I will have to abandon the project, because it completely nukes the idea I had.

 

Please help?

Posted

Two things. First, have you navmeshed the cell? Second, have you tested the packages without the "blow up" part of the blow up script?

Posted

Yes, I navmeshed the entire location, and the creature definitely navigates the location correctly before the reload. 

 

I tried testing it without the blowing up applied, and the problem is the same: everything works fine until I load a save game, then everything breaks.

 

As far as I tested, this definitely happens if I load the save and then COC into the location - regardless of whether it's a clean save or a save after enabling the mod. Strangely, the AI does NOT break if I make a save while already being in the location and then later load it.

Posted

Are your AI packages within the creature record or being applied by a script? Does the same thing happen if you apply those same packages to a different creature or an NPC?

Posted

They are within the creature record.

 

I tried replacing the creature with a similar creature recreated from scratch - same result. I tried changing the original creature into a different creature by changing its skeleton - same result.

Posted

Thing is, his script already uses EVP to force him into instantly changing his package whenever he sees the player or loses him.

 

I think it's best to show it on video: 

 

Before you ask: yes, I tried to have him start right away on his "teleported to" position, but what was happening instead was him standing in a different spot than intended and being just as unresponsive.

Posted

I think following up on him teleporting away while you're looking at him even though he shouldn't be able to is your best bet at the moment. Throw some DebugPrint lines in around that particular piece of script to see if you can figure out what the game thinks is happening.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...