Dusty Posted August 31, 2013 Posted August 31, 2013 Um, so I've been having this problem. I have no code mods at all on my JASP, no OpenJK, no nothing. But as I've said in this topic (http://jkhub.org/topic/2326-my-jaconfig-hates-me-it-keeps-resetting/), I have this problem: Everytime I exec my initialize.cfg ingame, and load a savegame or devmap (I have to do this or it won't reset), once I exit, on the next session a cvar_restart is triggered upon the game launching and everything is gone, from my user-set cvars to my video settings and my controls. At least I'm almost positive this is what is happening. Here's what the initialize config looks like: seta ui_mblockbutton 1seta ui_meleebutton 1seta ui_glowintensity "seta r_dynamicglowintensity 1.13f"vstr ui_glowintensityseta ui_holsterbutton "bind - weapon0"vstr ui_holsterbuttonseta ui_cameracontrols "bind p vstr camera"vstr ui_cameracontrolsseta tipcyclenext 1vstr tip1seta ui_saberautoaim "seta g_saberautoaim 1"vstr ui_saberautoaimseta ui_saberatkrolling "seta g_sabermovespeed 1"vstr ui_saberatkrollingset bob 1sets bob 1seta bob 1setu bob 1 I thought maybe it was an issue with the r_dynamicglowintensity which is a cheat-protected cvar, but after taking that out I still had the same problems. The main things I've found in the code are this cvar_restart_f, and the console command ingame called cvar_restart. Visual Studio was showing that no calls are made to the cvar_restart_f function from nowhere else in the code, so I can't figure out what's causing this. The only thing it checks for in it's declaration/definition or whatever in the cvar.cpp is that it checks for "safe" on the command line to see if it should run (automatically?). I am NOT running the game in safe mode however, so unless the game is adding this to it's command line by itself or something, so that shouldn't be what's happening.
eezstreet Posted August 31, 2013 Posted August 31, 2013 Type "safe" in the console and see what pops up.Also I'm pretty sure vstrs don't save. A lot of the stuff you've got in that script is extremely redundant.
Dusty Posted August 31, 2013 Author Posted August 31, 2013 Type "safe" in the console and see what pops up.Also I'm pretty sure vstrs don't save. A lot of the stuff you've got in that script is extremely redundant. Says unknown command in the main menu, and no response ingame for typing safe. And vstrs do save under certain circumstances. All the stuff in the script is so certain menu items relying on those cvars displays correctly. The bob thing on the end is just a test variable I left in to see if I could figure out what was causing this. Also, in the topic actually, I'm not sure if cvar_restart_f is what the game calls. It's actually in the check for com_safemode in the code where it says about a "cvar_restart" somewhere, which I mixed up. Cvar_restart_f is just the coding for the command I think.
eezstreet Posted September 1, 2013 Posted September 1, 2013 Oh, then try com_safemode perhaps. May I ask what this script is for?
ensiform Posted September 1, 2013 Posted September 1, 2013 "safe" only exists on command-line to determine of skipping the relevant game config (ie: jaconfig.cfg / openjk_sp.cfg etc), its not a real command or a real cvar. Also, the dynamic glow cvars have been removed of their cheat status in OJK (and just a few minutes ago also in OJK SP) I really doubt anything is actually calling cvar_restart, rather config just isn't being saved or loaded as per safe-mode as explained.
Dusty Posted September 1, 2013 Author Posted September 1, 2013 Oh, then try com_safemode perhaps. May I ask what this script is for? That's not a cvar; I already tried . And like I said it's for mah menu items. A menu item that operates using ui_glowintensity won't work right if ui_glowintensity doesn't exist. I need to set it first. And I've tried everything now just short of using OpenJK. I tried reinstalling the game, setting the jaconfig as read-only (which the game still deleted it and made a new one with all the defaults), and I don't know what else to do.
Dusty Posted September 1, 2013 Author Posted September 1, 2013 I'm pretty sure +safe is being added to the game's command line or something. Anyway I can get at that?
eezstreet Posted September 1, 2013 Posted September 1, 2013 Run the game using a .bat in order to be certain.
Dusty Posted September 1, 2013 Author Posted September 1, 2013 How would I do that? I know how to save a .txt as a .bat file but what would I write in it exactly? EDIT: Can I make a .bat file that just runs JASP? I've been using a custom shortcut for adding command line commands to the game but I haven't gotten anywhere.
Dusty Posted September 1, 2013 Author Posted September 1, 2013 Ugh. It did it with the .bat file too.
Dusty Posted September 1, 2013 Author Posted September 1, 2013 So I've isolated the problem to these two lines in my initialize.cfg: seta ui_saberautoaim "seta g_saberautoaim 1"vstr ui_saberautoaim Everything else works fine. Why? This whole time, it's really been just these two fracking lines of script causing ALL my problems? Heh. Must be some hardcoded cvar value conflict. Either way, it really disturbs me something so small could cause so much trouble.
Dusty Posted September 1, 2013 Author Posted September 1, 2013 Now it's doing it again... EDIT: Seems that I have to remove both the commands pertaining to g_saberautoaim and r_dynamicglowintensity from the config. Part of the reason for the .cfg not working was I left a copy in one of my .pk3s that had those commands and would exec along with the config that didn't?
Dusty Posted September 1, 2013 Author Posted September 1, 2013 So, I think the problem is this simple: JA doesn't like being forced to remember cheat-protected cvars or cvars that aren't loaded by the main menu (g_saberautoaim is loaded ingame) by seta commands and what not under certain circumstances.
Circa Posted September 1, 2013 Posted September 1, 2013 Why don't you just have "helpusobi 1" the first line in autoexec.cfg?
Dusty Posted September 1, 2013 Author Posted September 1, 2013 ^Doesn't work. OpenJK seems to have fixed it though. I'm happeh.
Xycaleth Posted September 1, 2013 Posted September 1, 2013 Probably a bug in JKA. You shouldn't be able to set cheat-protected cvars in your config file anyway
Dusty Posted September 1, 2013 Author Posted September 1, 2013 I can with helpusobi 1. I can't control the game wigging out though because I'm trying to save them between sessions.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now