removeallitems followed by additem problem

Post » Sun Aug 08, 2010 12:44 pm

I got bored of my Adoring Fan always svcking, so I made a little mod where you can issue commands to change his class.
It didn't really change his class, it just added bonuses and changed his armor.
The route I took was by adding dialog options with scripting results in which I used the "removeallitems" command.
I then used AdoringFan1Ref.additem to add the items I wanted him to have.

Now the problem:

He equiped only the weapons.
Other than that he's staying naked and I don't keep him around for his six appeal.
Does anyone know of a command I could insert into the script result box that would fix this problem?
I appreciate your insightful advise. :hehe:


:gun: :cheat:
^a happy face shooting a fat pokemon.
Ha, rad.
User avatar
Nick Tyler
 
Posts: 3437
Joined: Thu Aug 30, 2007 8:57 am

Post » Sun Aug 08, 2010 8:40 pm

In the next FPS cycle, you can use the http://cs.elderscrolls.com/constwiki/index.php/EquipItem function.
User avatar
Carolyne Bolt
 
Posts: 3401
Joined: Mon Jul 10, 2006 4:56 am

Post » Sun Aug 08, 2010 10:04 am

Pfft, how obvious.
No wonder I didn't think of it.
Tried it and it works. =)
You're true genius.
User avatar
Petr Jordy Zugar
 
Posts: 3497
Joined: Tue Jul 03, 2007 10:10 pm

Post » Sun Aug 08, 2010 9:35 am

There appears to be a quirk with EquipItem that makes the character unequip the item at the end of the current AI package, regardless of whether that makes sense. If you add the flag to force the equipping, then you also have to script any unequip of the item with the same flag, so that's not a viable choice for most situations.

You could try using EvaluatePackage, as the game then looks at the "Armor unequipped" and "Weapons unequipped" flags on the AI package chosen, to decide if the character puts on or takes off armor and weapons. If the flags are different from the current package, then armor/weapons are equipped or unequipped as applicable. You'll probably discover that the Annoying Fan has no AI packages with armor or weapons equipped, as he normally has none, so he's liable to unequip them spontaneously on any situation-forced change like leaving combat. IIRC if a character enters combat, they'll equip any armor or weapons they have, but then afterward, the AI package they select determines if they keep them on. The Fan would probably take them back off, if you don't give him a follow package with them on.

Removing his clothes when you give him armor is not needed. It's probably better to leave him with something to sleep in.
User avatar
MARLON JOHNSON
 
Posts: 3377
Joined: Sun May 20, 2007 7:12 pm

Post » Sun Aug 08, 2010 10:03 pm

after you finishing adding the items use the http://cs.elderscrolls.com/constwiki/index.php/Evp command to make his equippment update.

eg.
ArenaFan1Ref.evp


You might also want to up the Fan's confidence stat so that he doesnt flee so much if you havent done that already.

@ghastley

The check boxes on AI packages are 'Armor Unequipped' and "Weapons Unequipped". And after a quick look these are not checked on the Adoring Fan's AI packages.
User avatar
zoe
 
Posts: 3298
Joined: Sun Nov 12, 2006 1:09 pm


Return to IV - Oblivion