Enable/Disable

Post » Fri Feb 18, 2011 11:57 pm

Ok, Im having trouble with disable and enable...

When I modify the npcs value, and then disable and enable them, their stats get reset. This is bad, because they end up reappearing with different weapons and stats and all the players hard work to upgrade their npc companion is lost.

I'm also using the Moveto command as well, to put them by the player.

Am I right to suspect the disable/enable commands?

Would it better to move the NPC to some dummy cell and then move it back when the time is right?


Im using the ModActorValue command to change the NPCS strength, is there a better command that wouldn't change the base value of the stat so future references of that npc aren't running around with an extra 20 strength?
User avatar
Harry Hearing
 
Posts: 3366
Joined: Sun Jul 22, 2007 6:19 am

Post » Sat Feb 19, 2011 7:22 am

Well, you could make enchanted objects with the effects on them. Or even abilities that you can add as spells to the NPC. Or just use the moveto command but you would probably have to remove some AI packages from them or condition the AI packages.

Are you using leveled lists for the inventory? I did not know that disable and enable would reset the inventory of an NPC. I know resurrect does.
User avatar
Allison C
 
Posts: 3369
Joined: Mon Dec 18, 2006 11:02 am

Post » Sat Feb 19, 2011 12:41 am

Yes, the npc has a leveled list for his inventory. It would appear that disabling an npc and enabling them does reset the inventory, along with modded stats. I've used moveto to eliminate that, however, now whenever I disable the npc that I moved to TestChappy, it crashes the game. Is crashing known to happen when you disable an npc in another cell? Is there a way around that?

I think I may have figured out why there was crashing. Part of my script was trying to remove a package from the disabled npc. I'm going to fix that and see what happens.



Edit: Yep...that fixed it.
User avatar
Roanne Bardsley
 
Posts: 3414
Joined: Wed Nov 08, 2006 9:57 am


Return to IV - Oblivion