Class ModMetadata

#include <Geode/loader/ModMetadata.hpp>
classModMetadata{ ... }

Represents all the data gather-able from mod.json

Examples0
Public static methods6
staticintcreateFromGeodeZip()

Create ModInfo from an unzipped .geode package

staticintcreateFromGeodeFile()

Create ModInfo from a .geode package

staticintcreateFromFile()

Create ModInfo from a mod.json file

staticintcreate()

Create ModInfo from a parsed json document

staticboolvalidateID()
No description provided
staticstd::stringformatDeveloperDisplayString(
intconst&developers
)

Format a list of mod developers, truncated if there are multiple developers in the same way as in the mods list

ℹ Static because this is used by InstallListCell

Public member functions47
geode::ModMetadata&operator=()
No description provided
geode::ModMetadata&operator=()
No description provided
ghc::filesystem::pathgetPath()const

Path to the mod file

std::stringgetBinaryName()const

Name of the platform binary within the mod zip

geode::VersionInfogetVersion()const

Mod Version. Should follow semantic versioning.

std::stringgetID()const

Human-readable ID of the Mod. Should be in the format “developer.mod”. May only contain lowercase ASCII characters, numbers, dashes, underscores, and a single separating dot

boolusesDeprecatedIDForm()const

True if the mod has a mod ID that will be rejected in the future, such as using uppercase letters or having multiple dots. Mods like this should release new versions that supersede the old ones

std::stringgetName()const

Name of the mod. May contain spaces & punctuation, but should be restricted to the ASCII character set.

std::stringgetDeveloper()const

The name of the head developer. If the mod has multiple * developers, this will return the first developer in the list.

intgetDevelopers()const

The developers of this mod

std::optional<std::string>getDescription()const

Short & concise description of the mod.

std::optional<std::string>getDetails()const

Detailed description of the mod, written in Markdown (see <Geode/ui/MDTextArea.hpp>) for more info

std::optional<std::string>getChangelog()const

Changelog for the mod, written in Markdown (see <Geode/ui/MDTextArea.hpp>) for more info

std::optional<std::string>getSupportInfo()const

Support info for the mod; this means anything to show ways to support the mod’s development, like donations. Written in Markdown (see MDTextArea for more info)

std::optional<std::string>getRepository()const

Git Repository of the mod

std::optional<geode::ModMetadata::IssuesInfo>getIssues()const

Info about where users should report issues and request help

intgetDependencies()const

Dependencies

intgetIncompatibilities()const

Incompatibilities

intgetSpritesheets()const

Mod spritesheet names

intgetSettings()const

Mod settings

ℹ Not a map because insertion order must be preserved

boolneedsEarlyLoad()const

Whether this mod has to be loaded before the loading screen or not

boolisAPI()const

Whether this mod is an API or not

std::optional<std::string>getGameVersion()const

Gets the target GD version for the current platform. Returns nullopt if mod targets any GD version.

geode::VersionInfogetGeodeVersion()const

Gets the target Geode version for the current platform.

intcheckGameVersion()const

Checks if mod can be installed on the current GD version. Returns Ok() if it can, Err otherwise.

voidsetPath()
No description provided
voidsetBinaryName()
No description provided
voidsetVersion()
No description provided
voidsetID()
No description provided
voidsetName()
No description provided
voidsetDeveloper()
No description provided
voidsetDevelopers()
No description provided
voidsetDescription()
No description provided
voidsetDetails()
No description provided
voidsetChangelog()
No description provided
voidsetSupportInfo()
No description provided
voidsetRepository()
No description provided
voidsetIssues()
No description provided
voidsetDependencies()
No description provided
voidsetIncompatibilities()
No description provided
voidsetSpritesheets()
No description provided
voidsetSettings()
No description provided
voidsetNeedsEarlyLoad()
No description provided
voidsetIsAPI()
No description provided
inttoJSON()const

Convert to JSON. Essentially same as getRawJSON except dynamically adds runtime fields like path

intgetRawJSON()const

Get the raw JSON file

booloperator==()const
No description provided
Fields0
Protected member functions0
Protected fields0