Jump to content
Kel9509

Custom Queries for Custom Buildings

318 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
4 hours ago, nic49548 said:

E.g. flammability, it displays the value listed in the building exemplar rather than the current value based off of other multipliers like abandonment, summer or state of being watered

That is intentional, for lots that span multiple cells it would be ambiguous which cell should have its flammability value queried. Things like the land value and mayor rating numbers are not provided for the same reason.

5 hours ago, nic49548 said:

The "Age Degradation" value was dependent on two exemplar entries: Age degradation rate and hard failure threshold. It is displayed as a percentage, with two decimal places (E.g. 87.03%)

After a bit of digging through the Mac binary, I found that value is tracked through an internal occupant property with the id 0xc910b4cf. The format appears to be a single Float32 value in the range of 0.0-1.0. The "Age Degradation" tool tip displays it after multiplying the value by 100 and printing the formatted string with 2 decimal places, that type of floating point formatting can be done in Lua as some of @CorinaMarie's mods have done. I am also thinking of adding an age_degradation query variable that replicates the Maxis formatting, for buildings that lack the property it would return 0%.

  • Like 1

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
3 hours ago, Null 45 said:

0xc910b4cf

Here's that variable (rounded to 8 decimal places) the month before the power plant exploded:

imgW10-4362.jpg


Chance favors the prepared mind. ― Louis Pasteur  
Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

Are you new here? Check out the Introduction and Guide to Simtropolis.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
19 hours ago, Kel9509 said:

I guess a question is - is it really a problem that there is a bit of overlap on the Simgoober images?  I can understand the frustration of seeing the same image, but with a different IID.  It doesn't seem like it's actively harming anything though, unless you are certain that the image should've been replaced with a newer version.

The whole point of this operation was to reduce the size of the BSC Essentials, which started overblowing. I started sorting the unique UI files into the respective model packs where the model file can be found and only kept the generic repeating parts (background PNGs, wealth PNGs etc...) for the BSC Essentials. Unique UIs with completely unique background PNGs went into the model packs too, excpet if they were for only ONE plop lot, in which case they were kept within the LOT file. For example there are many unique UIs, that serve both growable and plop lots (like the Fish Tale Ale), this goes into the model pack (SG Models Restaurants). But the query of the Winifred Pickles School of Ettiquette was left with the single lot file that it was made for.

Simgoober had many unused UIs and unuse background PNGs (besides the many duplications), and I kept most of those unused ones in the BSC Essentials. I even updated some of those. He had multiple orange header PNGs (for landmarks and rewards); some were used more (0xeab5c100), some were not used at all. This header has the same colour shame as the education stuff or the health stuff, so I replaced all the other backgrounds (which used the orange colour) with this 0xeab5c100 ID. The difference was usually in size and how the logos were presented. 

You can keep that background for your override, just change the ID to 0xc35c5151 as the PNG with that ID remains part of the BSC Essentials. 

Quote

BSC 0xca200008 (X Landmark).txt
BSC 0xca200014 (X University).txt
BSC 0xca200023 (X Park1).txt
BSC 0xca200038 (X Purple Landmark).txt - These are from the PIM-X'd Essentials. Literally nothing is using these UIs currently. Only some RC buildings are using the relevant PIMX'd queries under the PIMX'd brand and I started using them in some cases, like the modding that I made for some of Barroco's uploads.

BSC 0xca530008 (CAS landmark).txt 
BSC 0xca530014 (CAS University).txt
BSC 0xca530023 (BSC Parks CAS Park1).txt - These are coming from the CAS Essentials. They all use the generic maxis background with Casper's custom logo. But most of these UIs are unused in general (apart from the park UI). 

BSC 0xedbcc99e (BSC University1).txt - This is actually the education UI for the SNM_Essentials aka the military academy or military school from the BSC's military stuff.

