NPC speed edits only work for new games?

Post » Fri Nov 28, 2014 7:57 am

I'm making a basic mod to give some types of enemies faster speed. I've found that editing the Speed parameter in the Actor window does what I want, but it only works if I start a completely new game. If I load an existing save, it's as if the mod has no effect.

Why is this happening? Is my save somehow keeping stat data for all the enemies I've met so far?
User avatar
Julie Ann
 
Posts: 3383
Joined: Thu Aug 23, 2007 5:17 am

Post » Fri Nov 28, 2014 12:14 pm

Yes, once an actor is generated in-game, changes to the Actor record in the CK won't have any effect.

The created actor becomes an ObjectReference once it is created, and all of its attributes are stored in your save as long as that actor is persistent.

User avatar
Love iz not
 
Posts: 3377
Joined: Sat Aug 25, 2007 8:55 pm

Post » Fri Nov 28, 2014 4:46 am

Is there a way to purge ObjectReference data from the save so that the game will recreate one with the edited CK stats?
User avatar
Samantha Jane Adams
 
Posts: 3433
Joined: Mon Dec 04, 2006 4:00 pm

Post » Fri Nov 28, 2014 5:32 pm

Not really, you would have to delete the actor and create a new one via script.

User avatar
Robert Devlin
 
Posts: 3521
Joined: Mon Jul 23, 2007 2:19 pm

Post » Fri Nov 28, 2014 10:30 am


Wait, I think I may have misunderstood what you meant with ObjectReference.

Would spawning a new actor with the console use the CK edited values as edited by my mod? To check if my mod was working, what I did was a spawn test with a regular troll (player.placeatme 23ABA 1) after the mod is loaded, and it doesn't work if I use an existing save. Wouldn't this be the same as creating a new actor via script?
User avatar
Red Sauce
 
Posts: 3431
Joined: Fri Aug 04, 2006 1:35 pm

Post » Fri Nov 28, 2014 4:25 am

Yes, that should work. If you use PlaceAtMe it should be using the new values as you have modified them.

User avatar
Epul Kedah
 
Posts: 3545
Joined: Tue Oct 09, 2007 3:35 am

Post » Fri Nov 28, 2014 10:16 am

That's odd, then.

I've tried using getav speedmult to get a better picture of what's going on, and if I spawn a troll right after starting a fresh game, it returns 175, which is the current value that my test mod is editing it to. If I do the same after loading a save, then it comes out as 100.

I can manually edit the speed using setav speedmult and it works as expected provided I disable and enable the actor after changing the speed, but that only seems to affect the current actor; subsequent spawned trolls will still have speed set to 100. I can only assume that the save is storing a template to generate new enemies with?

User avatar
KRistina Karlsson
 
Posts: 3383
Joined: Tue Jun 20, 2006 9:22 pm

Post » Fri Nov 28, 2014 5:10 pm

Yeah, you probably want to investigate that further. Sounds pretty odd - if your plugin has successfully edited the actor record, it should definitely be giving you the new values. You could try editing something else too to see if it works (like the name of the troll actor or something more obvious).

User avatar
sam smith
 
Posts: 3386
Joined: Sun Aug 05, 2007 3:55 am


Return to V - Skyrim