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!
Mad Poster
Original Poster
#1 Old 2nd May 2018 at 3:41 PM Last edited by Rosebine : 6th May 2018 at 9:19 PM.
Default Container slot help(SOLVED!!!) :)
I added a container slot to an item. Mine is at the same position (translation is the same) but I want it to face the opposite way.
The original slot as :
Rotation
X 0.0
Y 0.0
z -1.0
Angle : 90.000029

How should mine be set? and what -1 means about the z axe?
I thought I had to add a routine slot, but the game calculates the route accordingly..it seems.
So, my toddler can walk to the bed, but tells me he cannot go in by that side...See how sad he is? WE need help.

Thanks.

ETA :
I tried z 0 angle 270 didn't work.
I tried z 1 angle 270 didn't work.
Screenshots

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Advertisement
Field Researcher
#2 Old 2nd May 2018 at 4:44 PM
Quote: Originally posted by Rosebine
I added a container slot to an item. Mine is at the same position (translation is the same) but I want it to face the opposite way.
The original slot as :
Rotation
X 0.0
Y 0.0
z -1.0
Angle : 90.000029

How should mine be set? and what -1 means about the z axe?
I thought I had to add a routine slot, but the game calculates the route accordingly..it seems.
So, my toddler can walk to the bed, but tells me he cannot go in by that side...See how sad he is? WE need help.

Thanks.


The set of numbers you're looking at there are axis angles, The first 3 numbers represent a directional vector in 3D space while the fourth number represents the amount you are rotating by around the vector.
You can imagine it as poking a stick into the ground at a certain angle and rotating something around it perpendicular to the stick. In this case you are rotating 90 degrees around the vector (X:0, Y:0, Z:-1), which in the sims 2 engine means a vector pointing straight down. Since you are flipping the axis upside down, The vector's right is now your left. This is important because rotation is always calculated clockwise, 270 (or -90) degrees over vector 1 is the same as 90 degrees over vector 2.
example:


Here's an example of an angle axis around 1 axis and an example of one around multiple axes.
example:


I hope my crappy paint illustration cleared some things up
Mad Poster
Original Poster
#3 Old 2nd May 2018 at 5:04 PM
But setting my new slot to 1 instead of -1 didn't do it. Nor setting the angle to 270.
So the z -1 would mean, this slot is pointing down, so towards positive z, and the sim is entering going towards negative z.
I want the opposite, so a slot facing up, towards negative z, so my sim will enter going towards positive z.

On the pic, the green arrow is what this item offers already. toddler will enter the object by the green side.
The pink is what I want to add to the item. I want entering to be possible on both sides... crappy drawing, but you'll forgive me.
Screenshots

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#4 Old 2nd May 2018 at 5:50 PM
Sims use routing slots to route to an object. They don't go to container slots, they snap into those. Your object needs a routing slot on the pink side. Does it have one?
Mad Poster
Original Poster
#5 Old 2nd May 2018 at 6:07 PM Last edited by Rosebine : 2nd May 2018 at 6:18 PM.
Now yes. I added one. At first, this is what I did. I added a routine slot and a container slot. But it didn't work...so I deleted the new routine slot.
Now i am back at having one more of each. but it still does not work.
My toddler refuse to climb in or snap into the new container slot. But will walk to it, with or without an added routine slot.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Field Researcher
#6 Old 2nd May 2018 at 6:22 PM
Quote: Originally posted by Rosebine
But setting my new slot to 1 instead of -1 didn't do it. Nor setting the angle to 270.
So the z -1 would mean, this slot is pointing down, so towards positive z, and the sim is entering going towards negative z.
I want the opposite, so a slot facing up, towards negative z, so my sim will enter going towards positive z.

It seems I implied that the vector I described above indicates the orientation of the object, but this is not the cases. The pink arrow you would be rotating around is only imaginary in terms of applying it to the game, it's only there in SimPE to represent a Quaternion rotation in an easier to understand format. SimPE actually translates the values in there back to a Quaternion in the background, Take for example a rotation of 45 degrees over all axes. In Euler angles it's as simple as giving 45 degrees as input for all axes, in the rotation tab you can see this represented as turning 64.7 degrees around the vector (0.357, 0.862, 0.357). Both of these (Especially the Euler angles one) should be fairly simple to visualize, the Quaternion however...
example:


