Jump to content

Regional Supply/Demand DLL  1.0.0

   (0 Reviews)

1 Screenshot

About This File

Adds a basic supply/demand system in the form of a region-wide resource pool.

This mod differs from the BSC Daeley Regional Tracking Mod in that it works independently of the city names. It also lacks the region-wide building tracking features of that mod.

The 'resources' consist of a Uint32 resource id and a Sint64 quantity. The resource ids should be random to prevent conflicts between different mods that use this DLL as a dependency. Naming the resources is left up to the mod authors that use this DLL as a dependency.

Building Exemplar Properties

The DLL adds two new building exemplar properties that allow resources to be added or removed by plopping a building. Both values use paired Uint32 items, consisting of a resource id and a quantity.

Property Name                         Property ID     Description
Regional Supply Consumed 0x16F4C223 The resources the building consumes from the regional supply.
Regional Supply Produced 0x16F4C224 The resources the building adds to the regional supply.

Lua Functions

The DLL provides a regional_supply table with the following functions for use by Lua code.

Function Name                Description
add_to_demand Adds to the existing demand for a resource.
remove_from_demand Subtracts from the existing demand of a resource.
add_to_supply Adds to the existing supply of a resource.
remove_from_supply Subtracts from the existing supply of a resource.
get_resource_quantity Gets the current quantity of a resource.
 
System Requirements
  • Windows 10 or later

The plugin may work on Windows 7 or later with the Microsoft Visual C++ 2022 x86 Redistribute installed, but I do not have the ability to test that.

Installation

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

Troubleshooting

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

Source Code and Support

Plugin thread: https://community.simtropolis.com/forums/topic/763764-regional-supplydemand-dll/

The plugin's source code and issue tracker are located on GitHub: https://github.com/0xC0000054/sc4-regional-supply-demand

  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 11
  • Thanks 1



User Feedback

Create an account or Sign In to leave a review

You need to be a member in order to leave a review

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

There are no reviews to display.

×

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