Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

[RELz] Sleep on Command


Joben
 Share

Recommended Posts

Version 0.79 Out Now!

Tes Nexus

TES Alliance

=================

History:

=================

3/04/2010 - 0.79

Minor script optimization.

Tweaked sleep package settings.

Removed this mod's direct OBSE dependancy (though CSR still requires it of course)

1/15/2010 - 0.78

Fixed CTD bug related to RemoveMe script function.

1/6/2010 - 0.77

Fixed NPCs not sleeping a second time

Streamlined script.

Added debug messages in console

1/5/2010 - 0.75

Added option for 2, 4, or 8 hours of sleep

Fixed NPC not always returning to follow mode if they woke up before player.

Fixed NPC going home if they didn't like any nearby beds.

12/26/2009 - 0.52

Sleeping companions can no longer leave if they wake before the player. They at least stay near the bed until you wake up.

Failsafe code to make sure sleep orders are cleaned up properly if they are told to follow again before they reach a bed.

12/24/2009 - 0.51:

Tweaked radius on sleep package to reduce chances of NPC choosing a far bed in preference to a near one.

12/23/2009 - 0.50:

Initial release.

----------------------------

Old Original Post Below This Line

----------------------------

One of my favorite mods in TalkieToaster's Companion Share and Recruit.

I also play with Real Sleep, and it started to bug me that when I slept my companions didn't.

So I decided to fix that and make a way to tell your companions that it's bedtime.

I whipped up a working first version that I've released, but I still consider this a WIP because there are features I'd like to add, and some quirky behavior I'd like it iron out.

In this thread I'm hoping I can get some feedback, suggestions, help, and general moral support. :woohoo:

Pic 1

Pic 2

Pic 3

Download Note this is a PLUGIN for Companion Share and Recruit, it will crash if you don't have that mod too.

v0.51 Current features/behavior:

Tell NPC to rest, they leave follow mode, find a bed and sleep for up to 8 hours.

When they awaken, on their own or if you rouse them early, they automatically start following again.

Feature I'd like to add:

It would be nice if the NPCs could carry, and use, their own bedroll. I have to go study one of the Portable Bedroll mods.

Things I want help with now:

Test for robustness; Can you figure out a way to break it?

For example: What happens if you're in a different cell when they awaken?

How do they behave if enemies are nearby? One bed and three sleepy companions? Get creative.

Link to comment
Share on other sites

In which I explain how the core of my mod works and ask if I've handled a certain challenge in the proper manner.

CSR handles things by handing the actors token items.

I don't understand all the interactions, but if you want them to follow you give them a token, if you want them to stop following you give them a different token etc.

So to get them to pay attention to a sleep package we have to clear their current behavior, give them a NoFollow token and THEN their new sleep package.

This is handled as a resultscript of dialog.

My first version looked pretty much like this:


removescriptpackage

if(getitemcount aaaNoFollowtoken==0)

additem aaaNoFollowToken 1

endif

AddScriptPackage SRJsleepCommand

That works, they go to sleep, but when they awaken they tend to wander off to fulfill their default schedules. I needed a way to give them a new FollowToken, but it had to be after they were done sleeping. Otherwise they didn't even make it to the bed before going back to follow mode. So one more line on the Resultscript:

removescriptpackage

if(getitemcount aaaNoFollowtoken==0)

additem aaaNoFollowToken 1

endif

AddScriptPackage SRJsleepCommand

additem SRJfollowagainTOKEN 1

I made my own scripted token. It waits for them to start waking up, then gives them a new FollowToken(if they don't have one) and deletes itself.
scriptname SRJfollowagainSCRIPT


ref tempref


Begin Gamemode


set tempref to GetContainer


IF tempref.GetSleeping == 4

	if tempref.Getitemcount aaaFollowToken == 0

		tempref.additem aaaFollowToken 1

	endif

tempref.removeitem SRJfollowagainTOKEN 1

ENDIF

END

That's the part that worries me, is having a script that kills the item it's attached to a good idea?

It seems a bit sketchy to me. It seems to work but sometimes Oblivion Crash Prevention System 'dings' at me when I wake them up, I'm wondering if that's the cause.

Link to comment
Share on other sites

Can someone point to toward any info on how NPC's pick which furniture to use?

I got an odd incident near Kvatch, I was up at the top of the hill near the barricades.

I ordered an NPC to sleep and instead of using the bedroll at their feet, they walked all the way down the hill to the refugee camp and used a bed there.

This was a LONG walk, I didn't even think it was in the 'near current location' radius of their Sleep package. :woohoo:

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 4 months later...

This sounds really great, any way you could automate it with the players sleep?

Maybe getplayerleeping (I think thats written right) could be used to add the token to any followers, allough then I have a feeling you'd wake up to find everyone else going to sleep....

Still, awsome mod and a feature missing from CSaR, will download as soon as I wake up :icecream:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...