Asset editor

Sub-meshes

Scripting API

Asset Data API

Cinematic Camera API

Menu Filtering

Each of the in-game and editor menus that has filters available will have the filters as small buttons next to the menu. If a menu has multiple tabs, the filters are determined per tab.

By clicking (primary mouse button) the filter button the player activates the filter and the menu will show only items that fulfill the conditions specified by the filter.

When multiple filters are chosen, all of the filters' conditions must be met, thus narrowing down the range of available menu objects.

The filters can be deactivated by clicking them again.

Hello everyone! We are again happy to announce some new modding features coming up alongside with Park Life expansion, all of which will be part of the free update.Certain built-in buildings and vehicles have already made use of something called sub-meshes to change their look during the game. Sub-meshes are additional 3D-models with some simple conditions on when to switch them on and off. To give a few examples, you might have seen your friendly neighborhood Landfill Site switching between multiple trash pile models as the building fills up, and many service vehicles using a mirrored model in left-hand traffic. We have now exposed the sub-mesh system in asset editor.The editor panel now contains a new collapsible menu for sub-meshes when editing buildings and vehicles. Simply click the “Add New” button, select your custom model from the importer menu, tweak its position and rotation, set up any conditions on when to show or hide the sub-mesh in the “Required Conditions” and “Forbidden Conditions” drop-down menus, and you’re ready to go. You can switch the sub-mesh on and off in editor with “Toggle Preview”-button to get some idea on how your asset acts when you finally let it loose in your city.To give you some idea about how the conditions work let’s take a look at how the Landfill Site is set up. First we’ll import the asset with “Load existing props & decorations” switched on so as not to discard the sub-meshes. Now for clarity let’s switch off all sub-mesh previews.The main mesh of the Landfill Site only consists of the surrounding fences. There are in total three sub-meshes with trash piles of varying heights, making use of the “First Half Filled” and “Second Half Filled” conditions only available to certain building types such as Landfill Site and Cemetery. The first sub-mesh has both of these conditions set as “forbidden conditions”, meaning that if any of these conditions is met, the sub-mesh will be toggled off. The second sub-mesh has “First Half Filled” set as required, and “Second Half Filled” as a forbidden condition, and the third one requires both conditions to be met. In the end exactly one of these sub-meshes will always be rendered.There are multitude of conditions available, some of them only for some building types such as “Abandoned” condition for zoned buildings. Some general conditions such as “Active” are available for all building types, which you can for example set as forbidden to only have the sub-mesh rendered when the building is turned off. Vehicles have their own set of conditions, and also let you specify conditions on when to hide the main mesh.We have also added two new scripting interfaces to ICities.dll. These are mainly targeted to more experienced modders, but Cinematic Camera API might be interesting to those wanting to experiment with scripting. The API reference and documentation will become available later in community wiki once Parklife is released.The new Asset Data API will enable more advanced asset creators and modders to save custom data straight into their custom asset packages and receive a callback with that data when the asset is loaded. This feature has been requested to ease up custom setup of more complex assets, and should mitigate some needs for external xml-dumps and detour/harmony -hooks on asset loading.The custom data is saved as byte-arrays into a dictionary using string keys to organize the data. When saving an asset, the game will call OnAssetSaved method in your IAssetDataExtension implementation. The parameters contain the name of the saved asset, the actual asset prefab as a boxed object (which you can cast to game’s internal type in case you need to handle some additional magic), and the data-dictionary as an out-parameter. Similarly OnAssetLoaded will be called for all custom assets when they are loaded. Note that these are called only for the main asset, so for example road elevations or prop variations that get packed in the same package don’t receive additional calls.The Cinematic Camera API provides a reliable and convenient way to script beautiful camera sequences of your city, maybe for a showcase video or just to marvel at your creation. A new button has been added next to the existing Free Camera button to activate any custom cinematic camera scripts, along with a built-in cinematic camera to randomly showcase citizens, traffic or buildings in your city.The API offers some low level controls such as rotating and moving the camera, fading to/from black and changing the camera aperture to control the depth of field, as well as helpers to find citizens, buildings, vehicles etc. with certain parameters in your city. The camera system utilizes Unity coroutine -style scripting which is especially suitable for this kind of frame-to-frame work and lets you easily break your camera script into multiple sequences, start those sequences from others and halt some sequences while waiting for others to finish.When a player selects the cinematic camera from the in-game menu and activates it, the game will start the OnStart coroutine in your ICameraExtension implementation. The ICamera handle passed to OnStart will contains all the camera control methods, and ICameraExtensionBase also wraps these methods in the base class for some added convenience. When the script has finished controlling the camera for a frame, just use a yield instruction to wait for next frame and the script will keep then take on from where you left.Cinematic cameras are created much like any other mods, but implementing the ICameraExtension or ICameraExtensionBase will cause the mod to be listed under Cinematic camera scripts tab in content manager and Steam workshop. Due to being scripted assemblies, same security precautions apply to cinematic camera scripts as with any other mods, and enabling any camera scripts will disable achievements.We have a real treat for all players, regardless whether you buy or don't Parklife we have included the Menu Filtering feature for everyone to enjoy. As some may have noticed that with all the additional content from the previously published expansions, some of the in-game and editor menus have become somewhat crowded. Instead of just leaving it be, we made Menu Filtering so the browsing of the menus isn't as slow as it used to be. Menu Filtering is a new feature that will help players to filter down the objects in the menus and make menu browsing easier.So, lets go over the basic functionality real quick:There are plenty of different kind of filters, some menus can have more and some can have less filters to choose from. Couple of the menu filters that players will find are "Small Buildings", "Large Buildings" and "Net Structures". Net Structure filter shows you all roads, paths, water pipers and power lines.The Asset Editor is a special case, there will be a search box instead of filter buttons and will function similarly to Content Managers search feature, I welcome this change with big open arms, finding those assets just got so much easier.Cheers,Cities: Skylines developers