Skip to content

Getting Started with Customs

amione edited this page Jan 3, 2025 · 3 revisions

Introduction to Customizing DarkwoodCustomizer's Customs

DarkwoodCustomzer's configurations are controlled by JSON files, which are simple, human-readable data formats often used for configuration settings. These files contain information which the mod will edit the game's values with.

By editing these JSON files, you can:

  • Change item properties like damage, range, or durability.
  • Customize enemy stats.
  • Customize the player's stats.

Editing JSON Files

What is JSON?

JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write. In the context of Darkwood, JSON files store settings and data that the game engine reads to determine how things should behave.

A typical JSON file looks something like this:

{
  "nail": {
    "iconType": "nail",
    "maxAmount": 50,
    "stackable": true,
    "name": "Nail",
    "description": ""
  }
}

Each piece of data is stored as a key-value pair, where the key is the name (like "maxAmount") and the value is what you want to assign (like 50).

How to Edit JSON Files

Recommended Tools

While JSON files can technically be edited with any text editor, certain programs are better suited for the task. We recommend using one of the following:

  • Visual Studio Code (VSC):

    • VSC is a powerful, free editor that supports a wide range of file types, including JSON. It offers built-in tools for syntax highlighting, which colors different parts of the JSON file to make it easier to read.
    • It also provides features like autocomplete, error-checking, and JSON format validation, which ensures that your file is correctly structured.
    • How to Use:
      • Download and install Visual Studio Code.
      • Open the JSON file you want to edit by clicking "File" > "Open File."
      • Use the "Format Document" option under the "Edit" menu to clean up the formatting and ensure it's properly indented.
      • Optionally enable automatically formatting on saving a file, which is helpful because you wont need to do the step above manually anymore
  • Notepad++ (NP++):

    • Notepad++ is a lightweight, user-friendly text editor that works perfectly for editing smaller JSON files.
    • It also features syntax highlighting for JSON and supports plugin integration for extra functionality.
    • How to Use:
      • Download and install Notepad++.
      • Open the JSON file by clicking "File" > "Open."
      • Use the "Plugins" feature to install a JSON validation plugin to check your file for errors.

Troubleshooting & Best Practices

  • Use Proper JSON Formatting: JSON syntax errors (e.g., missing brackets, extra commas) are common issues that prevent the game from reading the file.
    • Always check your file for such errors using tools like JSON validators (available in VSC or online tools).
  • Also optionally enable Debug Logging in the main config of the mod which will show you useful information
Clone this wiki locally