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!
Test Subject
Original Poster
#1 Old 1st Jul 2016 at 9:05 PM Last edited by brig : 1st Jul 2016 at 11:00 PM.
Default Custom Animation with Prop for New Scripted Object
Apologies if this has been covered anywhere else, I haven't been able to find a similar discussion. I have to admit that I'm an absolute newbie when it comes to object/script modding, but I've been slogging through and I think I've nearly come up with a working script. Where I'm stuck is the JAZZ file. I'm following LeeFish's tutorial (here! ) and while it's been super helpful, it only covers how to replace a default prop with a custom one in an already-existing in-game animation, and I'm trying to figure out how to use a custom prop (a .package file of deco CC) in a brand-new animation, which I've already made.

My questions are: can it be done? If so, how? LeeFish says in the tutorial, regarding their replacement prop, "I cloned the fireplacelighter to make my candle - and a good job too or I would have had to add bones and hashes and all sorts of awful things." Does this mean I need to figure out how to do all that? I linked it to the bones of the hand in Blender (parent-child) and tested the animation by itself, and it (the prop) does not show up in game, though I pretty much expected that. I thought perhaps if I did it that way I wouldn't need to mess with the prop in the JAZZ but no luck. As far as the solution, I understand that I have to have the JAZZ script create the prop when beginning the animation, and I need to include the OBJD (I think) of the prop in the final object package and link it properly in the JAZZ (but where to find the value I need for CC objects? It's something like "Create Prop 1080" where 1080 is the dec conversion of the hex value of the prop itself, so is that just the IID of the OBJD? I tried that and the dec conversion couldn't be done for some reason). I'm kind of lost on how to do this part when my prospective JAZZ script doesn't reference an EAxian object or animation at all.

And what exactly do I need to do with the bones in the prop? Is the Mesh Toolkit's auto-assign function sufficient (never used it, just did some googling and came up with this as a possible fix)? It's probably not nearly as complicated as I think it is, but like I said I'm brand new at this. Any help would be appreciated. Thanks for reading!
Advertisement
Instructor
#2 Old 2nd Jul 2016 at 9:42 AM
I don't think you can simply link the custom prop to the hand bones in this case unless you turn the prop into an accessory (as in CAS part), which is probably not what you'd want unless you're just using this for movies or photoshoots.

A custom prop for a scripted object needs to be created as an object in the script, then passed into the JAZZ. The prop mesh needs to have a bone, as do most objects in the game. This can be most expediently done by cloning a simple basegame object, then replacing the mesh/textures with the ones from the custom prop in S3PE. Otherwise, you can add bones in Milkshape or Blender, but I'm not too familiar with that. (I don't think Mesh Toolkit can be used to add the bone in this instance, as it's for CAS parts and assigns sim body bones, AFAIK.) Then you can call GlobalFunctions.CreateObjectOutOfWorld(new ResourceKey(IID, TID,GID)) where IID = custom prop instance ID, TID = custom prop type ID, and GID = custom prop group ID. Finally, the created objected is fed into the JAZZ, using the actor name you chose in the JAZZ script for the prop.
Test Subject
Original Poster
#3 Old 6th Jul 2016 at 7:42 PM Last edited by brig : 6th Jul 2016 at 8:05 PM.
Ahhh thank you for answering! Sorry for the late response, I wanted to give your suggestions a try before posting in here again but it seems I'm stuck again. I want to test the object and its animations in-game, but I can't get the .dll to build because I keep getting errors. I change parts of the code and get different errors. I had to change every "private" or "protected" to "public" to stop it complaining about permissions. Currently the only errors it's reporting have to do with the use of "Sim" -- just about every tutorial references that in interactions but when I do it it tells me "the type or namespace 'Sim' could not be found (are you missing a using directive or an assembly reference?)". I dunno why but it sounds to me like it's having trouble accessing the game .dlls... but I ran them all through Unprotect (versions copied to my project folder, of course) and made sure it's referencing the correct version of mscorlib. I have a feeling these are all noob issues so I feel kinda silly asking but if you have any insights that would be great

edit: Nevermind! Added a few more "using Sims3.Gameplay.__" directives, just clicking ones that popped up and sounded promising, and those errors went away. I got it to build so I'll test it out and see what else needs tweaking.
Back to top