Jump to content

Changing the wife's clothes


Pescador7

Recommended Posts

Hi there,

 

I'm making a mod, where you can choose an item in your wife inventory and she will equip it. In the future I want to make something similar to followers, but that's not my priority now.

 

I already put an option in her dialogue where you can give her a "present", that will be added to her inventory.

 

Now I want to be able to open her inventory, select an item (some clothing or an amulet, for example) and she will equip it.

 

In my head everything was pretty simple:

 

akspeaker being the wife (or husband... whatever. This will happen during a dialogue with her)

 

During the dialogue, I ask her to use "that present I gave her" and then:

 

akspeaker.openGiftmenu (all those options, etc.) // open the gift menu to take from her inventory the item I want her to use

akspeaker.additem( Object reference of the item you took from her inventory) //the item I selected is added back to her inventory...

akspeaker.equipitem (Object reference of the item you took from her inventory) //...then she equips the said item ;)

 

The question is: how do I get the object reference of the item I took from her inventory? Is there another way to make this?

 

Thanks!

Link to comment
Share on other sites

Hi there,

 

I'm making a mod, where you can choose an item in your wife inventory and she will equip it. In the future I want to make something similar to followers, but that's not my priority now.

 

I already put an option in her dialogue where you can give her a "present", that will be added to her inventory.

 

Now I want to be able to open her inventory, select an item (some clothing or an amulet, for example) and she will equip it.

 

In my head everything was pretty simple:

 

akspeaker being the wife (or husband... whatever. This will happen during a dialogue with her)

 

During the dialogue, I ask her to use "that present I gave her" and then:

 

akspeaker.openGiftmenu (all those options, etc.) // open the gift menu to take from her inventory the item I want her to use

akspeaker.additem( Object reference of the item you took from her inventory) //the item I selected is added back to her inventory...

akspeaker.equipitem (Object reference of the item you took from her inventory) //...then she equips the said item ;)

 

The question is: how do I get the object reference of the item I took from her inventory? Is there another way to make this?

 

Thanks!

 

 

I'd love to see your mod made; I've considered building a similar mod, but I have no time. So, I'll share what I know.

 

1) You can do (most or) all of this using console commands. Using the console is an easy way to experiment with the flow of your mod before you start building. Take a look at the uesp.net/wiki/Skyrim:Console page for "openactorcontainer" for the swapping part. "showinventory" displays the inventory in the console that also shows the instance IDs. You already know about additem, removeitem, equipitem and unequipitem.

2) I'm pretty sure the Papyrus script has a GetReference() function that you can execute on the item that is being transferred. There are also events that you can subscribe to on the inventory to find out what is changing. You can add these events to the player to "catch" the items that are being transferred. I think, OnItemAdd() and OnItemRemove().

3) I've noticed that giving a spouse clothing doesn't work out so well. Getting them to equip clothes and even taking their old clothes doesn't "stick." When you return a day later, the old clothes are back on. I think the spouse inventory refreshes as part of them being merchants. I'm betting there is some marker or faction that needs to be set on the items for them to be considered part of the spouse's clothing.

 

Good luck with your mod. I'm anxious to see it finished.

 

Let me know how your modding goes.

Link to comment
Share on other sites

Ok, I discovered how to do most part of the stuff. Except that she puts on her old clothes after some time.

 

Reading the Wiki I discovered that the NPCs have default outfits, that they will put on again if you change their clothes.

 

You can change their outfits via scripting (setoutfit command). But I don't know how to create new outfits via scripting (for example, create a new outfit with the clothes you want her to use).

 

I only know how to use the predefined outfits that came with the CK.

 

Do you know if there's a way to create new outfits via scripting?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...