- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Object Creation >
- Object Creation - Modding >
- Container slot help(SOLVED!!!) :)
- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Object Creation >
- Object Creation - Modding >
- Container slot help(SOLVED!!!) :)
Posts: 7,361
Thanks: 2940 in 27 Posts
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.
Posts: 231
Thanks: 1026 in 5 Posts
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
Posts: 7,361
Thanks: 2940 in 27 Posts
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.
Posts: 1,530
Thanks: 15795 in 76 Posts
Posts: 7,361
Thanks: 2940 in 27 Posts
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.
Posts: 231
Thanks: 1026 in 5 Posts
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:
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.
Posts: 7,361
Thanks: 2940 in 27 Posts
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
Posts: 231
Thanks: 1026 in 5 Posts
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.
Posts: 231
Thanks: 1026 in 5 Posts
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
Posts: 7,361
Thanks: 2940 in 27 Posts
Posts: 231
Thanks: 1026 in 5 Posts
No, I tried..it seems hopeless. |
Could you upload the .package file here so i can take a loot at it directly?
Posts: 1,530
Thanks: 15795 in 76 Posts
There is a broken link somewhere in this chain (I think).
Posts: 7,361
Thanks: 2940 in 27 Posts
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.
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.
Posts: 7,361
Thanks: 2940 in 27 Posts
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?
Posts: 1,530
Thanks: 15795 in 76 Posts
If you could upload a file. Either SmugTomato, or I may be able to find what's wrong by looking at files.
Posts: 7,361
Thanks: 2940 in 27 Posts
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!
Posts: 7,361
Thanks: 2940 in 27 Posts
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.
Posts: 1,530
Thanks: 15795 in 76 Posts
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.
[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.
Posts: 7,361
Thanks: 2940 in 27 Posts
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!!!!
Posts: 7,361
Thanks: 2940 in 27 Posts
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.
Posts: 1,530
Thanks: 15795 in 76 Posts
Posts: 7,361
Thanks: 2940 in 27 Posts
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?
Posts: 1,530
Thanks: 15795 in 76 Posts
I think, it doesn't matter how you name object's bones.
Posts: 7,361
Thanks: 2940 in 27 Posts
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)
Posts: 1,530
Thanks: 15795 in 76 Posts
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.
Who Posted
|