I have used "vegastrike --help" to check this for years now. If there is a way to load a saved game from the command line, why does it appear to not be documented here? Also, what is the "magic incantation" for that?
If there is NOT a way to load a saved game from the command line, I respectfully request that someone of the developer group please add that. TIA
Load Saved Game from Command Line?
-
- Bounty Hunter
- Posts: 167
- Joined: Mon Nov 28, 2005 8:24 pm
- Location: TN, USA
- Contact:
Load Saved Game from Command Line?
http://www.eracc.com/ - Linux, Unix, eComStation (Get rid of proprietary Microsoft and Apple!)
Custom Built, Preloaded PCs, Workstations and Servers - Business, Home and Gamer systems
My custom built Linux Gamer/Personal/Business box: Mageia Linux on - ASUS M4A78, 4GB RAM (Linux "sees" 3.2 GB with a 32-bit kernel), AMD Phenom Quad-core @ 2.6GHz, Radeon X1650 Pro PCIe, "sda" 250GB WD2500AAKS-0, "sdb" 150GB WD1500ADFD-0 (Raptor), "sdc" 150GB WD1500ADFD-0 (Raptor), "sdd" 500GB ST3500418AS, "xfs" file system on all but the / partition which is using "ext4".
Custom Built, Preloaded PCs, Workstations and Servers - Business, Home and Gamer systems
My custom built Linux Gamer/Personal/Business box: Mageia Linux on - ASUS M4A78, 4GB RAM (Linux "sees" 3.2 GB with a 32-bit kernel), AMD Phenom Quad-core @ 2.6GHz, Radeon X1650 Pro PCIe, "sda" 250GB WD2500AAKS-0, "sdb" 150GB WD1500ADFD-0 (Raptor), "sdc" 150GB WD1500ADFD-0 (Raptor), "sdd" 500GB ST3500418AS, "xfs" file system on all but the / partition which is using "ext4".
-
- Elite Venturer
- Posts: 753
- Joined: Sat Apr 15, 2006 2:40 am
- Location: chthonic safety
Re: Load Saved Game from Command Line?
Hey, a good point. I just looked into sources - it's not yet implemented, and loading is performed from Python interface assuming everything's already running, so no one-minute solution, but... VS chooses a mission from command line and it seems easy to craft a mission that just loads some pre-defined savegame on start.eracc wrote:I have used "vegastrike --help" to check this for years now. If there is a way to load a saved game from the command line, why does it appear to not be documented here? Also, what is the "magic incantation" for that?
If there is NOT a way to load a saved game from the command line, I respectfully request that someone of the developer group please add that. TIA
This means launching VS with this mission will auto-load savegame - "Autosave" or intentionally saved under the name e.g. "Continue".
But there's more to it. An external launcher could craft such a mission (simple output-to-file, it's just a small XML text) using its own command line argument to define savegame name constant, and then launch VS with this mission as a command line argument. However, i doubt such a dynamic variant is very useful, since this means you still have pick a savegame you feed to it - so why not pick from load game menu?..
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
-
- Bounty Hunter
- Posts: 167
- Joined: Mon Nov 28, 2005 8:24 pm
- Location: TN, USA
- Contact:
Re: Load Saved Game from Command Line?
I run a local compiled copy of VS that is not in my X menus. Here is the "myvs" bash script I use to run VS:
It would be nice to be able to use "./vegastrike -savegame=mysave" instead of having to click click click on the menus every time. Then I could have a script for individual games that are for different play styles. Again, just loading these from the CLI with a script would be faster than wearing out my mouse hand with more clicking.
Code: Select all
#!/bin/bash
cd ~/VegaStrike/vegastrike && ./vegastrike && echo || echo
http://www.eracc.com/ - Linux, Unix, eComStation (Get rid of proprietary Microsoft and Apple!)
Custom Built, Preloaded PCs, Workstations and Servers - Business, Home and Gamer systems
My custom built Linux Gamer/Personal/Business box: Mageia Linux on - ASUS M4A78, 4GB RAM (Linux "sees" 3.2 GB with a 32-bit kernel), AMD Phenom Quad-core @ 2.6GHz, Radeon X1650 Pro PCIe, "sda" 250GB WD2500AAKS-0, "sdb" 150GB WD1500ADFD-0 (Raptor), "sdc" 150GB WD1500ADFD-0 (Raptor), "sdd" 500GB ST3500418AS, "xfs" file system on all but the / partition which is using "ext4".
Custom Built, Preloaded PCs, Workstations and Servers - Business, Home and Gamer systems
My custom built Linux Gamer/Personal/Business box: Mageia Linux on - ASUS M4A78, 4GB RAM (Linux "sees" 3.2 GB with a 32-bit kernel), AMD Phenom Quad-core @ 2.6GHz, Radeon X1650 Pro PCIe, "sda" 250GB WD2500AAKS-0, "sdb" 150GB WD1500ADFD-0 (Raptor), "sdc" 150GB WD1500ADFD-0 (Raptor), "sdd" 500GB ST3500418AS, "xfs" file system on all but the / partition which is using "ext4".
-
- Elite Venturer
- Posts: 753
- Joined: Sat Apr 15, 2006 2:40 am
- Location: chthonic safety
Re: Load Saved Game from Command Line?
Mine's more likeeracc wrote:I run a local compiled copy of VS that is not in my X menus. Here is the "myvs" bash script I use to run VS:Code: Select all
#!/bin/bash cd ~/VegaStrike/vegastrike && ./vegastrike && echo || echo
Code: Select all
MY_DIR=`dirname "$0"`
cd $MY_DIR
taskset 02 bin/vegastrike $@ 2>$HOME/.vegastrike/vegastrike_err.txt 1>$HOME/.vegastrike/vegastrike_out.txt
Code: Select all
<mission>
<variables>
<var name="mission_name" value="Continue Game" />
<var name="system" value="Special/Empty" />
</variables>
<flightgroups>
<!-- need at least one, to avoid messing with the engine -->
<flightgroup name="Shlimazel" faction="privateer" type="dumbfire" ainame="default" waves="1" nr_ships="1">
<pos x="119990000000" y="-9000000" z="-109990000000.0"/>
</flightgroup>
</flightgroups>
<python>
import VS
VS.loadGame("continue")
</python>
</mission>
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
-
- Bounty Hunter
- Posts: 167
- Joined: Mon Nov 28, 2005 8:24 pm
- Location: TN, USA
- Contact:
Re: Load Saved Game from Command Line?
Okay, I tried this using my saved game "mysave". It did load my saved game as far as I could tell. BUT, my Vigilance that I was using when I last saved was back to STOCK. All the customizations were GONE. Needless to say, but I'm saying it anyway, I quit without saving so it would not dink up my ship.
Here are the only changes I made:
Here are the only changes I made:
Code: Select all
<mission>
<variables>
<var name="mission_name" value="My Save" />
<var name="system" value="Special/Empty" />
</variables>
<flightgroups>
<!-- need at least one, to avoid messing with the engine -->
<flightgroup name="Shlimazel" faction="privateer" type="dumbfire" ainame="default" waves="1" nr_ships="1">
<pos x="119990000000" y="-9000000" z="-109990000000.0"/>
</flightgroup>
</flightgroups>
<python>
import VS
VS.loadGame("mysave")
</python>
</mission>
http://www.eracc.com/ - Linux, Unix, eComStation (Get rid of proprietary Microsoft and Apple!)
Custom Built, Preloaded PCs, Workstations and Servers - Business, Home and Gamer systems
My custom built Linux Gamer/Personal/Business box: Mageia Linux on - ASUS M4A78, 4GB RAM (Linux "sees" 3.2 GB with a 32-bit kernel), AMD Phenom Quad-core @ 2.6GHz, Radeon X1650 Pro PCIe, "sda" 250GB WD2500AAKS-0, "sdb" 150GB WD1500ADFD-0 (Raptor), "sdc" 150GB WD1500ADFD-0 (Raptor), "sdd" 500GB ST3500418AS, "xfs" file system on all but the / partition which is using "ext4".
Custom Built, Preloaded PCs, Workstations and Servers - Business, Home and Gamer systems
My custom built Linux Gamer/Personal/Business box: Mageia Linux on - ASUS M4A78, 4GB RAM (Linux "sees" 3.2 GB with a 32-bit kernel), AMD Phenom Quad-core @ 2.6GHz, Radeon X1650 Pro PCIe, "sda" 250GB WD2500AAKS-0, "sdb" 150GB WD1500ADFD-0 (Raptor), "sdc" 150GB WD1500ADFD-0 (Raptor), "sdd" 500GB ST3500418AS, "xfs" file system on all but the / partition which is using "ext4".
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Load Saved Game from Command Line?
Wouldn't mind a feature request in SF's bug tracker...