CVARs and mods

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
GooberMan
Posts: 1336
Joined: Fri Aug 08, 2003 12:57 am
Location: Helsinki, Finland

CVARs and mods

Post by GooberMan »

I'm putting in a nice little slider to alter the text speed in Prime Directive (pretty much a contingency in case I don't achieve my lofty goal of complete voice acting). Setting up MENUDEF that hooks in to a CVAR is simple enough, but there's one big snag.

Namely, it doesn't work unless I've previously set and archived the relevant CVAR and restarted ZDoom.

This is clearly a problem if I intend for this value to be used by anyone downloading the mod. No one would know about the CVAR before hand, so launching the game will result in a slider that can't be slid. I've got code that handles 0 values from an unset CVAR, but it makes the slider effectively useless and pointless.

A quick Google hasn't revealed a way around this. Is there something I've missed that would allow me to define this CVAR? KEYCONF seems thoroughly unable to do this, and it would be the one place I'd expect it to be in.
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: CVARs and mods

Post by edward850 »

There is currently no method to define a unique per mod CVAR, and to have this would also require something to define Net CVARs (CVAR_SERVERINFO) outside of the source code, which are required for demos and netgames. And there is a current limitation of 32 of these.
Locked

Return to “Editing (Archive)”