Announcement

Collapse
No announcement yet.

Auto Settings - Game options and input binding toolkit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Hello!
    I migrated the "SettingsUI" file from the sample project. I moved the plugin to code and I succeeded in building it. We also checked the enable check of the plugin. However, load errors occur in all functions. It is an error "can not find file for asset" and many errors occur. What should I look at? The version is using 4.17.2.

    Leave a comment:


  • replied
    Version 1.2 for UE 4.18 released!

    Changelist:

    New:
    • Added the ability to dynamically prioritize between different Key Groups for action and axis labels. Set this by calling "Set Player Key Group", or "UInputMappingManager::SetPlayerKeyGroupStatic" in code. Example usage for this would be automatically switching input prompts between gamepad and keyboard & mouse when the player changes input mode.
    • To support dynamic Key Group priorities, an empty tag for Key Group now represents "any" rather than the keys that are not used by any other key group. Projects with a gamepad key group will now also probably want a key group for keyboard and mouse. The keys used for prompts using an empty/any key group will be dynamically selected based on the player's Key Group.
    • Similarly, a Mapping Group of -1 represents "any". 0 is still the first mapping group, 1 the next, etc.
    • Added an easy "Use non-gamepad keys" option to Key Group so that users don't have to add every single key to a key group for keyboard and mouse.
    • Added the ability to bind mouse axes so that users can re-bind "look" inputs. Mouse axes can be blacklisted to revert to old behavior.
    • All BindWidget properties are now read-exposed to Blueprint. This means you can now access the internal control of a setting without needing to use code.
    • Exposed "Is CVar Registered" function to Blueprint.

    Fixed:
    • Fixed error logs caused by ActionLabel trying to create widgets at design time.
    • Fixed warning logs caused by trying to register a setting for a CVar that already exists when the game is run past the first time in an editor session.
    • Converted plugin to IWYU to decrease compile times

    Example project:
    • Removed the first Input page with Primary/Secondary columns, now there is a single Input page with Keyboard/Gamepad columns. This is still supported by the plugin but there were too many edge cases related to supporting multiple input layouts in the same project in parallel and in the end it was not worth the extra maintenance cost and complication that it would have to add to the plugin.
    • Added look and turn inputs to the input menu now that mouse axes can be bound.
    • Added more mappings to the "Alternate" preset.
    • Gamepad Right Stick Up and Down are now mapped to axis scales -1 and 1 respectively instead of 1 and -1. This is because the right stick Y axis has the opposite values of the left stick and I didn't realise when initially setting it up.
    • Added video setting for Max FPS.


    As usual please let me know if you run into any issues!
    Last edited by Sam Bonifacio; 07-03-2018, 08:10 AM.

    Leave a comment:


  • replied
    Originally posted by Acren View Post
    JimPhoenix

    Okay, the log errors and warnings will be fixed in the next update (very soon)
    The warnings can also be fixed in the meantime by checking if a CVar is already registered before trying to register it, but you'll need code for that.
    Nice to hear that! Thank you, look forward to the update!

    Leave a comment:


  • replied
    JimPhoenix

    Okay, the log errors and warnings will be fixed in the next update (very soon)
    The warnings can also be fixed in the meantime by checking if a CVar is already registered before trying to register it, but you'll need code for that.

    Leave a comment:


  • replied
    Originally posted by Acren View Post
    JimPhoenix


    Hey! Regarding the mappings, if you rebind any inputs at runtime it will essentially create a branch of the input mappings with the modified inputs. This means that if any inputs are added to the project settings (either the Input page or an AutoSettings preset) they don't get applied since the mappings are already branched at that point.

    If the player is using the default mappings in-game and hasn't overridden any, the inputs will stay updated with the project settings automatically.
    To get back to the default mappings you can clear out the overrides from Saved\Config\Windows\Input.ini under the [/Script/AutoSettings.InputMappingManager] header and restart the editor, or call Set Player Input Preset or Set Player Input Preset By Tag to reset to a preset at runtime. (See the preset switching in the example project)

    I'm also looking into the log messages and will get back to you on those.
    Okey, thank you Acren! I will look into these config / script options tonight. : ]

    And waiting for the log messages' fix, I hope we can do something against those too.

    Leave a comment:


  • replied
    JimPhoenix


    Hey! Regarding the mappings, if you rebind any inputs at runtime it will essentially create a branch of the input mappings with the modified inputs. This means that if any inputs are added to the project settings (either the Input page or an AutoSettings preset) they don't get applied since the mappings are already branched at that point.

    If the player is using the default mappings in-game and hasn't overridden any, the inputs will stay updated with the project settings automatically.
    To get back to the default mappings you can clear out the overrides from Saved\Config\Windows\Input.ini under the [/Script/AutoSettings.InputMappingManager] header and restart the editor, or call Set Player Input Preset or Set Player Input Preset By Tag to reset to a preset at runtime. (See the preset switching in the example project)

    I'm also looking into the log messages and will get back to you on those.

    Leave a comment:


  • replied
    Hey there Acren,

    if I open the "SettingsUI" widget I got this dark red logtext in my output log:

    Code:
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeyLabel_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    PIE: Error: Unable to create the widget StyledKeySeparator_C, no outer provided.
    And if I run my project it says with yellow warnings:

    Code:
    LogConsoleManager: Warning: Console object named 'Game.IconSet' already exists but is being registered again, but we weren't expected it to be! (FConsoleManager::AddConsoleObject)
    LogConsoleManager: Warning: Console object named 'Camera.FOV' already exists but is being registered again, but we weren't expected it to be! (FConsoleManager::AddConsoleObject)
    LogConsoleManager: Warning: Console object named 'Character.GravityScale' already exists but is being registered again, but we weren't expected it to be! (FConsoleManager::AddConsoleObject)
    LogConsoleManager: Warning: Console object named 'Character.WalkSpeed' already exists but is being registered again, but we weren't expected it to be! (FConsoleManager::AddConsoleObject)
    LogConsoleManager: Warning: Console object named 'GameAudio.MusicVolume' already exists but is being registered again, but we weren't expected it to be! (FConsoleManager::AddConsoleObject)
    LogConsoleManager: Warning: Console object named 'GameAudio.SFXVolume' already exists but is being registered again, but we weren't expected it to be! (FConsoleManager::AddConsoleObject)
    LogConsoleManager: Warning: Console object named 'GameAudio.Volume' already exists but is being registered again, but we weren't expected it to be! (FConsoleManager::AddConsoleObject)
    I live a "zero error / warning in my log" life, so what should I do to fix these?

    Also, if I set up a new input key mapping (for example V for Vision or something like this) AFTER I enabled the plugin mapping it doesn't work. If I disable the plugin it's fine, works as intended. Why is that? Really annoying. : )

    Leave a comment:


  • replied
    Originally posted by TheBirdPuncher View Post
    Oh I just realised 'A' not working is because I've got Rama's plugin installed to allow the player to use the left analog stick + 'A' as a cursor/left mouse button and that's taking priority over the rebinding. Is there anyway for me to be able to edit the code for the rebinding within blueprints? I know what I'd have to add to fix it so I can use both plugins.

    This is the plugin I mean: https://forums.unrealengine.com/comm...s!=&viewfull=1
    Looking at the FAnalogCursor class in engine (which the plugin is based upon) it seems like it is set up to always consume the bottom face button input. Therefore I'd imagine the best way to do it without modifying engine source is disabling the analog cursor when listening for bind inputs (assuming that stops it from consuming the input) and re-enabling it afterward.

    I'd suggest you to do that by extending the AutoSettings class UBindCapturePrompt for your project and overriding construct/destruct.

    Let me know how it goes!

    Edit:
    Another option could be to override the analogcursor so you can control how it consumes input.
    Last edited by Sam Bonifacio; 12-20-2017, 06:54 PM.

    Leave a comment:


  • replied
    Oh I just realised 'A' not working is because I've got Rama's plugin installed to allow the player to use the left analog stick + 'A' as a cursor/left mouse button and that's taking priority over the rebinding. Is there anyway for me to be able to edit the code for the rebinding within blueprints? I know what I'd have to add to fix it so I can use both plugins.

    This is the plugin I mean: https://forums.unrealengine.com/comm...s!=&viewfull=1

    Leave a comment:


  • replied
    Originally posted by TheBirdPuncher View Post
    Hey there, this plugin has been really useful so far, except for one small problem I'm having. For some reason when trying to rebind a key using the A button on an Xbox One Controller it doesn't work. I can rebind every other button, except for A which doesn't work. There are no keys in my allowed keys or disallowed keys so I'm having trouble understanding what's causing the problem.

    Also is there anyway to reset all the settings to default? When I tried Set Player Input Preset(Player Controller, Make input preset with tag mappingPreset.Default) it just removed every binding for every action and I had to manually delete the config file to reset everything to default.
    Hey TheBirdPuncher ,

    Do you have any Key Groups set up in the input configuration? And does the example project work as intended for you?

    To reset the bindings to the defaults I think you have the right idea, but I don't think it will work with the blueprint Make input preset.

    I would try using the Get Default Input Presets node and passing one of the elements (probably the first) into the Set Player Input Preset. The array it returns will be what you have set up in the input configuration, and if you don't have any presets configured it will use the bindings from Unreal's normal Input page.

    You could also try Set Player Input Preset by Tag and specifying the tag of a preset defined in the input configuration (See the preset switching in the example project)

    If you're still running into trouble with anything I'd be happy to take a look if you can send me a project if you can reproduce the issues.

    Cheers!

    Leave a comment:


  • replied
    Hey there, this plugin has been really useful so far, except for one small problem I'm having. For some reason when trying to rebind a key using the A button on an Xbox One Controller it doesn't work. I can rebind every other button, except for A which doesn't work. There are no keys in my allowed keys or disallowed keys so I'm having trouble understanding what's causing the problem.

    Also is there anyway to reset all the settings to default? When I tried Set Player Input Preset(Player Controller, Make input preset with tag mappingPreset.Default) it just removed every binding for every action and I had to manually delete the config file to reset everything to default.

    Leave a comment:


  • replied
    I've finally fixed the issue preventing me updating to 4.18 and have released version 1.1.1 with 4.18 support.

    Leave a comment:


  • replied
    onealexleft

    Sorry it took me this long to respond, turns out I didn't have notifications set up properly...

    Since I mostly use the binary builds and don't have a build server set up yet, I haven't run into anything like that myself. Glad you were able to fix it by editing the gitignore - I suppose it isn't set up to handle plugins with content.

    Thanks for the tip, and for using the plugin!

    Leave a comment:


  • replied
    Hi Acren!

    Great plugin, made my implementation of options UI in our game go way smoother than anticipated, even with the complication of online user accounts and preferences. This isn't so much as a question as a tip for those running UE4 from source.

    For the moment we're using some of the defaultsettings controls. But when cooking the game we'd get this error:

    Code:
    Cook: LogInit: Display: LogUObjectGlobals: Warning: Failed to load '/AutoSettings/SettingControls/DefaultCheckBoxSetting': Can't find file for asset '/AutoSettings/SettingControls/DefaultCheckBoxSetting' while loading NULL.
    The current practice for installing plugins on custom engine builds simply states to copy the respective plugin folder over to the custom engine install.

    This worked locally, but on our build server it failed with the above error, despite adding the plugin folder to our repo. The build server pulls down the latest version from our own fork, but the content and resources folder never got added. The manual solution was to copy the folder also to our build server. But to avoid broken builds in case there are updates to the plugin (with new content) I decided to just add that directory specifically into our git repo. To do so, I had to edit UE4's .gitignore file:

    Code:
    # Ignore content folders
    Content/
    
    #include AutoSetting plugin
    !/Engine/
    !/Engine/Plugins/
    !/Engine/Marketplace/
    !/Engine/Plugins/Marketplace/AutoSettings/
    !/Engine/Plugins/Marketplace/AutoSettings/Content/
    !/Engine/Plugins/Marketplace/AutoSettings/Content/*
    !/Engine/Plugins/Marketplace/AutoSettings/Content/*/*
    !/Engine/Plugins/Marketplace/AutoSettings/Resources/
    !/Engine/Plugins/Marketplace/AutoSettings/Resources/*
    Since Content folders are excluded across the engine, it required some gitignore hackery to let through just the relevant content. If there is a better way to version and store plugin content in custom builds that is hands-free (for automation purposes) I'm all ears. Thanks again!

    Leave a comment:


  • replied
    Update 1.1 released:
    • Added a function on Slider Setting called when its value changes. This allows users to easily have a text label reflect the value like this:
    Click image for larger version  Name:	slidervalue.png Views:	1 Size:	26.7 KB ID:	1368325
    • Added tooltip to option value explaining that it falls back to the array index if blank
    • Added new settings to example project:
      • View distance quality
      • Foliage quality
      • Field of view
      • Motion blur quality
      • Bloom quality
    • LoadingPhase set to Default - previously on PostEngineInit to support logic that has since been changed
    • Fixed: Category errors when packaging
    • Fixed: Crash from widgets attempting to apply or save settings during design time

    Leave a comment:

Working...
X