Open cxong opened 9 years ago
Do you plan to make it a whole command language, like TCL or what Xonotic has?
No plans; since this is only about setting config values it's not too interesting. Maybe once more functions are exposed, like spawning characters. Then it might be useful to include a scripting language such as Tcl or Lua.
config.h mentions groups, so I thought one would be able to alias a setting of a number of config values.
Like
alias debug {
set screen.resolution = default
set keys.shoot = default
...
}
And then simply apply those by
set debug
or something like that; in order to fake profiles.
The groups aren't really related to that; it's a simple hierarchical grouping of configs which makes a few things more convenient. That is, you might have Game.FriendlyFire (yes/no)
and Game.SightRange (integer)
configs; here Game
would be the group. An example of a convenient thing would be "make a menu out of everything in Game
".
What you mention can be done as functions in a scripting language, which will set a bunch of config values. That would be an advantage with scripting languages - you can implement profiles simply using the language.
Now that config has been refactored and can be set using dot-separated notation, we can build an in-game debug console that can print and set variables. Could be useful for testing.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.