Table of Contents

Class ModDefinition

Namespace
GrindFest
Assembly
GrindFest.dll

Mod manifest deserialized from mod.json. Required in every mod folder for Workshop publishing and mod browser display.

[Serializable]
public class ModDefinition
Inheritance
object
ModDefinition

Fields

Author

Author display name.

Content

Well-known content folders that exist in this mod.

Dependencies

Names (or "Author/Name") of mods that must load before this one. Their content merges first and their IMod entry points run first. Missing dependencies are reported and skipped.

Description

Human-readable description shown in mod browser.

FolderPath

Full path to the mod folder on disk.

IsWorkshop

Whether this mod was loaded from the Steam Workshop folder (read-only).

LoadOrder

Explicit ordering hint for mods without dependency ties; lower loads first (default 0).

Name

Unique mod name (also used as folder name).

PublisherSteamId

Steam ID of the original publisher. Loaded from .workshop.json.

ScriptAssembly

The compiled in-memory assembly holding this mod's scripts (null when none or blocked).

ScriptsBlocked

True if script compilation was blocked due to untrusted dangerous APIs.

ScriptsHash

SHA-256 hash of all .cs files in the mod's Scripts/ folder.

ScriptsTrusted

True if the mod's scripts are trusted by the user (hash matches trust store).

SecurityWarnings

Distinct risk labels found during script scanning (e.g. "file system access").

Tags

Tags for filtering in mod browser (e.g. "ui", "story", "scripts").

Version

Semantic version string (e.g. "1.0.0").

WorkshopId

Steam Workshop item ID (0 if local-only). Loaded from .workshop.json.

Properties

QualifiedName

Identity key used for de-duplication: "Author/Name" when Author is set, otherwise just Name. Two mods by different authors can share the same Name without colliding.

Methods

IncrementBuildVersion()

Increment the patch (last) component of the semantic Version string. E.g. "1.0.0" → "1.0.1", "2.3" → "2.3.1", null → "0.0.1".

LoadFromFolder(string)

Load a ModDefinition from a mod.json file in the given folder. Returns null if mod.json doesn't exist or is invalid.

Save()

Save this ModDefinition to mod.json in FolderPath.