.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 > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old February 23rd, 2004, 07:21 PM
Torvak's Avatar

Torvak Torvak is offline
Corporal
 
Join Date: Jan 2004
Posts: 151
Thanks: 0
Thanked 0 Times in 0 Posts
Torvak is on a distinguished road
Default 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.
__________________
World Map
Reply With Quote
  #2  
Old February 23rd, 2004, 07:32 PM
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: 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!)
Reply With Quote
  #3  
Old February 23rd, 2004, 07:37 PM
Torvak's Avatar

Torvak Torvak is offline
Corporal
 
Join Date: Jan 2004
Posts: 151
Thanks: 0
Thanked 0 Times in 0 Posts
Torvak is on a distinguished road
Default 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.
__________________
World Map
Reply With Quote
  #4  
Old February 24th, 2004, 02:54 AM

Gateway103 Gateway103 is offline
Corporal
 
Join Date: Jan 2004
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Gateway103 is on a distinguished road
Default 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
Reply With Quote
  #5  
Old February 24th, 2004, 11:19 AM
Torvak's Avatar

Torvak Torvak is offline
Corporal
 
Join Date: Jan 2004
Posts: 151
Thanks: 0
Thanked 0 Times in 0 Posts
Torvak is on a distinguished road
Default 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.
__________________
World Map
Reply With Quote
  #6  
Old February 24th, 2004, 04:37 PM
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: 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!)
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 05:40 PM.


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