Adding Custom Assets
[p]Greetings mayors![/p][p][/p][p] It’s been long underway, but we’re excited to finally bring you custom asset support for the Editor. In this dev diary, we’ll walk you through the steps to create your very own buildings and props for Cities: Skylines II, along with a few tips to make the process easier. Our goal for the Editor was to streamline asset creation and give you more control over your creations, while enabling you to create complex assets on par with official content. The result is a powerful tool that offers a lot of freedom and flexibility. It can take some time and patience to learn, but once you get the hang of it, you’ll be able to create truly unique additions to your cities. To help asset makers get started, we added a set of tutorials covering the different functions in the Editor. While it doesn’t get into all the nitty-gritty details, it includes handy reminders of where everything is, and tooltips provide additional information about the different functions. All the technical requirements for assets, like information about textures and meshes, can be found on the official wiki. [/p][p][/p][p]Let’s get into it! From the Main Menu, you open the Editor, just like when you would when creating a custom map. No separate Editor for assets. Instead, you have a scene where one or more objects can be placed and edited simultaneously. That’s right! If you’re making multiple assets, you can prop them all at once! The default scene is an empty green land, but you can also open a map and add roads and trees for size comparison and a visual reference for how your asset will look in the game.[/p][p][/p]
Once imported, you can place the new asset in the scene to start customizing it.[/p][p][/p][p]To customize an asset, either by adding decorations to it or adjusting its settings, you need to place it in the scene. Decorations are added through the Asset Browser button, which opens a panel listing all assets currently in the game. The base game contains thousands of assets, so the easiest way to find what you are looking for is to use the search field at the top of the list or browse the specific categories. Recent searches are remembered and can be saved by clicking the star icon next to them. Individual assets can also be bookmarked by right-clicking the asset, placing it at the top of the list so it’s easy to find again in the future. [/p][p][/p][p]To add any of these to your asset, make sure the snapping option “Binds overlapping items to a building” is enabled, and decorate to your heart's content. The Editor doesn’t have a hard maximum of props that can be assigned to a building, essentially allowing potentially hundreds or even thousands of props per asset, but keep in mind that too many props can impact performance. Additionally, propping is no longer limited to just buildings; vehicles and props themselves can also be decorated with other assets.[/p][p][/p]
Props can be adjusted after placement using the Object Info Panel or the M key to move them freely.[/p][p][/p][p]Similarly, we have ensured a lot of freedom when creating the building lots. Gone are the days when you had to manage multiple assets to create truly large building complexes. Now, all you have to do is simply type in the numbers for the depth and width of the lot for the whole building. The maximum lot size is capped at 1000x1000 tiles, allowing the creation of massive buildings. And just like when you’re decorating in-game, surfaces can be freely drawn using the polygonal tool. There are several snapping options available to make the area definition faster and more precise.[/p][p][/p][p]
Examples of interesting shapes created with the polygonal surface tool.[/p][p][/p][p]If you aim for a lot of variety in your assets, you will be happy to know that color masking supports three different mask textures that can be applied to different parts of your mesh. Each color mask is given its own unique color property, and the three color properties are treated as one color variation combination. The possible number of color variation combinations is effectively limitless, allowing for a lot of variation in a single asset. The color variation component is attached to the asset mesh, which can be accessed from the Workspace on the left. Depending on the import settings you chose, the Color Properties component may already be there, but if not, you can use the Add Component button and the search function to add it and set up the different variations for your asset.[/p][p][/p][p]
You can choose up to three colors per color variation corresponding to the three color masks you created for your asset.[/p][p][/p]
Hospital yard with both one and two-way car paths.[/p][p]
To tweak the assets function, like its cost, capacity, consumptions, and so on, you need the Object Info Panel, which is opened by selecting the asset. If you created your asset based on an existing prefab, all the components are copied from your template, but you can, of course, edit them or add them manually to create something truly unique. The Object Info Panel also contains lists of sub-objects such as props, areas, and effects, which can be edited, copied, or deleted from here. [/p][p][/p]
Share your finished custom asset on Paradox Mods for others to use in their cities.[/p][p][/p][p]And voila! You have successfully imported and shared a custom asset! We look forward to seeing the amazing creations you come up with, and how you use the many options the Editor provides to create something entirely unique. Modding and custom assets have been an important part of Cities: Skylines’ journey, and we can’t wait to see where it takes Cities: Skylines II.[/p][p][/p][p]* Please note that this is the initial implementation of Asset Mods support, and the editor is still considered to be in Beta.[/p]
BRING IN THE NEW
[p]To create a custom asset, you first need to import your custom mesh and textures. That’s done by pressing the Asset Importer button, which opens the Asset Importer panel on the right. Here, you set the Project Root, the folder that holds all of your custom assets, and then you select the Assets Folder, which holds all the files for the custom asset you want to import. Next, you choose a Prefab Preset setting, allowing you to either set the asset up as a building, a static object (such as a prop), or copy settings from an existing asset in the game by using the “Existing Prefab in Project” option. Then you just click the Import button and wait for the game to import the asset.[/p][p][/p][p]UNLEASH YOUR CREATIVITY
[p]We wanted to make prop placement as flexible as possible, so once a prop is placed, it can be selected and adjusted until it’s just right. When selected, the prop’s Object Info Panel opens on the right. Here, you can modify the prop’s position and rotation by changing the values directly. But that’s not all. You can adjust the prop using a few different shortcuts, making it easy to move, align, or copy props. Want to move a prop freely after placement? Simply select it and press M. Need to align it to another prop? Start by selecting the target you want to align to, then the prop you want to align, and then press either the X, Y, or Z key depending on the axis you want to align. Want to place another bush? Select it and press C to copy it, so you don’t have to find it in the asset library again.[/p][p][/p][p]FUNCTION AND FORM
[p]Now you have a great-looking asset, but it also needs to allow citizens and potentially vehicles access. There are two options: invisible paths and pathfinding areas, which can be combined depending on your asset’s needs. Invisible paths are placed using tools similar to road and path building. They can be connected to each other or to specific locations on the lot using the various snapping options. These invisible paths come in a few different variations, including both one-way and two-way vehicle paths and pedestrian paths. Pathfinding areas are created using the polygonal tool to define a surface that citizens can use for navigation. These pathfinding areas are not limited to traversal only, as there are options for special area types where citizens can perform some activity or simply hang out. To ensure a pathfinding area is functional, remember to place a Pedestrian Access Location marker to determine where citizens can enter and exit the area.[/p][p][/p][p]To tweak the assets function, like its cost, capacity, consumptions, and so on, you need the Object Info Panel, which is opened by selecting the asset. If you created your asset based on an existing prefab, all the components are copied from your template, but you can, of course, edit them or add them manually to create something truly unique. The Object Info Panel also contains lists of sub-objects such as props, areas, and effects, which can be edited, copied, or deleted from here. [/p][p][/p]
A FINAL TOUCH
[p]All assets placed in the scene are listed on the Workspace panel on the left of the screen. Here, you can easily locate an asset you’re working on or remove it. Most importantly, this is also where you save your custom asset and, when it’s ready, share it on Paradox Mods so others can enjoy your creation. You can add a description to help others understand what kind of asset you created and include screenshots showing off your work. Once you’re ready to share it, simply press Submit and wait for the serialization and sharing process to finish.[/p][p][/p][p]