I'm creating 4-tile sliding doors that match the large base game windows, but the sim routes through the center when they should route through the left where the door opens. I tried changing the rig position to X = -1 instead of X = 0 both in blender and S4S but it didn't change anything. How can I force the sim to pass through the left not through the center of the door?
Another thing is: how can I extend the footprint squares when placing the object in Buy Mode to 4 tiles instead of 2 (the original door I cloned was a 2-tile door)? The footprint itself is already correct (if you try to place other doors/windows in the square most to the right or most to the left they will intersect) but the squares that show up when placing it in Buy Mode is not.
Post by menaceman44 on Jan 4, 2018 13:53:35 GMT -5
I don't think I'm going to be of any help on this occassion I'm afriad. You've done everything to the slots that I'd have thought of. Perhaps brujah could be of more help? He's worked with custom sliding doors already.
About the routing, I'm not really sure what I need to put in the script. I don't know much about scripting, I've only done it once to add an interaction to terrain in a previous mod I made. I tried to give a look on how you did your script for the sliding doors you made but there was only a .pyo file and no .py file so I couldn't open it.
def _get_positions(self): pos = self.transform.translation orient = self.transform.orientation offset = orient.transform_vector(sims4.math.Vector3(0.0, 0.0, 0.3)) offset1 = orient.transform_vector(sims4.math.Vector3(0.465, 0.0, 0.0)) #This is my added variable cross = orient.transform_vector(sims4.math.Vector3(0.05, 0.0, 0.0)) p0 = pos + offset - offset1 #I applied it here, This is the front p1 = pos - offset - offset1 #And here, This is the back p0.y = terrain.get_lot_level_height(p0.x, p0.z, self.routing_surface.secondary_id, self.routing_surface.primary_id) p1.y = terrain.get_lot_level_height(p1.x, p1.z, self.routing_surface.secondary_id, self.routing_surface.primary_id) return (p0, p1, cross)
I basically copied the entire door.py and tweaked it with my own class name and replaced the __qualname__ as well. Anywhere the original class name was mentioned I changed it to the new class name. For example in the door.py:
I did what you said and created my .py file. But when I tried to compile it I got this error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python33\wideslidingdoor.py", line 1, in <module> from protocolbuffers import Routing_pb2 as routing_protocols ImportError: No module named 'protocolbuffers'
However that part where the error occurred was already in the original door.py, I didn't change anything on that part. I tried using the generated .pyo file anyway to see if it would work, so I renamed it to "__init__.pyo" just like yours (I'm not sure if the name makes any difference but I did it anyway), placed it inside a folder named "TS40_WideSlidingDoor" and compressed the folder into a .zip file with the same name. Then I changed the extension from .zip to .ts4script and placed it into my /Mods/Scripts folder. I also changed the header of the Object Tuning in the .package file to:
In the "c" I put the same name as the __qualname__ and in the "m" I put the same name as the folder/ts4script, but in game I cannot place the door as I get a "Script Call Failed" message. Could this be because of the error I got when compiling (if yes how can I fix it since that part is the same as the original door.py) or did I do something else wrong?
The package, .py and .ts4script files are here (the animation package is there too but it's the same as the previous one I had posted, I didn't change anything in it).
The script changed with the pre-pets patch. This looks like you were still using the script from before then. Re-extract the scripts and try again. You also haven't changed the class name.class Door(Portal): Should be class WideSlidingDoor(Portal): As far as the added variable, I think it would look better if you change the value to 0.875 or 0.975 instead of 0.5.
That's weird because I extracted the scripts yesterday and my game is up-to-date. But after I changed "class Door(Portal)" to "class WideSlidingDoor(Portal)" and changed the value to 0.875, it finally worked! I guess the problem was that I hadn't changed "class Door(Portal)". I still got that same error when compiling, but in-game it worked anyway. Thanks for the help!
the option to manually set them as the front door does not show up
This is generally the case if it is the only door on the front of the lot, it ends up automatically becoming the front door. Test it out by adding a second door to the same wall and/or changing which wall you put it on.
If you are having problems seeing the CAPTCHA, please clear your browser's cache and cookies and ensure that you do not have any browser addons or extensions that interfere with the display of the CAPTCHA. Then, close the CAPTCHA window and click on the register button to open the CAPTCHA again.