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!
Quick Reply
Search this Thread
Alchemist
#26 Old 3rd Apr 2010 at 12:28 AM
I apologize for asking what is probably a silly question...but I don't know much about coding. I just wonder if the information you just posted is getting us closer to being able to change table heights and slots. Again...I'm sorry to ask...the conversation is a little over my head but I still wanna know.
Advertisement
Lab Assistant
#27 Old 3rd Apr 2010 at 1:58 AM
Don't get me wrong, Im not seeking an argument, but many of the values I seen used ( usually the 1st,6th & 11th dwords and occassionally the 4th and 9th
dwords) would translate into Floats that are astronomically huge or microscopically tiny.

and those that translate into reasonable floats make stupid rotation values
such as 0.70710700750351, why rotate 255, when -105 is faster?

I've seen different path slot types, where the only way to know if has a different function is by the value in the 1st dword/float for each coordinate.
Some Path slots even keep one of the coordinates in a different float,
while the value that should have it holds a value that matches or is the opposite of the 1st value.

Then there are the Effect slots, thier usage varies widely, but they follow the same pattern, every effect slot that is used for the same use, has the same
exact values (except for the XZY coords) as every other effect slot with the
same use. no matter what the object is or the slots placement in relation to the mesh.

and then there's container slots, is there a reason to have rotation data on
container slots ??
and why 3 rotation values for the X-coordinate, 3 for the Y-coordinate
and 1 for the Z-coordinate?
That's 9 rotation axiis when there are only 3.

The wikki entry for rslt's needs updating too, it has the names in the wrong
positions and doesn't mention the extra dword the container slots have.
Lab Assistant
#28 Old 3rd Apr 2010 at 2:46 AM Last edited by atavera : 3rd Apr 2010 at 3:11 AM.
Honestly I'm not so good with the math on this, however, when I first tried to interpret the data in this format as a 4x3 transform matrix(which is commonly used, at least in my 3d editor, to represent a transformation), it yielded plausible results. My initial decoding strategy was to run it through a script in my 3d editor and the results ended up looking like a perfect skeleton for a sim(with auRig, cuRig, etc.), and on objects I saw all of the slots in the right places, though I only tried a few objects. I will recheck things, as my results may have been part coincidence.

As for container slots needing the rotation, yes that is very likely. When an object is snapped into a slot, its animations should be relative to the local coordinate system of that slot rather than the global coordinate system. This includes position and orientation.

Also, my observations may only be valid in the base game, as I have no expansions.
Alchemist
#29 Old 3rd Apr 2010 at 3:14 AM
Just sayin'...but I would take it as a given that anything EA is doing with this game is, at least in part, designed to make it tough to mod it just for the purpose of making it tough to mod. Ditto for meshing objects/clothes/hair for this game. My bet is that they figure, without a big modding community making great stuff like everyone did in Sims 2, they can sell more of their Store stuff.

The tougher they make it the more people get frustrated and walk away from modding it. The more people that walk away the more downloaders are forced to get any new content from the EA Store. What you're saying, Raven Shadow goes right along with that theory...they make the thing a ridiculous puzzle and the end result is fewer modders and more sales for them. The programmer attrition in this version of the Sims has been significant as a result. It's a follow the money issue for EA and the community surrounding this game IMO. Just my two cents.
Lab Assistant
#30 Old 5th Apr 2010 at 12:53 PM
yeah I realized afterwards that containers would need rotation data, especially seating , to correctly orient sims when sitting.
But they have no rotation values stored in the rslt, causing me to believe the game just orients to
the front or back of the mesh.
But container slots, even those for sims only use 2 non-zero values per coordinate.
One is commonly used by doors and paths ( 00 00 80 3F ) and the other is the XYZ cooridinate.
BTW 00 00 80 3F = dec 1 or int 1065353216.

Now the X & Y coordinate blocks usually have 3 zero values each, one of which could be for rotation ,
to make a slot that makes objects lie on thier side. That would have to be tested for.



Don't worry, OrangeMittens. you're not the only one.

It's a shame they don't realize they could make even more money following Creature Labs modding moto.
"If they're gonna mod our game, let's sell them the tools to do so."
Lab Assistant
#31 Old 5th Apr 2010 at 1:09 PM
Quote: Originally posted by atavera
Nice find, with just a few lines of C# and that dll, I can read the rig data. Although the actual SDK is quite costly, the dll itself exposes the api barely enough to work with(you get the size of the parameters, but have to guess what they are).

