foclassic icon indicating copy to clipboard operation
foclassic copied to clipboard

Config files handling

Open wipe2238 opened this issue 6 years ago • 0 comments

Core apps

  • Client
    • [ ] rename Game Options to Client
    • [x] add sections ClientDX and ClientGL which will be able to overwrite settings in Client
  • Mapper
    • [x] add sections Mapper / MapperDX / MapperGL
    • [x] ~~parse Client* (client cfg), use Mapper* (mapper cfg) for overrides~~ Client/Server sections can be defined in Mapper.cfg and have priority over (Client|Server).cfg
  • Client/Mapper
    • [ ] use valid ini format for interface settings (resolution W H -> [WxH])
  • Server
    • [x] move all settings into Server section
  • all applications
    • [x] config file search order: [executable name].cfg, [original name(s)].cfg

FOConfig

FOnline version will no longer work, obviously, but there's also no reason to upgrade it - once settings are documented, it can be safely dropped and left out in snow.

New shiny thing could be based on FOConfigEx, buried deep in original 2238 repo, or written from scratch in public. It must support adding server-specific settings and other customizations (small example how it could look - first tab reserved for core settings, second for server-specific stuff, last one for configurator itself). Other than that, it must be smart enough to understand sections logic... or their concept has to change :P

  • [ ] prepare configuration tool

IniParser

Handling config files is simply horrible - servers sometime ends with 2 or 3 different parsers, engine uses another one internally, art/intrface/default.ini uses resolution w h for sections, extensions are completely forgotten, and so on...

Way to read .ini, or anything else which will hold apps configuration, must be provided and available out of the box - lack of it is already a blocker for some of planned changes, as i really don't want to add some script as requirement for specific features. Exposing IniParser is obvious choice here - it's not going anywhere after all, it's not tied to any platform, and being a small thing, it shouldn't be hard to make it AS addon if replaced with 3rd party library. NOTES: IniParser is slowly being replaced with much simpler, (nearly) standalone class

  • [ ] port code using IniParser

wipe2238 avatar Oct 27 '18 14:10 wipe2238