View Full Version : Modding InfoCenter - An introduction to Slots
Numenor
6th Apr 2006, 8:05 PM
>>> Modding InfoCenter <<<
Slots 101: An introduction to the mechanics of Slots and their uses
By Atavera
DISCLAIMER: The "Modding InfoCenter" threads are NOT tutorials: they are intended to help average-experienced object creators performing specific tasks, or to give users a deeper in-sight on specific modding-related subjects. So, don't expect to find step-by-step explanations, to be performed "blindly". Please DO NOT REPOST the following info, or part of them, on other sites.
All the "Modding InfoCenter" threads are created and mantained by Numenor and JWoods. Everyone is welcome to post his own questions or additional information about the specific thread subject.
CREDITS: Special credits go to ATAVERA for having provided these info, and for having organized them in a readable and handy way. Atavera will mantain this thread, adding new information as he gathers them; and will answer to questions about the subject of this article.
-------------------------------------------------------------------------------------
SUMMARY
Slots are invisible points, located on objects, on sims, or somewhere in the sim world; their main purposes are to hold objects, hold effects, or direct sims toward an interaction point.
:deal: These InfoCenter articles are provided in PDF format. To view them, we strongly suggest to download the Foxisoft PFD Viewer (http://www.foxitsoftware.com/pdf/rd_intro.php): it's free and small, less than 1Mb!
-------------------------------------------------------------------------------------
Introduction:
There are three different kinds of slots; Routing Slots, Container Slots, and Target Slots.
Routing Slots define a location for a sim to walk to, for example to make sims walk in front of an object to use it.
Container Slots are invisible containers that can hold objects, FX and sims. Example of a container slot would be one that holds a sim a chair or bed.
Target slots define a target location for animations to use, but also can hold FX. An example of a target slot would be one that tells an animation for a sink where the knobs are. The slots are defined in the slot file, which uses the Resource Node for bone data, and then applied to actions in the Behaviour Functions.
The Slot Resource:
The slot resource is where slots are defined. All types of slots have a position, which can either be entered directly from the Slot file or from the Resource Node.
Target slots have no further parameters other than position.
Container slots can have a few parameters other than position. Max Size(I6 in SimPE) seems to always be zero. Height type(I7) is used, and depends on the type of object(will differ between chairs and counters etc.).
Routing slots can have many parameters including facing direction, and lots of routing flags that can be viewed and edited in DatGen if you wish.
The most important values of any type are S2 and I9. If S2 is 0, it will take the XYZ offsets from F1,F2,F3; but it is generally not done this way. The way it should be done(and is in most cases) is to have S2 have a value of 2 which tells the Slot to get the offset from the Resource Node. When it is using the resource node, it uses the I9 value as an index to Text List 0x90, reads that string and finds the block in the resource node with that name, and uses its offsets.
The Resource Node:
Basically all slots get their positions from the Resource Node. The type of block is always a cTransformNode. The name that is entered in the Text List 0x90 must be the same as the name in the cObjectGraphNode component of the cTransformNode. For more info on the Resource Node, you can see the Modding Info Center's CRES article. (http://www.modthesims2.com/showthread.php?t=84487)
Behaviour Functions:
Slots by themselves don't do very much, but are applied in the Behaviour Functions to do many things. The exception is that container slots can have things placed in them via Buy Mode without behaviours.
Here are the different kinds of slots and the primitives that use them.
Container Slots:
Snap Into(0x71)
Will snap an object/sim into a container slot either from the ground or another container slot.
Effect Start/Stop(0x70)
Will start/stop an effect at the position of the slot. Note, container slots are usually not used exclusively for this; if it is a container slot, it usually is also used to hold objects.
Create New Object Instance(0x2A)
This primitive can be specified to create an object directly into a container slot, alternately it can just be created and later 'snapped' into the slot with 0x71.
Snap(0x2E)
This is used when snapping sims from a container slot(i.e. a bed slot) to a routing slot(so they can walk again)
Routing Slots:
Go To Routing Slot(0x2D)
Directs a sim to walk to a routing slot.
Snap(0x2E)
This is used when snapping sims from a container slot(i.e. a bed slot) to a routing slot(so they can walk again)
Effect Start/Stop(0x70)
I've never seen a BHAV actually do this, but I would guess that it could work since the primitive does have parameters to use routing slots.
Target Slots:
These slots aren't used much in behaviours, but mostly in the ANIM resources. There is however 1 primitive that will use them.
Effect Start/Stop(0x70)
Target Slots are the preferred type of slot for this primitive assuming that it doesn't need to hold any objects.
Determining Slot Number:
The slot numbers as used in BHAVs are numbered by the type of slot, not just the entry number in the slot file.
Example:
In your slot file, you have these four entries
0:Container - (Container slot 0x0)
1:Target - (Target slot 0x0)
2:Container - (Container slot 0x1)
3:Routing - (Routing slot 0x0)
The routing slot would not be Slot 0x3, but Routing Slot 0x0
Thats all I can think of to put here for now :) If anyone has more questions, please ask. And if you have some more info that I can add to this, also please let me know.
shannanisims
11th Apr 2006, 7:04 PM
Is it possible to add a second container slot to an object?
Since we now have the OFB shelves... but maybe change
the positioning and target smaller areas of placement?
I've seen shelves (like Numenor's illuminated ones for instance)
that hold objects at heights that are not typical Maxis
placements and are more narrow than Maxis surfaces
so I assume its possible somehow.
What I'm wanting to do is take my 2-tier end table (see pic)
and make it so you can place objects on both levels.
Right now you can only place objects on the top level...
and I'm not happy with how deep I had to make that tier
in order to place objects to look right (not hanging half off the shelf).
I'm just curious if this is possible.... and if so a "Slots" for
dummies explaination would be appreciated. :)
http://thumbs2.modthesims2.com/images10/MTS2_227503_shannanisims_50sliving_pink.jpg
Numenor
12th Apr 2006, 9:10 PM
Yes, what you ask is possible... but it's not a job for dummies :)
I myself still have problems with slots... Probably I just haven't understood completely how they work, especially all those parameters in the SLOT file...
I should write a tutorial for this...
Karybdis
12th Apr 2006, 9:32 PM
Numenor, send me a pm with an email contact if you want, and I'll forward you the parameter details to give to Quaxi.
shannanisims
13th Apr 2006, 5:22 PM
Yes, what you ask is possible... but it's not a job for dummies :)
I myself still have problems with slots... Probably I just haven't understood completely how they work, especially all those parameters in the SLOT file...
I should write a tutorial for this...
Crap... guess I'm out a plan then. LOL!
Seriously I would love it if you wrote a tutorial on slots....
because I have other ideas I'd love to make... like this
table/seat combo (that were popular in the 50's... telephone stands)
But I would have to be able to take a loveseat and replace the
seat slot on one side with an object placement one... etc.
(Unless there is an easier way to make something like this)
So many ideas... so little knowledge to actually do anything about it. :dunce:
Claireh82
4th Aug 2006, 10:22 AM
Ok I have worked a little bit with slot files before in that I made a useable 8x1 table with all slots open for eating and object placement - what I would like to do now is make a table and chair at a new height for eating, I have some ideas that this may be possible from my table, pehaps changing the container and routing slots translation from z= 0.8 on a maxis table to say z=1.0, and the same idea with the chair.
Can you let me know if I'm on the right track and if this is possible?
Numenor
4th Aug 2006, 1:08 PM
The main problem I foresee is with the animations: the "sit on chair" and "stand up" are tailored on standard chairs; changing the chair height might bring to an odd placement of the sitting sims.
Putting and object on a table having a different height, and taking it back, on the contrary might work; but I'm not sure about this: I noticed that there is a specific put/get animation for each standard height (counter, end tables, etc), so there must be a reason for that.
Probably, if you lower down a dining table to the same height as a coffee table, for instance, you can somehow make the sims use the "coffee table" animations for the get/put actions; but - as said - make them sit at a coffee table height is not simple (or impossible) in my opinion.
As for the routing slots, so far I have seen only a value of zero for the Z coordinate (all the routings that I have examined are placed on the ground, while the container slots, of course, have the same Z value as the height of the table.
But I might have overlooked some routing slot with Z different than zero, so don't rely 100% on my word :P
Claireh82
4th Aug 2006, 1:21 PM
Thanks Numenor - i have got a few shots of what I wanted - the anims match up when sat but the sim does get down from the in an odd way - sort of sink thourgh and stand up. - haven't put in any mesh yet lol.
Edit: On routing slots for the table the z figure seems to minus whatever the actual slot is - for eating the height is 0.8 and -0.8 goes into all the routing slots. I haven't figured out why yet. I filled them in this way for my chair too - I have the result I want so even if it isn't needed there it isn't doing any harm either.
trezero
4th Aug 2006, 6:01 PM
I've seen two routing slots with Z coordinates that weren't zero: the top two slots in straight staircases, which both have a Z of 3. (no idea with modular)
Which is interesting, when you think about it, because it means a sim on the top level going down goes to a routing slot with a Z of 3. And a sim that just came up comes out on a routing slot z=3.
Numenor
4th Aug 2006, 7:20 PM
No surprise for the Z=3 in the staircases: you have probably noticed that when you set the camera to follow a sims that is climbing upstairs, the camera moves to the upper floor only when the sims reaches the top landing.
Claireh, in that case, the Z value of the routing slot is not actually -0.82, but zero. That's because the CRES is like a tree: starting from the ground, there is a vertical translation of +0.82 to reach the point where the surface is placed; and then a translation of -0.82 to get back to the ground, where the routing slot lies.
For more information about the CRES structure, you can read: "Modding Infocenter - The Resource Node (CRES)" (http://www.modthesims2.com/showthread.php?t=84487)
Claireh82
4th Aug 2006, 10:04 PM
Thanks Numenor - always learn things backwards lol - seeing as I'm working with the cres at the moment that is very helpful.
suceress
12th Oct 2006, 7:29 AM
What are the possible settings for I6 btw? I know 0 is the default, but what are the other settings?
Also, I made a 3 tile dresser (to look like one that I actually have in my room) and made it function as a surface. Objects hung over the edges so I moved the 2 edge slots in a bit but this caused the middle slot to prevent objects from being placed (all except a very thin vase with flower). Another problem was that objects that weren't very tall are difficult to impossible to pick up once placed on the slots. It doesn't seem to be able to grab them, just gets the entire dresser instead.
I saw that made a shelf that has 2 slots on one tile and I looked at the code, but can't figure what I did wrong that is preventing things from fitting the way I want.
Any thoughts on this? (I hope this is the right place to ask).
Numenor
12th Oct 2006, 5:16 PM
As for the I6 value, I've looked at many SLOT files, in order to understand how they worked; and I've always seen the I6 set to zero: never seen other values.
I have no clues about the meaning of that value.
Regarding your dresser, I have realized that there are different types of slots, that are defined by the field I7. The values accepted by the I7 are the same used in the Init BHAVs to define the placement of the object:
1 = ground
2 = low table
3 = table
4 = on counter
5 = non-standard (on sims)
6 = hand
7 = sitting
8 = end table
9 = in counter
10 = under counter
11 = decorative
Look at the field I7 for the central slot: perhaps it is set to 11 (decorative), and therefore the slot can accept only small vases and other little objects.
The last problem that you mention, that you can't pick up low objects when snapped into the slot it's not due to the slot itself: is seems more a problem in the clickable area (aka "bounding mesh") of the dresser; if the bounding mesh it's too big, everything placed near it can't be picked up any more.
Fixing the clickable area in objects that use joints it's not simple, because the bounding mesh is calculated automatically by the game, using as a reference the mesh associated to the main joint.
The only advice I can give you is to check if, by chance, you have associated to the main joint the shadows, too.
suceress
13th Oct 2006, 6:32 AM
As for the I6 value, I've looked at many SLOT files, in order to understand how they worked; and I've always seen the I6 set to zero: never seen other values.
I have no clues about the meaning of that value.
Regarding your dresser, I have realized that there are different types of slots, that are defined by the field I7. The values accepted by the I7 are the same used in the Init BHAVs to define the placement of the object:
1 = ground
2 = low table
3 = table
4 = on counter
5 = non-standard (on sims)
6 = hand
7 = sitting
8 = end table
9 = in counter
10 = under counter
11 = decorative
Look at the field I7 for the central slot: perhaps it is set to 11 (decorative), and therefore the slot can accept only small vases and other little objects.
The last problem that you mention, that you can't pick up low objects when snapped into the slot it's not due to the slot itself: is seems more a problem in the clickable area (aka "bounding mesh") of the dresser; if the bounding mesh it's too big, everything placed near it can't be picked up any more.
Fixing the clickable area in objects that use joints it's not simple, because the bounding mesh is calculated automatically by the game, using as a reference the mesh associated to the main joint.
The only advice I can give you is to check if, by chance, you have associated to the main joint the shadows, too.
Thank you. I made sure to look up the various things on CRES and BHAVs and made sure to put the right I7 value. All 3 of my slots on the dresser have the same value (8, I also tried it with 4). All 3 of the slots worked fine before I moved the 2 edge slots inward so that objects placed on them did not hang over the sides. After moving them in, it seems it crushed the allowable size for the middle slot.
I love your lighted shelves that allow multiple placement. Did you do anything special to get more than one object per slot? I looked at the file but it is beyond my knowledge so I don't really know what to look for.
As for the bounding mesh, I believe the object I cloned was taller than the object is now and it did not seem to actually import the shape of the new mesh even though I told it to. The bounding mesh area in the GMDC is (adnd originally was) completely empty. When I tried manually adding things it messed it up so badly that when I tried to load the object in the game, it caused the game to crash. I'm guessing that it is because it has a high number of vertices. I didn't add any shadows or anything to it. I just kept the same shadows as before and imported nothing. It seems to have adjusted the shadows appropriately on its own. Should I export the shadows and shrink them?
(I submitted an earlier version of my file to the repair thread, once I clean it up some I might delete that version and upload the current one).
Numenor
13th Oct 2006, 11:34 PM
I didn't do anything special with my shelves: I just duplicated the slots, and moved them off-center, one to the left and one to the right; I've never experienced your problem.
BTW, I'm quite sure that the side slots can't "shrink" the central one: if the slots are too near on another, the objects will just overlap each other: not beautiful to see, but nothing more.
As for the bounding mesh, I only know that if the mesh has joints (like yours), the "bounding mesh" area in the GMDC must be clear, becasue the clickable area is computed on the fly by the game reading the jonts. I don't know how to fix that; I've posted this question in this thread (http://www.modthesims2.com/showthread.php?t=196010), hoping that some modder more experienced than me gives me an answer.
suceress
14th Oct 2006, 9:41 AM
I didn't do anything special with my shelves: I just duplicated the slots, and moved them off-center, one to the left and one to the right; I've never experienced your problem.
BTW, I'm quite sure that the side slots can't "shrink" the central one: if the slots are too near on another, the objects will just overlap each other: not beautiful to see, but nothing more.
As for the bounding mesh, I only know that if the mesh has joints (like yours), the "bounding mesh" area in the GMDC must be clear, becasue the clickable area is computed on the fly by the game reading the jonts. I don't know how to fix that; I've posted this question in this thread (http://www.modthesims2.com/showthread.php?t=196010), hoping that some modder more experienced than me gives me an answer.
Thank you again.
For some odd reason it doesn't seem to want to let the slots overlap. It seems to be constraining the size of the middle slot. I don't know why. I'm pondering stretching my mesh but I don't really want to do that since it will require me to alter my textures. I might have to resort to that though.
When I make the changes and test it, if I still have a problem, should I post the object here for review? Or should I put it in the object repair center?
Numenor
14th Oct 2006, 4:05 PM
Post it here, it's better (I might overlook it in the other thread). I think that perhaps you have discovered the meaning of one of the unknown values, in the SLOT: perhaps one of them sets the slot as "shrinkable"?
Karybdis
14th Oct 2006, 6:36 PM
Sorry sorry sorry...
I meant to give this to you guys months ago, but nobody mentioned it to me and I forgot *sweatdrop*
Rest of the details are now up on the wiki
Again, sorry
http://www.sims2wiki.info/534C4F54
Numenor
14th Oct 2006, 11:35 PM
Sorry? Why should you be sorry! :)
Thank you for the valuable info.
pjplumley
17th Oct 2006, 3:36 AM
Wow, I just read this thread, I think I kinda understand what you all are talking about, but my head is spinning, or is the room?
I am now learning how much more I have to learn!
Thank you all!
Karybdis
20th Oct 2006, 3:49 AM
Yea I know.
I just didn't mean to be holding up the hobby by forgetting the stuff. I got a PM a couple of days ago from a person asking if I still had the info that I had mentioned earlier in the thread, and it hit me that I still hadn't done anything with it since around April.
Hope you guys can make some use of it now at least :)
suceress
23rd Oct 2006, 12:05 PM
Thanks Numenor! I noticed that the new Pets dressers came with container slots so as soon as SimPE is updated for Pets I will take a look at them. Especially since they seem to be the right height.
In the meantime I will upload my file here. Right now the middle slot only takes the very thin table decoration plant. Anything placed on the original main tile of the dresser cannot be picked up again (unless it is very tall). I might try that delete groups thing mentioned in the bounding mesh thread you linked.
Karybdis, thank you for putting that info up. It makes things much clearer.
UPDATE: Fixed most of the problems with the dresser. Just need to figure out how to make them only try to open the drawer from one spot rather than from all angles. I'm pretty sure I can get it now.
Reyn
30th Oct 2006, 5:21 AM
Okay - I'm using one of the shelves from OFB to make a knicknack shelf, and while it will hold multiple objects, it only shows two container slots, both set on the I7 as 1. I need to adjust the height for the shelves, because it is using the height for the ofb shelves, instead of my new ones. Also, I'm not sure how to add the third shelf in. Would I just add a third container slot?
I really want to learn to do something with this aspect, because it seems that if we could master this, we could start making all sorts of objects have slots, rather than having to custom make content at the right height for one thing, and use the moveobjects cheat to place it.
Ben♣
2nd Dec 2006, 5:45 PM
Hi everyone,
I'm making a living-room - well, trying to - and I realised that my coffee table looks quite big compared to the sofa and loveseat. What I'd like to do it to change the coffee table height.
I guess I should change a value in the Container line. I've just tried setting the I7 to 1 (instead of 2) but it doesn't change the height. i've realised it just prevents the table from holding lamps :blink: (and maybe some other objects).
Any help'd be appreciated - but keep in mind I have no knowledge about slots, behaviours...
Numenor
2nd Dec 2006, 9:07 PM
If you change the mesh of a coffee table to make it look taller, you need to move the slots, as well; but this is NOT done by editing the values in the SLOT file; you'd rather change the "Translation" values for the slots that are stored in the CRES.
Ppen the CRES and select the Hierarchy tab: you will see one or more "slot..." entries; select them (ignore the ones labeled with "route" or "target") and look at the "Translation" box on the left.
A higher value of Z moves the slot upwards: so, if you have raised the table surface by 0.5 in your 3D editor, you have to add 0.5 to the Z value.
Just to clear up, the parameter I7 that you have changed doesn't "move" the slot: it just qualifies a cntainer slot as "placed on an end table" or "placed on a dining table", etc. So that, whan a sim needs to put something on an end table, he will know how to choose the right slot where to put the object into.
Ben♣
10th Dec 2006, 6:20 PM
I finally had a little of time to test and yeahhh it works !! I haven't tested it with sims yet but it seems to work fine ! it's just weird to see that you have to change the Z value whereas you change the Y one in the 3D editor.
Thanks a lot for your help Numenor, as usual you're here to share your knowledge with everyone, it's so generous :)
KevinsHope
11th Jan 2007, 1:01 AM
Hi,
You know, I always miss the balk of these conversations somehow. I was wondering, can the routing slot be used to change the proxcemity of a sim from an object...for example, if you wanted to use the animation for putting a book back on the shelf to make a sim touch a wall, can you use the routing slot to change where the sim stands when the animation begins? Without a bookshelf, the regular animation is not even close to the wall, so I would need the animation to begin when the sim is at a position closer to the wall. Can the Routing slot be used for this via the "go to routing slot" primitive?
Echo
11th Jan 2007, 11:45 AM
Yes it can. If you change the location of the routing slot, then the sim will walk to the new location instead of the old location. You may need to make sure that the routing slot is not inside the footprint of the new object though, because that can cause routing failures (you know, when sims wave their hands in the air and say they can't reach something).
suceress
12th Mar 2007, 8:58 PM
I've actually had issues where I set the footprint (the no-walk way via the complicated hexadecimal coding) but my Sims still step into the object despite it because of routing slots. I'm currently trying to find out which part is the one that tells the sim how close to stand when reaching for the drawer on my dresser. Hopefully that will get resolved. For my mirror I had to tell the Sims to stand farther away because they were putting their faces through the glass.
I'm going to have fun trying to figure out which routing slot relates to the drawer now. I think I found it but only testing will tell. Wish me luck!
soloyo
21st Sep 2007, 1:53 AM
If you change the mesh of a coffee table to make it look taller, you need to move the slots, as well; but this is NOT done by editing the values in the SLOT file; you'd rather change the "Translation" values for the slots that are stored in the CRES.
Ppen the CRES and select the Hierarchy tab: you will see one or more "slot..." entries; select them (ignore the ones labeled with "route" or "target") and look at the "Translation" box on the left.
A higher value of Z moves the slot upwards: so, if you have raised the table surface by 0.5 in your 3D editor, you have to add 0.5 to the Z value.
Just to clear up, the parameter I7 that you have changed doesn't "move" the slot: it just qualifies a cntainer slot as "placed on an end table" or "placed on a dining table", etc. So that, whan a sim needs to put something on an end table, he will know how to choose the right slot where to put the object into.
please help Numenor, I done that for and entable, but instead of been taller, I want it shorter, so I put -0.5 ,the negative signt so it shoul be shorter I went into my game and the table is burry in the ground but I try to put an ornament and it did placed at the hight I want it, but the table is not at the right level with that because its in the floor,what did I miss,because the end table is made shorter, should I live it at the original level, and then move the value of z in simpe??
Echo
21st Sep 2007, 3:20 AM
You're probably moving the wrong node in the cres. You should look for a node with the word "slot" in the name, and not a "joint" or a "practical". That's the one you need to change the height on. :)
soloyo
21st Sep 2007, 6:08 AM
You're probably moving the wrong node in the cres. You should look for a node with the word "slot" in the name, and not a "joint" or a "practical". That's the one you need to change the height on. :)
Thanks , but I did move the one that sais slot,and the problem is the same
Jasana_BugBreeder
21st Sep 2007, 7:26 AM
so I put -0.5 That's height below ground, so it workd correctly :D You needed to substract 0.5 from previous value, not put it. Check the height of your table in your modelling program, and put that exact value; keep in mind that 0 is ground level, and 3.0 is next floor level, so your value should be between these two.
soloyo
21st Sep 2007, 8:15 AM
That's height below ground, so it workd correctly :D You needed to substract 0.5 from previous value, not put it. Check the height of your table in your modelling program, and put that exact value; keep in mind that 0 is ground level, and 3.0 is next floor level, so your value should be between these two.
thanks Jasana, but I already fix the problem, I let the endtable in its original hight and I move in simpe the z value, I used the same value -0.5 and works properly at the hight I really want it, thanks for all your ansewrs, because you answer me that put my brain to work, thanks
Rainncandy
27th Oct 2007, 11:56 PM
Are there any actual tutorials on how to do the slots in Simpe????
Jasana_BugBreeder
28th Oct 2007, 6:43 AM
fisheeyes had wrote the Creating Working Slots for Extended Objects (http://www.modthesims2.com/showthread.php?t=143252) a while ago, that's probably the only tutorial about slots.
Rainncandy
29th Oct 2007, 1:56 AM
I saw that one. I need a tutorial on how to make slots for custom objects that don't already have slots.
Jasana_BugBreeder
29th Oct 2007, 7:23 AM
Raincandy, there's no separate tutorial for that, but if you'll think up over the other tutorial ;) you'll find a way. For a working slot, you need - SLOT resource, slot name listed in appropriate STR# resource, slot name and position listed in CRES, and the code to handle the slot (without the code, slot will be only usable by user - i.e. you can put a vase there, sim wouldn't be able to put mail/whatever there).
Objects usually have at least one SLOT resource. In case of tables, they have container slots as well, so you could simply clone SLOT resource and link to it in OBJD. In random object case, there can be 2 variants:
- SLOT resource contains only 1 routing slot - then you can simply extract SLOT resource from another object with slot type you want (i.e. from end table), and replace the SLOT resource in your package
- SLOT resource contains other slots, maybe even some containers (AFAIR, armoires have some other slots) - then you have no other choice than manually add container slot data to existing slot resource - click Add and then fill all those fields, yes, it's boring
Editing STR# and CRES is described in tutorial. Values of fields in SLOT are described in this thread.
Adding code for sims to 'see' that slot would be the hardest, because you'll need to add slot-handling BHAVs (and placement functions to OBJf), and not mess existing code. I'm afraid there can't be detailed tutorial for this, because for different object categories steps would be different.
If you really want to - I suggest to start from other BHAV-related tutorials, to get the idea of what BHAVs are. Or make the user-interactable slot only first.
Or start from something simpler - good knowledge of package structure is really helpful when you toy with slots and such, so maybe you'd try some simpler object first?
Rainncandy
20th Nov 2007, 9:11 AM
What if you add slots, but they don't show up in the CRES Hierarchy tab? How can you change the slot height then?
I followed the "Creating Working Slots for Extended Objects" tutorial to the best of my knowledge, but the slot was on the floor in the game. I edited the slot height in Simpe, and tested my object ingame again, and there was no difference. My new slot doesn't show up under the CRES hierarchy tab, so I used the Blocklist dropdown list to select it, and edit the height that way, but still no difference. I don't know what else to do. How am I supposed to adjust the slot height?
Echo
20th Nov 2007, 9:24 AM
If your slot doesn't show up under the hierarchy tab, then you haven't correctly linked it to any existing nodes. You need to go into the node which you want to have as its parent, then add your node to its list of children.
If the slot doesn't appear in the cres hierarchy, then it will always default to a position of (0,0,0) in game, because it doesn't know what it's supposed to be relative to. :)
Rainncandy
20th Nov 2007, 9:02 PM
In the "Creating Working Slots for Extended Objects" tutorial, Step 3 states this:
Select ‘Object Data’ from the resource tree
Select your newly created OBJD file and find the slot id value under the ‘raw data’ tab. In hexadecimal view change this value to match your new slot file instance number. Commit.
What does it mean by "newly created OBJD file"? I don't see one. I just see the one that it already had. Am I supposed to clone it to make a new one? It doesn't say clone, but are we supposed to clone it?
I have had problems with this tutorial because it is vague in some parts. It doesn't always state exactly what to do. I guess we have to figure it out ourselves.
Jasana_BugBreeder
24th Nov 2007, 3:22 PM
Raincandy, tutorial "Creating Working Slots for Extended Objects" is dealing with extended object - they add tile first, then make slots for it. If you are adding slots to existing object - there's already reference to SLOT in existing OBJDs, so, there's unlikely that you'll need to modify OBJD.
When a tutorial is unclear, it's good idea to follow it strictly, without any changes. Once you are completely familiar with the steps of tutorial, you can adapt them to your project - add some, exclude some.
Rainncandy
25th Nov 2007, 2:09 AM
Yes, I know. I have made a wall shelf and it already has one slot. I'm trying to add another slot to it.
You said that when a tutorial is unclear, it's a god idea to follow it strictly, but I don't understand it. How can I "Select my newly created OBJD file", if I didn't create a new objd file? That makes no sense to me. What do I do on that part? Just edit the slot file id even though it already has one? It states to change the slot id file to my new instance number, but it already had one. So I need to change it anyway? What's going to happen to the slot id it already had for the original slot? That's why this tutorial makes no sense to me, and why I've been having so many problems. It's a vague tutorial.
Echo
25th Nov 2007, 4:35 AM
Jasana means that you should do the tutorial as it was intended the first time. That is, you should try adding the slots to a newly extended table. Then the instructions will match exactly what you're doing. The tutorial isn't vague, it's quite specific. It's just that it's specific to a task which is different to what you are trying to use it for. ;)
If you follow the tutorial with a newly extended table, then you should understand the process a bit better for that specific case. Once you understand the specific case, it's easier to generalise that information to other cases, like adding a slot to a wall shelf. :)
Rainncandy
25th Nov 2007, 5:39 AM
Echo, I went and tried a table with 3 slots to add another slot, like in the tutorial, and I still don't understand it. It's no different from when I was trying to add another slot to my wall shelf. The part I'm having trouble with is the part about selecting the NEWLY CREATED OBJD file. I don't see a new one. I only see the ones that originally came with the table. Where is this newly created OBJD file? I don't get it. That's why I say this tutorial is vague. It says select the newly created OBJD file, but there isn't a new one. There are only the same ones that came with the table. This is REALLY getting on my nerves. :cry:
Echo
25th Nov 2007, 6:53 AM
It's not adding slots to an existing object, it's adding slots to an object which has had its footprint extended. It's assuming that you are following on from this tutorial:
http://www.modthesims2.com/showthread.php?t=97054
in which you add an additional OBJD. That's the newly created one he's talking about. :)
Rainncandy
25th Nov 2007, 7:09 AM
Ok, thanks. I hope I can do this.
Phaenoh
25th Jan 2009, 2:55 AM
Anyone know how I can convert one kind of slot into another? I'm working with the maxis changing table and I'm not using the slot where the baby lays down anymore, can I convert this into a decorative slot?
Echo
25th Jan 2009, 9:34 AM
You can, as long as you make sure none of the code for the baby-snapping is ever going to get called ;)
Just go to the SLOT file, find the line which refers to the slot in question, and change its "i7" value. At the moment it will be set to 0x07, which means "can contain sims". I'd suggest "contain things placeable on low tables", which is 0x04. The numbers are the same as the ones used for placement options here if you want something different:
http://www.modthesims2.com/printthread.php?t=82685
:)
Phaenoh
26th Jan 2009, 5:03 AM
I did that but then the item doesn't show up where it should. I looked in the CRES heirachy and the only slot that is there is a route slot. I think that I need to translate the slot but how do I go about that?
Echo
26th Jan 2009, 6:02 AM
All three slots are apparently sharing the same coordinates for that table. So if you move the coordinates, all the slots will move to the same place. Given that it's being used as both a routing and a container spot, that is certainly odd. :)
If you want to move one separately, you'll need to add another line to text list 0x90, change the i9 value of the slot to point to that one, then create a new joint in the cres with that name and the coordinates you want. :)
Phaenoh
26th Jan 2009, 2:16 PM
: blinks: That sounds very over my head. I've never created a new joint before. Is it easy or should I drop that idea given the contest time constraint?
Edit: Manga_moon explained to me how to do all that, but we can't get the slot to translate at all. The item in the slot stays on the ground dead center of the tile. Manga's only solution that ever worked was to reclone a different object, but I don't have that option. What now? package attached.
Edit: Jasana found out what was wrong so I've removed the package. Thanks for your help Echo!
Phaenoh
27th Jan 2009, 7:31 PM
I just thought of another idea, can I extract the slot file from the Freetime changing table and import it into the other changing table and expect it to work?
Echo
28th Jan 2009, 7:22 AM
I don't have freetime, so I can't say. If it behaves differently to the regular one, then I expect you can't switch them in and out. :)
julsfels
25th Feb 2009, 11:45 AM
Hello,
just a question: I added some container slots to an object to store more items. Everythings works fine so far, but switching between the different containers in buy mode by pressing "m" stops after the sixth one -then it jumps back to the first one.
Is there any way to fix this and toggle between all container entries by pressing "m"?
eletrodj
25th Feb 2009, 6:18 PM
Hello,
just a question: I added some container slots to an object to store more items. Everythings works fine so far, but switching between the different containers in buy mode by pressing "m" stops after the sixth one -then it jumps back to the first one.
Is there any way to fix this and toggle between all container entries by pressing "m"?
How many slots did you add?
julsfels
25th Feb 2009, 6:23 PM
That differs - the total amount (including the one who was already in the package) lies between 3 and 15.
eletrodj
25th Feb 2009, 8:10 PM
That differs - the total amount (including the one who was already in the package) lies between 3 and 15.
Hum... I was thinking in some kinda retriction, but I were to the game and the magistray have 9 slots (?!) and works. I can't imagine how to fix.
Maybe, BHAV modification? Let's wait for numenorian users :D
Echo
26th Feb 2009, 12:48 AM
julsfels - can you post the package?
julsfels
26th Feb 2009, 8:37 AM
Sure, thank you for the help.
Here it is: Shelf with 15 containers (http://www.feenwald.de/zip/Regal.rar)
It´s an Repository object, therefore there are two packages in the rar-file. The one with the slots is FW-OOR-SlakRegal01-01.package. You can find it in the catalogue under surfaces/shelves (81§).
I checked out some BHAVs, especially the Inits - I thought if it is not stored in the slot it might be in an Init-BHAV - but I was luckless.
Maybe you can´t change this setting at all (but I don´t hope so), because JB´s stair OMSP has the same problem.
The 15 slots work, you can put 15 objects in the shelf if you fill it up, only the switching with "m" does not work correctly, it circles through the first six containers. If you put some objects on the first six ones, then it circles through the next six.
Oh my god. I hope you understand me, english is not my first language. :D
Phaenoh
6th Jul 2009, 6:26 AM
Is there a way of telling the slot to accept anything that is placeable on the ground? I figured out that the I7 value is for telling the sim how to react to that slot, but not for objects themselves.
Echo
6th Jul 2009, 6:35 AM
Should be the I7 value, make sure it's set to "ground". It doesn't tell the sim anything... If it's not accepting all ground objects, most likely its support strength isn't high enough. Remember to set that in the init function. :)
Rapsheba555
31st Jul 2009, 4:11 AM
could you explain the last part a little more? the part about adding a new joint? I got everything up to that, but the joint part is confusing me a bit. I'm not sure what I actually want to add.
Phaenoh
6th Aug 2009, 7:25 AM
I added a tile to my object and now I can fill all the slots twice, first from hovering over one tile and then again from the other tile. How do I tell some slots to be filled from the left tile and the other half to be filled on the right?
Echo
6th Aug 2009, 8:13 AM
Each OBJD links to one SLOT file. You need to copy your SLOT file, give it a new instance, then change one of your OBJDs to point to the new SLOT file's instance ID. (It's one of the fields under detailed view).
Once that's done, go into the right-hand slot file and delete the left-side slots. Then, go into the left-hand slot file and delete the right-side slots. :)
Phaenoh
6th Aug 2009, 7:16 PM
Sneaky, but I think I could do that. Is the master OBJD supposed to link to a slot file, or just the left and right tiles?
Echo
7th Aug 2009, 12:45 AM
The master OBJD doesn't need to link to any slot files unless you're planning on accessing them from inside your BHAVs. :)
leesester
13th Dec 2011, 12:04 AM
Holy Thread Resurrection...
I have a shelf object which has six slots, the object is made to be placed over doors. I have made the shelf object intersectable by objects and sims, and when the shelf is empty then the doors open and close fine without being stuck. However, as soon as I place an object in the slot then the doors get stuck open. If I make the object that I place in the slot intersectable by objects and sims then the problem goes away - but that is a lame fix.
Is it possible to add a BHAV onto a slot so that when an object is placed in a slot then the object in the slot is made intersectable by objects and sims?
I have attached a file...
maybesomethingdunno
13th Dec 2011, 12:16 AM
I would think so. You might look at netmicro's Decoration Transformer (http://www.modthesims.info/download.php?t=230162) and Echo's clown podium (http://www.modthesims.info/d/213108). Rather than having to pick-up and drop the shelf (like with the Transformer), you could have the shelf constantly checking its slot (like in the podium which is why I mention it). A note about this approach though is that the setting will likely stick if the object is removed from the slot (as is the case with the Transformer).
leesester
13th Dec 2011, 12:57 AM
Hmmm, thank you MSD. I have 6 slots though and am totally bewildered on where to start. In this object any one of the six slots can be occupied, so I don't think I want to cycle (I also think I will get horribly lost....) I just want to drop a book in the slot and it goes intersectable. The thing is I cannot work that bit out - in the transformer the pickup function triggers the action on a single slot, I am not sure where it would be in here - possibly the prevent place in slot function?
Ok, I had a look at the NetMicro table and I have edited it so that it will make things intersectable and cloned it and made it available in my upload. I will continue to work on a more elegant solution with a more restful feeling in my heart now that I know that people can use the item I uploaded and are not stuck with broken doors everywhere.
vBulletin v3.0.14, Copyright ©2000-2013, Jelsoft Enterprises Ltd.