Skip to content

Creates and maintain mod.yaml and mod_info.yaml files for the Mods of the Game Oxygen Not Included

License

Notifications You must be signed in to change notification settings

O-n-y/auto-mod.yaml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Yaml generator for Mods for Oxygen Not Included

About

This is PowerShell(https://learn.microsoft.com/en-us/powershell/) script for generating and maintaining 2 files: mod.yaml and mod_info.yaml, required as part of mod making for the game Oxygen Not Included.

Prepare

In your c# project create folder Engine and put inside AssemblyInfo.cs which should contain at least the version information and the tile:

[assembly: AssemblyTitle("FavoriteBuildings")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

image

In Directory.props or .csproj of your c# project add:

	<PropertyGroup>
		<LibDir>your_path</LibDir>
	</PropertyGroup>

	<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
		<Exec Command="PowerShell -executionpolicy bypass -File &quot;$(LibDir)update-version-script.ps1&quot; -assemblyInfoPath &quot;$(ProjectDir)Engine\AssemblyInfo.cs&quot; -modInfoPath &quot;$(ProjectDir)mod_info.yaml&quot;" ContinueOnError="false" />
	</Target>

As you can see it is using the paths as the arguments, so if you want - you can easily edit it. Change LibDir to the path of the directory where you located the update-version-script.ps

How it works

Each time the you will build the project, it will generate mod.yaml and mod_info.yaml files for you. image

The only thing you would need to maintain - is the game build number, which is stored in update-version-script.ps, at the time of posting it is 619020

mod.yaml

supportedContent: ALL
minimumSupportedBuild: 619020 # this number is stored in update-version-script.ps
APIVersion: 2
version: 1.0.0.0  #this will be changed to your project version from AssemblyInfo.cs

image

mod_info.yaml

staticID: FavoriteBuildings # the name will be taken from your Project Name, stored in AssemblyTitle of the AssemblyInfo.cs

image

About

Creates and maintain mod.yaml and mod_info.yaml files for the Mods of the Game Oxygen Not Included

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published