Quote: Originally posted by Rosebine
On the pic, the green arrow is what this item offers already. toddler will enter the object by the green side.
The pink is what I want to add to the item. I want entering to be possible on both sides... crappy drawing, but you'll forgive me.

It seems like what you want to do is a combination of rotating the slot by 180 degrees and Translate it to the other side of the object, translation is what actually moves an object in a given space.
Furthermore, the way the Sims 2 axes work is as follow: X: Right-Left, Y: Forward-Backward, Z:Up-Down. Milkshape uses another Coordinate system where X: Right-Left, Y:Up-Down, Z:Foward-Backward, so take note of that when trying to apply positions in Milkshape to SimPE. Properly placing the slot could be as simple as changing an X value in the Translation section of the cTransformNode from 1 to -1 or vice versa.
Mad Poster
Original Poster
#7 Old 2nd May 2018 at 6:30 PM Last edited by Rosebine : 2nd May 2018 at 6:43 PM.
I knew the Quaternion would change as i enter values in Rotation, but you tell me I can simply enter values in the Euler as well, or instead?
So..my new container slot should have the opposite x values of the original in Translations? on top of fiddling with angle and z value in Rotation?
Am i getting better?
ETA : So I changed the values in Translation Y, as this is front/back, in order to flip it around. Put 180 for angle, with a value of 1 for the Z.
Didn't work either. This is driving me nuts! lol

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Field Researcher
#8 Old 2nd May 2018 at 6:42 PM
Quote: Originally posted by Rosebine
I knew the Quaternion would change as i enter values in Rotation, but you tell me I can simply enter values in the Euler as well, or instead?
So..my new container slot should have the opposite x values of the original in Translations? on top of fiddling with angle and z value in Rotation?
Am i getting better?

You can enter rotation values into either the Quaternion, Rotation or Euler section and all will update accordingly. So pick whichever one is the easiest to understand for you.
It seems like that would cover it, Don't quote me on that though as I have never messed with slots myself before.
Field Researcher
#9 Old 2nd May 2018 at 6:47 PM
Quote: Originally posted by Rosebine
ETA : So I changed the values in Translation Y, as this is front/back, in order to flip it around. Put 180 for angle, with a value of 1 for the Z.
Didn't work either. This is driving me nuts! lol

Wouldn't you want to flip the X value instead? It looks like you want to move it Right<>Left

Edit
With rotation changed from this:
X 0.0
Y 0.0
z -1.0
Angle : 90.000029

To this:
X 0.0
Y 0.0
z 1.0
Angle : 90.000029
Mad Poster
Original Poster
#10 Old 2nd May 2018 at 7:04 PM
No, I tried..it seems hopeless.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Field Researcher
#11 Old 2nd May 2018 at 7:13 PM
Quote: Originally posted by Rosebine
No, I tried..it seems hopeless.

Could you upload the .package file here so i can take a loot at it directly?
just a girl
#12 Old 2nd May 2018 at 8:30 PM
To figure out the problem we'd need to examine the whole chain: Slot index used by 'Go to routing slot' primitive in the interaction's BHAV -> line in SLOT file by order of routing slots -> I9 table entry -> line number in STR file -> node name in CRES file.
There is a broken link somewhere in this chain (I think).
Mad Poster
Original Poster
#13 Old 3rd May 2018 at 12:27 AM Last edited by Rosebine : 4th May 2018 at 6:42 PM.
Quote: Originally posted by Lamare
To figure out the problem we'd need to examine the whole chain: Slot index used by 'Go to routing slot' primitive in the interaction's BHAV -> line in SLOT file by order of routing slots -> I9 table entry -> line number in STR file -> node name in CRES file.
There is a broken link somewhere in this chain (I think).

Oh..I'll check this, thank you Lamare.
Quote: Originally posted by SmugTomato
Could you upload the .package file here so i can take a loot at it directly?

