Setting Up Your Development Environment
A properly configured development environment is crucial for efficient Schedule 1 modding. This guide will walk you through setting up Visual Studio, organizing your workspace, and configuring everything for optimal productivity.
Visual Studio Community Setup
Installation
- Download Visual Studio Community (free)
- During installation, select these workloads:
- .NET desktop development
- Game development with Unity (optional but helpful)
Essential Extensions
Install these extensions to enhance your modding experience:
Code Quality & Productivity
Extensions → Manage Extensions → Online
- GitHub Extension for Visual Studio - Version control integration
- Productivity Power Tools - Enhanced editing features
- CodeMaid - Code cleanup and organization
- Error List Filter - Better error management
Unity-Specific (Recommended)
- Unity Tools - Better Unity project support
- Shader Tools for Visual Studio - If working with custom shaders
Visual Studio Configuration
Font & Display Settings
Tools → Options → Environment → Fonts and Colors
- Font: Consolas or Fira Code (with ligatures)
- Size: 10-12pt for comfortable reading
- Theme: Dark theme recommended for long coding sessions
IntelliSense Configuration
Tools → Options → Text Editor → C# → IntelliSense
- ✅ Enable "Show completion list after a character is typed"
- ✅ Enable "Highlight matching portions of completion list items"
- ✅ Enable "Show name suggestions"
Project Structure & Templates
Creating a Mod Project Template
Create a standardized project structure for consistency:
Schedule1ModTemplate/
├── src/
│ ├── Core/
│ │ └── ModMain.cs
│ ├── UI/
│ │ └── ModUI.cs
│ ├── Utils/
│ │ └── ModLogger.cs
│ └── Config/
│ └── ModConfig.cs
├── Properties/
│ └── AssemblyInfo.cs
├── References/
│ ├── MelonLoader.dll
│ ├── Assembly-CSharp.dll
│ └── UnityEngine.*.dll
├── BuildTools/
│ └── PostBuild.bat
└── Schedule1Mod.csproj
Sample Project File
Create a template .csproj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyTitle>My Schedule 1 Mod</AssemblyTitle>
<AssemblyDescription>Description of your mod</AssemblyDescription>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<OutputPath>bin\$(Configuration)\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="MelonLoader">
<HintPath>References\MelonLoader.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>References\Assembly-CSharp.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>References\UnityEngine.CoreModule.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="call "$(ProjectDir)BuildTools\PostBuild.bat" "$(TargetPath)" "$(ProjectDir)"" />
</Target>
</Project>
Build Automation
Create a PostBuild.bat script for automatic deployment:
@echo off
setlocal
set "OUTPUT_FILE=%~1"
set "PROJECT_DIR=%~2"
set "GAME_DIR=C:\Program Files (x86)\Steam\steamapps\common\Schedule 1"
set "MODS_DIR=%GAME_DIR%\Mods"
echo Deploying mod to game directory...
if not exist "%MODS_DIR%" (
echo Creating Mods directory...
mkdir "%MODS_DIR%"
)
copy "%OUTPUT_FILE%" "%MODS_DIR%\"
echo Mod deployed successfully!
pause
Game References Setup
Locating Game Files
Schedule 1 assemblies are typically located at:
Steam\steamapps\common\Schedule 1\Schedule1_Data\Managed\
Essential References
Copy these files to your project's References folder:
Core Game Assemblies
Assembly-CSharp.dll- Main game codeAssembly-CSharp-firstpass.dll- Third-party plugins
Unity Engine Modules
UnityEngine.CoreModule.dll- Core Unity functionalityUnityEngine.UI.dll- UI systemUnityEngine.IMGUIModule.dll- Immediate mode GUIUnityEngine.InputLegacyModule.dll- Input handlingUnityEngine.AudioModule.dll- Audio system
MelonLoader Files
MelonLoader.dll- Core modding framework0Harmony.dll- Harmony patching library
Reference Management Script
Create a PowerShell script to update references automatically:
# UpdateReferences.ps1
param(
[Parameter(Mandatory=$true)]
[string]$GamePath,
[string]$ProjectPath = "."
)
$managedPath = Join-Path $GamePath "Schedule1_Data\Managed"
$referencesPath = Join-Path $ProjectPath "References"
if (!(Test-Path $referencesPath)) {
New-Item -ItemType Directory -Path $referencesPath
}
$requiredFiles = @(
"Assembly-CSharp.dll",
"UnityEngine.CoreModule.dll",
"UnityEngine.UI.dll",
"UnityEngine.IMGUIModule.dll",
"UnityEngine.InputLegacyModule.dll",
"UnityEngine.AudioModule.dll"
)
foreach ($file in $requiredFiles) {
$source = Join-Path $managedPath $file
$destination = Join-Path $referencesPath $file
if (Test-Path $source) {
Copy-Item $source $destination -Force
Write-Host "Copied $file" -ForegroundColor Green
} else {
Write-Host "Warning: $file not found" -ForegroundColor Yellow
}
}
Write-Host "Reference update complete!" -ForegroundColor Cyan
Debugging Configuration
Debug Build Configuration
Configure your project for debugging:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
Attaching Debugger to Game Process
- Build your mod in Debug configuration
- Start Schedule 1 with your mod loaded
- In Visual Studio: Debug → Attach to Process
- Find Schedule1.exe in the process list
- Attach and set breakpoints in your code
- Use
MelonLoggerfor runtime logging instead ofConsole.WriteLine - Place breakpoints at key execution points
- Use the Immediate Window to inspect objects at runtime
- Check the Output window for MelonLoader messages
Workspace Organization
Multi-Project Solutions
For complex mods, organize multiple projects in a solution:
Schedule1ModdingSuite.sln
├── Core.Mod/ # Main mod functionality
├── UI.Library/ # Reusable UI components
├── Utilities.Library/ # Common utilities
└── TestHarness/ # Testing and experimentation
Source Control Best Practices
Recommended .gitignore
# Build outputs
bin/
obj/
*.dll
*.pdb
# Visual Studio
.vs/
*.user
*.suo
# Game references (don't commit these)
References/
!References/.gitkeep
# Logs
*.log
# OS files
Thumbs.db
.DS_Store
Git Workflow
# Initialize repository
git init
git add .gitignore
git commit -m "Initial project setup"
# Create development branch
git checkout -b development
# Regular workflow
git add .
git commit -m "Descriptive commit message"
git push origin development
Performance Optimization
Build Optimization
For release builds:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
Code Analysis
Enable static analysis:
<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>
Troubleshooting Common Issues
Reference Errors
- Problem: "Assembly not found" errors
- Solution: Verify all required DLLs are in References folder
Build Failures
- Problem: "Access denied" during build
- Solution: Check if game is running, close it before building
Debugging Issues
- Problem: Breakpoints not hit
- Solution: Ensure Debug build and symbols are generated
A well-configured development environment saves hours of frustration. Take time to set everything up properly!