Jump to content
Null 45

Query Tool UI Extensions DLL

60 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     
    19 minutes ago, Kel9509 said:

    It wasn't working so I guessed that the legacy command "#building_styles#" was merely augmented with "_lines" and it worked.

    Correct, I copied the command and failed to update styles to style. Fixed for the next version.

    20 minutes ago, Kel9509 said:

    However, the additional custom building styles no longer show!  Only the Maxis ones appear now.  

    Also, the Wall-to-Wall query doesn't work anymore either.  

    Something is definitely not working right in this version, unfortunately.

    It requires version 3.1.0 of the MoreBuildingStyle DLL as a dependency.

    Share this post


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

    Release version 1.8.1, which has the following changes:

    • Fixed a bug with the building_style_names variable.
    • Added an error message for the building_is_w2w variable.
    • Like 1

    Share this post


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

    It requires version 3.1.0 of the MoreBuildingStyle DLL as a dependency.

    Thanks!  I didn't notice you also uploaded a new version of that DLL.  Apologies for my mistake!

    Share this post


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

    Release version 1.9.0, which has the following changes:

    • Added a building_summary variable that displays the summary that the game shows in its hover tool tips. E.g: Low-Wealth Residential.
    • Fixed a potential crash.
    • Like 2

    Share this post


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

    Release version 2.0, which adds Shift + Click copying for some flora types.

    This only works for the flora types that are highlighted when hovering over them with the query tool.
    The other types appear to be static models that are not considered flora occupants by the game.

    • Like 6

    Share this post


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

    Release version 2.1.0, which adds advanced query tool tips for flora and props.

    The flora advanced query tool tip will provide the object's exemplar name, birth date, and last seeding date.
    The prop advanced query tool tip will provide the object's exemplar name.

    • Like 3
    • Thanks 1

    Share this post


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

    Added a few extensions the TerrainQuery command.

    It now shows the x, y, and z values without truncating to the first decimal place, and the cell moisture value is now provided as part of the standard query info.

    Added an alternate TerrainQuery mode that is accessed by holding the Alt key. It shows the humidity and ambient wind information, this data appears to be for the entire tile instead of varying per-cell.

    • Like 3

    Share this post


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

    Release version 2.3.0, which has the following changes:

    • Show the base texture id in the advanced network tool tip.
    • Added new occupant query variables for the jibs and travel jobs.
    • Added a Pollution mode to the TerrainQuery command.
      • This mode is activated by holding the Ctrl key when TerrainQuery is enabled.
    • Like 3

    Share this post


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

    Using release v2.3.0, the new variables "jobs_low_wealth" and "jobs_high_wealth" work fine. Also, "travel_jobs_low_wealth" and "travel_jobs_high_wealth" work fine (at least in my testing they both provided a value of "0" for Commercial buildings - probably because there's no internal routing of jobs.  I haven't tried it with an industrial lot yet).

    But "jobs_medium_wealth" and "travel_jobs_medium_wealth" do not work.  I thought it was a documentation error and tried "jobs_med_wealth" but that didn't work either.  Is there something I'm missing?

    EDIT: the medium categories still don't work, but I've tested low and high-wealth Travel Jobs on an industrial lot and they both work.  Also, a question: I've noticed that for industries there can be a difference between the Actual Jobs and Travel Jobs amounts, like a difference of 1.  Is that due to rounding?  Is there a reason they might not round the same way?  Just curious.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    34 minutes ago, Kel9509 said:

    But "jobs_medium_wealth" and "travel_jobs_medium_wealth" do not work.  I thought it was a documentation error and tried "jobs_med_wealth" but that didn't work either.  Is there something I'm missing?

    There was a typo in those variable names where they were defined in the code.

    36 minutes ago, Kel9509 said:

    Also, a question: I've noticed that for industries there can be a difference between the Actual Jobs and Travel Jobs amounts, like a difference of 1.  Is that due to rounding? 

    Yes. Depending on the value after the decimal place, it will round up or down.

    Share this post


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

    There was a typo in those variable names where they were defined in the code.

    I actually tried to look in the github code to see what the correct command would be, but I couldn't find it.  What's the right name?

    Share this post


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

    What's the right name?

    It was misspelled as jobs_mediim_wealth and travel_jobs_mediim_wealth, fixed for the next version.

    Share this post


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

    Release version 2.3.1, which fixes  a typo in the code that prevented jobs_medium_wealth and travel_jobs_medium_wealth from working.

    • Like 1

    Share this post


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

    Release version 2.3.2, which removes the dependency on the Extra Cheats DLL for the advanced flora, network, and prop queries.

    • Like 1

    Share this post


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

    Release version 2.3.3, which fixes a bug that prevented some queryable lots from being selected for copying.

    • Like 2

    Share this post


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

    Release version 2.4.0, which adds a water_building_source query dialog variable.

    • Like 3

    Share this post


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

    Release version 2.4.0, which adds a water_building_source query dialog variable.

    I'm still working on getting fully back into things and building a new PC, so I'm unable to test this right now.  But I saw this and wondered how it arose.  Is this a CAM thing?  Will the query display "yes" or "no" or will it provide another result?

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    5 hours ago, Kel9509 said:

    Is this a CAM thing?

    Yes.

    5 hours ago, Kel9509 said:

    Will the query display "yes" or "no" or will it provide another result?

    It displays Fresh Water, Salt Water or Aquifer depending on the value of the 0x48f23a7e property.

    Share this post


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

    Release version 2.5.0, which has the following changes:

    • Added a budget_purpose_type_cost: variable.
      • This variable takes the hexadecimal budget id as a parameter after the colon and returns the budget item cost.
      • It is intended as a workaround for the Maxis budget item cost query id not being able handle mixed income/expense properties.

    Additionally, a number of new interfaces and several bug fixes are now present in gzcom-dll as a result of porting this DLL to use it as a submodule.

    • Like 2

    Share this post


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

     Release version 2.6.0, which has the following changes:

    • Added a number of building query variables.
    • Added a Lua function to allow query UIs to read occupant properties.
    • The cell mayor rating is now included in the Extended Terrain Query's Pollution mode.
    • Like 4

    Share this post


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

    Release version 2.6.1, which fixes a typo that was causing the power_consumed and water_consumed variables to report 0.

    • Like 2

    Share this post


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

    Release version 2.6.2, which changes the effect query strings to make negative numbers easier to read.

    • Like 1

    Share this post


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

    Is it possible to add via LUA strings, values for UI that contain Police/Fire Station center/exterior strength, RCI Building Value, utility age degradation, school/hospital values or other variables in the game not already covered? I was looking at the LUA extension file but I was having difficulty trying to make the variables.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    6 hours ago, nic49548 said:

    Is it possible to add via LUA strings, values for UI that contain Police/Fire Station center/exterior strength, RCI Building Value, utility age degradation, school/hospital values or other variables in the game not already covered?

    I can add new values, but I would need a list of exemplar properties to add.

    6 hours ago, nic49548 said:

    was looking at the LUA extension file but I was having difficulty trying to make the variables.

    The Lua extension provides direct access to the exemplar properties of the queried building in whatever format the property uses, the expected formats of Maxis properties are documented in Ingred.ini. That feature was intended for accessing properties that I didn't provide, custom formatting of property data with Lua code, etc. But it is more complex to use.

    For example:

    #tostring(null45_query_ui_extensions.get_property_value(hex2dec('00000020')))#

    Would display the value of the Exemplar Name property if one is present, otherwise it would display nil.

    Share this post


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

    Okay, thank you. I did use your example, but now I'm trying to display a value by Rep. Like "Pollution at Center", I'm trying to display just one of the values, like Rep 3 only; Here is the variable I used: 

    #tostring(null45_query_ui_extensions.get_property_value(hex2dec('27812851')))#.

    I'm trying to only display rep 3, the Garbage Pollution.

    (I'm fully aware of the Pipe Separated values you programmed in the released version of the DLL, but I'm looking for examples on how to display different setups and individual values displayed in different Reps.)

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    2 hours ago, nic49548 said:

    Here is the variable I used

    You need to extract the value from that array, the easiest way to do that is with a Lua function that you call in your LTEXT file.

    The Lua function must have a unique name (usually this is done with a prefix or suffix), it also must have a package number higher than the Lua file that defines the  null45_query_ui_extensions.get_property_value function.

    I added a test script with a few examples of retrieving different building exemplar properties, see null45_query_ui_extensions_test.lua.

    • Like 1

    Share this post


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

    Release version 2.6.3, which has the following changes:

    • Added a larger test/example suite for the Lua code.
    • Made the null45_query_ui_extensions.get_property_value function easier to use by letting it read a hexadecimal string in addition to a number.

    The fact that null45_query_ui_extensions.get_property_value required the hexadecimal string to be converted to a number with hex2dec was easy to miss.
    Old code:

    local exemplar_name = null45_query_ui_extensions.get_property_value(hex2dec('00000020'))

    New Code:

    local exemplar_name = null45_query_ui_extensions.get_property_value('00000020')
    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 2/21/2026 at 10:10 PM, Null 45 said:

    The fact that null45_query_ui_extensions.get_property_value required the hexadecimal string to be converted to a number with hex2dec was easy to miss.

    I'm used to needing hex2dec since Maxis used it everywhere in their Lua code, but this'll be a nice addition. *:ohyes: 

    I'm glad your version 2.6.3 still supports the old method since I'd already gathered pics for a new tutorial using 2.6.2. (I have edited in a note to it so peeps'll know they can use either method.)

    Thanks so much for your continued updates to your DLLs. They are opening up so many possibilities when modding the game. *:golly: 

    • Like 1

    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:  
     
    1 hour ago, CorinaMarie said:

    I'm used to needing hex2dec since Maxis used it everywhere in their Lua code, but this'll be a nice addition. *:ohyes: 

    I had originally designed the DLL to require the use of hex2dec for the same reason, but I found that some people were forgetting to use it and the error was hard to spot due to hex strings looking correct for those APIs. It was easier to change the DLL to support that behavior than to make people rewrite existing code to use hex2dec. I had also never documented the need for hex2dec outside of the example/test code.

    1 hour ago, CorinaMarie said:

    I'm glad your version 2.6.3 still supports the old method since I'd already gathered pics for a new tutorial using 2.6.2. (I have edited in a note to it so peeps'll know they can use either method.)

    Sometimes using numbers is easier, e.g. writing 1 instead of '00000001'.

    • Like 2

    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