specs - GoatGames/ConfigFileManager GitHub Wiki

Config Manager Specs

Introduction

Game designers often use config files to store the different behaviors of the entities in a game. It is an easy way to test, tweak and adapt a game without needing a full rebuild. However such files are cumbersome to edit and can easily become incredibly numerous, making their management a nightmare. This is why the use of a tool can greatly help the management of these files.

Config Model

A config file is a simple .ini file containing properties and their value, and possibly sections. The directory in which the config file is located is called a configuration module. A module located inside another module is called a configuration sub module.

Config inheritance

In order to avoid duplicated properties, it is possible for a config file to inherit another config file. This enables the user to simply specify the new values in the child config (override).

A child config file (called a config override) is always located in the same module as its parent and is named as follows:

parentName_childName.ini

ex:
laserGun_MKI.ini // Laser Gun Mark I inherits laserGun.ini

Full hierarchy example

Config/
   Weapons/
       laserGun/
           laserGun.ini
           laserGun_MKI.ini
           laserGun_MKII.ini
       rocketLauncher/
           rocketLauncher.ini
           rocketLauncher_DoubleRocket.ini

Tool's Features

The tool should provide the user a series of useful features to ease the management of configuration files. A User should be able to load a root configuration module in order to manage its sub modules. The root config module can be any module containing configuration files and/or submodules.

Module management

It should be possible to Create Read Update and Delete a (sub)module and all it's associated config files. Deleting a module should delete all submodules and their config files

Config file management

It should be possible to Create Read Update and Delete files.

Creation of config files

A user must be able to create two flavors of config files:

  • Base Config
  • Config Override

Editing of config files

The GUI should allow the user to edit the values of the config files with appropriate Widgets;

  • Spinners for floats and int
  • Textfield for strings
  • Checkboxes for boolean

Next to each field of a config override there should be a colored label explaining the status the field:

  • New (blue): The field is not defined in the base
  • Override (orange): the field does not have the same value as its base
  • Base (green): the value is the same as its base.

Buttons should be available to:

  • Delete a parameter (if a deletion of field happens in a base class display a warning and delete from child class as well)

  • Add a new parameter

  • Move up or down the location of a parameter.

In the config file, if there is a comment on the line of a parameter, it should be displayed under the corresponding field in the GUI as a description of that parameter.

Deletion of config files

The deletion of a base config file should trigger a warning and automatically delete all the config override of that base.

MOCKUP

mok

Compatibility

Linux/Windows

Coding

The coding should be done in C++ using Qt. The version control will be Git/GitHub. Coding standard, refer to the wiki page: Coding standard for C++

It should work as a standalone app as well as being easy for integration with other Qt projects.