.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Space Empires: IV & V (http://forum.shrapnelgames.com/forumdisplay.php?f=20)
-   -   SEV command line execution (http://forum.shrapnelgames.com/showthread.php?t=33017)

se5a January 28th, 2007 10:00 AM

SEV command line execution
 
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

Re: SEV command line execution
 
I don't believe they have been released yet.

Fyron January 28th, 2007 03:38 PM

Re: SEV command line execution
 
PBW can handle SE5, so there must be some command line parameters available.

geoschmo January 28th, 2007 04:24 PM

Re: SEV command line execution
 
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

Re: SEV command line execution
 
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

Re: SEV command line execution
 
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

Re: SEV command line execution
 
Start -> Run -> Command

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

geoschmo January 28th, 2007 10:15 PM

Re: SEV command line execution
 
Quote:

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

Re: SEV command line execution
 
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

Re: SEV command line execution
 
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

Re: SEV command line execution
 
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

Re: SEV command line execution
 
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

Re: SEV command line execution
 
that code should run multiple turns.

screw batch files, python FTW

Fyron January 29th, 2007 02:58 AM

Re: SEV command line execution
 
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

Re: SEV command line execution
 
Well, you could use the batch to call the script, skipping the DOS prompt. http://forum.shrapnelgames.com/image...ies/tongue.gif

Atrocities January 29th, 2007 04:45 AM

Re: SEV command line execution
 
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

Re: SEV command line execution
 
Phoenix-D said:
Well, you could use the batch to call the script, skipping the DOS prompt. http://forum.shrapnelgames.com/image...ies/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

Re: SEV command line execution
 
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


All times are GMT -4. The time now is 04:38 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.