Class ModMetadata

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

Represents all the data gather-able from mod.json

Examples0
Public static methods6
staticgeode::Result<geode::ModMetadata>createFromGeodeZip()

Create ModInfo from an unzipped .geode package

staticgeode::Result<geode::ModMetadata>createFromGeodeFile()

Create ModInfo from a .geode package

staticgeode::Result<geode::ModMetadata>createFromFile()

Create ModInfo from a mod.json file

staticgeode::Result<geode::ModMetadata>create()

Create ModInfo from a parsed json document

staticboolvalidateID()
No description provided
staticstd::stringformatDeveloperDisplayString(
std::vector<std::string>const&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 functions53
geode::ModMetadata&operator=()
No description provided
geode::ModMetadata&operator=()
No description provided
std::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::vector<std::string>getDevelopers()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<geode::ModMetadata::IssuesInfo>getIssues()const

Info about where users should report issues and request help

std::vector<geode::ModMetadata::Dependency>getDependencies()const

Dependencies

std::vector<geode::ModMetadata::Incompatibility>getIncompatibilities()const

Incompatibilities

std::vector<std::string>getSpritesheets()const

Mod spritesheet names

std::vector<std::pair<std::string,matjson::Value>>getSettings()const

Mod settings

ℹ Not a map because insertion order must be preserved

std::unordered_set<std::string>getTags()const

Get the tags for this mod

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.

geode::Result<>checkGameVersion()const

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

geode::Result<>checkGeodeVersion()const

Checks if mod can be installed on the current Geode version. Returns Ok() if it can, Err explaining why not otherwise.

geode::Result<>checkTargetVersions()const

Checks if mod can be installed on the current GD & Geode version. Returns Ok() if it can, Err explaining why not 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
voidsetTags()
No description provided
voidsetNeedsEarlyLoad()
No description provided
voidsetIsAPI()
No description provided
voidsetGameVersion()
No description provided
voidsetGeodeVersion()
No description provided
geode::ModMetadataLinks&getLinksMut()
No description provided
geode::ModJsontoJSON()const

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

geode::ModJsongetRawJSON()const

Get the raw JSON file

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