Modifying base actor inventories

Post » Fri Aug 05, 2011 11:28 am

Basically, I've been making a spell that would create a summoning spell (via OBME). You'd cast it on a valid (dead) actor and you'd get a 'summon actor' spell.

...However, I seem to be stuck. Since I want the summon to have the items it had when it became a summon, I figured I had to use OBME's clone function first, add the equipment to the base actor, then create the summon spell.


...Except I can't seem to find out how to modify the base's inventory.

I tried AddItem using the object returned from CloneForm, but it kept adding items to the player instead (it was a onself test spell cast by the player, so... I dunno). Are there any current commands that I can use? Thanks.
User avatar
Connie Thomas
 
Posts: 3362
Joined: Sun Nov 19, 2006 9:58 am

Post » Fri Aug 05, 2011 4:50 pm

I'm a bit confused on what you're asking, but can't you just use CreateFullActorCopy and DeleteFullActorCopy?
User avatar
Sierra Ritsuka
 
Posts: 3506
Joined: Mon Dec 11, 2006 7:56 am

Post » Fri Aug 05, 2011 8:04 am

Hmm....

CreateFullActorCopy does create a new base actor as well (I'll have to get rid of the spawned reference somehow, but it'll do if it works). But then the question is what its base inventory is like....

Alright, I guess I should clarify my intentions with an example. The player goes fight an NPC who spawns with an iron sword and armor. He spawns with it because it's his base actor's default inventory (i.e. set in the CS. Lets assume no levelled list for now). The player kills this NPC, takes his iron gear and replaces it with daedric gear. He then casts a "registration" spell on the now dead NPC.

What should happen is that the player gets a new spell that allows the player to summon that NPC, wearing daedric gear, since that was what he was wearing when the registration spell was cast. The summon spell requires a base actor to summon an instance of. If I just use the base actor of the dead NPC, it'll be summoned with iron gear, since that is what is in the base actor's inventory. CloneForm gives me a new base NPC, but it's naked, so that's no good either.

I'll give CreateFullActorCopy a shot though.
User avatar
Schel[Anne]FTL
 
Posts: 3384
Joined: Thu Nov 16, 2006 6:53 pm


Return to IV - Oblivion