game options not saving in T3D 1.1?
by SeanT · in Torque 3D Professional · 06/08/2011 (5:02 pm) · 7 replies
Hi, Just noticed that the game options like antialiasing, resolution etc. are reset to defaults after every session running the engine. I did not notice this behavior before. Has anyone else noticed this?
#2
for some reason the three lines below my "diagnostic echo" command were uncommented.
06/09/2011 (2:51 pm)
had a little more time to investigate and found the problem is in 'scripts\client\default.cs'// First we execute the core default preferences.
exec( "core/scripts/client/defaults.cs" );
// Now add your own game specific client preferences as
// well as any overloaded core defaults here.
// Finally load the preferences saved from the last
// game execution if they exist.
if ( $platform !$= "xenon" )
{
if ( isFile( "./prefs.cs" ) )
exec( "./prefs.cs" );
}
else
{
echo( "Not loading client prefs.cs on Xbox360" );
}
//Following lines set audio options
// to null in order to avoid Directsound
//Problems
//$pref::SFX::autoDetect = false;
//$pref::SFX::provider = "Null";
//$pref::SFX::device = "SFX Null Device";
echo ("Why is this here?");
$pref::Video::mode = "1280 800 false 32 60 4";
$pref::windEffectRadius = 75.0;
$pref::Physics::threadCount = 4;
//$pref::Video::defaultAnisotropy = 4;
//$pref::PSSM::detailAdjustScale = 0.8;
//$pref::TS::detailAdjust = 0.9;
//$pref::Reflect::refractTexScale = 0.5;for some reason the three lines below my "diagnostic echo" command were uncommented.
#3
06/09/2011 (2:55 pm)
actually this issue only applies to the Pacific Demo. Other projects 'default.cs' do not have anything below the if/else block.
#4
06/09/2011 (3:42 pm)
Is prefs.cs being generated at all? Are there any .dso's that are overriding it?
#5
yes, it does export client and server prefs after exiting. Problem was that default.cs would load the user prefs.cs file and then right after that the video prefs were hardcoded. Works fine with those lines removed. Looks like that code just didn't get removed before packaging. I should also mention that this was from a clean install of 1.1 final.
06/09/2011 (4:01 pm)
hi Scott,yes, it does export client and server prefs after exiting. Problem was that default.cs would load the user prefs.cs file and then right after that the video prefs were hardcoded. Works fine with those lines removed. Looks like that code just didn't get removed before packaging. I should also mention that this was from a clean install of 1.1 final.
#6
06/09/2011 (4:19 pm)
Strange, if it's exporting the prefs.cs that should be overriding the defaults.cs. The settings specified in the defaults were intentional as we wanted those settings enabled by default.
#7
since it's in the 'core' folder?
edit:
Oh, i see the big picture now..
looks like lines 11-38 should be in 'core\scripts\client\default.cs'
that would set a higher quality view initially, and could then be overridden by prefs.cs
06/09/2011 (4:40 pm)
Ah, i see. I think... But doesn't the second line in above code load default settings?exec( "core/scripts/client/defaults.cs" );
since it's in the 'core' folder?
edit:
Oh, i see the big picture now..
looks like lines 11-38 should be in 'core\scripts\client\default.cs'
that would set a higher quality view initially, and could then be overridden by prefs.cs
Associate Steve Acaster
[YorkshireRifles.com]