Jump to content

Modding with CK - Noob questions


Recommended Posts

4 hours ago, AndrewLRG said:

To get a "Well Rested" effect you need to sleep in location with "LocTypePlayerHouse" keyword.

Thank you, that did the trick. Although I don't quite understand the CK's approach to that, as I couldn't find a single location with that keyword, I had to create one myself. Where's Breezehome, Vlindrel Hall, Proudspire Manor? They don't seem to have any worldspace in the CK...

Link to comment

Thank you very much for your constant input! :classic_blush:

 

4 hours ago, Scrab said:

Youre missing that the Candle isnt an Activator, yes

I feared something along those lines...

 

4 hours ago, Scrab said:

Thats usually done through Scenes where in the start script there is a "Game.SetPlayerAIDriven(true)" and in the end fragment is a "Game.SetPlayerAIDriven(false)" or however the scene needs to time things

Uhm, yes, absolutely. I think Create World, create Adam and Lilith, are higher up on my list...

 

5 hours ago, Scrab said:

Another option would be to block the Activation of the Bedroll until the Player entered the cell themselves, doing so requires yet another triggerbox that you fill the cell with an use a Script on that, which OnTriggerEnter() will allow activation and on leave disable activation again. The Bedroll itself should probably have a script with OnCellAttach that blocks activition

That sounds like a feasible solution, because with the PC inside the triggerbox I should be able to make him/her unable to fiddle with things outside, like escaping by activating a chair. I've placed those out of reach by now, but I would love to have them closer to the fireplace.

You don't have by chance a code snippet in your pocket that I could shamelessly copy? I have no idea how to disable the ability to activate something (other than replacing a static, non-usable bedroll through a usable copy upon entering that triggerbox)

The Bedroll already has a script that does the closing and locking of the cell door at OnSleepStart()

 

5 hours ago, Scrab said:

A 3rd option, probabvly the easiest one, would be  to add a Script to your Bedroll and OnActivate() registers for Sleep and OnSleepStart() moves the player onto itself

Sounds easy enough. How do I move the player? *sigh*

 

...back to reading/watching tutorials...

Link to comment
53 minutes ago, CaptainJ03 said:

They don't seem to have any worldspace in the CK...

They are interiors and the fact that that worked only means that your Cells Location was bugged in some way

 

38 minutes ago, CaptainJ03 said:

You don't have by chance a code snippet in your pocket that I could shamelessly copy?

Id still recommend looking through the CK Wiki, I only write this up by what I have in my head. For the Triggerbox you simple do:

ObjectReference Property bed Auto

Event OnTriggerEnter(ObjectReference obj)
	bed.blockActivation(false)
EndEvent

Event OnTriggerLeave(ObjectReference obj)
	bed.blockActivation(true)
EndEvent

 

And for the Bedroll you simply add

Event OnCellAttach()
	self.blockActivation(true)
EndEvent

 

That should I think disallow the Player to activate the bed while they are outside the trigger box

 

42 minutes ago, CaptainJ03 said:

How do I move the player? *sigh*

On your Bed Script:

Event OnSleepStart(params idk)
	Game.GetPlayer().moveTo(self);
EndEvent

 

Link to comment
12 hours ago, Scrab said:
13 hours ago, CaptainJ03 said:

They don't seem to have any worldspace in the CK...

They are interiors and the fact that that worked only means that your Cells Location was bugged in some way

I knew I picked the wrong word. Let's call it CK-space. I am unable to find any reference to the in-game player homes.

 

12 hours ago, Scrab said:

On your Bed Script:

Event OnSleepStart(params idk)
	Game.GetPlayer().moveTo(self);
EndEvent

 

That actually worked, had the nice effect that I see myself sleeping. Had the weird effect that I attached the RegisterForSleep() to OnActivate, and as I have to activate the bedroll to get up, every coming sleep event is now attached to that bedroll. So after sleeping once in that cage, wherever I go to bed, I wake up in the cage.

And what I coded had the bug, that though I went to sleep and the cage door locked, I didn't actually sleep.

No need to go into debugging details as I've used the trigger box.

 

Your script snippets for the TriggerBox helped a lot, thank you very much! I copied the trigger event from the CK wiki, and with the MessageBox poppig up upon entering or leaving the cage, I could set the borders to be triggered at the right spot. With the same mechanism I disabled activation of the chair as long as I'm inside the triggerbox, now that's exactly as I wanted it to be!

 

Back to lighting candles...

 

Oh - would anyone be interested in downloading this "mod"? I cannot imagine that the umptieth player home would be of any interest to anyone.

 

Link to comment
31 minutes ago, CaptainJ03 said:

I am unable to find any reference to the in-game player homes.

Cells are always named by Parent Location followed by their own Location

So Breezehome would be WhiterunBreezehome

as Whiterun is the Parent of the Player Home and the Player Homes Location is called Breezehome

 

34 minutes ago, CaptainJ03 said:

wherever I go to bed, I wake up in the cage

To avoid this issue in Alternate Perspective, I set a Condition on the OnSleepEvent:

If(Game.GetPlayer().GetDistance(Self) > 500)
	return;
EndIf

That way the Event only fired if the Player is actually near the Bed. Also make sure to Unregister For Sleep when you no longer need the Event

 

36 minutes ago, CaptainJ03 said:

Oh - would anyone be interested in downloading this "mod"? I cannot imagine that the umptieth player home would be of any interest to anyone.

Whatever youre doing right now sounds kind of interesting with the dungeon & cage n stuff, so if nothing else, making it a modders ressource to save someone else from creating a house for their own story sounds certainly worth it.. or maybe you make your own story around it *shrugz

 

 

Link to comment
  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use