.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #11  
Old January 28th, 2007, 11:11 PM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default 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).

Code:
import os
for i in range(20):
print "Executing turn " + str(i+1) + "..."
os.spawnl(os.P_WAIT, 'se4.exe', 'savegame', 'player', 'password')

__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #12  
Old January 28th, 2007, 11:18 PM
Suicide Junkie's Avatar
Suicide Junkie Suicide Junkie is offline
Shrapnel Fanatic
 
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
Suicide Junkie is on a distinguished road
Default 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.
Reply With Quote
  #13  
Old January 29th, 2007, 02:01 AM

se5a se5a is offline
First Lieutenant
 
Join Date: Aug 2003
Location: New Zealand
Posts: 776
Thanks: 0
Thanked 0 Times in 0 Posts
se5a is on a distinguished road
Default Re: SEV command line execution

that code should run multiple turns.

screw batch files, python FTW
__________________
[img]/threads/images/Graemlins/Flag_NewZeland.gif[/img]
Reply With Quote
  #14  
Old January 29th, 2007, 02:58 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default 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.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #15  
Old January 29th, 2007, 04:35 AM

Phoenix-D Phoenix-D is offline
National Security Advisor
 
Join Date: Nov 2000
Posts: 5,085
Thanks: 0
Thanked 0 Times in 0 Posts
Phoenix-D is on a distinguished road
Default Re: SEV command line execution

Well, you could use the batch to call the script, skipping the DOS prompt.
__________________
Phoenix-D

I am not senile. I just talk to myself because the rest of you don't provide adequate conversation.
-Digger
Reply With Quote
  #16  
Old January 29th, 2007, 04:45 AM
Atrocities's Avatar

Atrocities Atrocities is offline
Shrapnel Fanatic
 
Join Date: Dec 2000
Location: USA
Posts: 15,630
Thanks: 0
Thanked 30 Times in 18 Posts
Atrocities is on a distinguished road
Default 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.
__________________
Creator of the Star Trek Mod - AST Mod - 78 Ship Sets - Conquest Mod - Atrocities Star Wars Mod - Galaxy Reborn Mod - and Subterfuge Mod.
Reply With Quote
  #17  
Old January 29th, 2007, 05:29 AM
Fyron's Avatar

Fyron Fyron is offline
Shrapnel Fanatic
 
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
Fyron is an unknown quantity at this point
Default Re: SEV command line execution

Phoenix-D said:
Well, you could use the batch to call the script, skipping the DOS prompt.


Or you could double click on the script.
__________________
It's not whether you win or lose that counts: it's how much pain you inflict along the way.
--- SpaceEmpires.net --- RSS --- SEnet ModWorks --- SEIV Modding 101 Tutorial
--- Join us in the #SpaceEmpires IRC channel on the Freenode IRC network.
--- Due to restrictively low sig limits, you must visit this link to view the rest of my signature.
Reply With Quote
  #18  
Old January 29th, 2007, 05:51 AM
Atrocities's Avatar

Atrocities Atrocities is offline
Shrapnel Fanatic
 
Join Date: Dec 2000
Location: USA
Posts: 15,630
Thanks: 0
Thanked 30 Times in 18 Posts
Atrocities is on a distinguished road
Default 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.
__________________
Creator of the Star Trek Mod - AST Mod - 78 Ship Sets - Conquest Mod - Atrocities Star Wars Mod - Galaxy Reborn Mod - and Subterfuge Mod.
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


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


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