|
|
|
|
July 13th, 2005, 07:51 AM
|
|
General
|
|
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
|
|
gauging interest. save game perl script
Well not sure why but I never got to actually using the Java dom save utility. I had problems with jre this and classpath that and probably I wasn't patient enough to get it to work.
So after some time of stupidly saving turns by manually copying them I decided to write a small perl script to save turns.
So I did.
It can save and restore turns.
It is configurable.
It is OS independent.
It is CLI (though if there's interest I might add a GUI to it).
I am using it and find it very convenient.
I am trying to gauge if there's interest in this tool.
If so I can upload it, also If there are any suggestions as to how it can be even more useful I can consider and maybe add them.
One use for it that I can imagine is for PBEM hosts - it can be used as an easy way to save all turns.
Usage (from script documentation):
"Usage save_dom.pl [v|c|s|l] [game name] [turn number].
Examples.
1 To save turn 14 of game named "ermor" do:
save_dom.pl s ermor 14.
2 To load turn 14 of game named "ermor" do:
save_dom.pl l ermor 14.
3 To configure values of dominions II path and save game root path do:
save_dom.pl c.
4 To view configuration parameters values do:
save_dom.pl v
"
EDIT,
In the zip file is the perl script (you need to install perl for it to work)
also is a .save_dom_conf file, this is an example of the configuration file on my system.
|
July 13th, 2005, 10:22 AM
|
First Lieutenant
|
|
Join Date: Feb 2005
Posts: 693
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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?
|
July 13th, 2005, 03:42 PM
|
|
General
|
|
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
|
|
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.
|
July 14th, 2005, 12:02 AM
|
Corporal
|
|
Join Date: Jan 2004
Location: Wilmington, Delaware, USA
Posts: 191
Thanks: 1
Thanked 13 Times in 2 Posts
|
|
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.
|
July 14th, 2005, 09:29 AM
|
|
General
|
|
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
|
|
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.
|
July 14th, 2005, 10:15 AM
|
|
General
|
|
Join Date: Sep 2003
Location: Tel Aviv, Israel
Posts: 3,465
Thanks: 511
Thanked 162 Times in 86 Posts
|
|
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.
|
July 13th, 2005, 09:53 PM
|
Private
|
|
Join Date: Jul 2005
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: gauging interest. save game perl script
I am *TREMENDOUSLY* interested in this heh. I've never used perl.... trying to figure out how to use it now, add a gui .
Edit: Okay i'm lost, how do I use this?
Quote:
Oversway said:
I would download it and check it out, although the java one works fine for me now.
|
What java one?
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|