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!
Lab Assistant
Original Poster
#1 Old 19th Oct 2005 at 6:01 PM
Default Does anyone know how to add slots and routes to an object?
Trying to figure out how to add slots to an object to make it useable by more than one Sim. Added routing and slot info to the CRES and SLOTS files, but that doesn't seem to make any difference. Anyone know what tells the game how many Sims can use an object, and makes them use the secondary routing and slot? Thanks!

-T
Advertisement
Lab Assistant
#2 Old 19th Oct 2005 at 6:35 PM
I know there is a text list instance 0x0101 which contains the names of the slots in the resource node. I think the slot number referred to in-code is a pointer to this.

More recent hacks can be found at http://www.moreawesomethanyou.com
One horse disagreer of the Apocalypse
#3 Old 19th Oct 2005 at 8:16 PM
But I wonder how you stick one onto an object? Like "x marks the spot" - you don't see them in Milkshape

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Lab Assistant
#4 Old 19th Oct 2005 at 10:10 PM
They are defined in the resource node.
Screenshots

More recent hacks can be found at http://www.moreawesomethanyou.com
One horse disagreer of the Apocalypse
#5 Old 19th Oct 2005 at 10:39 PM
Mmm yes, I wish I knew what euler and stuff meant. Joints are slots? Is that the same as bones?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Lab Assistant
#6 Old 20th Oct 2005 at 12:26 AM
It's more like slots are connected to joints.

Take for example the wedding ring that a sim wears. The slot is attached to the finger, and the ring is placed into the slot. The slot will move with the finger,hand,arm,etc.

Euler is just a way of representing a point in space, based on current position.
You would rotate a bone (between two joints) about each axis in turn, at the end of which the bone is in the desired position. Normally the rotation is applied as XYZ but can be any combination. In the sims 2 it is applied as XZY.

More recent hacks can be found at http://www.moreawesomethanyou.com
One horse disagreer of the Apocalypse
#7 Old 20th Oct 2005 at 7:32 AM
I hope this thread stays open, and people can add to it from time to time

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Instructor
#8 Old 20th Oct 2005 at 1:50 PM
Ok these are the notes I have on slots. They are by no means complete and may not work for all instances. They also are for decorative slots, so I don't know if you can use the info for other slot usage.

1) Clone the item
2) Remesh the item
3) Find the X, Y, Z location where you want the new slots to go.
Update the Text Lists
4) Click on the text lists, select 0x90 - Model - Bones. If it doesn't exist you will need to import it via the import semi-globals.
5) "Add String" two times
6) Set the first new string to slot_left
7) Set the second new string to slot_right
Update the CRES
8) Select an appropriate node to be the parent. If there are other slots, it's possible you can use it's parent. Each item is different.
9) Add a cObjectGraphNode (trans) for each new slot.
10) Select the new cObjectGraphNodes from the block list
11) Change the filename to slot_left and slot_right
12) Change the translation x,y,z to where you want each slot to be.
13) Select node you want as the parent to the new slots in the block list.
14) Link the new slots nodes to the parent node. Add an entry to the Child Nodes for each new slot.
15) The UnKnown 1 should be set to 0x0001 for each. The child Index will be the index number for each new slot as showin in the blocklist drop down.
Update the Slot File.
16) In the slot file add a container type for each new slot.
I9 is the text list position converted to decimal.
Not sure what the rest are. Usually populate with values i already had.
Update the init bhav
You need to update the support strength of the object.
Add a line My 0x001c Assign To Literal Value 0x0032

For rotation in the cres, if you are rotating on a single axis it isn't too bad, put 1.0 in the axis you want to rotate, and the number of degrees in the degree box. If you are going to rotate on more than one axis it will require some calculations. I found these programs:

Dizzy & Spin Doctor (unfortunately I just checked and their site seems to be down)
Degree/Radian Conversion

