Jump to content

Sleeping outfits


tonyis59

Recommended Posts

Hi

 

I am sure this has been covered before but I would like to know how can I get my follower or my character to change into their set sleeping outfit when sleeping. I have the CK but am not experienced enough to try changing things for myself.

Link to comment
Share on other sites

  • 3 weeks later...
You can use the NPC Editor, it has the Default Outfit and Default Sleep Outfit listed under the "Inventory" tab ... Note: You MAY need to fire, then in the console 'disable' then 'enable' and re-hire the NPC for the change to take effect. Skyrim stores NPC data (including location, stats and current inventory/outfits) in the save file (WHY!?!?) So to 'reset' the NPC you MAY need to do the above before the changes take effect
Link to comment
Share on other sites

It's kinda ridiculous-- many-- maybe all?-- NPCs in Oblivion switched to their undies when they slept, or slept naked if you used that sort of mod.

 

Can't imagine why this simple bit of world building was skipped in Skyrim.

 

To save time, from their marketing departments brilliant (sarcasm) 11-11-11 release date.

 

EDIT: Sorry to be OT, just couldn't resist.

Edited by fms1
Link to comment
Share on other sites

  • 3 months later...

Firstly I apologize if it is frowned upon to reply to a post several months old, but a Google search on this very topic brought me here so I figure others that may search would be brought here as well making an answer relevant. I was confused why the sleeping clothes didn't seem to get used. I wonder if it's a bug or if they just scrapped the feature before it got fully implemented. That bit of information in the topic was especially useful because I wasted some time trying to get the sleep clothes to work and it let me know that was futile.

 

I found a messy workaround and I am not at all an expert at modding, in fact I only dabbled with a couple things so far. Unfortunately an activator box with the script attached would have to be placed on every bed where this behavior is desired. I'm not sure if there is a better way, and this is pretty much my second script I've written.

 

Here's what I did:

I created a generic "xmarkeractivator" box and shaped it such that it covered the bed such that it forms a box that covers the surface of the bed with the exception of the sides and front so that NPCs walking on the sides/in front are not hit. I attached this script:

 

Scriptname BedActivatorScript extends ObjectReference  

;The player check may be superfluous here. In earlier versions I didn't do the sleep check. State 2 is while the "laying down" animation is playing, so they strip to their underwear as they are laying down for bed.
Event OnTriggerEnter(ObjectReference akActionRef)
          If ((akActionRef != Game.GetPlayer()) && ((akActionRef AS Actor).GetSleepState() == 2)) 
             (akActionRef AS Actor).UnEquipAll()
          EndIf
EndEvent

;This is the less graceful part.  Five seconds after they move out of the activator box when waking up, they get disabled and then enabled.  This makes them put their clothes/armor back on.  
;I do not think there are any negative side effects to doing this, but I'm not sure.  Sometimes they move slightly when enabled again, but it doesn't always happen.  They also disappear for a slight moment.
Event OnTriggerLeave (ObjectReference akActionRef)
          If (akActionRef != Game.GetPlayer())
             Utility.Wait(5)
             akActionRef.Disable()
             akActionRef.Enable()
          EndIf
EndEvent

 

Sorry again if this is not the place for this reply or if the bump is bad.

Edited by Zeopard
Link to comment
Share on other sites

  • 2 weeks later...
  • 9 months later...
  • 1 year later...

Sorry for the necro of a necro. There are not many results for this in Google so I used this to get started and figured my results may be useful to someone, But not worthy of a new thread.

 

Below is my modified script which attaches directly to beds in CK. Once attached any bed of that type will fire the script either when the bed is used or the player enters the cell.

 

The script checks for update to see if the NPC has woken up, If they are awake it will dress them. In order to re-equip the outfit it is necessary to add and remove an item to the NPC's inventory. I had to use GetForm() for this as I was not able to add the property and have the item actually go into their inventory.

 

I am currently working working on a random selector that will choose from an array of sleeping outfits and add/equip one and remove it from their inventory when they wake up.

Scriptname BedActivator extends ObjectReference

Actor Sleeper

Event OnActivate(ObjectReference akActionRef)
	Sleeper = (akActionRef as Actor)
	If ((akActionRef != Game.GetPlayer()))
		Sleeper.UnEquipAll()
		RegisterForUpdate(5)
	EndIf
EndEvent

Event OnUpdate()
	If (Sleeper.GetSleepState() != "3")
		Sleeper.AddItem(Game.GetForm(0x0003CA00), 1, True)
		Sleeper.RemoveItem(Game.GetForm(0x0003CA00), 1, True)
		UnregisterForUpdate()
	EndIf
endEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

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