Results 1 to 24 of 24
  1. #1
    MSgt. Shooter Person
    Join Date
    Sep 2010
    Posts
    79

    Default Reading system settings?

    I've tried to ignore this part for quite a while now but the time has come. The time to implement system settings. My current issue is that I can't figure out how to read current system settings values to use.

    My plan is to have a Scrolling List that contains a label and a optionstepper. This part I got covered. What I need now is to fill my list of optionsteppers with info.
    So basically where I am at now is at extracting the settingsdata from the udkgame ini file. Any standard methods for doing that?

  2. #2
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Deal, UK
    Posts
    42
    Gamer IDs

    Gamertag: SweptSquash PSN ID: SweptSquash

    Default

    I'm not quite certain on how to read the settings from the UDKEngine.ini thats something we're still working on however you can save the users settings to the UDKEngine.ini using a set of console commands which can be found here http://udn.epicgames.com/Three/Conso...tings Commands (Bottom of the page under System Settings Commands). Hope this helps.

  3. #3
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    31

    Default

    Any update on this? I'm in the same situation... Setting the values is easy, but I haven't found any way whatsoever to read what is currently set .

  4. #4
    MSgt. Shooter Person
    Join Date
    Sep 2010
    Posts
    79

    Default

    Quote Originally Posted by Duker View Post
    Any update on this? I'm in the same situation... Setting the values is easy, but I haven't found any way whatsoever to read what is currently set .
    Other than creating a custom wrapper class around the actual settings I haven't found anything that works using UDK.

  5. #5
    MSgt. Shooter Person
    Join Date
    Jul 2009
    Posts
    135

    Default

    Sid were you able to make any progress on this? I'm working on this too.

    Initially I'm thinking there would be a datastore that contains all of system settings and their friendly names but it doesn't appear to exist in UDK.

    I got the idea from the way they pull the game mode options for host game. Look at GFxUDKFrontEnd_Settings (the Multiplayer | Host | Settings screen specifically.)

  6. #6
    MSgt. Shooter Person
    Join Date
    Jul 2009
    Posts
    135

    Default

    Also, based on these two things we should be able to read them from the engine.ini

    http://udn.epicgames.com/Three/SystemSettings.html

    http://udn.epicgames.com/Three/ConfigurationFiles.html

  7. #7
    MSgt. Shooter Person
    Join Date
    Sep 2010
    Posts
    79

    Default

    Quote Originally Posted by Skalamondre View Post
    Sid were you able to make any progress on this? I'm working on this too.

    Initially I'm thinking there would be a datastore that contains all of system settings and their friendly names but it doesn't appear to exist in UDK.

    I got the idea from the way they pull the game mode options for host game. Look at GFxUDKFrontEnd_Settings (the Multiplayer | Host | Settings screen specifically.)
    As you said those things are not accessible from UDK, you need access to native code.

    I think that the only solution is to create a wrapper for the system settings. Create a class that saves to a config file and add values for the different settings you want to adjust, when you start the game you can read those values and set them to the engine via console commands.

  8. #8
    MSgt. Shooter Person
    Join Date
    Jul 2009
    Posts
    135

    Default

    Aside from GAMMA and SETRES is it possible to enable/disable/change advanced video options such as Anti-Aliasing level?

    It almost seems you would need a "video restart" command that would apply all the new settings. Right now the way I see it I would have to say "Changes will take effect when you restart the game."

  9. #9
    MSgt. Shooter Person
    Join Date
    Sep 2010
    Posts
    79

    Default

    Yes you can change the advanced settings with console command. Check out this page for more info. http://udn.epicgames.com/Three/Conso...ds.html#System Settings Commands

    The last topic on the page is called "System Settings Commands", you'll find everything you need there. But to give you an example:

    Enable/disable AmbientOcclusion: "scale set AmbientOcclusion false"

  10. #10
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    193

    Default

    Hi there, I've been working on the same myself. I have already gone through the system settings and I see that, if you change them, everything updates in realtime (most of the time). For example you can turn on-off dynamic shadows on the fly, AO, and such.

    For the settings menu I also need to change volume, brightness and maybe a couple of things (I'm keeping it simple, so I won't be adding tens of settings). The problem is I don't know how to set those up.

    I know I can change the brightness using the gamma command "gamma (value)" and that the DisplayGamma in the engine.ini controls that, but how can I replace that value? I tried creating my own test command using SaveConfig but it creates another category with a new DisplayGamma setting that does nothing.

    I can also run the volume commands, but don't know how to store those values either.

    How do you save those types of values?

  11. #11
    MSgt. Shooter Person
    Join Date
    Jul 2009
    Posts
    135

    Default

    Good to see another soldier fighting this battle. It appears to me that the UDK doesn't save the sound volume anywhere. I think that was stripped out. I noticed that UT3 saved the volume settings in the engine ini file under something that looked like this:

    Code:
    [Engine.AudioDevice]
    +SoundGroups=(GroupName=Weapon,Properties=(Volume=1))
    I believe Gamma is the same situation. You can set it manually however it doesn't get written out when the engine quits (unlike the other system settings.) I don't think you can access the Gamma or display settings yourself in the INI since they don't have classes associated with them. They are native settings.

    For now I think we will have to read and apply the setting ourselves whenever the game starts. Kinda lame but seems the only way. Maybe Epic is in the middle of revisions on these.

    By the way, have you tried to apply a setres console command from script? Mine crashes UDK when I do it but works fine when I type it in myself. Another battle

  12. #12
    Iron Guard
    Join Date
    Dec 2009
    Location
    Ontario, Canada
    Posts
    632

    Default

    Seems everyone is hacking a solution for a settings page. I would like to see

    GetSystemSetting, SetSystemSetting and RestartGame

    added as static functions in the Engine class to allow these settings to be adjusted. I think it would allow people to have full blown proper settings pages without having to hack this functionality into them using console commands and wrappers to store the possibly current settings.
    Mike

  13. #13

    Default

    Is this still an issue? I can't find a single tutorial for how to read the current state of system settings... Surely there has to be a way.

  14. #14
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    193

    Default

    Well I've found myself rather "tricking" it into returning the settings. What settings are you trying to get?

    EDIT: in some cases I will just override those to set my own at runtime, for example manually enabling or disabling motionblur, setting my own gamma setting, and such...

  15. #15

    Default

    All of them really... so I can make a settings GUI that shows the user the current settings and offers alternatives. specifically:

    Current Resolution, Fullscreen/windowed, Gamma Correction, DirectX11, Antialiasing, shadows, depth of field, SSAO, Post Processing, Texture filtering, Vsync, Tripple buffering....

    All the usual suspects you'd expect to find in an settings menu.

    All the stuff is in SystemSettings and I can't access it to read the current settings. Most of it can be changed through SET and SCALE commands, but I want to read the current value so it can be displayed.
    Its all in UDKEngine.ini

    Code:
    [SystemSettings]
    bUseMaxQualityMode=False
    StaticDecals=True
    DynamicDecals=True
    UnbatchedDecals=True
    DecalCullDistanceScale=1.000000
    DynamicLights=True
    DynamicShadows=True
    LightEnvironmentShadows=True
    CompositeDynamicLights=True
    SHSecondaryLighting=True
    DirectionalLightmaps=True
    MotionBlur=True
    MotionBlurPause=True
    MotionBlurSkinning=1
    DepthOfField=True
    AmbientOcclusion=True
    Bloom=True
    bAllowLightShafts=True
    Distortion=True
    FilteredDistortion=True
    DropParticleDistortion=False
    bAllowDownsampledTranslucency=False
    SpeedTreeLeaves=True
    SpeedTreeFronds=True
    OnlyStreamInTextures=False
    LensFlares=True
    FogVolumes=True
    FloatingPointRenderTargets=True
    OneFrameThreadLag=True
    UseVsync=False
    UpscaleScreenPercentage=True
    Fullscreen=False
    AllowD3D11=False
    AllowOpenGL=False
    AllowRadialBlur=True
    AllowSubsurfaceScattering=True
    AllowImageReflections=True
    AllowImageReflectionShadowing=True
    bAllowSeparateTranslucency=False
    bAllowPostprocessMLAA=False
    SkeletalMeshLODBias=0
    ParticleLODBias=0
    DetailMode=2
    MaxDrawDistanceScale=1.000000
    ShadowFilterQualityBias=0
    MaxAnisotropy=4
    MaxMultiSamples=1
    bAllowD3D9MSAA=False
    bAllowTemporalAA=False
    TemporalAA_MinDepth=500.000000
    TemporalAA_StartDepthVelocityScale=100.000000
    MinShadowResolution=64
    MinPreShadowResolution=8
    MaxShadowResolution=1120
    MaxWholeSceneDominantShadowResolution=1344
    ShadowFadeResolution=128
    PreShadowFadeResolution=16
    ShadowFadeExponent=0.250000
    ResX=1280
    ResY=720
    ScreenPercentage=100.000000
    SceneCaptureStreamingMultiplier=1.000000
    ShadowTexelsPerPixel=1.273240
    PreShadowResolutionFactor=0.500000
    bEnableVSMShadows=False
    bEnableBranchingPCFShadows=False
    bAllowHardwareShadowFiltering=False
    TessellationAdaptivePixelsPerTriangle=48.000000
    bEnableForegroundShadowsOnWorld=False
    bEnableForegroundSelfShadowing=False
    bAllowWholeSceneDominantShadows=True
    bUseConservativeShadowBounds=False
    ShadowFilterRadius=2.000000
    ShadowDepthBias=0.012000
    PerObjectShadowTransition=60.000000
    CSMSplitPenumbraScale=0.500000
    CSMSplitSoftTransitionDistanceScale=4.000000
    CSMSplitDepthBiasScale=0.500000
    CSMMinimumFOV=40.000000
    CSMFOVRoundFactor=4.000000
    UnbuiltWholeSceneDynamicShadowRadius=20000.000000
    UnbuiltNumWholeSceneDynamicShadowCascades=3
    WholeSceneShadowUnbuiltInteractionThreshold=50
    bAllowFracturedDamage=True
    NumFracturedPartsScale=1.000000
    FractureDirectSpawnChanceScale=1.000000
    FractureRadialSpawnChanceScale=1.000000
    FractureCullDistanceScale=1.000000
    bForceCPUAccessToGPUSkinVerts=false
    bDisableSkeletalInstanceWeights=false
    HighPrecisionGBuffers=False
    AllowSecondaryDisplays=False

  16. #16
    Iron Guard
    Join Date
    Nov 2011
    Location
    Somewhere on Earth.
    Posts
    659

    Default

    You can create a Custom Standalone Game Launcher (eg: Game Launcher from Batman Arkham series games) using Visual Basic 2010 Express (Free to download). You can change all these settings via Custom Launcher.

    Quote Originally Posted by Zitheral View Post
    Code:
    [SystemSettings]
    bUseMaxQualityMode=False
    StaticDecals=True
    DynamicDecals=True
    UnbatchedDecals=True
    DecalCullDistanceScale=1.000000
    DynamicLights=True
    DynamicShadows=True
    LightEnvironmentShadows=True
    CompositeDynamicLights=True
    SHSecondaryLighting=True
    DirectionalLightmaps=True
    MotionBlur=True
    MotionBlurPause=True
    MotionBlurSkinning=1
    DepthOfField=True
    AmbientOcclusion=True
    Bloom=True
    bAllowLightShafts=True
    Distortion=True
    FilteredDistortion=True
    DropParticleDistortion=False
    bAllowDownsampledTranslucency=False
    SpeedTreeLeaves=True
    SpeedTreeFronds=True
    OnlyStreamInTextures=False
    LensFlares=True
    FogVolumes=True
    FloatingPointRenderTargets=True
    OneFrameThreadLag=True
    UseVsync=False
    UpscaleScreenPercentage=True
    Fullscreen=False
    AllowD3D11=False
    AllowOpenGL=False
    AllowRadialBlur=True
    AllowSubsurfaceScattering=True
    AllowImageReflections=True
    AllowImageReflectionShadowing=True
    bAllowSeparateTranslucency=False
    bAllowPostprocessMLAA=False
    SkeletalMeshLODBias=0
    ParticleLODBias=0
    DetailMode=2
    MaxDrawDistanceScale=1.000000
    ShadowFilterQualityBias=0
    MaxAnisotropy=4
    MaxMultiSamples=1
    bAllowD3D9MSAA=False
    bAllowTemporalAA=False
    TemporalAA_MinDepth=500.000000
    TemporalAA_StartDepthVelocityScale=100.000000
    MinShadowResolution=64
    MinPreShadowResolution=8
    MaxShadowResolution=1120
    MaxWholeSceneDominantShadowResolution=1344
    ShadowFadeResolution=128
    PreShadowFadeResolution=16
    ShadowFadeExponent=0.250000
    ResX=1280
    ResY=720
    ScreenPercentage=100.000000
    SceneCaptureStreamingMultiplier=1.000000
    ShadowTexelsPerPixel=1.273240
    PreShadowResolutionFactor=0.500000
    bEnableVSMShadows=False
    bEnableBranchingPCFShadows=False
    bAllowHardwareShadowFiltering=False
    TessellationAdaptivePixelsPerTriangle=48.000000
    bEnableForegroundShadowsOnWorld=False
    bEnableForegroundSelfShadowing=False
    bAllowWholeSceneDominantShadows=True
    bUseConservativeShadowBounds=False
    ShadowFilterRadius=2.000000
    ShadowDepthBias=0.012000
    PerObjectShadowTransition=60.000000
    CSMSplitPenumbraScale=0.500000
    CSMSplitSoftTransitionDistanceScale=4.000000
    CSMSplitDepthBiasScale=0.500000
    CSMMinimumFOV=40.000000
    CSMFOVRoundFactor=4.000000
    UnbuiltWholeSceneDynamicShadowRadius=20000.000000
    UnbuiltNumWholeSceneDynamicShadowCascades=3
    WholeSceneShadowUnbuiltInteractionThreshold=50
    bAllowFracturedDamage=True
    NumFracturedPartsScale=1.000000
    FractureDirectSpawnChanceScale=1.000000
    FractureRadialSpawnChanceScale=1.000000
    FractureCullDistanceScale=1.000000
    bForceCPUAccessToGPUSkinVerts=false
    bDisableSkeletalInstanceWeights=false
    HighPrecisionGBuffers=False
    AllowSecondaryDisplays=False
    I made two part tutorial on how to do it.

    Part I (Designing)
    Youtube

    Part II (Coding)
    Youtube

    You can get my project files from my signature.

    Hope this helps.

  17. #17

    Default

    Thank Ryan... that is very kind of you. I actually stumbled onto that while researching the problem. I can honestly say that I am SHOCKED that it isn't possible to read and set those values from script.

    UDK has so many very powerful, very good tools -- and yet I can't access and change the system settings? I'm flabbergasted. It seems impossible that it has been this way for 2+ years. How hard would it be to implement exposed functionality to read and set those variables even if they don't want to uncover anything else? We shouldn't need an outside utility to set graphics options

    But thanks again Ryan!

  18. #18
    Iron Guard
    Join Date
    Nov 2011
    Location
    Somewhere on Earth.
    Posts
    659

    Default

    Quote Originally Posted by Zitheral View Post
    We shouldn't need an outside utility to set graphics options
    You are right...I thought of making this Game Launcher because just like you, i also wondered how to make a settings menu. Then i found out that its easier to make a Standalone Launcher that can read and write INI values instead of doing it with Scaleform.

    Sometime ago i received a raw script on changing settings from my online friend. I think i have them. I'll search and let you know if i find it.

    EDIT: Got it. Check your PM

  19. #19
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    193

    Default

    Yes you can change system settings via script. Check the console commands page for some things (like resolution, "setres 1024x768f") and other commands that can be used to change the volume, graphics quality, postprocess, gamma, and pretty much everything else. You change them via commands and they are stored in the UDKEngine.ini file.
    I don't remember how to read those commands, though. Off the top of my head, I remember sapitu can write stuff to any config file, but I'm not sure if you can read those values from the default config files.

    The launcher is also a good option, but I think it's used more for convenience than anything else, for example, using it as an excuse to make players change the default resolution rather than launching the game at some random resolution value. I found that you can, however, make Unreal to detect your current resolution if you put some randomly high resolution setting (for example 3000x3000). The game launches at that rez, but since it won't "fit" on your screen it automatically scales down to whatever your resolution is set to (for example 1600x1200 on my case) and store that setting as the new resolution setting.

    I still use launchers for my projects, though, just because I don't want players to dig for the UDK.exe file under binarnies\win32\ and because I want a custom icon.

  20. #20

    Default

    This is how I went about it earlier this year: http://forums.epicgames.com/threads/...58641#poststop
    Maybe it helps you guys in some way and you can go from there to implement all the other settings you'd like in your menu. But yeah, sometimes you need some magic to get your values. :\
    Oh, and while we're at it: You may also want a ranged optionstepper - http://forums.epicgames.com/threads/...porting-floats though a slider would be much more convenient for the user.

  21. #21

    Default

    As for Gamma you can do this:
    Code:
    ConsoleCommand( "Gamma" @ SGamma.Value );	// Necessary to actually change it on run-time.
    class'Client'.default.DisplayGamma = SGamma.Value;	// Won't be saved if you don't change this!
    class'Client'.static.StaticSaveConfig();
    And for reading:
    Code:
    SGamma.Value = class'Client'.default.DisplayGamma;

  22. #22

  23. #23
    MSgt. Shooter Person
    Join Date
    Dec 2010
    Posts
    193

    Default

    I can't find any "client" class, or is it something you manually created?

  24. #24

    Default

    "Client" is a Native only class. It exists but isn't mirrored in UnrealScript.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.