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 31st Jul 2018 at 2:13 PM
Default Making the Gypsy Caravan behave like the Celebrity Trailer
Hi everyone,

sorry for troubling you with this, I'm just too stupid to figure this out by myself apparently (I'm usually more into CAW than modding, but I know the basics of S3OC and s3pe): I have made a clone of the Fortune Teller's wagon that came with Supernatural, and I would like it to behave like the Celebrity Trailer (so it can be put in the inventory and used as a bed, essentially). But when I change the script class (with Transmogrifier), although the expected interactions are available (like "sleep", "throw star trantrum" and such), the Sim is stomping his feet and cannot access the wagon. From this, I reckon some or all of the animations - of the object and / or of the Sim using the object - are being exchanged with the class, so the poor thing wants to access a door where there is none, but I can't find out how to prevent this. Like, how can I keep all the animations and simply change the pie menu (and connected buffs) of the wagon?

Any help will be much appreciated! :lovestruc
Advertisement
Test Subject
#2 Old 31st Jul 2018 at 11:31 PM Last edited by Rgnrk198 : 1st Aug 2018 at 5:45 AM.
Sounds like a routing problem. Your sim is trying to route itself to the routing slot of where the animation should begin, but either that slot does not exist or it is being blocked by part of the mesh.

What I would do is clone the object in a new package file (You can do that with TSRW or maybe S3OC if you know how - not familiar with it myself), change the script class of the new object with S3PE. Then to fix the routing problem, I would export the RSLT resource (which is in charge of slots) and edit the slots/ make the missing slot using blender with this plugin by cmomoney: http://modthesims.info/d/456325 - instructions included in the download page. It works on blender 2.65, and its its simple to use/ free. You can get the object to appear in blender if you export the mesh as an obj file from TSRW and import into blender so you can see where the slots are relative to the object, then save back the slot file. Once you have fixed the slot file, re-import it back to your package and test it out.

I can take a look at the code to see what slots it uses when I get a chance.

EDIT: I took a look at the caravan code vs the trailer code, and it turns out the caravan is a rabbit hole like one of those pre-built buildings (grocery store/ diner/ city hall/ etc). I'm not sure what kind of slots rabbit holes use but the trailer uses the slot named RoutingSlot_0
Lab Assistant
Original Poster
#3 Old 1st Aug 2018 at 9:38 AM
Hi Rgnrk198, thanks a lot for taking all this trouble! Yes I knew that the Caravan is a rabbit hole. It doesn't matter to me so much, because I want to keep the animations that go with the Caravan, just exchange the interactions that happen once the sim is inside the Caravan rabbit hole. How can I do that?
Test Subject
#4 Old 1st Aug 2018 at 10:48 AM
Ah okay. Hmm.. This is my first time reading rabbithole code, normal objects are usually easier.

There's no simple way to switch the animation for the interaction sadly, since that is defined in the code. You would have to create a new custom scripted object and do some code editing for that. I'm not sure what your coding experience is, but there are tutorials in the wikis, though some are a bit outdated Basically on a high level, I would have to do the following:

1. In TSRW, clone the wagon and create a new package file. You can set the flags to make the object able to put in inventory using TSRW as well.
2. Write a custom scripted object - I would first just copy the code from the trailer and rename the ActorTrailer class into something else like GypsyTrailer or something else. And then replace all the function calls that look like
RouteToAndEnterActorTrailer(.....) into something like RouteNearEntranceAndIntoBuilding(...) - it won't be as trivial as this because the parameters are different, but basically replace the function calls for routing into trailer to routing into rabbithole instead. You would also have to edit the references for the functions being called when sims exit the trailer as well. The coding part is the tedious part >.<
3. Use S3PE to change the OBJK class to the newly created one.

Some of what I said may sound like magic, or gibberish if you haven't looked at sims 3 code. Working through the object modding tutorial will help a bit. The main difficulty I see with the modding this is one is a rabbithole and the other is not, so some coding edits and trial and error would be needed to get it to work ...

ALTERNATIVELY, if you're comfortable with object meshing/ rigging... and dont care if the animation doesn't match.
1. clone the trailer in TSRW
2. Export the caravan mesh and reassign the routing slots so that the routing slots are by the door or something like that
3. import the mesh + textures from the caravan to the trailer
4. Now you have a trailer that looks like a caravan. But this will retain the actor trailer's animation so its probably not what you want if they're not similar :/
Lab Assistant
Original Poster
#5 Old 2nd Aug 2018 at 9:23 AM
Thanks a million, your explanations do help me a lot! I understand now that the caravan and its animations cannot be separated from each other the way I thought. Your tips for coding / meshing a new "caravan trailer object" are also great.

One more question, if you don't mind: I have a custom made gypsy wagon (I forgot who made it, but it's here at MTS I think) which uses the class (and of course the animations and functionality) of a tent object. The animations don't match too well, but the whole thing works at least. Couldn't I just clone the EA wagon and import and replace with S3PE everything BUT the mesh and textures from the custom "caravan tent"? Would that work? Because the way I understand it, a big part of the coding work would already be done this way. Or am I still not understanding something vital here?

Once more, thanks a lot! :lovestruc
Test Subject
#6 Old 2nd Aug 2018 at 5:21 PM
That gave me a simpler idea. So yeah, you don't need to replace everything just try replacing 2 resources. you can try to do the following:

1. Clone the EA wagon
2. Export the RSLT from the custom caravan tent and import it to your newly cloned EA wagon (you can do this in S3PE by exporting RSLT slot file, and then open S3PE with the cloned EA wagon package, right click the RSLT resource > replace )
3. Change the class of the EA clone to the same class that the caravan uses. You can use the OBJK editor in S3PE to figure that out, its just a one line copy and paste. An example is the last step of this tutorial (but using the existing EA tent class instead of the custom class that they write themselves) http://modthesims.info/wiki.php?tit..._Object_Modding

The class name in the OBJK is what links the object to the code of how the object should behave.
The RSLT slot is basically a skeleton file that defines where all the different slots are located for the object.

That way all you are copying over is the Rig/ skeleton of the gypsy wagon and changing the object class. The animations won't match but it'll work as long as the slot names are the same, which I assume should be.
If you still get the routing error, try importing over the FTPT and VPXY resource as well, which have something to do with the object footprint (the big green boxes you see in the game).. I've never actually tried copying over that one to see if it works, but if it doesn't, you can always manually edit it. To manually edit you would have to edit the bounding boxes to make it smaller, this tutorial helps teach you how to edit the bounding boxes: http://www.modthesims.info/showthread.php?t=382724
Lab Assistant
Original Poster
#7 Old 2nd Aug 2018 at 5:41 PM
This sounds really good, will try tomorrow and report back ;-) Thanks again!
Lab Assistant
Original Poster
#8 Old 4th Aug 2018 at 9:45 AM
Sorry, my game is having problems at the moment - perhaps the custom gypsy wagon is at fault, don't know yet - experimenting will have to wait a little thus. Will get back asap!
Back to top