Skip to content
Triton Supreme edited this page May 30, 2026 · 15 revisions

Asset Mod

First you need to create your assets.

Here is the step to create an AssetMod:

  1. Read the C:S 2 wiki on how to set up the Modding Toolchain.

  2. Once you have the modding toolchain ready, you can open Visual Studio 2022 and create a new project.

    Image

    Create a new Project

  3. Search the Cities: Skylines II mod template, select it and click on Next.

    Image

    Mod Template

  4. Setup your project.

    Image

    Config Mod

  5. Setup more your project, you can already edit the desciption of your mod, you can also edit it later.

    Image

    More config

  6. Now you need to add ExtraAssetImporter as dependency to your project.

    For That you need to double click on the project name (see image under), if you don't have this panel press Ctrl + Alt + L.

    Image

    Dependency 1

    Once you double click on it you should see that pop (see the image)

    Image

    CODE

    Add this code :

    <ItemGroup>
        <Reference Include="$(UserDataPath)\.cache\Mods\pdx_mods\80529_*\ExtraAssetsImporter.dll" Private="False" />
    </ItemGroup>

    And the file should look like this and you should see the ExtraAssetsImporter in your dependency.

    Image

    Dependency Yep It's in it

  7. Since wa are in this file we are going to add the code needed to send your assets to PDX mod.

    For that you need copy/past this code in the file

    <Target Name="GetCustomAssetsFiles" AfterTargets="DeployWIP">
    	<ItemGroup>
    	  	<AdditionalFilesToDeploy Include="CustomAssets\**\*.*" />
    	</ItemGroup>
    	<Copy SourceFiles="@(AdditionalFilesToDeploy)" DestinationFiles="@(AdditionalFilesToDeploy->'$(DeployDir)\%(RecursiveDir)%(Filename)%(Extension)')" />
    </Target>
    and it should now look like this.

    Copy CustomAssets Files

  8. Now that you have ExtraAssetsImporter as dependency we can create create the asset mod.

    For that double click on the Mod.cs file and start by deleting all the content in the OnLoad and in the OnDispose function, also delete public static ILog Log line (there is an image under).

    Now add this line before the OnLoad method (there is an image under).

    private string pathToModFolder;

    Next add these lines in the OnLoad method (there is an image under).

    if (!GameManager.instance.modManager.TryGetExecutableAsset(this, out var asset)) return;
    
    pathToModFolder = $"{new FileInfo(asset.path).DirectoryName}";
    
    ExtraAssetsImporter.EAI.LoadCustomAssets(pathToModFolder);

    And alos add this line in the OnDispose method (there is an image under).

    ExtraAssetsImporter.EAI.UnLoadCustomAssets(pathToModFolder);
    The content of the file should look like this at the end.

    AssetMod

  9. Now let's add the custom assets to the mod. For that you need to create your CustomAssets folder in the project folder and then move all the custom assets folder (CustomSurfaces, CustomDecals) in this CustomAssets folder.

    Like this

    CustomAssets folder

  10. Let's Build our mod now. To do that right click on the project file

    To do that right click on the project file and click on Build.

    CustomAssets folder

  11. You can start the game and place your custom assets.

  12. To publish your assets mod read the important information on the game wiki and follow the step on the C:S 2 wiki and for the Dependency ID put this one 80529.

If you need help, join one or the two discord mentioned in the Community

Clone this wiki locally