Cities: Skylines

Cities: Skylines

Not enough ratings
How To Repurpose Assets
By Still_Claire
An Update of LegionOfMe's "How to repurpose workshop-assets" Guide
   
Award
Favorite
Favorited
Unfavorite
0. Why Repurpose An Asset?
As LegionOfMe acknowledged, some assets seem better suited to some other purpose. However, without mods, it isn't possible to change the properties that control how a building behaves.

When the original Guide was written (in 2015), the method to repurpose assets relied on five mods - four of those didn't need an update for seven years (or more). So although some changes occurred to the game that made some of the steps in the original guide obsolete, it remained mostly accurate and a valuable resource.

However, after so long, the code language has changed enough that those old mods no longer worked reliably (for some players, they stopped working entirely). I was able to get four of them updated to working again, and so here's an update for the guide as well.

The original focuses on repurposing Workshop assets, but since changes happen everywhere, I suggest being cautious and always respect the rights of the asset creator. No can can stop you from making your own versions of other people's work, but don't upload it to the Workshop if the creator doesn't want players doing so. You can freely edit and modify all of the vanilla assets, and share them on the Workshop without restriction. All examples in this guide use vanilla assets.
1. Prepare to Repurpose
You will need the following:


*Current as of February 2023

Back up your work.

After subscribing to needed mods, remember to enable them in content manager.

2. Loading the Editor
(This guide depicts creating a new asset; editing is the same once the editor is loaded.)

1. After enabling the mods, return to main menu and select Editors:


2. Choose Asset Editor:


3. Choose “New”.

If you are editing an existing asset, select “Load” instead, then find the item you want to edit in the list that populates. Remember to respect the rights of creators and don’t reupload without permission.


4. Select the Theme (Biome):

It does not matter which Theme you select, as all props, trees, buildings, etc, are available in the Editor.

5. Pick the template:
The current (1.16.0-f3, February 2023) version of the Asset Importer. Most of the time “Building” is going to be the choice.

6. Find your building:
The Asset Importer will load all of the objects (in this case, Buildings) you can use as a template for a new asset. Across the top are clickable icons representing the various types: Roads, Services (Electric, Water, Garbage, etc), Zoned (Residential, Commercial, etc), and so on. The example selects “Leisure Commercial” Buildings.

Click on the Building you want to use to select it. You will see the “Continue” button doesn’t become active until you select something. If you don’t want to redecorate, click the radio button for “Load existing props & decorations”. Otherwise, if that is not selected, all the props, trees, decals, etc, will be removed and you will have an undecorated building on a dirt lot. (It will not remove door, path, spawn markers.)

After clicking “Continue”, the Asset Importer gives an opportunity to adjust the model, such as rotating and scaling. Make any desired changes (or not) and click Continue again to (finally!) load the Asset Editor.




3. Changing the Prefab AI
You will see new sections on the Asset Editor Properties Panel (that grey thing on the right).
My comedy club has loaded with all of its props and markers.

1. Click the green arrow on the Prefab AI dropdown box to… drop the list upward. Don’t blame me, that’s just how it works.

2. Scroll up or down to find the AI you would like the asset to use instead.
In this example, I have decided to change this delightful comedy club into something a little less lighthearted: from a Leisure Commercial to Cemetery.

3. No changes have been made to the asset yet. Click the Apply button to change the Prefab AI.
The tooltip will echo your selection when you hover over the button.

4. Choose which attributes to copy:
The choice is yours. (I have generally selected “All” and it has so far seemed to work out.)
If it’s going to break, this is the stage it will happen. Be careful when changing the AI. (Also this is not the time to be wishing you had made a backup copy.)

5. After the Prefab AI change is applied, the Properties Panel will refresh and you will see the other fields change.
Now my club has a burial rate, corpse capacity, hearses, etc. Click in any field to edit the value (this example is default values) and hit Enter to apply the change.
4. Changing the Item Class
1. Click the green arrow on the Item Class dropdown box to… drop the list upward, just like the Prefab AI.

