I probably should already know this, but I'm a bit rusty and my searches aren't turning up anything.
By default, when you fire up GZDoom on Windows, it creates an ini file:
Documents/My Games/GZDoom/GZDoom.ini
Is there any way to tell GZDoom to generate an ini file with a different name for a stand-alone game without the end user having to use command line parameters or similar. i.e. the first time that the game is run "out of the box" it creates a file called:
Documents/My Games/GZDoom/MyCoolGame.ini
or even
Documents/My Games/MyCoolGame/MyCoolGame.ini
I know about gzdoom_portable.ini, but that's something else (though, being able to generate MyCoolGame_portable.ini might also be cool).
Anyway, can it be done? If so, how?
Thanks in advance.
How to get GZDoom to generate a uniquely named ini?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Re: How to get GZDoom to generate a uniquely named ini?
While I'm at it, the game that I am trying to set up has an IPK3 with a DEFCVARS lump. In that lump there is this line:
set queryiwad "false"
It used to work on GZDoom 4.8, but it doesn't seem to work any more. Whenever the game is run for the first time, the IWAD selection dialogue appears and the newly generated ini has:
queryiwad=true
I can change it by editing the ini, or choosing the option not to show the IWAD selector (and those work), but I'd rather that it didn't show it by default. There is only one IPK3 in the game folder and the only IWAD/IPK3 listed in the IWAD picker dialogue is the one for the game. So, I'd much rather the game just started without prompting the user to pick an IWAD/IPK3.
Obviously, the entire IWAD selection interface has changed since I last set up this game (as I said, with version 4.8) so perhaps something has changed and it needs to be done differently?
Short version, how do I get a stand-alone game to not prompt the user to select an IWAD?
set queryiwad "false"
It used to work on GZDoom 4.8, but it doesn't seem to work any more. Whenever the game is run for the first time, the IWAD selection dialogue appears and the newly generated ini has:
queryiwad=true
I can change it by editing the ini, or choosing the option not to show the IWAD selector (and those work), but I'd rather that it didn't show it by default. There is only one IPK3 in the game folder and the only IWAD/IPK3 listed in the IWAD picker dialogue is the one for the game. So, I'd much rather the game just started without prompting the user to pick an IWAD/IPK3.
Obviously, the entire IWAD selection interface has changed since I last set up this game (as I said, with version 4.8) so perhaps something has changed and it needs to be done differently?
Short version, how do I get a stand-alone game to not prompt the user to select an IWAD?
Re: How to get GZDoom to generate a uniquely named ini?
First, you need to build a custom gzdoom engine that generates a custom name config file then loads it automatically. As far as I know, there are other ways.
In my customized gzdoom,
https://github.com/Laskow/borgzdoom/blo ... sion.h#L95
The .ini file generates in Documents\My Games\Borrowhelen.
In the gzdoom,
https://github.com/ZDoom/gzdoom/blob/ma ... sion.h#L95
The .ini file generates in Documents\My Games\GZDoom, as you know.
I might be wrong with the file, and have no idea about queryiwad. Sorry.
In my customized gzdoom,
Code: Select all
#define BASEWAD "borgzdoom.pk3"
The .ini file generates in Documents\My Games\Borrowhelen.
In the gzdoom,
Code: Select all
#define BASEWAD "gzdoom.pk3"
The .ini file generates in Documents\My Games\GZDoom, as you know.
I might be wrong with the file, and have no idea about queryiwad. Sorry.
Last edited by Laskow on Thu Oct 17, 2024 12:35 pm, edited 1 time in total.
Re: How to get GZDoom to generate a uniquely named ini?
Thanks for the answer. I did look at a couple of released stand alone games to see if they'd solved the problem, but they all had their own codebase (like you have).
I was hoping to be able to avoid building a custom exe. Creating a custom exe locks you to a certain version of the game engine unless you maintain your own code along with it and build new exes as and when required (and runs the risk of your exe becoming obsolete if you don't). With this project, it's not really worth it and I would be building the custom exe for one relatively small change.
Pretty much everything that used to need a custom exe has now become a moddable feature of the game, so I was hoping that this might be too. Maybe it isn't though.
I was hoping to be able to avoid building a custom exe. Creating a custom exe locks you to a certain version of the game engine unless you maintain your own code along with it and build new exes as and when required (and runs the risk of your exe becoming obsolete if you don't). With this project, it's not really worth it and I would be building the custom exe for one relatively small change.
Pretty much everything that used to need a custom exe has now become a moddable feature of the game, so I was hoping that this might be too. Maybe it isn't though.
Re: How to get GZDoom to generate a uniquely named ini?
Oh, sorry. The file was probably correct, but the specified line was completely wrong. So, forget about line 95.
Yeah, that does cause the problems you mentioned. Modders won’t like it, and it’s difficult to maintain a customized engine for a long time. I also want this feature because the same .exe uses the same config file, which is actually not ideal for testing purposes. Though it’s easy to access and manage the config file through Documents\My Games, it would be nice if there were another option.
Yeah, that does cause the problems you mentioned. Modders won’t like it, and it’s difficult to maintain a customized engine for a long time. I also want this feature because the same .exe uses the same config file, which is actually not ideal for testing purposes. Though it’s easy to access and manage the config file through Documents\My Games, it would be nice if there were another option.