Eclectic Sims The place for your younger sims and unique animated items!
Charmed Sims Archives Gorgeous Clothing, Furnishings and more.
Two great sites ALL FREE NOW!!!
One horse disagreer of the Apocalypse
#9 Old 20th Oct 2005 at 3:23 PM
Thanks SnowStorm! I have dedicated the last half hour or so to exploring a chair with your message as a guide. I won't post a question until I think I have a half way intelligent one :D

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Lab Assistant
Original Poster
#10 Old 20th Oct 2005 at 8:11 PM
Thanks for the replies. If this ever gets completely figured out, it needs to be rewritten as a tutorial. Very helpful info SnowStorm, but it didn't work for me. That appears to be only a part of the process, probably depending on the object.

Some things I noticed:

Your new route needs to be made a child of your new slot.

In the Slot File, Integer 10 appears to be the "physical location" of your Text Lists: bones items. In looking at a shower, bed, and table, they all seemed to follow Integer 9, except bumped up by one. So 0x0000 in your Text List Bones should be value "1" in Integer 10, and so on.

Also noticed in the table and bed that it appears BHAV programming is needed to tell the Sims which route and slot to use. The BHAV's have checks they run through, and send the Sim to the appropriate slot via 0x002D (go to routing slot). The table has an "Is Slot Empty?" BHAV, and a "Slot-In Use-Set" BHAV among others. It's beyond me...

-T
Object(ive) Investigator
retired moderator
#11 Old 29th Oct 2005 at 4:29 AM
I had a look at several tables and they only had two bhavs (int and main). Also, Int 10 wasn't always one more then Int 9. Which table did you look at?
One horse disagreer of the Apocalypse
#12 Old 29th Oct 2005 at 8:28 AM
jaxad, the remaining BHAVs needed will be on surfaceglobals or whatever it's called. If you look in your table package there will be one or more OBJf files, one per tile of the table. If you look in those you will see entries for things like "Surface" or "Pick up from slot". Against those will be BHAV numbers for what to run as those events. They will probably refer to semi-global BHAVs that apply to all tables of that type.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
The ModFather
retired moderator
#13 Old 29th Oct 2005 at 9:09 AM
I'm not very experienced in BHAV modding, but I think that the game manages the slots automatically, once you have added them; i.e., if the sim has to put a newspaper on the table, the lot is scanned for tables with free slots (and the scanning will include your new slots), and then the sim is routed to the first empty slot found.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
One horse disagreer of the Apocalypse
#14 Old 29th Oct 2005 at 9:32 AM
Numenor, this definitely was not the case in Sims 1, and hasn't been my experience with Sims 2, where I have successfully prevented Sims putting bills and other items on a hacked desk merely by disabling the functions in the function table. I have done quite a bit of work in the functional area and have not observed anything to make me doubt this theory.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
The ModFather
retired moderator
#15 Old 29th Oct 2005 at 6:12 PM
Sorry, I wasn't clear...

Obviously, the function of finding a free slot and routing the sim to it is done via some BHAVs; but I think (I may be wrong) that those BHAVs are capable of automatically spot and use the new slots added into a custom object. If I'm right, there's no need to edit any BHAV, after having added a slot to an object: the game will be aware of it without further intervention by the modder.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Object(ive) Investigator
retired moderator
#16 Old 29th Oct 2005 at 7:39 PM
Quote: Originally posted by Inge Jones
jaxad, the remaining BHAVs needed will be on surfaceglobals or whatever it's called. If you look in your table package there will be one or more OBJf files, one per tile of the table. If you look in those you will see entries for things like "Surface" or "Pick up from slot". Against those will be BHAV numbers for what to run as those events. They will probably refer to semi-global BHAVs that apply to all tables of that type.


Sorry, I forgot to look at the object functions.
Lab Assistant
#17 Old 4th Nov 2005 at 8:29 PM
Default not automatic
I agree with Inge : Testing the slots is not automatic.
When you call a "find best object for function" the game will call the guardian of this function for each available object. The guardian has to check the slots.
The ModFather
retired moderator
#18 Old 5th Nov 2005 at 3:18 PM
Ebruere, we are saying the same thing
Testing a slot is not automatic, but using a free slot is.

