Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
I'm excited to try this! I've never used bed deco for the very reasons you named - no way would I want to take the deco off every time a sim went to bed. Thank you so much!
Well, this looks totally interesting, and by that I mean, awesome. I love decorating beds, but too am always bothered by sims clipping through the items. So, thank you for this!
This mod looks awesome. I use a lot of custom bedding in TS4, but hate it when my sims disappear into it when they go to sleep or lay on their beds. Would you consider making a TS4 version of this mod?
#14
30th Jul 2017 at 4:38 AM
Last edited by Lamare : 30th Jul 2017 at 5:18 AM.
Posts: 1,530
Thanks: 15760 in 75 Posts
Hot fix is hot
Replaced "norelax" versions. Sorry guys, was the wrong file. I suck.
If your pets can't get on a bed, replace the file. If you don't own pets, I guess, it won't matter to you.
Quote: Originally posted by Athena Apollos
This mod looks awesome. I use a lot of custom bedding in TS4, but hate it when my sims disappear into it when they go to sleep or lay on their beds. Would you consider making a TS4 version of this mod?
Thanks. The thing is I don't know how to mod the Sims 4.
@sammyhulton, pillow's shape makes no difference, if that's what you're asking. Items on pictures are only examples of decorations that can be used.
If you're asking because you tried it in game and it doesn't hide, the most likely cause is how the pillow was made. If you point me to where I can get the pillow, I may be able to edit it for you.
Can anyone tell me where to find the "Impi" stuff, particularly the pillows? It seems most of the Jonesi-slaved bed pillows I've picked up along the way don't want to hide with this mod, but google is not helping me find "impi bed pillows". Thanks!
Tutorial: Making object hideable or unhideable by editing its category in SimPE
You have a pillow or a blanket that doesn't hide with the mod? I'll show you how to edit it so it hides.
On the contrary, you want to make some object stay put instead or hiding? I'll show how to do that as well.
Do this only with purely decorative objects.
Make backups of your files before you change them, in case you need to start fresh.
Every object has Init function. What you're going to do is edit that function to set certain category. Note: it's not going to change where the object appears in Buy mode.
Open an object in SimPE. It has to be a mesh, not a recolor. First, find out what BHAV your object uses as its Init function (it's not always obvious):
01
^
1. Select Object Functions file type in Resource Tree.
2. Open a file in Resource List. Usually it has [Object Functions] in place of its name. Sometimes there're a few files. Start from any one.
3. Go to Plugin View.
4. Note the Init function's number. It's hexadecimal so it may contain letters. In this case it's #1002 and named "init".
If the number starts from 1000 (e.g. 1005, 10F7, 1158 or the like), read this spoiler:
Function number 1NNN means it's private, i.e. inside the package. Find it:
02
^
1. Select Behaviour Function file type in Resource Tree.
2. Find the file with the instance number and name you noted before. Instance number is more important in this case, don't get confused by similar names. Click on it.
You've opened the BHAV. Next step is finding a place to insert new line.
03
^
1. Make sure you're in Plugin View.
2. Make sure Special buttons box is checked.
3. Select the final line that returns true, i.e. goes "true: FFFD". It may be at the very bottom, like in this example, but not necessarily.
4. Click Ins/true button. This action will insert new line.
Other examples of how the Init function might look and where to insert new line.
- This one named "Function - Init". It has only one line, so it's a no-brainer:
04
- This one is a mild case of spaghetti:
05
- Watch out for unattached lines. Gray arrows point to leftover unused stuff. Don't link your code from there, choose the "real" line:
06
So, you've found the line. Select it and click Ins/true. New line will appear below, it will be linked to previous and be a copy of it.
Now you have to change it.
07
^
1. Select new line.
2. Make sure it's OpCode is 0x0002 - Expression. If not, set it so.
3. Click the quotes button.
Raw entry box popped up:
08
^
A. If you want your object to hide on a bed, copy this numbers: 3B0030D60005031A0000000000000000
B. If you want the object to stop hiding, copy this: 3B000000000503070000000000000000
Paste them straight into that little input field. Click Okay.
Here's what you should see. It's either (A) garden sculptures:
[prim 0x0002] Expression (My category := Const 0x016C:0x30)
... or (B) zero category:
[prim 0x0002] Expression (My category := Literal 0x0000)
09
Your line now is the last. Make sure it says "true: FFFD", i.e. returns True, as init functions should.
This is all there is to it, except for last KEY step - saving changes.
10
^
1. Click Commit File.
2. Save the package.
If your object had more than one Object Functions file, see if they all use the same init function. If not, you may have to repeat what you did for all object's inits.
To test the package in game buy new object in Buy mode catalogue, because the init function runs when an object is created or bought.
If the number starts from 2000 (e.g. 2000, 200A, 2014 or the like), read this spoiler:
Function number 2NNN means you are "lucky" - the object links directly to semi-global function, and you'll have to create new private function in order to stick a category in there. But be not afraid.
11
^
First, write down the number for later. In this example, it's 2000.
Right-click anywhere on blank space of Resource List to bring context menu:
12
^
Choose Create Resource.
Then find and open it:
13
^
1. Choose User Defined type in Resource Tree.
2. Spot your new file in Resource List and click on it.
Next step is to turn it into a BHAV.
14
^
1. Go to Resourse tab.
2. Pick Behaviour Function in a drop-down list.
3. Assign Instance number. It's got to be in range of 1NNN and be unique for the package - no repeating BHAV numbers already existing in this particular package file. In my example it's 1001.
Commit and click on any other resource to refresh view.
Find your new function in the list of resources:
- It'll be under BHAV type.
- You'll recognize it by instance number you gave it and [Behaviour Function] instead of a name.
- Click on it.
You'll see a blank file. The goal is to include two lines: the original Init function and set a category.
15
^
1. Make sure you're in Plugin View now.
2. Click Add button.
16
^
0. Nevermind the sleeping.
1. Look up the number of semi-global init function and put it into the OpCode field. It'll go from 0x0000 to 0x2000 or whatever the number is in your case.
2. Clear operands by clicking on X button.
3. Click Ins/true to add new line. If you don't see the button, tick Special buttons checkbox.
Now the first line calls the original init function for your object. The second line is a copy of it - let's change it.
17
^
1. Change the Op-code to 0x0002.
2. Click the quotes button to bring up raw entry box
3. Paste these numbers in that little input field:
A. If you want your object to hide on a bed, paste this:
3B0030D60005031A0000000000000000
B. If you want the object to stop hiding, paste this:
3B000000000503070000000000000000
Click Okay.
4. Name the file, if you want.
5. Click Inge's InitLinker button. It makes all lines properly linked.
The result:
18
^
Line 0 calls semi-global init and linkes to line 1.
Line 1 sets new category and returns True, i.e. goes "true: FFFD".
... or (B) zero category:
[prim 0x0002] Expression (My category := Literal 0x0000)
BHAV is done. Save changes (screenshot is recycled from previous spoiler):
^
1. Click Commit File.
2. Click Save or Save as.
Finally, make the object recognize new BHAV as its Init function. For that, replace instance number for Init in Object Functions file.
19
^
1. Open the Object Functions file you opened at the beginning.
2. Select init line.
3. Put new function's number in the Action BHAV field. In my case, I replaced 2000 to 1001.
4. Commit File and Save the package.
If your object has another Object Functions file, see if it uses the same semi-global init function as the one you've just changed did. If yes, replace it to new number as you just did. If not, repeat the whole creation of new init for it: include a call to its own semi-global, set a category, give it yet another unique number and put the number in this file.
To test the package in game buy new object in Buy mode catalogue, because the init function runs when an object is created or bought.
Thank you very much for the detailed tutorial, i kind of gave up with waiting, thought that you forgotten maybe I figured it out how to do it myself not long after i asked you to explain how, just changed one line by copy-pasting it from the objects that worked with your mod, but i'll be sure to save your tutorial on my PC somwhere in case one-line-editing wouldn't be enough. Thanks, again!