In this article, we will look at how to find and edit JSON and CFG config files for Minecraft mods. JSON and CFG are the two most commonly used formats for modded configuration files.
Contents
- Finding Configuration Files
- Editing Configuration Files
- Modded Minecraft Config File Types
- File Type rules
- Further Reading & External Links
Finding Config Files With Multicraft
Multicraft is set to look for configuration files in the locations where they would normally be put and put them all in one spot for easy searching, you can find steps below on how to search all of the config files that Multicraft finds:
- Log into Multicraft
- In the
Files
section of the side menu on the left, selectConfig Files
. - You can filter the files by using the search boxes above each column, if you want to find a configuration for a specific mod, you can search the mod name in the
Description
column of the config file list.
Finding Config Files With FTP
This section is only for users who are familiar with how to use FTP to: Upload and Download Files with FTP
Config files for mods are most commonly located in the config
folder of your server. When mods don't use this location the config file can be hard to find, most mod authors will typically tell you where the config file is on the main page for the mod, check to see if it indicates there if you can't find the config in this folder.
Editing Configuration Files
STICKY NOTE
Before you edit any configuration files, stop your server and take a backup of the world.
Editing Config Files with Multicraft
- Click the name of the file you would like to edit in the file list of the
Config Files
menu in Multicraft. - Edit the config however you want
- At the bottom of the page hit
Save
when you are done.
Editing Config Files with FTP
Editing files downloaded with FTP can be done in any editor, we highly recommend using Notepad++ which can be downloaded for free from:
Notepad++ Downloads
Editing configuration files can be confusing because the text will not be highlighted to help you know what means what and it is much easier to break something. For this reason we highly recommend editing configuration files through Multicraft.
Modded Minecraft Config File Types
CFG File Type Overview
A config properties file is a type of file that makes data easier for humans to read. This is the format that most mods will use for their configurations. Below you can find an example of what cfg data looks like.
# this is a comment, it can be used to give information to the human only
# this is a direct value assignment
option_1_name = option_1_value
# This is a list of values
> option_2_name
option_2_value_1
option_2_value_2
option_2_value_3
<
JSON File Type Overview
JSON is another type of data file that some mods will use, this format is often harder for humans to be able to read as it does not allow the use of comments in most cases. JSON also has very strict rules for how it is written, and violating those rules can cause the server or mod not to start, or even cause the mod/server to behave in an unexpected way. Below you can see an example of valid JSON:
{
"option_1_name": "option_1_value",
"option_2_name": [
"option_2_value_1",
"option_2_value_2",
"option_2_value_3",
42
],
"option_3_name": {
"option_3.1_name": "option_3.1_value",
"option_3.2_name": 9001,
"option_3.3_name": 3.141
}
}
As you can see, without comments that can get hard to read depending on how complicated the configuration is, we always recommend verifying to make sure that any JSON you write is correct using the validator below:
JSONLint
Zenscript Overview
Very rarely, a mod will use a Zenscript file for it's configuration, this article won't discuss Zenscript, due to it being almost a full on programming language. Only a very small subset of mods will use this configuration file type, for information on how to edit Zenscript you can use the official documentation: Zenscript Documentation
File Type Rules
CFG Rules
CFG files have a fairly simple way of being written, below are the rules on which CFG files are written. Most mod configurations will have all the tags that they look for already in the file, along with a brief description in a comment about what happens, these rules will help you to understand what is happening in these files so you aren't confused while modifying them.
- To associate a single value to a tag name, you use
tag_name = value
(replacingtag_name
with the name of the tag you'd like to use, andvalue
with the value of it). - Comments begin with a
#
(hashtag) at the start of the line - If you want to associate multiple values to a single tag, you can do that by using:
Where the tag_name is usually set by the mod authors, if it is set, do not change it as the mod will be looking for that exact name. The values are slightly more forgiving, they may be changed to different values depending on the mod, the mod will often indicate what values are allowed in a comment before it or on a wiki.> tag_name value_1 value_2 <
JSON Rules
JSON is more strict in it's writing than CFG, so you should be extra diligent while filling it in so as to make sure that no errors occur. Below are some of the more prominent rules in JSON, a full description can be found at the official JSON specification: JSON Specification
- Comments are not supported by default. You may see some keys with a name like
comment1
to indicate that the value is a comment, not all configs will try to use comments and just use a website documentation or help document inside of the folder instead. - Keys must be enclosed in double quotes (
"
), followed by a colon (:
), then a value. Example:"key_name": "value"
(note: not all values are enclosed in quotes, see the values list for more information) - Values can be one of the following types:
- String: A series of characters inside of double quotes. In order for double quotes to be able to be in the string they must be escaped by putting a backslash (
\
) in front of it (Ex:\"
). (Ex:"This is a string, it can have anything in it. Like: 90187491ht3iou32nr83. If I wanted to \"quote something\" inside of the string, I'd need to escape those double quotations with a backslash"
) - Number: A number that can be a whole number (Ex:
42
), a decimal number (Ex:3.141
), or a number represented in scientific notation (Ex:9.001e+3
) - Object: An object is a sub list of keys and values enclosed by a pair of curly brackets (
{}
). These objects will rarely need to be created by the user, this is usually something the mod creator will use just to group options better. - Array: An array is a list of values associated with that key enclosed by square brackets, the values that are within the array can be any of the value types in this list (including array). The values in an array are separated by a comma (
,
). Example:["value_1", 42, 3.141, "value_4"]
- Boolean: A boolean value indicates a true/false scenario, the only values that are considered boolean are
true
andfalse
, and they must be spelt exactly like that, they cannot have uppercase letters, and are not enclosed in quotations. Example:"key_name": true
- Null:
null
is a special value that denotes "nothing", some configs will use this as placeholder values until it is filled in.
- String: A series of characters inside of double quotes. In order for double quotes to be able to be in the string they must be escaped by putting a backslash (
- Key/Value pairs must be enclosed in curly brackets (
{}
) and separated with a comma (,
). Example:{"key_1": "value_1", "key_2": "value_2"}
JSON does not care about any spacing, so you can have it all on one line, or split across multiple lines and it will behave exactly the same way unless you broke a string by splitting across lines.
Further Reading & External Links
- Source: CFG File Format
- JSON Linter (Verifier)
- JSON Specification
- Notepad++ Downloads
- Zenscript Documentation
StickyPiston Support
If you have questions about this guide or any part of our Minecraft services, please open a support ticket and our dedicated team will be in touch.
Open Support Ticket