Page 1 of 1

Configurable default startscript

Posted: 08 Mar 2015, 08:27
by Funkencool
It would be nice if you could add something like this to the springsettings.txt,

Code: Select all

defaultstartscipt=script.txt
and it would then launch script.txt when no arguments were given to spring.exe. Otherwise it would behave as it has before.

It would
  • Make spring transparent (users only deal with UI provided by the game developer)
  • Allow usage of custom menus
  • Eliminate the need to create shortcuts for this behaviour

Re: Configurable default startscript

Posted: 08 Mar 2015, 11:57
by hokomoko
I actually think this should even have a default value not in springsettings, as settings are edited a lot, are loaded from a few locations in the FS and are often overwritten by lobbies.

Re: Configurable default startscript

Posted: 08 Mar 2015, 12:26
by Funkencool
True then maybe something more along the lines of

If "defaultscript.txt" exists in the root folder and no arguments are given, spring will use it.

It could also have similar behavior to springsettings, in that portables get priority but it will also include shared folders. That's probably just default spring behavior though.

Re: Configurable default startscript

Posted: 08 Mar 2015, 13:49
by zwzsg
In the modern world, you're not supposed to run individual files anymore to launch programs. You've got start menu, icons on the desktop, app tiles, or whatever. And it's quite easy when making one to provide a fixed script.txt argument to spring.exe.

Re: Configurable default startscript

Posted: 08 Mar 2015, 14:01
by Funkencool
And this feature wouldn't prevent anyone from continuing to use those methods..

Re: Configurable default startscript

Posted: 09 Mar 2015, 21:51
by Funkencool
To reiterate,

Just because that works doesn't mean that this wouldn't be the better solution. Right now running spring brings up an (arguably) dated menu. This feature would be the easiest way to prevent that menu from being what the unknowing user see's when they click the binary that came with their new game/engine.

I do agree that this isn't an issue for shortcuts in the start menu, for instance; but what about portable installs?
Personally, I have always gravitated towards the binary in the folder of a program I downloaded, regardless of what shortcuts were included.

I don't take shortcuts :wink:

Re: Configurable default startscript

Posted: 10 Mar 2015, 01:45
by abma
thats same idea as in viewtopic.php?f=14&t=33065

(not sure if its explicitly written there, a lot of useful got lost because of the "flamewar")

also a config tag for that already exists:

https://springrts.com/wiki/Springsettin ... enuArchive

atm its only used for the background image

Re: Configurable default startscript

Posted: 10 Mar 2015, 04:27
by Funkencool
Awesome! Wish I would have known that earlier.. but o well, I do now :-)
So how does it work?
It says "Archive name for the default Menu." ; doesn't it also need a script and/or map?
Does it also use the standard lua callins?
abma wrote:thats same idea as in viewtopic.php?f=14&t=33065
But that one is locked, and no formal request was actually made to get this feature.
abma wrote:a lot of useful got lost because of the "flamewar"
Sorry about that :(

Re: Configurable default startscript

Posted: 11 Mar 2015, 11:00
by hokomoko
abma wrote:(not sure if its explicitly written there, a lot of useful got lost because of the "flamewar"
viewtopic.php?p=566437#p566437