Skip to content

Commit

Permalink
Merge pull request #3 from kosch104/AssetPackCreatorBeta
Browse files Browse the repository at this point in the history
Asset Pack Creator Beta Release
  • Loading branch information
Mimonsi authored May 9, 2024
2 parents 1bd316c + f19c532 commit 6d4db71
Show file tree
Hide file tree
Showing 16 changed files with 82 additions and 60 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

# Asset Pack Creator settings
assetPackCreatorSettings.json

# User-specific files
*.rsuser
*.suo
Expand Down
Binary file added AssetPackCreator.exe
Binary file not shown.
22 changes: 22 additions & 0 deletions AssetPackCreator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Create an Asset Pack using Asset Pack Creator
The Asset Pack Creator is a Windows Application designed to be used as a replacement of manually creating asset packs

## Features
- Choose a name for your Asset Pack
- Add and Remove your prefab files
- Includes overview of added prefabs
- Add/Remove thumbnails to your Prefabs (including live preview)
- Automatically sets correct Prefab Name and Thumbnail paths in the Prefab file
- Edit your Asset Pack Publishing Information (thumbnail, Display name) including Markdown Preview
- Publish your Asset Pack from within the application without ever opening an IDE
- Add Name and Description to your assets (coming soon)
- Add Localization to your assets (coming soon)

## Getting Started

