team-eternity / eternity

The Eternity Engine
http://eternity.youfailit.net/wiki/Main_Page
GNU General Public License v3.0
230 stars 36 forks source link

[Possibly already in] Launch the game specifiying CVAR values from command line? #600

Open hfc2x opened 1 year ago

hfc2x commented 1 year ago

Hey, I don't know if this is already a feature, but if it's not, it would be nice to have the possibility of adding user-defined values to certain CVARs like Quake games (for example) allow to do.

This is mostly because I'm having trouble getting Eternity to detect my Master Levels folder by default on Linux, and the master_levels_dir CVAR can be directly written to in the console, but I wanted to know if there's a way of setting it from the terminal.. at least for the first launch. Currently, the only ways I know this is done is either by using the WAD options when the game is running, or by editing the system.cfg file.

I mentioned the Quake games, because I was thinking probably it could work like this: ./eternity -iwad ./DOOM2.WAD +set master_levels_dir "./Master Levels WADs/".

Can this already be done and it's just not documented, or is it not a feature?

hfc2x commented 10 months ago

I figured out that there's a way around this by making a custom console command script (*.csc file) that sets this CVAR on launch, and using the -exec command to call the desired script, and although this solves the problem it's still not really ideal.