whelp, I missed this part of your post, sorry.
I also found source code for an Eve Online modding tool that uses the dll
to extract mesh/texture data from thier .gr2 files.
and I've been trying to find out if anyone could use these to,
at the very least, extract data from the TS3 .gr2 files into a format
that can be hex edited?

Do you wan't the source code?



Quote: Originally posted by orangemittens
I apologize for asking what is probably a silly question...but I don't know much about coding. I just wonder if the information you just posted is getting us closer to being able to change table heights and slots. Again...I'm sorry to ask...the conversation is a little over my head but I still wanna know.


Yes, that info is enough to edit table slot heights right now.
I'm currently using the info to convert the pedestal cube into a set of shorter
stackable shelving units, that use an RSLT that I hand made myself.
Me? Sarcastic? Never.
staff: administrator
#32 Old 5th Apr 2010 at 1:17 PM
And if you put items on that edited slot height, do those objects move with the table? Because right now anything I add is not moving with the base table. And I don't see this as very useful.
Lab Assistant
#33 Old 5th Apr 2010 at 10:28 PM
No they don't , but most people are willing to move them manually, if they're sitting on a table they made...

Do you want the source code to see if it can help you read the _rig file?
Alchemist
#34 Old 6th Apr 2010 at 1:34 AM
If you put them on the edited slot height will they stay at that height if you then use a cheat to slide them exactly where you want them on the (edited) surface that you moved? Or will it only work outside of cheat mode?

And, if anyone ever figures out how to make the whole thing move together, how much of a fix do you figure that would be to the object someone made that doesn't have the slot moving with the object?

Er...and how do you alter the height of a surface? Does it require hex editing right now?

I'm with you RavenShadow...I just want to have stuff at different levels. If that requires manually moving a slotted item placed on a surface that's ok. The alternative is meshing stuff that has things already placed on it in the mesh itself...and that isn't a good solution IMO.

I would also like to thin the slotting...to make surfaces thinner...you know...so something someone puts on it isn't hovering in space in front, at a side, or behind the more narrow surface. Can that be done?
Lab Assistant
#35 Old 6th Apr 2010 at 3:06 AM
Quote: Originally posted by Raven Shadow
whelp, I missed this part of your post, sorry.
I also found source code for an Eve Online modding tool that uses the dll
to extract mesh/texture data from thier .gr2 files.
and I've been trying to find out if anyone could use these to,
at the very least, extract data from the TS3 .gr2 files into a format
that can be hex edited?

Do you wan't the source code?

It may be helpful to see some source that re-compresses the data. I already can decompress/read the data, but have had no such luck with any of the functions that would repack it. Luckily, once it is decompressed, there is nothing to decode(the data structure is defined in the dll) and it is very readable; only without the ability to re-compress the data, we are no further than we were using the official radgametools granny file viewer.

Quote: Originally posted by orangemittens
Er...and how do you alter the height of a surface? Does it require hex editing right now?

The current QA version of S3PE can edit the RSLT.
Lab Assistant
#36 Old 6th Apr 2010 at 3:13 AM
OM,
right now you can control the exact X Y & Z Coordinate of every container slot on your surface, period.
Objects will sit as close or as far above the surfave as you want, all you have to do is change the Y coordinate in the RSLT for that
or any slot you want changed.

The only thing that can't be currently done, is edit the settings controlled by the _rig file which allows objects placed on a table to be moved
when you move the table, or dinning room chairs to move when the dinning room table they assigned to is moved.

Other then that you can make a custom surface with any height you want, with container slots positioned at a height that fits that surface.

As an example I've attached my current project for you to look at.

It's 6 wall shelves that were cloned from the trophy case
(thus no container slots to start) each shelf is a different height
and has 14 defined container slots.
It's an early version and can be found under Decor -> Misc Decor
Attached files:
File Type: zip  Wall Shelf Kit.zip (123.3 KB, 12 downloads) - View custom content
Lab Assistant
#37 Old 6th Apr 2010 at 3:22 AM
Quote: Originally posted by atavera
It may be helpful to see some source that re-compresses the data. I already can decompress/read the data, but have had no such luck with any of the functions that would repack it. Luckily, once it is decompressed, there is nothing to decode(the data structure is defined in the dll) and it is very readable; only without the ability to re-compress the data, we are no further than we were using the official radgametools granny file viewer.


Well as I said this is for Eve Online, and from what I've read, they approve of the app.
But It's an under developed tool and has it's limits, but It does allow
that games' modders to extract Mesh, Texture & Animation data from
EO's .gr2 files, modify them and import the changes back into thier .gr2
file.

I wish you further luck with it, being able to edit the _rig
(even if it's with a hex editor) is an important step in TS3 modding.

I've attached the source with 2 versions of the dll.
Mostly because I've read that dll version can be important if the files your
working with use an older format.
Attached files:
File Type: zip  triexporter.zip (6.38 MB, 13 downloads) - View custom content
Instructor
#38 Old 6th Apr 2010 at 11:11 AM
If you want a higher table, try cloning one of the counters and turning it into a table. You would have to make it modular in order to be able to place chairs on both sides, however.

No, u can't haz cheezburger
Alchemist
#39 Old 7th Apr 2010 at 12:28 AM
Thank you RS...I've downloaded your shelves to have a look If I want to make a surface that is more narrow in the z direction, or smaller in the x direction, can I remove slots that would make an object hop onto empty space? If I do so will it make it so the slots I don't touch will lose the ability to hold items that are placed in those slots if the surface object is moved?
Lab Assistant
#40 Old 7th Apr 2010 at 11:09 AM
All the slots will lose the ability to move objects when the table moves period, I believe
it will be because the data in the _rig will be out of sync with the RSLT file, but the table will hold objects.

Removing slots is a little complicated if you're just learning to work with slots, but, thankfully
the latest QA version of S3PE now displays slot details, and you can use it to add, remove or move slots more easily.
One horse disagreer of the Apocalypse
#41 Old 7th Apr 2010 at 6:30 PM
Can I just clarify something.. since sims games sometimes use 'z' where most 3d editors would use 'y', can someone say unambigiously which of the three blocks deals with the height - first, second, or third?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Lab Assistant
#42 Old 7th Apr 2010 at 11:14 PM
INGE!!
Really, messing with the RSLT as a non-prammer, has me confused enough, without your mischief ..

In all seriousness tho' .... *sigh* yeah, I've played games that use the Z axis
for height in-game, a real pain to mod.
But too my knowledge, Wes never mentioned his tools needing to rotate
meshes for import into MS.

Part of my confusion stems from the following:
If you split the block into X Y & Z related blocks, you get something like
Code:
00 00 80 BF
00 00 00 00
00 00 XX XX
00 00 00 00
00 00 00 00

00 00 80 3F
00 00 00 00
00 00 00 00
00 00 YY YY
00 00 00 00

00 00 80 BF
00 00 ZZ ZZ


If the 1st value, in each of the 3 blocks, is Rotation , I could believe it, since the Z block has no extra
dwords available.
If thats true, what are the other 6 values for?
I know that certain Path Slots use 2 of them (they hold the opposite value
of the 1st float in each block)
Alchemist
#43 Old 8th Apr 2010 at 12:46 AM
Inge, when I asked HL that question in her footprints tutorial here:

http://www.modthesims.info/showthread.php?t=382724

she said S3 uses the same x, y, z as Milkshape does.
Lab Assistant
#44 Old 8th Apr 2010 at 3:24 AM
Code:
--[1]--
SlotName: 0xA820F8A7
BoneName: 0x85D6179D
TransformMatrix: 
X:		Y:		Z:
[0:'0']		[4:'0']		[8:'-1']	X Axis Vector
[1:'0']		[5:'1']		[9:'0']		Y Axis Vector
[2:'1']		[6:'0']		[A:'0']		Z Axis Vector
[3:'-0.031603']	[7:'0.486862']  [B:'0.072369']	Origin
SlotPlacementFlags: 0x00000100 (Sim)


Looking at one in s3pe, this is how I would arrange it as a 4x3 matrix. The XYZ orientation vectors are normalised(length equals 1 unit) 3d vectors for the axes relative to the origin.

The example is the container slot for a crib(0x5E6BDD4EA80D024C), so you see up is Y(translates up 0,48 units).
Lab Assistant
#45 Old 8th Apr 2010 at 9:58 PM
Thank you, Atavera, unfortunately this means I'm gonna have to stop ignoring matrices.
any suggestion on where to look for beginner info on converting tranformation matrices into
understandable rotation values?
One horse disagreer of the Apocalypse
#46 Old 8th Apr 2010 at 10:53 PM
I can get the routing slots working (as in change location of them) but I can't seem to affect sim-containing slots such as found in chairs (the sim still sits in exactly the same place when she gets to the object). And even more annoyingly I can't find a sim containing slot at all on a bed - they are all containers for end tables, apparently!!

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Pettifogging Legalist!
retired moderator
#47 Old 8th Apr 2010 at 11:14 PM
Raven Shadow: you could try looking around MathWorld: http://mathworld.wolfram.com/RotationMatrix.html – I'm not a math crack *at all*, but I remember that site being quite helpful in the past since they often have nice graphs and pictures explaining things (look at the "demonstrations", top right).

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Lab Assistant
#48 Old 9th Apr 2010 at 12:40 AM
Quote: Originally posted by Inge Jones
I can get the routing slots working (as in change location of them) but I can't seem to affect sim-containing slots such as found in chairs (the sim still sits in exactly the same place when she gets to the object). And even more annoyingly I can't find a sim containing slot at all on a bed - they are all containers for end tables, apparently!!


Don't know if it's related, but the sim holding objects I looked at used them oddly.
They have 1 containe slot and 1 effect slot for each sitting position
and they have the same exact coordinates, so when viewing the object
in TSRW you only see 1 of them, usually the effect slot.

As amatter of fact, I looked at Chair Living Modern, so if you
clone that one and view it in TSRW, you'll see 3 routing slots
and 2 effect slots.
1 Effect slot is at 0,0,0 and the 2nd one has the same coordinates as the container slot.
Try keeping the effect slot's coords in sync with the container slot's.

edit:
Oh, and just in case, keep the middle routing slot lined up with the
effect/container slots, too (i.e. the same x & y coords, only z is different).
Lab Assistant
#49 Old 9th Apr 2010 at 2:58 AM Last edited by Raven Shadow : 9th Apr 2010 at 3:24 AM.
I've had a sudden realization ..... That I am stupid, and I mean really stupid, st times.
Every time I've seen the words "Transformation Matrix" in reference to TS3's RSLT,
I treated it as if it said "Rotation Matrix".
I still don't really understand exactly what kind of matrices the RSLT is storing,
But I think you're reading it as some sort of Translation matrix.
Yet from what I've read, so far, it looks like a backwards identity matrix
except that the -1 would indicate that the Z-axis is mirrored,
which would make it a Scaling Matrix.
Also sim containers have a 2nd matrix stored in it's associated effect slot,
in the crib's case, the 2nd matrix is exactly the sme as the 1st.

Quote: Originally posted by atavera
Code:
--[1]--
SlotName: 0xA820F8A7
BoneName: 0x85D6179D
TransformMatrix: 
X:		Y:		Z:
[0:'0']		[4:'0']		[8:'-1']	X Axis Vector
[1:'0']		[5:'1']		[9:'0']		Y Axis Vector
[2:'1']		[6:'0']		[A:'0']		Z Axis Vector
[3:'-0.031603']	[7:'0.486862']  [B:'0.072369']	Origin
SlotPlacementFlags: 0x00000100 (Sim)


Looking at one in s3pe, this is how I would arrange it as a 4x3 matrix. The XYZ orientation vectors are normalised(length equals 1 unit) 3d vectors for the axes relative to the origin.

The example is the container slot for a crib(0x5E6BDD4EA80D024C), so you see up is Y(translates up 0,48 units).

How did you get at that?
that would put the contents of the sims slot 1.4m (roughly) above the crib.
hhmmm , I also read somewhere that -1 would be a 90 degree counter-clockwise rotation and 1 would be a 90 degree clock-wise rotation.
which would make it a rotation matrix if there were 3 matrices with sin/cosine data instead of zeros
Lab Assistant
#50 Old 9th Apr 2010 at 8:01 AM
Here is a screenshot of that slot in milkshape3d. I just made a box, and translated it to the local slot origin vector, duplicated it 3 times(for the x,y,z axes) and translated them out from the local slot origin. The result is that the slot(the red box) is right on top of the bedding where it should be, and it turned 90 degrees so it faces the foot of the bed.
Screenshots
Page 2 of 5
Back to top