Jump to content

Recommended Posts

Hey! I've been working on reskinning/tweaking @afro1967's cabin mod as a way of practicing code, but after a couple weeks of struggling with a couple concepts I might as well ask for help

The two main functions I would like to add: 

  • Making the hunger meter go up while sleeping. The code seems solid in original DS, but nothing I've tried in DST has had the same effect. I'm not sure if it's possible with the way sleeping works in DST? I'm probably wrong.
  • Working as both a place to sleep and a container at the same time. I'm thinking a good way to do this would be to have it so you could hold down ctrl while mousing over, but I'm not sure how to make that work while holding a hammer or torch or something.

I have a couple other ideas, but they kind of hang on these two concepts working. In the meantime hey look at the new cabin I drew

be9477e65412a633c85aeff02a1d0c74.jpga7ac52c8dc8af93e2c99f2497bde6823.jpg

Link to comment
https://forums.kleientertainment.com/forums/topic/68527-need-help-tweaking-mod/
Share on other sites

19 hours ago, WORLDSBIGGEST said:

The code seems solid in original DS, but nothing I've tried in DST has had the same effect. I'm not sure if it's possible with the way sleeping works in DST?

The DS tent code is obsolete for DST. You have to pretty much copy the new DST tent code.

19 hours ago, WORLDSBIGGEST said:

these two concepts working

 

ComboTest.zip

4 hours ago, Aquaterion said:

in line 136 ur comparing your temperature with "TUNING.SLEEP_TARGET_TEMP_CABIN"

yet I don't see any of these tuning values declared anywhere.

Ah yep, looks like I screwed up doing a find>replace command somehow. Thanks!

I coded a recipe, and it shows up ingame and can be crafted no problem, but now if I try to open the cabin it immediately closes again. It plays the sounds and I can still store items(if I drag the item to the cabin itself), though.

https://dl.dropboxusercontent.com/u/104514748/cabin.rar (the night and sleep_loop anim files are just placeholders, eventually ill go back and animate the curtains moving)

1 hour ago, DarkXero said:

Changed the recipe of modmain to use AddRecipe so it sets up the RPC.

But the issue was fixed in cabin.lua. When you are 3 units away from a container, it closes.

But the cabin is huge so it needs the closing range upped.

cabin.zip

AAaaa thank you so much again! I really appreciate the help and hope me messing with the code wasn't annoying or insulting or anything like that ;u; If I post this should I credit you as DarkXero, or is there a different handle you prefer?

25 minutes ago, WORLDSBIGGEST said:

AAaaa thank you so much again! I really appreciate the help and hope me messing with the code wasn't annoying or insulting or anything like that ;u; If I post this should I credit you as DarkXero, or is there a different handle you prefer?

You did good. The closing of containers has a hardcoded range, for stuff that is small, so it clashed with the big cabin.

You don't need to give me credit. Post whatever you like.

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
×
  • Create New...