Creating an Options menu via Blueprint / Allowing user to change Resolution

Sorry if this sounds like a dumb question, I’m new to this and I’m not really sure where to start when it comes to letting players choose their graphical options.

I have a main menu which is a separate level with custom game mode for mouse control, I have a New Game button which when clicked loads the player into a level and the game mode changes to whatever that level is set to, I have that working fine.

Within this I tried to create an options menu to allow the player to change resolution. I tried building my game and hunting down an ini file that affected it but couldn’t.

I read another answer that suggested to call the scalability options using console commands, and this seems to work okay.

However, for changing resolutions calling r.setRes from a blueprint seems to crash the editor, and the built game. Opening the console and typing it in seems to work, so I’m not sure what’s causing the crash. The other scalability commands seem to work okay, though. The output log spits this out: output log - Pastebin.com

Is r.SetRes the wrong way to go about doing this? How else can I give the user the option of changing the resolution?

edit: I’m also having trouble figuring out how to do a fullscreen toggle. r.FullScreenMode mentions a [SystemSettings] ini with a fullscreen bool but I’m not sure how I would find or create one for my game, and interact with it via blueprints. r.SetRes mentions a w or f modifier on the resolution, but using it at all via blueprints just crashes the game and editor as mentioned.

edit 2: Okay I just tried creating a new blank project and using r.setres, and it works fine when called from the level blueprint! I have no idea why my project is crashing, but it’s related to using r.setres. I’m going to try importing my old blueprint to this new project,
Edit 3: Old blueprint crashes new project. Maybe because it’s being called from the HUD blueprint? Do I need to make a ChangeRes function somewhere else and then call it when a user clicks on the HUD element? Using a new HUD blueprint and calling it after a hit box is clicked on seems to crash it too.

Upvoting for visibility because I’ve been wondering this exact thing – how to save settings (quality, resolution) that persist through closing and relaunching the game.

I think by storing all the settings in an array and creating a save game object and saving them to a “Settings” slot may work (Tappy Chickens high score seems persistent, anyway), then loading it at event begin to restore the settings / running through the console commands for each item in the array.

It definitely does not seem like the right way to do it, but I can’t find anything in the documentation regarding interacting with the .ini files, or creating them, or even where save game files are created. It won’t help the issue with r.SetRes being incredibly crash happy, either.

Edit: Using a SaveGame object I figured out how to save settings and stuff, I’m making a rough/informal video for how to make a basic menu at the moment. SetRes still crashes though. Curiously whilst casting to the save game object I noticed something interesting where I could cast to engine settings and such, but I don’t seem to be able to recreate it.

The save stuff I took straight from TappyChicken. It seems persistent.

Thanks for the pointer about Tappy Chicken and the save game slot. I’ll experiment with that, though I agree that it doesn’t sound like the right way to do it. My problem with save game vs ini file is that the ini file will apply quality settings before anything else happens. Seems like applying settings via save slot would effectively be more costly because it first loads everything high quality.