Skip to content

dpconfig format

autumn edited this page Aug 17, 2025 · 1 revision

dpconfig is a format that allows you to define a config screen for your data pack. That screen can then be viewed in Datapack Toolkit, and be used to modify the data pack in a plethora of ways! :3

If you're just starting out, a good, up-to-date example of a config file will always be here, on Geophilic's repo, so check that out.


The config is defined in the dpconfig.json file in the root of your data pack.

Inside the file is the config object containing the following things:

  • meta - an object containing some metadata.
  • widgets - an ordered list/array of widget objects.
  • methods - an object containing method objects, keys being their names.
  • slots - an optional object describing variables and their default values.

Metadata

As of version 1, the following data is necessary inside the meta object:

  • ver - the format version. Currently 2!!
  • tab - the name of the config tab in Datapack Toolkit. Should be the name of your pack.

Widgets

Widgets define the graphical user interface for the config.

Methods

Methods describe what values in the data pack to modify, how, and where to find them. They take input from a widget, and then use that to change a value somewhere in the data pack.

Slots

Slots are variables. They can be written to by widgets, and accessed inside method transformers with the prefix $ like this: "$slot_name".

You can define their default values inside an object at the same level as widgets and methods. Using them is not necessary, it's just a neat feature.

They can also be created on the fly by widgets, but I highly discourage you from doing so.

The "input", "in" slot names are reserved for method input and therefore you can't use them.

Clone this wiki locally