|
|
|
|
|
February 23rd, 2004, 07:21 PM
|
|
Corporal
|
|
Join Date: Jan 2004
Posts: 151
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
domsaver v0.1
I need to learn Java for the next semester so i thought i do it writing myself a small save game utility. Not sure if something like this already exists, if yes i havent found it.
Right now it lets you specify the path to dominion 2, game name and the name of the .trn file. There are 4 buttons save, load, quicksave and quickload.
Save gets the turn number from the .trn file and creates a folder gamename## in ./doc/save and copies the 3 files into it. I put the save dir in /doc so it doesn't show up on the game list.
For load you specify a turn number and if the dir exists it copies the files back.
Quicksave and quickload just use a gamenamequick dir and will overwrite existing stuff.
This is the very first working Version i just wrote in some hours working my way through the help and a book. It works for window but i doubt on any other OS. Mostly because i hardcoded the "\" for the paths.
For future Versions i want
-some nifty drop down menus and file dialogs to select the locations of the files,
-saving .trn and .2h files for more than one nation if multiplayer
-compressing of the saved games,
-keyboard commands
-pretender saving
and some other stuff people will come up with.
If anyone is interested drop me a line and i'll email it. Haven't bothered to set up a webpage yet.
|
February 23rd, 2004, 07:32 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: domsaver v0.1
Hmmm well this can all be done with bat files but I can think of a few things that would make me want to use something else....
How about a way to add "notes" to your game save?
A front end to the game which will "play" the game as though it was PBEM mode. Each time you do a turn you end up in this new menu which offers buttons for save, restore from save, or play next turn. The "play" button can enter Dominions with "play xxxxx game and quit" switches so that you drop right back out to your utility.
Or better yet a way to pack away a game completely with a note? I do alot of "what if" games and try to keep them around to jump into if someone askes questions here. Id love a utility which offers me a list of old compressed games. Man, Abyssia, Pangaea playing Carrion theme, Marignon with 4/4/4/4/4/9/4 maximum bless pretender, etc etc. But my game lists get so huge. Compress it with a note, and delete it, adding it to a "restore" list would be a kewl thing.
OK brain farts done now. Thats enough.
__________________
-- 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!)
|
February 23rd, 2004, 07:37 PM
|
|
Corporal
|
|
Join Date: Jan 2004
Posts: 151
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: domsaver v0.1
Quote:
Originally posted by Gandalf Parker:
Hmmm well this can all be done with bat files
|
I knew someone would say that Well it's just that i need to get used to Java and learning a new language without an actual project is boring.
|
February 24th, 2004, 02:54 AM
|
Corporal
|
|
Join Date: Jan 2004
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: domsaver v0.1
Sounds like a neafty utility, especially for those who keep their turns to do AAR and/or testings. Some random thoughts from me:
-------------------------
Instead of creating separate gamename## folders for different turns of the same game, why don't we append to the filenames the turn number. For example, "mygame_t020.trn", or "mygame.trn.020" or some variants, and put all these different turns of the same game in one "mygame" folder. This would make it easier to keep track of things.
-------------------------
To expand on GP's note idea, you can also create separate note files (text file?) for each separate turns, and name them appropriately.
-------------------------
Hmm... I wonder if you can extract the turn event summary from the save files, (i.e. the list of things that happened that turn such as battles, prophet proclaimations, random events.) If you could extract them, it may prove useful (or not?!), as an user option, to put them in the beginning of the note files.
This could help AAR writers I believe, as they don't have to write up each turn as they go and/or take a lot of notes, but can play say 10+ turns, load up the note files, and write on those turns.
-------------------------
Lastly, can this program or its later Version be set to run in the background, so each time I press host button in Dom2, and when the next turn is ready for me to play, it'll autosave the processed turn appropriately?
-------------------------
Just some random thoughts
-Gateway103
|
February 24th, 2004, 11:19 AM
|
|
Corporal
|
|
Join Date: Jan 2004
Posts: 151
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: domsaver v0.1
Quote:
Instead of creating separate gamename## folders for different turns of the same game, why don't we append to the filenames the turn number. For example, "mygame_t020.trn", or "mygame.trn.020" or some variants, and put all these different turns of the same game in one "mygame" folder. This would make it easier to keep track of things.
|
That's easily possible and sounds like the better way. Will do it.
Quote:
To expand on GP's note idea, you can also create separate note files (text file?) for each separate turns, and name them appropriately
|
Ok a mini notepad . Will have to see what Swing offers here to implement that.
Quote:
Hmm... I wonder if you can extract the turn event summary from the save files, (i.e. the list of things that happened that turn such as battles, prophet proclaimations, random events.) If you could extract them, it may prove useful (or not?!), as an user option, to put them in the beginning of the note files.
|
Not easily. Just did a quick check and it seems they are either encoded or just generated by the game according to events during the turn.
Quote:
Lastly, can this program or its later Version be set to run in the background, so each time I press host button in Dom2, and when the next turn is ready for me to play, it'll autosave the processed turn appropriately?
|
That's also a little bit trickier. When you run a server there is an option to execute a command after hosting. So you could setup a server and connect to it on the same machine.
For single player i think the only way is to constantly check time stamps of the files. The turn file is saved when you click next turn. Between that and the user clicking host i'd have to check if the file is changed and save it. Not sure how much cpu time it would take to check often enough to make it possible.
I just thought of another way. Assuming i can react to a certain (configurable) key while the program is running in the background i could have it move the mouse, click next turn, save files, click host.
|
February 24th, 2004, 04:37 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: domsaver v0.1
I think rather than background mode you might find it easier to run it as a front end. Run Dominions in background mode. Well not really but your program could be the program that they go into. Since dominions does support options for host&quit with the game name being specified on the command line, you could "call" dominions each time and then doing the turn would automatically drop you back out to your program menu.
At least this might be something easier and quicker to implement for now.
[ February 24, 2004, 14:38: Message edited by: Gandalf Parker ]
__________________
-- 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!)
|
February 24th, 2004, 06:02 PM
|
|
Corporal
|
|
Join Date: Jan 2004
Posts: 151
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: domsaver v0.1
Ok v0.2 now saves the files as .trn.##, .2h.## and ftherlnd.## in the game directory.
It also has a textpane were you can make comments and it'll save them as race##.text if you activate a checkbox.
Putting in a turn number will display the comment for the turn if one exists without loading the game.
Loading will display the comment and load the game of course.
Quote:
Since dominions does support options for host&quit with the game name being specified on the command line, you could "call" dominions each time and then doing the turn would automatically drop you back out to your program menu.
|
Not really sure what you mean
Quote:
At least this might be something easier and quicker to implement for now.
|
I have all the time. Next semester starts in april.
|
February 24th, 2004, 11:06 PM
|
|
Corporal
|
|
Join Date: Jan 2004
Posts: 151
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: domsaver v0.1
v0.2
I need ideas what to add next
Hmm image and url don't seem to work with image dump links.
[ February 24, 2004, 21:09: Message edited by: Torvak ]
|
February 24th, 2004, 11:10 PM
|
|
Major General
|
|
Join Date: Jan 2004
Location: twilight zone
Posts: 2,247
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: domsaver v0.1
Quote:
Originally posted by Torvak:
I need ideas what to add next
|
Do you have a useable (testable) Version that we can play around with? If so, feel free to email it to me at "[email protected]" and I can put it up on my site for others to try out. If you have beta testers, you'll get more (and better) feedback ...
|
February 24th, 2004, 11:24 PM
|
|
Corporal
|
|
Join Date: Jan 2004
Posts: 151
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: domsaver v0.1
Ok mailed you.
|
Thread Tools |
|
Display Modes |
Linear Mode
|
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
|
|
|
|
|