Creating your config
Getting Started
Building your base
public class ExampleConfig extends Config {
}object ExampleConfig : KtConfig() // This is an object so we can easily access a singleton instance of the config. Refer to later section for more infopublic class ExampleConfig extends Config {
public ExampleConfig() {
super(
"example_config.json", // Your mod's config file's name and extension
"/assets/examplemod/example_mod.png", // A path to a PNG or SVG file, used as your mod's icon in OneConfig's UI
"Example Mod", // Your mod's name was it is shown in OneConfig's UI
Category.QOL // The category your mod will be sorted in within OneConfig's UI
);
}
}object ExampleConfig : KtConfig(
id = "example_config.json", // Your mod's config file's name and extension
icon = "/assets/examplemod/example_mod.png", // A path to a PNG or SVG file, used as your mod's icon in OneConfig's UI
title = "Example Mod", // Your mod's name was it is shown in OneConfig's UI
category = Config.Category.QOL // The category your mod will be sorted in within OneConfig's UI
)Initializing your config when the game launches
Last updated