Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Simple Settings

An asset by WidgitLabs
The page banner background of a mountain and forest
Simple Settings hero image

Quick Information

0 ratings
Simple Settings icon image
WidgitLabs
Simple Settings

A simple settings manager for Godot 4+.

Supported Engine Version
4.0
Version String
1.0.1
License Version
MIT
Support Level
community
Modified Date
2 days ago
Git URL
Issue URL

Simple Settings

A simple settings manager for Godot 4+.

What Is This

When we started working on our first major project with Godot, we decided that for the sake of standardization, we wanted a simple, reusable settings manager. The closest we could find to what we were looking for was a little addon called Godot Settings Manager, but it was a bit outdated and didn't comply with our code standards. So... we thought we could improve on it! Simple Settings is the result.

Installation

Note: Simple Settings requires Godot or Redot 4 or later.

Using the Asset Library

  • Open the editor.
  • Navigate to the AssetLib tab at the top of the editor and search for "Simple Settings".
  • Install the Simple Settings plugin.
  • Open Project > Project Settings, go to Plugins and enable the Simple Settings plugin.

Manual Installation

Manual installation lets you use pre-release versions of this plugin by following the main branch.

  • Download the latest release or clone this Git repository:

    git clone https://gitlab.com/widgitgaming/godot/simple-settings.git
    
  • Move the simple-settings/ folder to the addons folder in your project.

  • Open Project > Project Settings, go to Plugins and enable the Simple Settings plugin.

Usage

Once you have the plugin installed and activated, you can start building your settings. First off, you'll have to tell the plugin what settings files to implement. To do so, set the config_files variable as follows:

SimpleSettings.config_files = {
    game = {
        path = "user://game.ini",
    },
    player = {
        path = "user://player.ini",
    },
}

The above example will create a game.ini file and a player.ini file in the user directory defined in Project Settings.

Once you've defined your config files, load the library:

SimpleSettings.load()

Once Simple Settings is loaded, the rest is up to you! Using the above config file array as an example, you can save a setting to game.ini like so:

// Params: <file>, <section/setting>, <value>
SimpleSettings.set_value("game", "misc/first_run", false)

The above code will result in the following being written to game.ini:

[misc]

first_run = false

Similarly, you can get a value from a config file as follows:

// Params: <file>, <section/setting>, <default value>
SimpleSettings.get_value("game", "misc/first_run", true)

Simple Settings is capable of much more, and the code is well documented. We encourage you to explore and provide feedback, and check back regularly for updates!

A simple settings manager for Godot 4+.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Simple Settings icon image
WidgitLabs
Simple Settings

A simple settings manager for Godot 4+.

Supported Engine Version
4.0
Version String
1.0.1
License Version
MIT
Support Level
community
Modified Date
2 days ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers