PDA

View Full Version : SEV command line execution


se5a
January 28th, 2007, 10:00 AM
what are the command line thingys for se5?

I can't seem to find them in the docs or history.

Slick
January 28th, 2007, 01:04 PM
I don't believe they have been released yet.

Fyron
January 28th, 2007, 03:38 PM
PBW can handle SE5, so there must be some command line parameters available.

geoschmo
January 28th, 2007, 04:24 PM
It's the same as SE4, except there are no "-" options and no mod path is used. You can actually run it with the "-" options and a mod path but SE5 will ignore them. I'm not sure why he didn't put instructions for this in the manual. He says in there you yoo can run it at the command line but doesn't explain how. If someone wasn't familier with SE4 they'd be pretty lost.

se5.exe "Savegame\gamename.gam" "password"

Geoschmo

se5a
January 28th, 2007, 05:05 PM
cool, thanks geo, that's what I'm after.


umn, now does anyone know how to run applications in a python script? it looks harder than I thought, and I can't seem to find any decent examples

Atrocities
January 28th, 2007, 08:12 PM
Can you post all of the SE IV command line options or instructions? How do you access the command line?

Suicide Junkie
January 28th, 2007, 09:13 PM
Start -> Run -> Command

Command Line = DOS window for all intents and purposes here.

geoschmo
January 28th, 2007, 10:15 PM
Atrocities said:
Can you post all of the SE IV command line options or instructions? How do you access the command line?

The SEIV command line options are listed in the History.txt file in the same folder as the Se4.exe file.

Atrocities
January 28th, 2007, 10:19 PM
Thanks Geo, and SJ.

I assume there is a function or a batch file that you can use to execute X amount of turns? If so where can it be downloaded from?

Suicide Junkie
January 28th, 2007, 10:33 PM
The trick is waiting long enough for SE4 to finish processing one turn before your script kicks it again.

I'm pretty sure somebody wrote one for the AI competition thing.

Fyron
January 28th, 2007, 11:11 PM
No tricks are necessary; the script just has to wait for the SE4 process to exit. Most exec functions in programming languages have a way to do that directly. Dunno about batch, but its a 3 line python script (plus the import os line). I forget exactly what the command line parameters are, so you'll have to put the exact commands in. Assuming you have python installed, set the range to the number of turns you want to wait, save as something.py in the se4 folder, and run it (DOS prompt is easiest way).

<font class="small">Code:</font><hr /><pre>import os
for i in range(20):
print "Executing turn " + str(i+1) + "..."
os.spawnl(os.P_WAIT, 'se4.exe', 'savegame', 'player', 'password')
</pre><hr />

Suicide Junkie
January 28th, 2007, 11:18 PM
Sigh, Fy.

Just running with command line parameters is trivial.
Running multiple turns one after the other is the hard part.

Using Python vs a Batch file, for example.
And of course, difficulty is relative.

se5a
January 29th, 2007, 02:01 AM
that code should run multiple turns.

screw batch files, python FTW

Fyron
January 29th, 2007, 02:58 AM
I don't know why anyone would want to do something like this with DOS batch... Doing pretty much anything in DOS batch is just asking for trouble. Python is several orders of magnitude easier to learn than batch.

Phoenix-D
January 29th, 2007, 04:35 AM
Well, you could use the batch to call the script, skipping the DOS prompt. http://forum.shrapnelgames.com/images/smilies/tongue.gif

Atrocities
January 29th, 2007, 04:45 AM
I don't know enough about any of this to really use it. I just wanted to know so that I could run 100 turn AI test for both SE V and SE IV.

Fyron
January 29th, 2007, 05:29 AM
Phoenix-D said:
Well, you could use the batch to call the script, skipping the DOS prompt. http://forum.shrapnelgames.com/images/smilies/tongue.gif

Or you could double click on the script. http://forum.shrapnelgames.com/images/smilies/laugh.gif

Atrocities
January 29th, 2007, 05:51 AM
I just read that SE V has a feature added recently that allows you to execute X amount of turns. http://forum.shrapnelgames.com/images/smilies/laugh.gif