SFTtech / SFTtech/openage

interface to create new cvar variables and their defaults

Open
#813 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

improvement just do it lang: c++ lang: python
Dominant language
Python
Stars
14.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

The cvar manager is used to store key-value pairs for engine settings.

Problem: cvars ("keys") are assumed to exist, and if changed, it's unknown which config file it belongs to.

Possible solution:

  • Extend the CVarManager::create interface to support default values and categories.
    • That way "missing" entries can be recreated
    • Categories allow filename-distinction
  • Map categories to storage file names (i.e. allow creating new categories with an associated filename).

Bonus points:

  • Add writeout-support so all cvars are written out (by category) to the right file (e.g. keybinds.oac).

Location:

  • CVarManager is in libopenage/cvar/
  • cvar reading (and then the writing) in openage/cvar/

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the CVarManager implementation under libopenage/cvar/ and then trace cvar reading and writing under openage/cvar/. Identify how existing keys and configuration files are represented before deciding how defaults, categories, and category-to-file mappings fit together. Done means newly created or missing cvars can be restored and written by category to the appropriate file, including keybinds.oac where applicable.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.