### Handle Build Errors and Configuration Issues in Bash
Source: https://context7.com/rcav8tr/cs2-modding-instructions/llms.txt
Commands and instructions for diagnosing and resolving common build errors such as exceeding screenshot limits or missing Paradox account configuration files. These bash commands help developers troubleshoot build process failures by identifying root causes and providing remediation steps.
```bash
# Error: Too many screenshots (more than 10)
# Edit PublishConfiguration.csproj to add more Screenshot entries
# Error: Paradox account data file not found
# Create the file at: %LOCALAPPDATA%\Colossal Order\ParadoxAccount.txt
# Format: Username;AdditionalData
```
--------------------------------
### Generate Paradox Mods Publishing Configuration using MSBuild
Source: https://context7.com/rcav8tr/cs2-modding-instructions/llms.txt
Creates an XML configuration file for uploading mods to the Paradox Mods platform. This MSBuild target automatically processes screenshot files, reads changelog and readme content, and generates a complete publishing configuration with all necessary metadata for the Paradox publishing system. It requires importing 'PublishConfiguration.csproj' into your main project file.
```xml
BetterEconomy
1.0.5
Better Economy Mod
Enhances economic simulation with realistic mechanics
```
```text
# Directory structure for publishing assets
Properties/
├── Thumbnail.png (max 2.1MB)
└── Screenshots/
├── screenshot1.png
├── screenshot2.png
└── gameplay.png
# ReadMe.md (supports markdown subset)
# Better Economy Mod
This mod improves the economic simulation in Cities: Skylines II.
```
--------------------------------
### Configure Mod Publishing Metadata in XML
Source: https://context7.com/rcav8tr/cs2-modding-instructions/llms.txt
Define core mod publishing configuration including mod ID, display name, descriptions, version, and external links in the PublishConfiguration.xml file. This XML structure is auto-generated from MSBuild properties and contains all metadata required by the Paradox Mods platform for mod publication.
```xml
# Better Economy Mod
This mod improves the economic simulation in Cities: Skylines II.
## Features
- Realistic tax calculations
- Dynamic demand modeling
- Enhanced budget controls
## Version 1.0.5
- Fixed tax calculation bug
- Improved performance
## Version 1.0.0
- Initial release
```
--------------------------------
### Generate mod.json Configuration using MSBuild
Source: https://context7.com/rcav8tr/cs2-modding-instructions/llms.txt
Generates the 'mod.json' file essential for Cities: Skylines II to load mods. This build target reads the Paradox account username from a local text file and combines it with project properties to create the JSON configuration. Dependencies can be manually added to the generated file or by extending the build target.
```xml
TrafficManager
2.1.0
$(LocalAppData)\Colossal Order\ParadoxAccount.txt
```
```text
# Contents of ParadoxAccount.txt (semicolon-separated format)
YourUsername;YourEmailOrOtherData
```
```json
// Generated file at UI/mod.json
{
"id": "TrafficManager",
"author": "YourUsername",
"version": "2.1.0",
"dependencies": []
}
```
```json
// The game automatically reads this file when loading mods
// To add dependencies, manually edit the generated file or extend the build target:
{
"id": "TrafficManager",
"author": "YourUsername",
"version": "2.1.0",
"dependencies": ["SomeOtherModId", "AnotherDependency"]
}
```
--------------------------------
### Extend Screenshot Support in MSBuild Configuration
Source: https://context7.com/rcav8tr/cs2-modding-instructions/llms.txt
Add additional Screenshot entries beyond the default limit in PublishConfiguration.csproj and update error conditions to allow more screenshot files. This configuration demonstrates how to extend the template to support more than 10 screenshots by adding new conditional screenshot entries and adjusting validation error thresholds.
```xml
%3CScreenshot Value=%22$([System.String]::Copy($(ScreenShotFileList)).Split(';')[10])%22 /%3E%0D%0A
```
--------------------------------
### Define Mod Dependencies and DLC Requirements in XML
Source: https://context7.com/rcav8tr/cs2-modding-instructions/llms.txt
Configure required mod dependencies and DLC requirements within the GeneratedText section of PublishConfiguration.csproj. This XML configuration specifies which mods and DLC expansions are required for the mod to function. Multiple dependencies and DLC values can be added as separate entries.
```xml
```
--------------------------------
### Generate Assembly Information in C# using MSBuild
Source: https://context7.com/rcav8tr/cs2-modding-instructions/llms.txt
Automatically creates a C# class with assembly metadata (name, version, title, description) as constant strings. This generated class is derived from properties defined in the main .csproj file and can be used to programmatically access mod metadata at runtime. It requires importing 'ModAssemblyInfo.csproj' into your main project file.
```xml
MyAwesomeMod
1.2.3
My Awesome CS2 Mod
Adds amazing new features to Cities: Skylines II
```
```csharp
// Generated file at ModAssemblyInfo/ModAssemblyInfo.cs
// DO NOT MODIFY THIS FILE.
// This entire file was automatically generated by ModAssemblyInfo.csproj.
namespace MyAwesomeMod
{
///
/// Make assembly info available as constant strings.
///
public class ModAssemblyInfo
{
public const string Name = "MyAwesomeMod";
public const string Version = "1.2.3";
public const string Title = "My Awesome CS2 Mod";
public const string Description = "Adds amazing new features to Cities: Skylines II";
}
}
```
```csharp
// Usage in your mod code
using MyAwesomeMod;
public class ModInitializer
{
public void Initialize()
{
Console.WriteLine($"Loading {ModAssemblyInfo.Title} v{ModAssemblyInfo.Version}");
Console.WriteLine($"Description: {ModAssemblyInfo.Description}");
}
}
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.