BSC 0x0f1ba3e7 (University).txt - This is actaully the UI from the BLS School - Miss Mel_s Academy_essentials (that's just the name I gave it, the UI were built into the LOT file). I extracted this when I went through on Barbyw's contents and fixed some stuff a few years ago. It uses the standard BLS background.

BSC 0x4de02006 (Dark Green Park1).txt - This one is part of the UIs that I extracted from the Deadwoods Forest Trails.

BSC 0x6fcac134 (BSC Park2).txt - This is the UI from the RT (BSC) Greek Bath Park. Now this will be the victim of a background UI ID change for sure. So it comes with the same UI PNG (colour and size, but different ID), than the generic BSC (from the GC_Essentials) green header UI, that was used for the BSC Residentials and other stuff. So you might go ahead and change the background ID to 0x7a600002, because the original PNG will be removed, but seeing that this is the same UI but with different ID, than the generic park UI from the BSC/GC_Essentials, probably I will replace the GUID in Lot too. These are the duplications which I want to get rid of completely. So instead of using this 0x6fcac134 UI for your override, use instead the 0x7a600009.** The former one was used for only ONE lot, the later one is the general BSC UI for parks (not for the BSC Parks as that one has its unique UI system).
** Ah I just see the generic one on your list too. 

BSC 0x7a60000a (Cruise Ship Port).txt - this is part of the

BSC 0x7a600009 (BSC Park1).txt - See explanation above

BSC 0xedbcd00b (BRT Blue Park2).txt

BSC 0x15addda9 (BSC Nut Squad Park1).txt - It used to be part of the NUTsEssentials. It is actually used quite a few of their park lots.

BSC 0x105afa4e (BSC White Park1).txt - This is originally coming from the BSC RT CdS Parks/Fuenta Minerva. In this case the background PNG (0x105afa4e ) will be replaced with the one from the BRT_Essentials (0x6ffea21e). Originally there were much more duplications with the same CDS background PNG, but in the past updates I already cleaned many of them up.

BSC 0x910faa45 (Church).txt - this used to be part of the BSC RT CdS Missions before I moved it into the BSC Essentials. It uses the 0x6ffea21e background PNG

BSC 0x2994f194 (Purple Park).txt - this is coming from the BSC X-Ports. I'm not sure what stuff used to use it as it doesn't even have the BSC Logo.

BSC 0xb5173999 (SimGoober Lighthouse).txt - see above.

BSC 0xbea00006 (Orange Park).txt
BSC 0xbea00007 (Orange Courthouse).txt
BSC 0xbea00008 (Orange TV Station).tx
BSC 0xbea00009 (Orange University).txt
BSC 0xbea00011 (BSC Main Library).txt - These are part of MBEAR's Essentials used mostly on his lots.

To-be-continued. I need to go to work, but after my shift I carry on describing all these UIs from your list and where they are coming from, so you might have a better picture about them and where they are used. 

- Tyberius06

  • Like 1

I'm responsible for the Heretic uploads a.k.a. Heretic Projects, you may find updates about my ongoing projects into my development thread over at SimCity 4 DevotionTyberius Lotting Experiments or here on Simtropolis into the Tyberius (Heretic Projects) Lotting and Modding Experiments OR Show Us What You're Working On thread.

Now I'm part of the NAM Team and the RTMT Team.
I'm also working on some preservation and reorganization projects the behalf of non-anymore-active-developers and with the permission of the Staffs both on STEX and LEX. Current projects: SimcityPolska Restoration and WMP (WorkingManProduction) Restoration.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Where do I put that variable id/internal occupant property "0xc910b4cf"? Like in the LUA file, the UI file or the building exemplar? I saw it in CorinaMarie's UI Image but no specifics on what variable it goes into. Would that example appear in a UI like "Age Degradation 99.85%"?

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
On 1/21/2026 at 10:13 PM, Ulisse Wolf said:

I'm not a fan of Maxis Goofy Stats because their values are too fictitious and not in line with the city's development. With the LUA code, I managed to obtain Box-Muller transformation with a standard deviation, allowing me to have fictitious values in line with the city's growth

I'm not sure if anyone already confirmed this, but it seems Goofy Stats are based off of the city's global mayor rating value.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

@Kel9509
Check my earlier post now, please. I edited with the missing descriptions and explanations.
 

  • Thanks 1

I'm responsible for the Heretic uploads a.k.a. Heretic Projects, you may find updates about my ongoing projects into my development thread over at SimCity 4 DevotionTyberius Lotting Experiments or here on Simtropolis into the Tyberius (Heretic Projects) Lotting and Modding Experiments OR Show Us What You're Working On thread.

Now I'm part of the NAM Team and the RTMT Team.
I'm also working on some preservation and reorganization projects the behalf of non-anymore-active-developers and with the permission of the Staffs both on STEX and LEX. Current projects: SimcityPolska Restoration and WMP (WorkingManProduction) Restoration.

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Thanks @Tyberius06.  That's really helpful.  So it seems as if it's not necessary to include in the project any overrides for the PIM-X Essentials or the X-Ports.  I already did the work on these, so I can hold off if they're not needed.  For others, like BLS School and the SNM Essentials, I suppose it wouldn't hurt to include them if anyone wants to override those.  

    I can also include overrides for CAS, Deadwoods Forest Trails, the general BSC Park (0x7a600009), the BSC Nut Squad, MBEAR's stuff, and the BSC RT CdS Missions/Parks using the new IID.

    I wasn't sure about the Cruise Ship or the BRT Blue park.  I think your explanation might've gotten cut off on those.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    42 minutes ago, Kel9509 said:

    I wasn't sure about the Cruise Ship or the BRT Blue park.  I think your explanation might've gotten cut off on those.

    Ah shi... yeah I see it now. The cruise ship UI is coming from the BSC/GC_Essentials, it worth to mention that the BSC team later used the custom queries from this GC_Essentials the ones that start with 0x7a60####, so it seems like kind of these are the default BSC queries, while many of the members had their own queries that were mostly developped around 2004-2006. To be fair I don't know where this Cruise Ship UI was used... maybe with some of Mattb's lots and maybe in the BSC Seaports, but there were not many cruise ship lots developped in the past 2 decades anyway.

    The BRT Blue Park used to be part of the BRT Essentials and was used with the park lots of the BSC Parks BRT - WFK Parks and some other parks under the BRT label. 

    1 hour ago, Kel9509 said:

    the BSC RT CdS Missions/Parks using the new IID.

    This one good as is, with its current ID and background PNG. The BSC 0x105afa4e (BSC White Park1) will still run on this IID, but the background PNG ID will be changed to 0x6ffea21e.

    And now I looked into some other stuff and I realized that some of the UI PNGs in the SimGoober part of the BSC Essentials that I deemed unused were actually used in the SG Brick Canals (though the same PNGs were stored there as well.)  Anyway since some of the canals were still not restored I needed to update the legacy pack anyway eventually, so some cleanup will happen there either way...

    • Like 1

    I'm responsible for the Heretic uploads a.k.a. Heretic Projects, you may find updates about my ongoing projects into my development thread over at SimCity 4 DevotionTyberius Lotting Experiments or here on Simtropolis into the Tyberius (Heretic Projects) Lotting and Modding Experiments OR Show Us What You're Working On thread.

    Now I'm part of the NAM Team and the RTMT Team.
    I'm also working on some preservation and reorganization projects the behalf of non-anymore-active-developers and with the permission of the Staffs both on STEX and LEX. Current projects: SimcityPolska Restoration and WMP (WorkingManProduction) Restoration.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    5 hours ago, nic49548 said:

    I'm not sure if anyone already confirmed this, but it seems Goofy Stats are based off of the city's global mayor rating value.

    They are.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    On 2/20/2026 at 11:43 AM, CorinaMarie said:

    Just grab any ploppable lot, such as the Big Ben Landmark, and edit its Query exemplar GUID from 0x2A56675C to whatever IID matches the UI you are working on. *;) 

    I wanted to circle back on this.  That of course is very true and correct.  But the reason I couldn't test some lots is that some were deliberately coded incorrectly.  By that, I mean that they looked like Parks and had all the Park coding in the query but it was extremely obvious that they were not correct parks because instead of "Monthly Cost" the query said "Monthly Income".  They were parks with Business Deal Income.  At the time I didn't know of any.  And after looking around, the only one I can see that's available for now is @catty-cb's Memorial Park series.  Oddly enough, that lot uses the default Park query so it still says "Monthly Maintenance Cost" although it uses the id=0x00001010 WinText reference.  So it appears like the Park costs $800 when you query it.  But it also clearly shows in the Budget as Business Deal Income.  I'm surprised it works with the original query.  

    Anyway, I decided that to address unique lots like that I made a Park with Monthly Income query.  It's not a replacement and for lots like the Memorial Park they'll need to be manually edited in order to work properly.  I'll probably be the only one who does something like that, but in case anyone else is interested I'll include it with the pack.

    @Tyberius06 thanks again.  I thought it might be Mattb325's cruise ship as well.  I'll check on that.  Hope to release this soon after final checks.  

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    3 hours ago, Kel9509 said:

    They were parks with Business Deal Income.  At the time I didn't know of any.  And after looking around, the only one I can see that's available for now is @catty-cb's Memorial Park series.  Oddly enough, that lot uses the default Park query so it still says "Monthly Maintenance Cost" although it uses the id=0x00001010 WinText reference.  So it appears like the Park costs $800 when you query it. 

    It's been so long since I created those, even I can't remember how I did it, but feel free to make any changes you like to them  :read:

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    10 hours ago, catty-cb said:

    It's been so long since I created those, even I can't remember how I did it, but feel free to make any changes you like to them  :read:

    Thinking about it overnight, I think I there might have been a tutorial over at sc4 devotion re queries ????

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 2/21/2026 at 11:26 AM, nic49548 said:

    Where do I put that variable id/internal occupant property "0xc910b4cf"?

    I wrote a tutorial for you. *;) 

     

    On 2/21/2026 at 11:26 AM, nic49548 said:

    Would that example appear in a UI like "Age Degradation 99.85%"?

    Yes. Even tho Maxis refers to it as Age, it really is the percent of degradation and at 100% the power plant is all used up.

    • Like 3

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Finally released version 1.0 of this mod, the Rewards-Parks-Landmark DLL Query Upgrade:

     

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 23/2/2026 at 5:18 AM, CorinaMarie said:

    at 100% the power plant is all used up.

    What do you mean by that? Does it mean the bulbs (on the Maxis vanilla query) are fully lit or the opposite?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    52 minutes ago, Propfam said:

    What do you mean by that? Does it mean the bulbs (on the Maxis vanilla query) are fully lit or the opposite?

    The opposite. The plant would (possibly) explode when the age degradation reached 100%, and I would expect the efficiency bulbs in the Maxis vanilla query to be unlit before that. See the image and description in this post.

    • Like 1
    • Yes 2

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    I forgot to add one more BSC query override which applies to the awesome BSC Gascooker UK Village Church St Bartholomews, so I'll probably update the RPL Query shortly with that extra one.

    And I'm thinking of doing a combo NYBT-SFBT override as well.  I've got basically every NYBT lot ever posted on the STEX and unfortunately despite the NYBT_Essentials redoing every query in their style, not many lots actually use them.  It's a real shame because they did such a nice job with the art.  After reviewing all my NYBT downloads from here, I saw that there are a few landmarks that use their NYBT Landmark query, but many use the default Maxis one.  For those that use the NYBT one, I came up with a version for it.  

    I had to extend their art a bit, combining their "new" logo with their "old" logo, to get it to fit across.  I think it came out ok.

    69a12c153543c_SimCity42_26_202611_56_01PM.jpg.b6bffb8203662f66f852e6d6c8b6b31d.jpg

    @Tyberius06 or anyone else who might know, are there NYBT files that aren't posted here on STEX (like to be released on SC4Evermore?).  Because I won't create overrides for their queries for rewards that don't exist.  I don't have many SFBT lots so I'm not sure if it's worth doing most of their reward queries as well.  

    • Like 3

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Automated Notice Message

    All posts after 1 March, 2026 @ 01:37 GMT were lost in the site crash.

    We've added this message thread divider in every topic across all forums for what were then active threads. (We decided active is if the most recent extant post (from the backup) was on or after 1 January, 2026.)

    This divider serves as notice that the conversation was interrupted. Answers and further discussion which used to be here have been lost. Keep this in mind when replying. Our hope is to rebuild what is missing.


    I am Lab Rat.

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections