Jump to content

Is there such a command?


Recommended Posts

Posted

Hey there guys, I need some help finding a command for SP.

 

I had a feature planned that I was hoping to implement that used lots of cvars. Now, as you know, save games don't retain cvars, so if you save a game with a cvar set to 1, keeping playing, awhile later set it to 2, then later load the game you saved. The cvar is not 1, it is 2. Now I wanted to fix this, using the writeconfig command along with save. Like so: save game1;writeconfig game 1. But I recently found out that writeconfig only saves binds and other commands, not custom cvars. Is there any commands that dumps all the commands into an .cfg file?

 

Thanks.

Posted

Hmmmm...thanks for the reply. Bummer. How difficult would that be? I know that SP coding isn't easy and is a relatively new area, but how difficult would it be to add the ARCHIVE flag to cvars?

Posted

Aren't there cvars that are quite useless (or not even used) and so could be used (or abused) as a "custom"-cvar?

Posted

Not totally sure. I think there could be some clues in the game exports:

d_JediAI = gi.cvar ( "d_JediAI", "0", CVAR_CHEAT ); <- last arg specifies flags

I haven't totally reverse engineered the cvar struct yet, but I do know that the game imports in gi -could- hold some clues as to how to alter the flags of them. I already have the whole of gi worked out. There's no way to modify the flags of a cvar directly through the jagamex86.dll from within Raven's code though. You'd need to do an engine hack (read: jasp.exe) in order to do such a thing. If I'm right though, changing the flags of a cvar would be done exactly the same way as in MP.

 

That's aside from the fact that temporary/custom cvars aren't totally meant to be archived. If you have a specific use for the custom cvar, I might add a sort of plugin to JAMod that would improve custom cvars for you (no guarantees yet though as I haven't even started on that)

therfiles likes this
Posted

LOL Totally forgot about that... I feel stupid now

 

The quake code says:

 

As Cvar_Set, but also flags it as archived

 

There are also setS and setU which do serverinfo and userinfo

Posted

sets and setu are not really important unless you're trying to network it. sets makes server data known to the client (such as map, number of players, that kind of thing), setu does the opposite (saber color, hilt, et al)

therfiles likes this

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...