e32wt icon indicating copy to clipboard operation
e32wt copied to clipboard

Persist the value of the config vars across sessions?

Open AvinashReddy3108 opened this issue 1 year ago • 1 comments

When using this stopgap, I have noticed that the value of the configuration variables gets reset to their default values when the game is restarted (as in, EDuke32 is closed and started the next time)

In which case, it would be annoying for someone to use the console to set the values every time EDuke32 is started (I don't know if any autoexec system exists in EDuke32 which can help me here, hence this issue.)

I was going through the EDuke32 documentation to see if we can persist the values of game variables (the same way the game settings like resolution, renderer, sound volume, etc..) and I think this (quoted below) can probably help us in that aspect.

[Gamevars] This section is used to store gamevars with savegamevar in order to preserve things between EDuke32 sessions. In order to put the contents of the gamevar stored here back into memory, use readgamevar.

In short, if we can implement the readgamevar and setgamevar stuff in the CON script, we should be able to persist the customizations in the stopgap across EDuke32 sessions.

AvinashReddy3108 avatar Jan 09 '24 05:01 AvinashReddy3108

EDuke32 supports loading a file named autoexec.cfg on startup.

The gamevars in question could use a new flag that includes them in the settings.cfg without need for autoexec.cfg.

Really though, I just need to integrate the stopgap into EDuke32.

Hendricks266 avatar Jan 09 '24 07:01 Hendricks266