2. Scroll up or down to find the Class you would like the asset to use instead.
The Class relates both to how the object is placed in game, and where it is found on the game toolbar (the buttons). For most objects, it only affects the toolbar placement.

3. If you are converting a growable to a ploppable, you will get a notification:

4. Click OK (or otherwise close the popup); the change has been applied so it doesn’t matter what you do to close the thing.

If you have selected a Class that makes it impossible to find your asset in-game, it can probably still be fixed by changing the Class to something more predictable.
5. Changing the UI Category
Same as for Class, more or less.

1. Click the arrow, drop the list upward.

2. Scroll to find.

3. Select your choice.

The UI Category only controls which tab the asset will appear on; “Default” is the main tab for any Class, and new tabs can be added to Classes (buttons) by assigning a Category that doesn’t already exist for that Class.
6. Changing the UI Priority
This is the safest Advanced field you can tinker with! Knock yourself out!

1. Click in the text box to edit the value.

The UI Priority field only controls the display of assets in the game toolstrip. It serves no other purpose. (If you use FindIt!, for example, this field won't make much difference to you.)
Negative numbers position the asset toward the left (immediately after vanilla assets); positive numbers position the asset toward the right (the end of the strip).

2. Hit Enter to save the change.

7. Placement Mode
(Note: I have not tested this method, this section is mostly c&p from the original.)

Most items have to be placed along a road. This can be changed with ModTools.

While the asset is loaded in the asset editor, press F7 to start the Mod Tools UI.

Now choose your placement mode from this list and copy the code into the text input field of the mod tools console (left of where it says "Run").

Mode
Code
On Ground (Anywhere on ground)
((BuildingInfo)GameObject.FindObjectOfType<ToolController>().m_editPrefabInfo).m_placementMode = BuildingInfo.PlacementMode.OnGround;
On Water (Anywhere on water)
((BuildingInfo)GameObject.FindObjectOfType<ToolController>().m_editPrefabInfo).m_placementMode = BuildingInfo.PlacementMode.OnWater;
Roadside (Anywhere along a road)
((BuildingInfo)GameObject.FindObjectOfType<ToolController>().m_editPrefabInfo).m_placementMode = BuildingInfo.PlacementMode.Roadside;
Shoreline (Needs to have both water & ground)
((BuildingInfo)GameObject.FindObjectOfType<ToolController>().m_editPrefabInfo).m_placementMode = BuildingInfo.PlacementMode.Shoreline;
On Surface (Can be placed on water and on ground, but doesn't need to have both)
((BuildingInfo)GameObject.FindObjectOfType<ToolController>().m_editPrefabInfo).m_placementMode = BuildingInfo.PlacementMode.OnSurface;
???*
((BuildingInfo)GameObject.FindObjectOfType<ToolController>().m_editPrefabInfo).m_placementMode = BuildingInfo.PlacementMode.???;

When you copied the code into the input field, hit "Run".

(I guess the change is applied when clicking “Run”.)

* With Parklife and Campus updates, there may be one or more additional mode flags regarding the new conditions (same as above but requiring special zones and|or buildings as well).
8. Finishing Touches
Make any other adjustments you like, such as changing values or decorations.

9. Asset Images
1. Click the “Asset Settings” button (the gear icon on the right of the default tools).

2. Take the three pictures for your asset.



If you forget to take pictures for your new asset the Editor will do it for you when you try to save.
10. Save and Enjoy!
1. Save your asset, remembering to change BOTH fields.
On the left, the file name (what the game uses in front of the .crp); on the right, the "Asset Name" field.

Ever gotten a "duplicate prefab name" error? "New Asset" happens when the "Asset Name" field is neglected.

2. When you are done editing assets, exit the game completely. You don't want to "second load" the game (especially, it would seem, on Windows 10).

When you restart, your new asset will be ready for you:

3. Select the Class button for your asset:
My cemetery club is found under the Health Services button, on a brand new tab!

4. Select your asset and plop as usual:





1 Comments
TortoTheConqueror 19 Feb, 2023 @ 6:52am 
Can you edit vehicles with this?