Do you want to look at it only, or test in game? Because to test in game you'd need my twin bed too. My toddler bed is a slave.
And thank you.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Mad Poster
Original Poster
#14 Old 3rd May 2018 at 12:48 AM Last edited by Rosebine : 3rd May 2018 at 4:07 AM.
Oh..ok, so there was error in that chain, Lamare. Both slots in SLOT file had the wrong STR numbers, this is fixed now.
But now I am wondering if I must add to the behave as well? There is only one Go To Routine slot, and of course, it points to the original one, which is still there and needs to be. Then, only one Snap Into..pointing to that same slot. Then a snap...
Should I add all these lines?
Ugh...add lines, changed nothing. Why is this such a complicated pain?

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#15 Old 3rd May 2018 at 7:32 AM
Because slots are not friendly =) It takes me a lot of tries to get them right, too.
If you could upload a file. Either SmugTomato, or I may be able to find what's wrong by looking at files.
Mad Poster
Original Poster
#16 Old 3rd May 2018 at 8:04 AM Last edited by Rosebine : 5th May 2018 at 9:57 PM.
Okay then. Have a lillHouse tot bed.
Thank you.
My next idea was to clone this bed, and mirror its frame. That worked, though the toddler sleeps head to toes. but oh well!

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Mad Poster
Original Poster
#17 Old 4th May 2018 at 12:42 AM
Quote: Originally posted by Rosebine
My next idea was to clone this bed, and mirror its frame. That worked, though the toddler sleeps head to toes. but oh well!


And this is what it looks like. I think I can live with that. This will be my new arrangement.

Of course, if someone downloaded my package and can tell me if /how, what I want is possible, then I'd like to know. Otherwise, this is the next best thing.
The toddler sleeping on the bed that has the mirrored frame will just sleep in the opposite direction, and I'll say it is because he/she is...different.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#18 Old 4th May 2018 at 11:06 AM Last edited by Lamare : 4th May 2018 at 11:43 AM.
There are some things to change in the BHAV (Interaction - Toddler Sleeps In).

First off, slot numbers. Slot numbers used in BHAVs correspond with their order in SLOT file. You count slots starting from 0, BUT you only count slots of certain type. So, if you had four slots of only one type, for example, four routing slots, you'd count them 0, 1, 2, 3. But you have two routing slots (0 and 1) and two container slots (0 and 1).



I haven't looked at CRES and translation/rotation coordinates. Try to fix the BHAV first and see how it goes.

Let's look at the BHAV now.

