Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 15th May 2025 at 6:26 PM
Default About scripts and properties
Hello! After reading for a long time about different technical aspects of the game, I have learned variety of things, not always with accuracy. One of the concepts I have is the following: let's say a bed, it has a script like "Sims3.Gameplay.Objects.Beds.Mimics.BedDoubleTITropicsLocal", which is equivalent to 0xF96EFB5493315D54, which as instance number refers you in GameplayData to an _XML resource in which certain multipliers and properties of that object are contained. Cases like this, where each object in a category has its own script class, I think I understand.

But then... I find cases like with the stereos:

-StereoExpensiveModern (Fun 3) - Sims3.Gameplay.Objects.Electronics.StereoExpensive
-stereoHETech2x1 (Fun 3) - Sims3.Gameplay.Objects.Electronics.StereoExpensive
-stereoPhonographRecDarkLux (Fun 4) - Sims3.Gameplay.Objects.Electronics.StereoExpensive
-stereoTowerFuture (Fun 3) - Sims3.Gameplay.Objects.Electronics.StereoExpensive

These stereos share the same script in OBJK, but they 3 are "fun 3" while 1 is "fun 4"... How does the game know how to tell them apart if they have the same script.

And... I cannot even find the _XML for the StereoTowerGenConsole at all anyway. How does the game use this script?

-stereoTowerAntiqueRadio (Fun 4) - Sims3.Gameplay.Objects.Electronics.StereoTowerGenConsole
-stereoTowerGenConsole (Fun 3) - Sims3.Gameplay.Objects.Electronics.StereoTowerGenConsole
-stereoTowerUnivRecordplayer (Fun 4) - Sims3.Gameplay.Objects.Electronics.StereoTowerGenConsole
Forum Resident
#2 Old 16th May 2025 at 1:45 AM
Quote: Originally posted by alohomoraplease
These stereos share the same script in OBJK, but they 3 are "fun 3" while 1 is "fun 4"... How does the game know how to tell them apart if they have the same script.

And... I cannot even find the _XML for the StereoTowerGenConsole at all anyway. How does the game use this script?


Simply put, the catalog stats are completely arbitrary. These are set in the OBJD and affect nothing but what the tooltip says, not the truth of the object's function.

Scripts can use / be derived from each other- in the case of StereoTowerGenConsole, it's using StereoExpensive. None of the unique code added to that script is tunable, so it doesn't have it's own XML. Tuning is completely optional.

thecardinalsims - Cardinal has been taken by a fey mood!
Test Subject
Original Poster
#3 Old 16th May 2025 at 10:57 AM
Quote: Originally posted by CardinalSims
Simply put, the catalog stats are completely arbitrary. These are set in the OBJD and affect nothing but what the tooltip says, not the truth of the object's function.

Scripts can use / be derived from each other- in the case of StereoTowerGenConsole, it's using StereoExpensive. None of the unique code added to that script is tunable, so it doesn't have it's own XML. Tuning is completely optional.


Hello, thank you for your reply. It is very interesting. How do we know that GenConsole derives from Expensive and noot from Mediocre or Cheap?

About the catalogue, I did know that it is a bit imprecise (also I know that OBJD is merely informative in that sense, as in changing the Energy value there does not change anything apart from the catalogue entry). For example, with beds, there are beds that say in the catalogue same energy value and they actually use different multipliers one being so much better than the other. However I didn't perceive it as completely random as I saw, again with beds, that there was a correlation between the properties displayed in catalogue and the actual values of the multiplier in the _XMLs (more or less).
Forum Resident
#4 Old 17th May 2025 at 12:30 AM Last edited by CardinalSims : 17th May 2025 at 12:40 AM.
Quote: Originally posted by alohomoraplease
How do we know that GenConsole derives from Expensive and noot from Mediocre or Cheap?


By looking at the script directly, either by exporting the game libraries or using the very useful pre-prepared assemblies from NRaas (they're in the Sims3 > Compiler folder).

In a program like dnSpy, we can see the code for the StereoTowerGenConsole class is using StereoExpensive:

Follow the chain from the classes StereoExpensive itself uses and you'll get down to generic ones like GameObject. That way, the object can both have unique functions and generic ones.


The catalog isn't random, rather it's just manually input. It can be true, but it can also be false- someone at EA decided on what ratings to give each object and that means (for whatever reason) they could lie about objects that are identical.
Screenshots

thecardinalsims - Cardinal has been taken by a fey mood!
Test Subject
Original Poster
#5 Old 18th May 2025 at 6:34 PM
Quote: Originally posted by CardinalSims
By looking at the script directly, either by exporting the game libraries or using the very useful pre-prepared assemblies from NRaas (they're in the Sims3 > Compiler folder).

In a program like dnSpy, we can see the code for the StereoTowerGenConsole class is using StereoExpensive:

Follow the chain from the classes StereoExpensive itself uses and you'll get down to generic ones like GameObject. That way, the object can both have unique functions and generic ones.


The catalog isn't random, rather it's just manually input. It can be true, but it can also be false- someone at EA decided on what ratings to give each object and that means (for whatever reason) they could lie about objects that are identical.


I don't fully understand everything because it exceeds my level of knowledge, but everything you have said has actually been very helpful in teaching me a bit more. Thank you very much.
Back to top