Jump to content

Is there such a command?


Recommended Posts

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.

Link to comment

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
Link to comment

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...