tx00100xt / SeriousSamClassic-VK

Open source game engine version developed by Croteam for Serious Sam Classic with Vulkan support (Windows, Linux, FreeBSD, OpenBSD, macOS, Raspberry Pi OS). Based on https://github.com/sultim-t/Serious-Engine-Vk and linux port https://github.com/icculus/Serious-Engine
GNU General Public License v2.0
101 stars 12 forks source link

portable mode #20

Closed legluondunet closed 1 year ago

legluondunet commented 1 year ago

Hello, I'm writing a script that facilitates GOG SeriousSam TFE and TSE install for Linux users. I would like to specify a config file to use, like this I could choose default parameters. Is it possible to specify a config file at launch, with a command line or a config file stored in main game folder that will be read in priority by SSC?

tx00100xt commented 1 year ago

Is it possible to specify a config file at launch, with a command line

Yes. You just need to specify the command "+script " in the command line and the path to the script. For example like this: SeriousSam +script Scripts\\Addons\\SafeMode.ini A list of all console commands can be found here: https://github.com/tx00100xt/SeriousSamClassic-VK/blob/main/SamTFE/Sources/SeriousSam/CmdLine.cpp#L92 For example, the +level parameter starts the game from the specified level, and the +game parameter starts the specified modification or a config file stored in main game folder that will be read in priority by SSC?

I can add a new option like +portable so that all user files are stored in the root directory of the game. It is not difficult. They are currently stored in ~/.local/share/Serious-Engine/serioussam

legluondunet commented 1 year ago

"I can add a new option like +portable so that all user files are stored in the root directory of the game. It is not difficult."

Nice idea, nice feature :)

tx00100xt commented 1 year ago

Nice idea, nice feature :)

Ready. https://github.com/tx00100xt/SeriousSamClassic-VK/commit/7b5e7ea3746f46caba2acf6d2c4b63b471b5c64f

https://github.com/tx00100xt/SeriousSamClassic-VK/releases/tag/v1.10.4

legluondunet commented 1 year ago

it was fast. I just compiled latest git code and override my game install, added "+portable" as an argument and... SSC starts with default graphics parameters and ignore the old ones stored in my home path, so it works. I will test a little more before to close this report.

legluondunet commented 1 year ago

I tested several times, it works as expected, in my home SSC created a config folder in .local/share but it is empty. And in game folder I have the config file in scripts/persistent.ini Bravo !