Quick Reply
Search this Thread
Field Researcher
Original Poster
#1 Old 23rd Jul 2022 at 12:54 AM
Default Script-based wall creation?
Kind of a long shot, but - is anyone aware of a situation in the game where a build mode object (like a wall or fence or something) is created or destroyed through code instead of through build mode? I'm wondering if I could make an object turn into a wall section (or vice versa).
Field Researcher
Original Poster
#2 Old 28th Jul 2022 at 12:51 AM
I've found that part of the reason walls can't be used the way I want to use them (changing their meshes and functionality through interactions) is that the game treats them like lots when clicked, since PickObjectTask.ProcessClick gets the script proxy for the lot the wall is on when you click a wall. I can change this with a simple core mod to PickObjectTask.ProcessClick, but that just results in walls having no interactions at all, since walls have no script proxies of their own.

So, a follow-up question: is it possible to add an OBJK resource to an object that doesn't have one, so I can give it a script proxy? I've found 5 VPXY resources that seem to have something to do with various walls in FullBuild0, but I've never successfully edited a VPXY.
Senior Moderator
staff: senior moderator
#3 Old 28th Sep 2025 at 11:18 PM
Hiya @lizcandor !
I've been thinking about this myself but couldn't find anything helpful in the code so I don't even know where to start. And just found this thread now... I'm wondering if you've had any more luck looking into this at all?
Field Researcher
Original Poster
#4 Old 4th Oct 2025 at 12:08 AM Last edited by lizcandor : 4th Oct 2025 at 12:54 AM.
Oh man I'd forgotten I was trying to do this, I wanted to make sims build and demolish houses but got stuck here. I never got any further than this but I'm up for trying again, I'll find the IDs of those VPXYs from before at least! [Edit: They are Wall_Country_Cream, Wall_Foundation, Wall_paper01, Wall_Pool, and Wall_Wainscot_CrownDental]
Reaper
staff: moderator
#5 Old 4th Oct 2025 at 7:28 PM
I have found a method to do this, but your camera needs to be facing the area where you want to build the wall, as if you are creating the wall yourself with your mouse. In fact, that's how this method works. It just triggers mouse events so the game thinks you want to create a wall. It takes the position of your mouse on your screen and finds in-world coordinate it points to, and builds walls accordingly.

I also found wall cheats in Sims3Common.dll of TS3 CAW tool, called "CreateWalls, RemoveWalls, CreateObjectWall (its name was something like that)". But unfortunately, they do not work in the actual game.

This is a signature.
Senior Moderator
staff: senior moderator
#6 Old 4th Oct 2025 at 7:59 PM
This is amazing, still need to try it out. In this code function, where do parameters come from? They must be the 3d coordinates already at that point I think? I'm wondering about getting the coordinates from where an object is placed in game
Reaper
staff: moderator
#7 Old 4th Oct 2025 at 10:30 PM
Those parameters correspond to the coordinates on screen, so they are a pair of 2D coordinate values. We're basically triggering a click, drag, and release sequence to make a wall. When we click somewhere on the screen, the game finds the corresponding 3D point. So no, those parameters aren't 3D coordinates.
Example usage: buildWall 640 540 1280 540 <<< If there are connected grids nearby these points, it will build a wall.

Sims3.SimIFace.CameraController (i.e., RequestLerpToZoomAndRotation and RequestLerpToTarget methods or FocusOnLot method) can be used to change the camera view. However, when I tried to apply a bird's-eye view (that's -90 degrees, with the default limit being -85), my game froze.

There's also a method called Sims3.SimIFace.PickWallAtWindowPoint. I didn't try it myself, but it may help to confirm whether a wall exists in front of the game camera at a given point.

Honestly, it's a bit bothersome to do all these. I'd try that one-wall blueprint idea as suggested on Discord. I know they are also objects, whether they have scripts. Or as @lizcandor suggested, maybe creating an OBJK resource would work?

This is a signature.
Back to top