1. Line 1 (first 'Go To Routing Slot' try). Turn on 'no failure trees'. Now it has 'no failure trees' off, which means a sim will whine if he can't go to that slot. Since you have alternate routing slot, let's not make him whine before he tried that one as well.
Code:
[prim 0x002D] Go To Routing Slot (0x0000,
  no failure trees: True


2. Line 21 (second 'Go To Routing Slot' instruction). If it fails, it leads to an error, which means that if a sim can't go to this slot, he would reset. You probably don't want that. Change false target to 'False'. Then change the slot number from 3 to 1. The 'no failure trees' is off - leave it off (a sim tried both slots and failed, so it's a good time to whine now).

3. Let's move on to line 23 (Snap Into). Change slot number from 2 to 1.

4. You may have to adjust the way sims get *out* of the bed to help them choose available side. I'd test to see if getting in works first.

If I'm not making sense, feel free to ask more questions.

ETA. By the way, do you really need two container slots? The object is usable by one sim at a time. Maybe you could make it easier on yourself and leave one container slot in the middle of the bed. Or you could let two toddlers sleep on two sides, which is even better! And will require some more BHAV changes, but think how cool it'll be.
Mad Poster
Original Poster
#19 Old 4th May 2018 at 12:34 PM
I added a container slot, because I thought I had to. I thought, one cannot face both sides at the same time...this is why I added it.
You are making sense! Having 2 toddlers in would be great indeed. The original container slot seems to be in the middle of the bed already, according to the coordinates in Milkshape.
I'll see if I can follow your instruction...I'll be back.
Thank you!!!!

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Mad Poster
Original Poster
#20 Old 4th May 2018 at 2:38 PM
Ok...The numbering of the SLOTs. In the original object, there is only one Routine and one Container. Routine has 0 in I9, and Container has 1 in I9.
I put 2 and 3 for my added slots, as i thought I was following a pattern. But if I look into a twin bed that has 2 sides available, the numbers they have in their I9 seems to follow another pattern, which differs from the one used in behav. So in my package, there is probably something wrong with my I9 column.

I made the modifications you proposed to the behav. It did not work. I'll see if I might have missed something.Now, my toddler is not even trying to go to the other side.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#21 Old 4th May 2018 at 2:49 PM
No-no-no, you've filled the 'I9' entry just fine! I9 points to the line number in the STR file, so you did it right. It's the numbers you use in BHAV that need changing. This is confusing as hell, but once you wrap your head around it, it gets better, I promise. BHAV functions count slots by order, not by what line number they're on.
Mad Poster
Original Poster
#22 Old 4th May 2018 at 2:57 PM
Well, I did just what you said. It was not confusing, no. Opening the twin bed confused me though, as i said.
But i changed the second routine slot(the one I added) to point to 1, and the second snap into(the one I added) to point to 1. But that did not work. I changed nothing in the SLOT file.
Oh..by the way, might be silly, but do you think I must rename my STR's to fit the numbers?
Like..I named them like this:
slot_toddler_std_0
route_toddler_std_0
Should I change the 0 into 1?
like this..
slot_toddler_std_1
route_toddler_std_1
Or it might not change anything, as I could have named them : Platapuss123?

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#23 Old 4th May 2018 at 3:04 PM
Huh, Ok. I guess, I should have looked at the CRES after all. I'll get back to you on this.

I think, it doesn't matter how you name object's bones.
Mad Poster
Original Poster
#24 Old 4th May 2018 at 6:32 PM Last edited by Rosebine : 4th May 2018 at 6:53 PM.
Okay, so I ran a test. I wanted to know if my new routine and container slots had maybe wrong values. So I set them both to the exact values of the original, the ones already in the object.

If the side is inaccessible because there is a wall there, then the toddler accept to route to the other side as his first choice. But then complains access is blocked.
The toddler will route to the other side with or without an added routine slot...(I had the same thing happened before I added a routine slot, so my added one might not even be in effect here.)



Now, if the side is inaccessible because there are objects in the way, (my toy box and my rocking snail) the toddler does not even try to route to the other side. Instead, he still routes to the original inaccessible side, and once there, complains that there is a toybox in his way.(maybe then, my new added routine slot is in effect)


Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
just a girl
#25 Old 4th May 2018 at 6:42 PM Last edited by Lamare : 4th May 2018 at 7:12 PM.


Green - I imagine, this is how the tiles go? Facing this side? Red - this is the 0 point of the mesh, or root, or whatever it's called? I suppose it is.

OK. Let's figure out the coordinates. I'm gonna look at this picture I made for myself to reduce hair-pulling while making slots.



Let's see where your bed's slots are. Careful about left-right and back-front - think in green tiles (not by the look of the mesh).

Initial routing slot:
Translation:
X -0,005402
Y 0,330775
Z 0,000000
Rotation angle 180, Z -1
So, this slot is located on the ground, tiniest bit to the left and about 1/3 tile forward (1,000000 = 1 tile). To approach it a sim will go face to face with the bed. Everything seems Ok. I forgot what rotation Z -1 does... even though SmugTomato explained it, I have trouble visualizing it. Anyway, let's move on.

New routing slot:
Translation:
X 0,005402
Y 0,330775
Z 0,000000
Rotation angle 90, Z -1
This slot is located pretty much in the same place, except it's slightly to the right and rotation angle is different. It might be the reason why it doesn't work. To be on the other side of the bed, we need to push it back quite a bit (a whole tile) and turn it around 180 degrees, without changing other things.

So, I would try something like this for your new slot:
Translation:
X -0,005402 (same as the initial slot)
Y -1,330775
Z 0,000000
Rotation angle 0
Maybe play with rotation, if it doesn't look good in game.

ETA. You've made new post while I was writing this whole thing. I haven't read it yet, but I'm gonna.
Page 1 of 3
Back to top