A DLL Plugin for SimCity 4 that adds a city lottery to the game.
The ordinance provides a fixed monthly income, plus additional income based on the residential wealth group populations.
The plugin can be downloaded from the Releases tab: https://github.com/0xC0000054/sc4-city-lottery-ordinance/releases
- 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.
- Close SimCity 4.
- Copy
SC4CityLotteryOrdinance.dll
andSC4CityLotteryOrdinance.ini
into the Plugins folder in the SimCity 4 installation directory. - Copy
CityLotteryOrdinanceText_English.dat
into your SimCity 4 Plugins folder. - Configure the plugin settings, see the
Configuring the plugin
section.
-
Open
SC4CityLotteryOrdinance.ini
in a text editor (e.g. Notepad).
Note that depending on the permissions of your SimCity 4 installation directory you may need to start the text editor with administrator permissions to be able to save the file. -
Adjust the settings in the
[CityLotteryOrdinance]
section to your preferences. -
Save the file and start the game.
MonthlyConstantIncome
is the base monthly income provided by the ordinance, defaults to §500.
The following values represent the factors (multipliers) that control how much each wealth group contributes to the city lottery's monthly income based on the group's population. A value of 0.0 excludes the specified wealth group from the city lottery. For example, if the city's R§ population is 1000 and the R$ income factor is 0.05 the R$ group would contribute an additional §50 to the monthly income total.
R$IncomeFactor
income factor for the R§ population, defaults to 0.05.
R$$IncomeFactor
income factor for the R§§ population, defaults to 0.03.
R$$$IncomeFactor
income factor for the R§§§ population, defaults to 0.01.
The following options control the effects that the ordinance has on crime, Cs§ demand and school EQ.
CrimeEffectMultiplier
the effect that the ordinance has on global city crime. Defaults to 1.10, a +10% increase.
The value uses a range of [0.01, 2.0] inclusive, a value of 1.0 has no effect. Values below 1.0 reduce crime, and values above 1.0 increase crime.
Cs$DemandEffect
the effect that the ordinance has on Cs§ demand. Defaults to 1.01, a +1% increase.
The value uses a range of [0.01, 2.0] inclusive, a value of 1.0 has no effect. Values below 1.0 reduce Cs§ demand, and values above 1.0 increase Cs§ demand.
SchoolEQBoostEffect
the effect that the ordinance has on the global EQ level. Defaults to 102, a +2% boost in EQ.
The value uses a range of [0, 200] inclusive, a value of 100 has no effect. Values below 100 reduce school EQ, and values above 100 increase school EQ.
The plugin should write a SC4CityLotteryOrdinance.log
file in the same folder as the plugin.
The log contains status information for the most recent run of the plugin.
This project is licensed under the terms of the MIT License.
See LICENSE.txt for more information.
gzcom-dll Located in the vendor folder, MIT License.
Windows Implementation Library MIT License
Boost.PropertyTree Boost Software License, Version 1.0.
- Visual Studio 2022
- Open the solution in the
src
folder - Update the post build events to copy the build output to you SimCity 4 application plugins folder.
- Build the solution
Visual Studio can be configured to launch SimCity 4 on the Debugging page of the project properties.
I configured the debugger to launch the game in a window with the following command line:
-intro:off -CPUcount:1 -w -CustomResolution:enabled -r1920x1080x32
You may need to adjust the resolution for your screen.