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 28th Dec 2010 at 3:42 PM
Default Idea to create stair landings without CFE - need help from experienced modders
I had an idea to create an architectural block that was 4, 8, and 12 clicks high that stairs would interact with, but would not trigger a new floor elevation. Low and behold, EA already made such an object: the platform! Except, in the dark and twisted path that EA programmers minds work, they only made it one click high and non-stackable. Otherwise, they work perfectly, as you can build a 1-step stairs up to them, or a 5-step stairs if it is on a foundation. They do not trigger a new floor, so no weird slanty walls with weird slanty textures. Railings can even be placed on them and walls merely build around them. The only bugs I have seen with them when used with stairs is that the stair walls don't build when the stairs is attached to a platform, and that the platform must be under the full length of the stairs.

I am hacking and slashing my way through the game resources, trying to find a way to make a copy of the platforms, only at different heights, but I am not exactly a good modder. Has anyone ever successfully modded the basic build commands like walls or foundations?

Why, WHY, EA has not thought of this baffles me, as it would allow really awesome new building possibilities, and all the coding is already there. Time to give them a swift kick to the noots.
Screenshots
Advertisement
Alchemist
#2 Old 29th Dec 2010 at 12:37 AM
Baffles you?...it's because it's EA of course
Test Subject
Original Poster
#3 Old 31st Dec 2010 at 3:04 PM
Well, I had some minor success, but nothing that is profoundly helpful. I opened up the CWST files, which are the wall definition files, in Fullbuild0 and Deltabuild0 and figured out which Unknown values control behavior. The chart on file types in the Advanced Coding Section was very helpful for defining the flags. However, nothing in the wall definitions directly affects floor height. Technically speaking, things like foundation, deck, and platform walls cannot even be drawn by the user, but are instead automatically drawn by the tool. It is the tool that draws the floor level of the given structure as well. There must be a table somewhere where these tools pull actual height data from, but I have not yet been able to find it. Reflector showed a class in the DLLs called SurfaceHeight, with entries such as Floor = 0, CoffeeTable = 1, Table = 2, Counter = 3, SimInventory = 4, and Wall = 5, but these looks like flags to me, and not actually heights. From other coding, the width of the grid squares seem to be 1 unit in size, and the height of a foundation wall looks to be about .8 (just eyeballing it, can't find any defined values, but one click looks like .2 units). So now it is time for me to explore the tangled mess of a jungle that is the Sims 3 XML files.

On a side note, that minor success mentioned earlier... I found out how to make deck walls re-texturable. In the CWST file, Unknown9 is the flag for Wall Style. A value of 4 is standard for deck, which gives it a thin wall and textures it from the top down. A value of 7 is standard for a pool wall, which is also thin, but can be re-textured, and is textured from the bottom up. The direction of texture denotes whether you will see base or crown molding on short walls. Personally, if/when I ever get a stair landing working, I would rather it get textured from the floor up, so the texture will match the walls seemlessly. Incidentally, platform walls texture the correct way, and to reiterate my frustration, platforms would make perfect landings, provided there height could be adjusted to something useful.

Finally, all of my testing has been done using default replacements for platforms, decks, and foundations. I am unsure how to (if even possible) to make new foundation tools. Of course there are CFND that can't be readily read by s3pe, and several files labeled "PlatformHelper" with tags such as _RIG, FTPT, OBJD, OBJK, RSLT which also bear exploring. Also, all of the wall definitions are located in Deltabuild0, but some of the more basic ones, like normal, foundation, and deck are also located in Fullbuild0. Some of the variable flags are slightly different, and it looks like Deltabuild0 is more up-to-date.

Now if you will excuse me for a few moments, I seem to have gotten skull and forehead fragments on my keyboard...
One horse disagreer of the Apocalypse
#4 Old 31st Dec 2010 at 3:14 PM
I could never find how to alter stage or foundation heights even in Sims 2 days. I did however make some architectural landings (for sims 2) which woulod probably have addressed this need you have identified. They relied on stairs not redrawing when the floor they were attached to was deleted or moved. So you used CFE to place the stairs, then delete the temp floors and straighten the walls. Then place one of these architectural pieces as landings. Each one was flagged as "acts as floor" - a setting not yet identified for sims3. Then the sim was able to use the stairs as if there was a floor there, while allowing the walls to be straight and non-CFE'd

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
#5 Old 31st Dec 2010 at 8:05 PM
It's quite odd as well that in the Sims 2, the stages were the same height as a foundation, but the Sims 3 ones are only one step high, so not much use for stair landings.

[URL=
Test Subject
Original Poster
#6 Old 1st Jan 2011 at 2:18 PM
I think I found it! Using Reflector, Sims3.SimsIFace.World has a const value labeled kplatformheight and it equal .1875f! That is the height value of a single step. I am so happy, yet so sad. How does one go about changing a constant value in a core script?
One horse disagreer of the Apocalypse
#7 Old 1st Jan 2011 at 2:29 PM
Probably only by making a core mod... what might be more useful is seeing if new platform classes can be made that have their own height coded. The problem with simply overriding that default is that platforms have portal code defined on them that get sims on and off the platform. I assume that would be wrecked if platforms were suddenly all higher

I didn't get that back when I searched "platform" in reflector (or else I missed it), so well done!

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
Original Poster
#8 Old 1st Jan 2011 at 4:03 PM Last edited by simoro : 1st Jan 2011 at 4:41 PM. Reason: Spastic train-of-thought new info
I only found it because you have to click on the Search Member button on the upper right. The default is Search Type, and that won't find it for some reason. Irritating, because I would have found the variable weeks ago otherwise. One issue I am having trouble with is the fact that NOTHING seems to ever actually call the variable, which is irritating. Guess I better check to see if I am using an old .dll.

So, I get to delve fully into that which is Class construction and Quasi-Core Modding. How fun, I haven't had to reformat my computer in awhile anyway.

The last time I followed a tutorial that dealt with creating scripts, they failed miserably. I was told that all custom classes have to use a Sims 3 namespace, or something like that. I saw the code you listed on the IngeToilet; is that a good current format for the namespace/class definition?
Instructor
#9 Old 1st Jan 2011 at 5:35 PM
Simoro,
I would suggest that you use a namespace like this:
Code:
namespace Sims3.simoro;
{
    public class MyObject
    {
...


Where you change MyObject to the name of what ever you are working on. This will generally work quite well and because it uses your modding name in the namespace, it won't conflict with other peoples mods...

codename: granthes -- Developer of Sims3/4 utilities
Now working on modding tools for the Sims 4 CAS Demo
One horse disagreer of the Apocalypse
#10 Old 1st Jan 2011 at 5:45 PM
Yes, my toilet wasn't a good example of a namespace as I started too deep.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
Original Poster
#11 Old 1st Jan 2011 at 5:59 PM
Ah, it just needs to start with Sims3, thanks that will be helpful. Unlike EA's programing. I pulled all of the core .dll files from the packages to make sure I wasn't using an outdated copy, but no help. The variable kPlatformHeight is defined, but no code in any of the other scripts actually ever use it.
One horse disagreer of the Apocalypse
#12 Old 1st Jan 2011 at 6:01 PM
That was the impression I got too... but I was kinda hoping I was wrong. I wonder if there is a mesh file and stuff for it anywhere? The code for getting onto the platform seems to refer to slots.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
Original Poster
#13 Old 1st Jan 2011 at 6:27 PM
Yes, I found an entire collection of resources for platforms in Deltabuild0. Here are the ones I found:

platform.CFND
platform.CWST
platformhelper.OBJK
platformhelper.OBJD
platformhelper.FTPT
platformhelper.RSLT
platformhelper._RIG
platformhelper_lightingdata.LITE

The following nameless files are the model files referenced by the platformhelper ones:

MODL 0x0000000000CAC283
VPXY 0x0000000000CAC283
MLOD 0x0000000000CAC283

The model file, when opened up in Milkshape is just a cube (not flat like the platform, but a perfect cube) with each dimension being 1.0001026, same as the dimensions of the bounding box in the VPXY. I may have imported it wrong, but using Wes Howes' Object Tools seemed pretty straight forward enough.

Using the reference tables in the advanced modding section, I have identified many of the unknown variables in the CWST file, and you can change some of the behaviors of the walls in a few interesting ways, but none of them affect their height or construction. I even copied all of the values from normal walls and decks into it, and it didn't really make a difference except how the textures apply, and a few lighting things.
One horse disagreer of the Apocalypse
#14 Old 1st Jan 2011 at 7:16 PM
Excellent finds! I wonder if there is anything linking the CFND to the platformhelper resources, then we can make an alternative set and reference them from the new platform.

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
Original Poster
#15 Old 1st Jan 2011 at 7:27 PM Last edited by simoro : 1st Jan 2011 at 7:34 PM. Reason: Oops, only using the last 'stable' version of s3ep...
Is there a way to look at the CFND types? All I am able to do is look at it in the Hex Editor in S3PE, and then it is just gibberish for the most part. I noticed that the CFND type variables are defined in the Advance Coding section, but I do not know how to view them in that format.

N.M.
I updated to the 'bleeding edge' highly untested, could melt my computer version of s3ep. I can read the CFND now.
One horse disagreer of the Apocalypse
#16 Old 1st Jan 2011 at 7:38 PM
Good :D

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Test Subject
Original Poster
#17 Old 1st Jan 2011 at 9:06 PM
I haven't yet had luck with finding a link between the CFND and the platformHelpers, but I did find a couple of references in reflector to the kplatformheight... sort of. I did a search for .1875, and got a couple of hits. Both of them call an IsOnPlatform() function and if so, they add '.1875' instead of adding 'kplatformheight'. The noodle heads at EA must have gotten lazy. Makes me wonder if even changing all of those would even do anything other than return bogus position data. The actual height of the platforms might still be in some model data somewhere.
Test Subject
#18 Old 2nd Jan 2011 at 8:19 PM
I decided today to search out how to start modding, because dammit, those platforms are truly useless, but having read your thread, I bow to the inevitable and will wait for you to succeed! I couldn't make head nor tail of anything you said... which would be why I've never modded anything for any Sims anywhere.

I truly hope you can find an answer, because I have lots of house plans I want to build, all of which need landings at either 4, 8 or 12, and I am so frustrated by EA's sheer incompetence that I could scream!

Good luck! and if you want a tester, I have an un-modded S3 with all EP's and SP's just waiting on your platforms!
Test Subject
Original Poster
#19 Old 3rd Jan 2011 at 3:48 AM
I tried to make a core mod that basically just replaces all of Sims3.SimIFace.World, with a change to the kplatformheight variable, just to see if that would even change anything. Seems you can't make the .dll in Visual Studio because .World has a bunch of encrypted private functions that cannot be read, and are needed by the compiler. Something else that has been bugging me is that the build commands that control the construction of the house objects is almost non-existent. There is a 'platform' class in the .dll, but as far as walls, foundations, decks, and the like, there are not. Equally absent are any functions that seem to control placement of any of these. I wonder if the key functionality for this stuff is in those encrypted functions (a bunch are in Sims3.SimIFace.World, such as 'sOnObjectPlacedInLotEventHandler'). They have public functions with similar names that call the private functions, which allow modders to use the functions, just not edit them. I cannot be certain, but I believe the droids we are looking for might be in there. After all, EA knew that standard objects had to be left open for even official mods, but they never intended for the really deep stuff like the architectural side of things to be modded.

And don't worry about not understanding any of this, Anghara. I certainly don't. All I do is use the tools that Inge Jones, Wes Howe, Rothn, and a hand full of others created and poke around until something bites me. (^_^) You will find no (working) .package files that start with 'simoro' at this time. But I do want stair landings, as I am tired of having to make a six tile long room just to have a second floor. Especially since by the time EA gets around to making them, they will probably want 6000 simpoints for them or something.
Test Subject
Original Poster
#20 Old 3rd Jan 2011 at 5:51 PM
Accidents do happen I suppose. Don't know if anyone was able to do this yet, but I was successfully able to make a clone of the platform (see picture). I did NOT retexture either platform, the blue tiles and wooden puzzle surface are the textures I assigned in the package. The link between the PlatformHelper files and the Platform files are simply the catalog name.

A couple of bugs appeared though. A staircase was unable to find an attachment to the custom platform, but still attached to the original just fine (also in picture). Also, the eyedropper tool could not grab the wall tile texture off of the custom platform. It was however retexturable. Finally, the name and description of the clone still reads like the original, instead of the quips I put in from s3oc. Most if not all of these bugs are likely simple things that I missed, and other than the stairs thing, pretty minor.

Still haven't cracked the height thing yet, but this development will hopefully help. The .package file is also attached for your amusement and chicanery.
Screenshots
Attached files:
File Type: zip  Simoro_Platform.zip (5.5 KB, 28 downloads) - View custom content
Instructor
#21 Old 3rd Jan 2011 at 6:04 PM
Very cool, simoro. I'll d/l and take a look.

We might be able to create a custom script class that attaches to the file and re-enables those features.

codename: granthes -- Developer of Sims3/4 utilities
Now working on modding tools for the Sims 4 CAS Demo
Lab Assistant
#22 Old 4th Jan 2011 at 11:47 AM
I'm following this thread since the beginning and I'm so thrilled. Go for it, you guys! It would be heaven to have these moded platforms! Sounds so promising what you've found out already!
Test Subject
Original Poster
#23 Old 4th Jan 2011 at 5:34 PM
Since there is a platform class, but not a foundation or deck class, I did a little exploring. All the platform class does is provide scripts to handle animation for stepping on and off the platform. (Foundations and decks don't have this, as you have to use stairs to get on to those.) I removed the script from the custom platform, and the sim will still walk on top of the platform, but when getting on and off, he just kinda of glides up and down without breaking stride. There are some flags that can be set in the CWST file to block locomotion, so that stairs will be required to enter the platform. Ultimately, this will probably have to be done, as you don't want those crazy, crazy sims casually strolling up a four foot ledge. This is of course a moot point, as height/elevation/floorLevel data for platforms, decks, foundations, walls, and everything else seems to be non-existent. Something, SOMEWHERE, has to be a reference for the size of these buggers.

While playing around with the custom platforms, I also noticed some additional odd behavior not discovered earlier. If a platform is already built, it will not let walls be built around the parameter. Also, when deleting the custom platforms, they are leaving their walls behind. I am pretty sure that all of these problems are linked with the fact that the platform walls cannot be eyedropped and stairs won't attach to them. Something is wrong with how the walls for the custom platforms are being built. I have triple checked the custom files, and they are identical to the originals in everything but the appropriate references, so I almost wonder if there is still another file in Deltabuild0 that has data required to set these things up.

I did figure out the name/description thing. Never learned how STBL and language files worked until now.


As every goat knows, if you ram into the chicken coop long enough, corn will eventually fall out.
Scholar
#24 Old 7th Jan 2011 at 3:17 AM
This is awesome. I hope you can figure it out. And if you do.. ill totally beta test this stuff for you.
Test Subject
Original Poster
#25 Old 8th Jan 2011 at 2:50 AM
Oro, I had a small success, I did! Kind of. Maybe. Figured out why the modded platform was behaving differently from the normal one anyway. Seems the game disliked the custom CWST file, so now the modded platform uses the same wall as the normal one. It means no custom default texture, but big whoop, as it can be re-textured. Now stairs attach to the custom platform, and sims can walk up on it just like the regular ones. I have absolutely no idea why the custom CWST messes things up. The custom CWST is still in the package file, but nothing references it.

Unfortunately, there is still no sign of the coding that actually dictates the height of platforms, foundations, or walls. The only file in the set that cannot be easily read is the _RIG file, so it is possible that is controlling it. The bounding box in the VPXY is -.5, -.5, -.5; .5, .5, .5 which makes the total bounding box a 1 unit cube (the width of a full build tile when editing a lot in sims3). The bounding box for all of the construction pieces are something like that.

I am going to keep looking, I am.
Attached files:
File Type: zip  Simoro_Platform.zip (5.3 KB, 36 downloads) - View custom content
Page 1 of 2
Back to top