If I clone an end table (that has only one slot) and add a second slot, along with its route, I don't need to modify any BHAV, nor local nor global: the new slot will be checked and used either in autonomous and in user-directed interactions, because the surfaceglobals (guardian and action ones) are already capable of managing the newly added slot.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Forum Resident
#19 Old 9th Nov 2005 at 9:27 PM
I added a surface slot to a tub, but now the sims can no longer use it. it is placed onto a seperate OBJd in the main CRES. The slot was taken from an original coffee table. does the name have to equal the function (coffee table)
The ModFather
retired moderator
#20 Old 10th Nov 2005 at 12:14 AM
Do you mean that you want to add a container slot, where the sims can put object on?
In my experience, if a slot can contain objects picked from the catalogue, it doesn't necessarily mean that the sims can use it; if a correct routing slot is provided, the sims can pick objects from the slot, but if you want e.g. that they put the newspaper on that slot, some other elements are involved, among which the "surfacetype" attribute.

The name of the container slot should be irrelevant, as lon as the name in the CRES is identical to the one in the Text List.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Lab Assistant
#21 Old 10th Nov 2005 at 2:03 AM
You need the anims for the objects, and the CT-Reach-Grab and CT-Reach-Put bhav functions that call these anims in the object's code, the CT-Route-to-Reach for the surface object, a pie menu string and function for the surface object with "Put" option,
another pie menu with "Get" for the object.
Some objects already have code for additionnal slots, but it's not as automatic as it could.
Forum Resident
#22 Old 10th Nov 2005 at 1:30 PM Last edited by Fat D : 10th Nov 2005 at 3:06 PM.
i did not change the tub slot in any way and i don't want my sims to use the slot.

EDIT: Adding the slot to the existing slot file works better.
Instructor
#23 Old 9th Mar 2007 at 11:43 AM
Does the number of slot files matter?
I'm making a 3 tile surface out of a dresser (yes I'm STILL trying to get this to work). I got it to work pretty well except for a bounding mesh issue. I made 4 different slot files and had the slots for each tile in the different slot files. I'm wondering if it would work if I just put all of the slots into a single slot file, would it work?
I suppose I could try it and find out, but I was wondering if anyone else happens to know.
Retired Duck
retired moderator
#24 Old 9th Mar 2007 at 12:21 PM
Wow, old thread!

If you put all the slots in the same slot file, then changed each OBJD to use that slot file, then yes, it would work. It may not work quite the same way though.

If you think about the way the sofas work, there is a different slot file for each "seat" tile. Depending on which tile you select a sim to sit on, the sim will respond by looking for the slot in the SLOT file for that tile (OBJD). If you had all tiles pointing to the same SLOT resource, then I have a feedling that regardless of which tile you select, the sim will always pick the same slots in the same order. (That is, the first available slot according to the shared SLOT resource).

The other thing to note is that sims will most likely not be able to use all the container slots if they're part of a "surface" like a table. Most of the "surface" function calls only expect one sim-friendly slot per SLOT/OBJf pair, and will ignore any additional slots added to it. If you add them via multiple tiles, then each OBJf's surface functions will be pointing to a different SLOT resource, and consequently to a different slot.

Did that make any sense at all? It makes sense in my head, but my words seem to be coming out all muddled today.
Instructor
#25 Old 9th Mar 2007 at 12:54 PM
Quote: Originally posted by Echo
Wow, old thread!

If you put all the slots in the same slot file, then changed each OBJD to use that slot file, then yes, it would work. It may not work quite the same way though.

If you think about the way the sofas work, there is a different slot file for each "seat" tile. Depending on which tile you select a sim to sit on, the sim will respond by looking for the slot in the SLOT file for that tile (OBJD). If you had all tiles pointing to the same SLOT resource, then I have a feedling that regardless of which tile you select, the sim will always pick the same slots in the same order. (That is, the first available slot according to the shared SLOT resource).

The other thing to note is that sims will most likely not be able to use all the container slots if they're part of a "surface" like a table. Most of the "surface" function calls only expect one sim-friendly slot per SLOT/OBJf pair, and will ignore any additional slots added to it. If you add them via multiple tiles, then each OBJf's surface functions will be pointing to a different SLOT resource, and consequently to a different slot.

Did that make any sense at all? It makes sense in my head, but my words seem to be coming out all muddled today.


Ahh! Ok. That makes perfect sense to me! Thank you!
*hugs*
Page 1 of 2
Back to top