Jump to content
Null 45

Custom Ordinance Exemplar Host DLL

13 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

A DLL Plugin for SimCity 4 that allows new ordinances to be defined in ordinance exemplars.

This DLL is a dependency for mods that add new custom ordinances into the game. The ordinance exemplars support a number of availability conditions and monthly income/expense properties that can be used to customize the ordinance behavior.

Download: https://community.simtropolis.com/files/file/36860-custom-ordinance-exemplar-host-dll/

Source Code: https://github.com/0xC0000054/sc4-custom-ordinance-host

Creating New Ordinances

A tutorial on creating new ordinances is located at: Tutorial for Creating New Ordinances

Example Ordinances

The examples directory contains several ordinances that can be used as-is or as a guide for creating your own ordinances. See the read-me in that directory for more information on those ordinances.

Ordinance Exemplars

Each ordinance exemplar must have a unique instance id, this is how SC4 will identify the ordinance. The ordinance exemplar must have an ExemplarType property with the value set to Ordinances (14).

Ordinance Exemplar Properties

The documentation is on the Ordinance Exemplar Properties page.

The exemplar properties are persisted in the save game, and the exemplar will be ignored once the city has been saved. Because of this, the ordinance tuning should be done in a new city or in an existing city without saving.

System Requirements

The plugin may work on Windows 7, but I do not have the ability to test that.

Installation

  1. Close SimCity 4.
  2. Copy SC4CustomOrdinanceHost.dll into the top-level of the Plugins folder in the SimCity 4 installation directory or Documents/SimCity 4 directory.
  3. Start SimCity 4.

Installing New Ordinances

The ordinance DAT files must be installed in Documents/SimCity 4/Plugins/140-ordinances (or a sub-folder).

Troubleshooting

The plugin should write a SC4CustomOrdinanceHost.log file in the same folder as the plugin.
The log contains status information for the most recent run of the plugin.

  If you would like to make voluntary contributions to support me in continuing to create more content for SimCity 4, I accept donations via PayPal: https://paypal.me/0xC0000054
 

Thanks to the few people who have donated to me.

  • Like 3

Share this post


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

So this is essentially a user version of what you used to create your DLL ordinance mods like the Humane Society Ordinance? Great work as always.


Formerly known as biff.

YOU CAN'T CUT BACK ON FUNDING! YOU WILL REGRET THIS!

The Comprehensive SimCity Music Collection V3.1 | SimCity 2000 Music ReTexture (not mine, I just think it's neat) | Uploader of the first SimCity 2000 file on the STEX

Share this post


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

    So this is essentially a user version of what you used to create your DLL ordinance mods like the Humane Society Ordinance?

    Yes, plus an extension of the system Maxis used. It took a bit of experimenting to get it to work because I am abusing the GZCOM framework in a way the Maxis engineers who designed it never intended.

    Technical Details

    Maxis designed GZCOM with the expectation that each class would uniquely identify itself using a a hard-coded class id, in the case of ordinances the class id is also expected to be the ordinance exemplar IID. For this plugin I scan the custom ordinance DAT files when SC4 asks the DLL for its class ids, and then hand the game the IID of each ordinance exemplar.

    The special install path is an optimization to limit the number of DAT plugins that get read twice to just custom ordinances.

    • Like 4

    Share this post


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

    Release version 1.0, with various code and documentation improvements.

    • Thanks 2

    Share this post


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

    So it doesn't work for me, either this file is an April Fool's joke or you should explain to stupid people how it works. 

    Original Comment:

    Also bei mir Funktioniert das nicht entweder ist diese Datei ein Aprilscherz oder man sollte für dumme Menschen erklären wie es klappt. 

    Share this post


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

    I posted a tutorial on creating new ordinances to GitHub.

    • Like 2

    Share this post


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

    Release version 1.0.1, which has the following changes:

    • Add a tutorial on creating new ordinances.
    • Silently ignore overrides of Maxis ordinances.
    • Various other bug fixes and improvements.
    • Like 3

    Share this post


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

    I have absolutely no clue what to do even with the tutorial pages included with the dll folder.😓

    Share this post


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

    Hi @Null 45. A question if I may?

    As is the case with reservation of texture IIDs (so publicly available items do not conflict), is there any list or reservation system for new ordinances?

    If I make one, how can I make sure that its IDs don't conflict with the rest, or the future ones?


    The "SimCity 4" vanilla Opera House is the most evil thing in existence. Avoid.

     

    My city journals! *:read:
    - SimCity: Tribalism - seven urbanization concepts clashed together
    Saving Magnasanti... - the most depressing city in history being revitalized

    Also worth checking...
    - "TMC's Drawing Board" - my city designs and plans.
     

    Share this post


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

    Hi @Null 45. A question if I may?

    As is the case with reservation of texture IIDs (so publicly available items do not conflict), is there any list or reservation system for new ordinances?

    If I make one, how can I make sure that its IDs don't conflict with the rest, or the future ones?

    You don't need an IID range for ordinances, as you can simply use the IID generation function in Reader and Ilive Reader. 

    Furthermore, the percentage of IID conflicts using the generator is extremely rare.

    • Like 1
    • Thanks 1

    Federal Republic of SiculiaFederal Republic of Sonora

       Ain Member  Wiki

    NAM Team - Co-developer of Pedestian Revolution Mod - Railway Department (Hybrid Railway | HRW Expert) - MTA Member - BAT Creator

    Ulisse Wolf YouTube Channel - Ulisse Wolf Mastodon Profile

    Share this post


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

    Yet another question if you don't mind. *;)

    I downloaded both the .dll and the 'New_properties.xml' for iLives 1.54. I noticed that some of the more intricate ordinance properties (say, Ordinance Monthly Income: XXX Population Factor) do not appear in the property dropdown list.

    Should these variables display the name when using iLives? They just show up as "Unknown" but they seem to be reflected in-game after I ran a test...

    Is this normal or should I adjust something?


    The "SimCity 4" vanilla Opera House is the most evil thing in existence. Avoid.

     

    My city journals! *:read:
    - SimCity: Tribalism - seven urbanization concepts clashed together
    Saving Magnasanti... - the most depressing city in history being revitalized

    Also worth checking...
    - "TMC's Drawing Board" - my city designs and plans.
     

    Share this post


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

    I downloaded both the .dll and the 'New_properties.xml' for iLives 1.54. I noticed that some of the more intricate ordinance properties (say, Ordinance Monthly Income: XXX Population Factor) do not appear in the property dropdown list.

    The properties should have been present for iLives 1.54, but I only ever tested the Reader 0.93 tropod_Properties.xml due to that fact that I avoid using Reader 1.x.x.

    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