1. Download OR Clone the [repository](https://github.com/kosch104/CS2-CustomAssetPack) OR Create a repository based on this ("Use this template", green button)
2. Open the repository in your windows explorer (file browser) and execute the `AssetPackCreator.exe`
3. Follow the instruction steps in the Asset Pack Creator

## Known Issues
- When opening the Creator in a manually edited Asset Pack there can be uncaught exceptions.
Binary file removed AssetPackCreatorUtilities.exe
Binary file not shown.
Binary file removed AssetPackCreatorUtilities.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion CustomAssetPack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!--The file should contain 2 lines:-->
<!--[email protected]-->
<!--Your-PDX-Account-Pa$$word-->
<PDXAccountDataPath>$(USERPROFILE)\Desktop\pdx_account.txt</PDXAccountDataPath>
<PDXAccountDataPath>$(USERPROFILE)\pdx_account.txt</PDXAccountDataPath>

<!--The file where mod information which is required for publishing mod on PDX mods are stored-->
<PublishConfigurationPath>Properties\PublishConfiguration.xml</PublishConfigurationPath>
Expand Down
19 changes: 19 additions & 0 deletions ManualAssetPackCreation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Manually Creating your Asset Pack

1. Clone the [repository](https://github.com/kosch104/CS2-CustomAssetPack) OR Create a repository based on this ("Use this template", green button)
2. Open the repository in your windows explorer (file browser) and execute the `AssetPackCreatorUtilities.exe`. There you can rename your project. Choose a project name that contains no spaces or special characters and ends in `AssetPack`
3. Open the repository sln-file with any IDE (Visual Studio, Rider, but NOT Visual Studio Code, that doesn't work)
4. If you are using an alternative Cities Skylines II installation path, enter it in the `CustomAssetPack.csproj`-file under `<CustomManagedPath>`
5. Create a file called `pdx_account.txt` on your Desktop. Put your PDX Mods username in the first line, your password in the second line. This is required for the mod to be published under your name and will not be shared with anyone.
6. Put the assets you want to add into the "Resources/assets" folder in the solution explorer (subfolders allowed)
7. Edit the localization file "en-US.json" to include your assets. Otherwise, they will have missing localization
8. Add thumbnails to your assets. Make sure the icon path is set like this `coui://customassets/PackName/CarProp.png`
9. Click on the Build Symbol (Hammer in Rider) at the top to build your project. This will load the assets into your local mods folder

## Publishing your Asset Pack

To publish your mod you have to do the following steps:
1. Open `Properties/PublishConfiguration.xml` in Notepad
2. Edit `<DisplayName>`, `<ShortDescription>`, `<LongDescription>` and `<Tag>`
3. Replace the `thumbnail.png` file by the thumbnail for your Asset Pack
4. In Visual Studio, navigate to "Publish" and select "Publish New Mod". In Rider you can just select "Publish New Mod" next to the green arrow and press the arrow to execute the Publish Configuration.
52 changes: 20 additions & 32 deletions Properties/PublishConfiguration.xml
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
<Publish>
<!--Id must be set in order to update existed mod. it is not required for publishing mod for the first time-->
<ModId Value="" />
<!--Name of the mod to display to players-->
<DisplayName Value="TODO#1" />
<!--Short description of the mod-->
<ShortDescription Value="TODO#2" />
<!--Long description of the mod. Single line or multi line. Supports minimal markdown subset-->
<!--LongDescription Value="This is a long description" /-->
<LongDescription>
TODO#3
</LongDescription>
<!--Thumbnail-->
<Thumbnail Value="Properties/Thumbnail.png" />
<!--Screenshot, can be set multiple times-->
<Screenshot Value="" />
<!--Tag, can be set multiple times-->
<Tag Value="Code Mod" />
<!--Link to the forum post where the mod can be discussed-->
<ForumLink Value="" />
<!--Version of the mod-->
<ModVersion Value="1.0" />
<!--Recommended version of the base game to use the mod-->
<GameVersion Value="1.1.*" />
<!--Dependency for the mod, can be set multiple times-->
<Dependency Id="78903" />
<!--Change log for new version. Single line or multi line. Supports minimal markdown subset-->
<ChangeLog Value="" />
<!--ChangeLog>
</ChangeLog-->
<!--External link. supported types are discord, github, youtube, twitch, x, paypal, patreon-->
<ExternalLink Type="discord" Url="https://discord.gg/UkKAfRqfCn" />
<Publish>
<ModId Value="" />
<DisplayName Value="Example Pack (do not subscribe)" />
<ShortDescription Value="Example Pack Description" />
<LongDescription>## Asset Pack Name
This asset packs adds xxx and yyy to the game

## Added Assets:
- Asset 1
- Asset 2
- Asset 3 (special)</LongDescription>
<Thumbnail Value="Properties/Thumbnail.png" />
<Screenshot Value="" />
<Tag Value="Code Mod" />
<ForumLink Value="" />
<ModVersion Value="1.0" />
<GameVersion Value="1.1.*" />
<Dependency Id="78903" />
<ChangeLog>Initial release</ChangeLog>
<ExternalLink Type="discord" Url="https://discord.gg/UkKAfRqfCn" />
</Publish>
32 changes: 9 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,24 @@ Unofficial Custom Assets are highly experimental. They WILL crash your game at s

## Requirements
- Modding Toolchain Installed
- Finished Assets (.Prefab and .Prefab.cid file, option Thumbnail files)
- Finished Assets (.Prefab and .Prefab.cid file, optional Thumbnail files)

## Creating Assets
The process is called asset assembly, because we use existing assets and props and combine them into new assets. We can add Components to add functionality to the assets. You can find a full guide for the asset creation in the discord server.


Short compilation of the steps:
1. Open the Editor in Cities Skylines II
2. Create your Asset and click the save button on the top left when you are done
3. Your assets will now be found in `C:/Users/[USERNAME]/AppData/LocalLow/Colossal Order/Cities Skylines II/StreamingAssets~`
4. Copy the .Prefab and .Prefab.cid file. The file names should correspond to the ones you chose in the editor. These are the files you will be sharing.
2. Choose an asset to use as template and place it in the editor. Click on the asset and click "Duplicate template"
3. Edit your duplicate to your liking
4. Open the hierarchy on the top left object list. click the save button next to the asset when you are done
5. Your assets will now be found in `C:/Users/[USERNAME]/AppData/LocalLow/Colossal Order/Cities Skylines II/StreamingAssets~`
6. Copy the .Prefab and .Prefab.cid file. The file names should correspond to the ones you chose in the editor. These are the files you will be sharing

## Creating your Asset Pack

1. Clone the [repository](https://github.com/kosch104/CS2-CustomAssetPack) OR Create a repository based on this ("Use this template", green button)
2. Open the repository in your windows explorer (file browser) and execute the `AssetPackCreatorUtilities.exe`. There you can rename your project. Choose a project name that contains no spaces or special characters and ends in `AssetPack`
3. Open the repository sln-file with any IDE (Visual Studio, Rider, but NOT Visual Studio Code, that doesn't work)
4. If you are using an alternative Cities Skylines II installation path, enter it in the `CustomAssetPack.csproj`-file under `<CustomManagedPath>`
5. Create a file called `pdx_account.txt` on your Desktop. Put your PDX Mods username in the first line, your password in the second line. This is required for the mod to be published under your name and will not be shared with anyone.
6. Put the assets you want to add into the "Resources/assets" folder in the solution explorer (subfolders allowed)
7. Edit the localization file "en-US.json" to include your assets. Otherwise, they will have missing localization
8. Add thumbnails to your assets. Make sure the icon path is set like this `coui://customassets/PackName/CarProp.png`
9. Click on the Build Symbol (Hammer in Rider) at the top to build your project. This will load the assets into your local mods folder

## Publishing your Asset Pack

To publish your mod you have to do the following steps:
1. Open `Properties/PublishConfiguration.xml` in Notepad
2. Edit `<DisplayName>`, `<ShortDescription>`, `<LongDescription>` and `<Tag>`
3. Replace the `thumbnail.png` file by the thumbnail for your Asset Pack
4. In Visual Studio, navigate to "Publish" and select "Publish New Mod". In Rider you can just select "Publish New Mod" next to the green arrow and press the arrow to execute the Publish Configuration.

There are two ways to create your asset pack:
1. [Using the provided `AssetPackCreator.exe` for Windows (recommended)](AssetPackCreator.md)
2. [Manually creating your Asset Pack](ManualAssetPackCreation.md)

## Support and Contact
To receive help and find other asset creators join the [Cities Skylines Modding Discord](https://discord.gg/UkKAfRqfCn). We have infrastructure with a knowledge base and a community of creators that can help you with your questions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"active": true,
"m_Group": null,
"m_Priority": 1,
"m_Icon": "coui://customassets/ExamplePack/CarProp.png",
"m_Icon": "coui://customassets/CustomAssetPack/CarProp/CarProp.png",
"m_LargeIcon": "",
"m_IsDebugObject": false
}
Expand Down Expand Up @@ -51,4 +51,4 @@
]
},
"m_Circular": false
}
}
4 changes: 4 additions & 0 deletions Resources/lang/de-DE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"Assets.NAME[CarProp]": "AutoProp",
"Assets.DESCRIPTION[CarProp]": "Ein kleines Auto zur Dekoration ohne jegliche Funktionalität"
}
4 changes: 2 additions & 2 deletions Resources/lang/en-US.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"Assets.NAME[CarProp]": "Example Name",
"Assets.DESCRIPTION[CarProp]": "Example Description"
"Assets.NAME[CarProp]": "CarProp",
"Assets.DESCRIPTION[CarProp]": "A small car prop without any functionality"
}
Binary file added WebView2Loader.dll
Binary file not shown.
Binary file added runtimes/win-x86/native/WebView2Loader.dll
Binary file not shown.

0 comments on commit 6d4db71

Please sign in to comment.