Abilities and Tokens

Post » Sat May 28, 2011 1:53 pm

I've got a couple of questions.

I know that when an ability is added to an NPC, every NPC that uses that base form will respawn with that ability. But, if I remove that ability from said NPC, will the opposite be true, i.e. will that ability be missing from subsequent spawns of that base form?

If I add a token to an NPC's inventory, is this the correct syntax to do something with the NPC via the token's script:

ref npcRefbegin OnAddset npcRef to getContainerendbegin GameModenpcRef.someMethodend


I know that CreateFullActorCopy creates savegame bloat. Does CloneForm also do this? If I use CloneForm to create a copy of the player and delete it before the game is saved, will that bloat the savegame?
User avatar
suniti
 
Posts: 3176
Joined: Mon Sep 25, 2006 4:22 pm

Post » Sat May 28, 2011 5:21 am

I've got a couple of questions.

I know that when an ability is added to an NPC, every NPC that uses that base form will respawn with that ability. But, if I remove that ability from said NPC, will the opposite be true, i.e. will that ability be missing from subsequent spawns of that base form?

Yes.
If I add a token to an NPC's inventory, is this the correct syntax to do something with the NPC via the token's script:

ref npcRefbegin OnAddset npcRef to getContainerendbegin GameModenpcRef.someMethodend

Almost; the only problem is that it takes a few frames before GetContainer returns the correct reference.
scn tokenScrref npcRefbegin gamemode  if npcRef == 0    set npcRef to getcontainer    return  endif  npcref.someMethodend

I know that CreateFullActorCopy creates savegame bloat. Does CloneForm also do this? If I use CloneForm to create a copy of the player and delete it before the game is saved, will that bloat the savegame?

You can't delete clone forms. And cloning the player means cloning the base npc object, not the actual player reference that exists in the gameworld.
"Bloat" means creating an unbounded number of objects. If you know you're only ever going to create, say, 5 cloned forms, it's not bloat. If you add a spell that the player can cast any time which creates a new cloned form, that's bloat.
User avatar
StunnaLiike FiiFii
 
Posts: 3373
Joined: Tue Oct 31, 2006 2:30 am

Post » Sat May 28, 2011 10:51 am

Thanks a lot for the headsup. I guess I'll just copy the player once, when they exit the starter dungeon, and use that one for subsequent doppelgangers.
User avatar
Mr. Ray
 
Posts: 3459
Joined: Sun Jul 29, 2007 8:08 am


Return to IV - Oblivion