Hello
I’m wondering if it’s possible to override some of the .ini files, when packaging a project.
I’m using RunUAT.bat to build and package my game for uploading to steam, however I have a Steam Playtest enabled, which requires different AppId.
I want to avoid human error, so I’m making a batch script that builds and uploads my game.
For this I’d like to overwrite some values in the DefaultEngine.ini (SteamDevAppId, and some custom made ones) just for the package, without actually modifying the file, since I want to be able to build both for Playtest, and for my main app.
Is there any way to do it? Either append an ini file (like making a PlaytestEngine.ini file, that only contains the overridden values), or directly overwrite the values somehow?
How do others handle playtests, and different config values for different builds?
I have found this once, but I believe it did not work for me, something about packaging process itself ignored the changed config, just was inserted after, or something like that, can’t remember the exact problem.
Have you tried it, did it work for you?
It doesn’t work because it requires custom engine edits. At the bottom of that post is a link to a blog post and in that blog post is a link to their github for the custom engine. They added the -saveconfigoverrides option, this doesn’t exist in a stock engine.
There does appear to be a way to do this that the engine supports (I’m looking at 5.5 right now)
Found in the engine’s DeploymentContext.cs:
/**
* Returns the Custom Config string, which if set will load additional config files from Config/Custom/{CustomConfig}/DefaultX.ini to allow different types of builds.
* It can be set from a game Target.cs file with CustomConfig = "Name".
* Or in development, it can be overridden with a -CustomConfig=Name command line parameter.
*/
static CORE_API const FString& GetCustomConfigString();
There are a few ways to set this up:
DefaultGame.ini:
[Staging]
CustomConfig="ProjectVersion"
or in Target.cs:
CustomConfig="ProjectVersion";
And UAT command line:
-CustomConfig="ProjectVersion"
Then, in your projects Config folder, make a “Custom” folder, and within that make your custom config folder (“ProjectVersion” in my example above).
Then you want to make an empty config ini that you want to override. In my example, I want to override the ProjectVersion, which is in DefaultGame.ini. So I’ll make a DefaultGame.ini.
The end result:
(ProjectFolder)\Config\Custom\ProjectVersion\DefaultGame.ini