Cities: Skylines

Cities: Skylines

30 ratings
Assets with Ploppable RICO, SBE, and SBTabs
By AJ3D
This a rough draft that explains a little more how Ploppable RICO, Sub-Buildings Enabler, and Sub-Buildings Tabs work. This guide is for those who are curious about the mods. More information will be added over the coming weeks.
   
Award
Favorite
Favorited
Unfavorite
Intro
This is an advanced guide that explains how Ploppable RICO, Sub-Buildings Enabler, and Sub-Buildings Tabs can be combined to create amazing assets. Rather than write a rigid step by step guide, I thought it would be best to offer some basic insight on how things work, so you can explore and experiment for yourself.
Definitions
Let’s first start with some simple definitions and key settings you’ll need to know:

BuildingInfo - The most important object for asset creators to understand. This contains all settings related to your building, including mesh data, placement style, AI, and ItemClass.

Asset Editor – This is essentially a tool that allows you to create BuildingInfo objects. You can add a mesh and change AI settings. Using ModTools, you can change settings like placement style and the shader. Using SnowCats mods, you can change the AI and itemclass.

Itemclass – Each BuildingInfo has an Itemclass. This determines how the game will treat your asset. It contains settings like building level, service, and sub service. ex. Residential High Level1, Industrial Farming.

Building AI – Each BuildingInfo contains an AI. This is the logic that handles the buildings behavior. ex. MonumentAI, SchoolAI, ResidentialBuildingAI.

Shader – This is a setting in BuildingInfo. You can change this setting to allow your mesh to deform to the terrain.

Placement Style – A setting in the BuildingInfo. Growables should have an “Automatic” placement style. Ploppables will be “Manual”, and dummy buildings will be “Procedural”. Any asset with Manual placement style gets added to the in game tool panels. .

.crp – The file format of a BuildingInfo object.

Asset – A folder that you upload and share to Steam. The folder initially contains a single .crp file, but any number of .crp or other files can be added, including .xml files. Any additional .crp files added to the asset will show up as separate buildings in the content manager.

.xml – A text file that contains settings for various mods.

Building Object – When you plop an asset, you create a new Building object. Each new Building object you plop gets its settings from a BuildingInfo object. The Building objects store data like production values, accumulation, position, and any other data unique to that plop. This object is saved with the game.

Other key concepts that are important to know:

-On scene load, all BuildingInfo objects are loaded fresh from the .crp files in the folders of subscribed assets. Any changes made to the BuildingInfo objects in game are not saved.

-In the in game tool panels, each button you see is a BuildingInfo object with “Manual” placement style, sorted by service.

-A Dummy Buiding is a BuildingInfo object with a Dummy AI and procedural placement style. It will not get drawn to any of the in game panels, and will not do anything once placed in the scene.
What Are Sub-Buildings?
An easy way to visualize this is a chain. (Fancy graphics coming soon).

Sub-Buildings are regular fully functioning Building objects. When you plop an asset that has sub-buildings, you create a chain of Building Objects. When you select any one of the sub-buildings, the game will bring up the info panel of the master building and shade the entire Building chain blue.

To the player, this creates the illusion that they are all the same building. You can adjust the position offset of the sub-buildings to create large footprints, as well as stack them on top of each other for mixed use buildings.
Ploppable RICO Mod
Ploppable RICO Steam Link

On scene load, the Ploppable RICO mod will read the bundled PloppableRICODefinition.xml file. On any specified BuildingInfo, it will:

-Change the AI to a custom ploppable AI
-Change the ItemClass
-Adjust placement mode, thus removing the button from the tool panels.
-Draw a new button in the RICO panel.

From the player’s point of view, the mod will appear to “convert” an asset to a RICO asset. However the underlying files are not touched, and disabling the RICO mod will allow the BuildingInfos to load with normal settings.
Sub-Buildings Enabler
Sub-Buildings Enabler Steam Link

Boformer has created an excellent Tutorial[gist.github.com] for his Sub-Buildings mod that shows how to create buildings with large footprints using dummy buildings.

Here I'll attempt to offer an expanded explanation on things, so you can better create complex mixed use and larger footprint buildings.

On scene load, this mod will read the bundled SubBuildingsDefintion.xml file. It will assign the sub buildings list to the master BuildingInfo.

Each Building and Sub-Building is a BuildingInfo. This is a key point to understand when making mixed use assets. Sub-Buildings Enabler simply chains the BuildingInfos together.
Sub-Buildings Tabs
Sub-Buildings Tabs Steam Link

If a selected building has any non-dummy sub buildings, this mod will draw a tabstrip above the info panels. Clicking the tabs will allow a player select the various sub building’s and view their info panels. This is vital for mixed use assets.
Creating Service Sub-Buildings
If your creating a complex mixed use asset, you only want your main building to be drawn to either the main game panels or the RICO panel. Make sure the BuildingInfos that your using as sub-buildings have "Procedural" placement style, so they are not drawn in the interface.

To create service buildings that are suitable for mixed use assets, start with a blank template, such as a park with no mesh.

Use this mod to assign the service AI to your blank lot:
Building AI Changer

Use this mod to assign the service Itemclass to your blank lot:
Building Itemclass Changer
Advanced Building Settings
To change advanced settings on your assets, you'll need to grab Mod Tools.

With this mod running in the asset editor, you can change the placement mode and shader.

To change the placement mode and style, open the Mod Tools scene explorer by hitting ctrl+e.
1. Scroll down and select and expand Tool Controller
2. Select Tool Controller
3. In the left column, scroll down and find Prefab. Select it to expand it. These are the various settings that define your building.


Once you've navigated to the prefab settings, scroll down further until you find Placement Mode and Style. You can change the settings by simply expanding the drag down menu. Once a new item has been selected, you can close mod tools and save your asset.


For some assets, like farms, you may want your mesh to deform to the terrain. You can also use this trick for things like industrial pipes and large fences that ring your lots. The shader is applied to the whole lot, so any elements you wish to remain un-deformed can be added in as a separate sub building.

In mod tools, hit F7 to bring up the debug console.


Copy Boformers Shader Switch[gist.github.com] script from your web browser into the entry field on the console. Hit "Run".


If the script executed sucessfuly, you should see this output.


The script will switch the shader between the normal and fence shader. If you need to change it back, you can run the script again by copying and pasting it again into the console. Close the console and save your asset to preserve the changes.



Putting All Three Together
There are three main catagories of assets you can create with these mods:

Small singe use RICO buildings - Ploppable RICO mod recomended, but not required. Asset will function normaly with out RICO mod.

Large single Use RICO buildings - Ploppable RICO mod recomended, but not required. Sub-Buildings Enabler required. Sub-Buildings Enabler only required to plop asset.

Small or large mixed use buildings - Sub-Buildings Enabler and Sub-Buildings Tabs required. Ploppable RICO mod recomended, but not required. Sub-Builidngs Tabs needed to select and view the various mixed use components.
3 Comments
panik attak 17 Jan, 2018 @ 8:25am 
very helpful. Thak you.
Beth2020 17 Feb, 2017 @ 7:54am 
Thanks AJ3D
:^)
I'm a "newbie" to modding, so am still terribly confused by all this, but not as confused as I was after reading boformer's tutorial for subbuildings. Maybe between the explanations of both of you, I'll eventually be able to get my four buildings into one asset.
Thanks again for getting me "one-step-closer" to creating my 4-building asset.
:^)
Macronomicus 16 Mar, 2016 @ 11:29pm 
oh my this is sweet! Mixed use!