openfodder icon indicating copy to clipboard operation
openfodder copied to clipboard

Switching from JSON/INI to YAML as format for configuration/customization

Open winterheart opened this issue 5 years ago • 1 comments

Currently openfodder uses JSON for describing campaigns/mission and INI for configuration. I propose to switch to YAML as more human-friendly format.

Here example of campaign in YAML format:

---
Author: Sensible Software
Name: Cannon Fodder
Missions:
  - Name: THE SENSIBLE INITIATION
    Phases:
      - Aggression:
          - 0
          - 0
        MapName: mapm1
        Name: IT'S A JUNGLE OUT THERE
        Objectives:
          - KILL ALL ENEMY

Library for parsing: https://github.com/jbeder/yaml-cpp

winterheart avatar May 24 '19 19:05 winterheart

I disagree: YAML is not known as JSON, and it has very specific rules to observe too (spaces, indentation, etc); easier to make mistakes than JSON. Global configuration INI is surely more user friendly than Yaml.

We could consider to support YAML too, even if it's not a priority currently.

drnovice avatar May 27 '19 07:05 drnovice