Search Knowledgebase

How To: Edit Mod Config Files

 

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

  1. Finding Configuration Files
    1. Finding Configs Using Multicraft
    2. Finding Configs Using FTP
  2. Editing Configuration Files
    1. Editing with Multicraft
    2. Editing with FTP
  3. Modded Minecraft Config File Types
    1. CFG File Type Overview
    2. JSON File Type Overview
    3. Zenscript Overview
  4. File Type rules
    1. CFG Rules
    2. JSON Rules
  5. 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:

  1. Log into Multicraft
  2. In the Files section of the side menu on the left, select Config Files.
    Multicraft Config Files Menu Entry
  3. 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

Sticky Piston

Before you edit any configuration files, stop your server and take a backup of the world.

Editing Config Files with Multicraft

  1. Click the name of the file you would like to edit in the file list of the Config Files menu in Multicraft.
  2. Edit the config however you want
  3. 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 (replacing tag_name with the name of the tag you'd like to use, and value 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:
    > tag_name
    value_1
    value_2
    <
    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.

 

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 and false, 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.
    Note: JSON does not allow comments within it, meaning that if you find a JSON configuration where will likely be no help inside of the file. If a mod uses a JSON config, then they will often supply help documents either in the folder with the config or on the mod's website.
  • 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


 

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


  • Modded, Multicraft
  • 22 Users Found This Useful

Was this answer helpful?

 Print this Article

Also Read

Reinstalling a modpack on your client

If you are having difficulty connecting to a modded server and you are getting errors like the...

Diagnosing lag issues with a Timings report

If you are running a server with many plugins it can be very difficult to diagnose performance...

How to reset or change the Modpack maps

Map reset script This is a user runnable script that will reset your map to one of the starter...

How to Upgrade or Reinstall your Modded Server

Changing the server option in the control panel does not change the server it just chooses a...

Server is still starting! Please wait before reconnecting.

If you see this screen when trying to join a server, it just means that the server is still...