This DLL mod is intended as a dependency for other mods that add new building styles beyond the 4 that Maxis included, it does not add any building styles to the game by itself. Maxis programmed the Building Style Control UI to only recognize the check boxes of the 4 built-in styles, no matter how may check boxes are actually present. This mod patches the game's memory to remove that restriction. Build all styles at once The DLL fixes a game bug to make this feature work as Maxis intended. Adding More Building Styles into SC4 The building style IDs are assigned in the SimCity 4 Building Styles Index thread, you will need to use the Maxis/community styles or request your own public and/or private building style ID range in that thread. Modifying the Building Styles UI The easiest way to get started is to download the Building Style UI template, but you can also create your own Building Style Control override plugin. Building Style UI Template A UI template is available here, which supports all of the new controls the DLL adds.
The UI Template can be configured using either BuildingStyles.ini or the Building Style exemplars.
Once you have configured your styles in BuildingStyles.ini or the style exemplars, see the section below on assigning buildings to custom styles. Creating a Custom Building Style UI Create a patch that overrides the default Building Style Control UI, TGI 0x00000000,0x96a006b0,0x6bc61f19 in SimCity_1.dat. Edit the UI to add the style check boxes, and optionally the new check boxes and radio buttons that the DLL supports. The check box or style ID (e.g. 0x2003) identifies the building style to the game. See the section below on assigning buildings to custom styles. Adding Buildings to Custom Building Styles This process is performed with ilive's Reader or PIMX. The building's intended styles should be added to the building exemplar using the Building Styles property (property id 0xAA1DD400). The building will only grow when one or more of the custom or Maxis styles in that property is selected in the game's UI. The DLL will ignore the building styles in the Occupant Groups property (property id 0xAA1DD396) when the Building Styles property is present. For compatibility with players who are not using the DLL, the Maxis styles in the Occupant Groups property should be left alone. If you are creating a new building, add the Building Styles property for users with the DLL and set the Occupant Groups property to one or more of the 4 Maxis styles for users without the DLL. For Wall-to-Wall (W2W) buildings, add the Building Is Wall-to-Wall property (property id 0xAA1DD401) to the building's exemplar with the value set to true. If the Building Is Wall-to-Wall property is not present or the value is set to false, the building will be treated as non-W2W. See the Building Styles Exemplar Property (0xAA1DD400) and Building Is Wall-to-Wall Exemplar Property (0xAA1DD401) sections for more details. New Building Exemplar Properties Building Styles Exemplar Property (0xAA1DD400) This property allows the building styles that are active when the DLL is installed to be specified separately from the Maxis building styles in the Occupant Groups property (0xAA1DD396). Residential and Commercial Buildings The Building Styles property is optional for custom building style support in residential and commercial buildings. When the property is present, the building will use custom and Maxis styles specified in the property and ignore the styles in the Occupant Groups property (0xAA1DD396).
When the property is not present, the building will use the custom and Maxis styles specified in the Occupant Groups property (0xAA1DD396). Industrial Buildings The Building Styles property is mandatory for custom building style support in industrial buildings. When the property is present, the building will use custom styles specified in the property.
When the property is not present, the building will be treated as compatible with all styles. Building Is Wall-to-Wall Exemplar Property (0xAA1DD401) This is a Boolean property, a value of true indicates that the building is W2W. If the value is false or the property is not present, the building will not be considered W2W. This is the preferred method for identifying W2W buildings that do not already have one of the W2W occupant groups. Building Style Check Box Tool Tips The individual building styles can have a tool tip that describes the style when the user hovers over that check box. When defining styles in a Building Style exemplar, the tool tip can be set with the Building Style Exemplar: ToolTip Key property. For styles that are defined in BuildingStyles.ini, the tool tips must use the LTEXT group id 0x3EE5B610 with the style id as the LTEXT instance id. The group id supports the standard language offset scheme. The style id is used as the LTEXT instance id. For example, the 0x2004 building style in would use the following TGI in German: 0x2026960B, 0x3EE5B614, 0x00002004. Tool tips can optionally have a title in addition to a body, this is done by placing both on a single line with a pipe separator. For example: ToolTip Title|Tool tip body
Note that how the game displays tool tips with both a title and body will depend on the user's game settings. If the user has unchecked the expanded tooltips check box in the play options dialog, the game will display the tool tip title (if present) or the body, but not both. Building Style Exemplars These exemplars provide a way for building style mods to define the style check boxes without requiring the user to edit BuildingStyles.ini. See the Building Style Exemplars page for more information. Cheat Codes The DLL provides the following cheat codes: ActiveStyle shows an in-game message box with the ID of the currently active style when Change building style every N years is selected. When Build all styles at once is selected, using this cheat will display a message saying that mode is active. DebugActiveStyles writes the IDs of all the active/checked styles to the plugin's log file. BuildingStyles INI File This file allows styles to be defined without editing the Building Style Control UI file. When the check box button ids for the Building Style Control are in the range of 0-127, these ids can be mapped to a specific style and style name in BuildingStyles.ini. The style entries are placed under a BuildingStyles section and use the following format: <UI button id> = <style id>,<style text format>[,<style name>] <UI button id> is a style check box id in the range of 0-127. <style id> is the building style id assigned in the Building Style Index, or the text Show (case-insensitive) to display a disabled placeholder check box. <style text format> is one of the following values: N (normal text) or B (bold text). <style name> is optional, when present it uses one of the following formats: <name> or CaptionRes:<LTEXT group id>,<LTEXT instance id>. If <style name> is not present, a default name will be used. Examples: 0 = 0x2005,B,Mediterranean & Tropical 1 = 0x2006,N,CaptionRes:0x6a231eaa,0x6bbbd875 2 = Show,N,Placeholder Check Box 3 = Show,B SC4MoreBuildingStyles INI File This file contains settings that control whether the growable debug logging code will write to the plugin's log file. It is recommended that you only enable these options for experimentation. They will slow down your game and quickly produce a large log file. As an example from one of my tests, a 22 second run with the BuildingStyleSelection and LotStyleSelection options enabled produced a ~2 MB log file with ~15,500 lines. Lua Functions The DLL provides a number of building style related functions for use by Lua scripts. See building_style.lua for a list of the provided functions, and building_style_tests.lua for examples of their use. Download: https://community.simtropolis.com/files/file/36112-allow-more-building-styles-dll-plugin/ Source Code: https://github.com/0xC0000054/sc4-more-building-styles System Requirements SimCity 4 version 641 Windows 10 or later Microsoft Visual C++ 2022 x86 Redistribute The plugin may work on Windows 7, but I do not have the ability to test that. Installation Close SimCity 4. Copy SC4MoreBuildingStyles.dll, SC4MoreBuildingStyles.ini and BuildingStyles.ini into the top-level of the Plugins folder in the SimCity 4 installation directory or Documents/SimCity 4 directory. Start SimCity 4. Troubleshooting The plugin should write a SC4MoreBuildingStyles.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.