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

This Month's Specials

Air Command 3.0- Save $12.00
War Plan Pacific- Save $7.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old July 13th, 2005, 10:22 AM

Oversway Oversway is offline
First Lieutenant
 
Join Date: Feb 2005
Posts: 693
Thanks: 0
Thanked 0 Times in 0 Posts
Oversway is on a distinguished road
Default Re: gauging interest. save game perl script


I would download it and check it out, although the java one works fine for me now.

One question: why do you have to give the turn number with the 's' command? Won't it just save the current turn no matter what? Is it that there no easy way for the script to know what the current turn is?
Reply With Quote
  #2  
Old July 13th, 2005, 03:42 PM
WraithLord's Avatar

WraithLord WraithLord is offline
General
 
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
WraithLord is on a distinguished road
Default Re: gauging interest. save game perl script

Quote:
Oversway said:

I would download it and check it out, although the java one works fine for me now.

One question: why do you have to give the turn number with the 's' command? Won't it just save the current turn no matter what? Is it that there no easy way for the script to know what the current turn is?
Good question. The truth is I don't know for sure.
The turn # is probably stored in the .2h/.trn file.
If it is stored there then it can be extracted otherwise I'm not sure there's an easy way to know the turn #.
The script could work like a deamon, in the background checking if the turn files are updated and then save them to the correct turn.
only problem is how to know what is the correct turn.
Reply With Quote
  #3  
Old July 14th, 2005, 12:02 AM

Evil Dave Evil Dave is offline
Corporal
 
Join Date: Jan 2004
Location: Wilmington, Delaware, USA
Posts: 191
Thanks: 1
Thanked 13 Times in 2 Posts
Evil Dave is on a distinguished road
Default Re: gauging interest. save game perl script

izaqyos,

The turn number is in all of the .2h, .trn, and ftherland files. It's in bytes 15 and 16, low-order byte first.
__________________
No plan survives contact with the enemy.
--Helmut von Moltke

Have too may pretender files to keep track of? Use catgod to view them.
Reply With Quote
  #4  
Old July 14th, 2005, 09:29 AM
WraithLord's Avatar

WraithLord WraithLord is offline
General
 
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
WraithLord is on a distinguished road
Default Re: gauging interest. save game perl script

@Evil Dave, Thanks. I'll modify the script so that the turn # is not needed.

@Slen, I mainly work with C/C++ and JAVA but for quick and dirty stuff they don't come close to Perl.
Reply With Quote
  #5  
Old July 14th, 2005, 10:15 AM
WraithLord's Avatar

WraithLord WraithLord is offline
General
 
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
WraithLord is on a distinguished road
Default Re: gauging interest. save game perl script

@Evil Dave, I used a hex editor to view the .2h and .trn files but I didn't see the turn numbers at all.
Reply With Quote
  #6  
Old July 14th, 2005, 10:35 AM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: gauging interest. save game perl script

I dont want to know you out of your project. Its always worthwhile to do something like it. The subject of the thread is "gauging interest. save game perl script" so we can wait and see if enough people are able to run perl scripts who are interested.

But yes, here are a number of versions of a save program. Bat file, java, basic, etc. I was tempted to EXE a basic one so that people didnt have to "download this and install it to run this". You can use the pre-exec and post-exec switches when starting Dom2 to make a save every turn but that doesnt do anything different than the game does without a save.

The icon version with bat files works ok for me. I click the icon to make a save of the game. But you have to reach your desktop to do it and you have to edit the batch file to tell it which game.

What I had in mind for an exe would be something that you clicked which would start the saver program, then start Dom2 with the "status file" switch. That file is ascii and easily parsed with a turn number in it. The exe could "see" the turn changes and make 2, 3, or 5 maybe.. rotating backups that are 5 turns apart from each other.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #7  
Old July 14th, 2005, 08:23 PM

Evil Dave Evil Dave is offline
Corporal
 
Join Date: Jan 2004
Location: Wilmington, Delaware, USA
Posts: 191
Thanks: 1
Thanked 13 Times in 2 Posts
Evil Dave is on a distinguished road
Default Re: gauging interest. save game perl script

Quote:
izaqyos said:
@Evil Dave, I used a hex editor to view the .2h and .trn files but I didn't see the turn numbers at all.
I'm using xxd under Mac O/S 10. In a game at 171, the first line of the dump looks like this:


0000000: 0102 0444 4f4d f609 0000 d400 0000 ab00 ...DOM..........
^address ^bytes ^ascii equivalent


I've put the turn number bytes in bold. 0xab == 171 decimal. I hope the save file is the same under all architectures.
__________________
No plan survives contact with the enemy.
--Helmut von Moltke

Have too may pretender files to keep track of? Use catgod to view them.
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 03:44 AM.


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