.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 August 11th, 2004, 07:12 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 So i played a bit with C# lately

Thought i'd rewrite my domsaver with it. Just to see how things work.

You can get it here.

To run it the Microsoft .net Framework must be installed.

It's pretty self explanatory. Start it, click browse, the file dialog will open the dominions2 directory. Switch into the dir of one of your games and select the .trn file.
When you click Save it will create a zip file in that directory name race##.zip. Where race is obviously the race you play and ## the turn number.

I hope it works, didn't do alot of testing.

God saving will be done tomorrow
__________________
World Map
Reply With Quote
  #2  
Old August 12th, 2004, 07:19 AM
tinkthank's Avatar

tinkthank tinkthank is offline
Lieutenant Colonel
 
Join Date: Jan 2004
Posts: 1,276
Thanks: 0
Thanked 2 Times in 2 Posts
tinkthank is on a distinguished road
Default Re: So i played a bit with C# lately

Hey Torvak, thanks, this sounds great.
Before I download and check it out, I'd like to ask, simply because I know nothing about computers:
1. This will change my dom2.exe and add an interface to my current dom2 game which will allow me to save games and then reload them?
2. I run my game on one machine with win98 and on another with win2000 -- do I have to install something which will change or be difficult for any of these systems?

thanks much!
Reply With Quote
  #3  
Old August 12th, 2004, 07:47 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: So i played a bit with C# lately

Quote:
Hey Torvak, thanks, this sounds great.
Before I download and check it out, I'd like to ask, simply because I know nothing about computers:
1. This will change my dom2.exe and add an interface to my current dom2 game which will allow me to save games and then reload them?
2. I run my game on one machine with win98 and on another with win2000 -- do I have to install something which will change or be difficult for any of these systems?

thanks much!
No, it will do nothing to your dom2.exe It's just a small program that zips up your game files so there is a copy of them and the game doesn't see them any more. As a side effect they are smaller too.

You need to save before you host the next turn.

You do need however the .net framework from microsoft. According to MS Win ME is no longer supported so i'd say forget about 98 too. For win2k you also need the service pack 2 but you should have that one anyways
__________________
World Map
Reply With Quote
  #4  
Old August 12th, 2004, 08:15 AM
tinkthank's Avatar

tinkthank tinkthank is offline
Lieutenant Colonel
 
Join Date: Jan 2004
Posts: 1,276
Thanks: 0
Thanked 2 Times in 2 Posts
tinkthank is on a distinguished road
Default Re: So i played a bit with C# lately

ok thanks much. I may end up not being able to give you feedback, since I dont know what this net framework is and mostly use my win98 laptop and not my 2k office machine for obvious reasons -- thanks for your efforts however!
Reply With Quote
  #5  
Old August 12th, 2004, 09:03 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: So i played a bit with C# lately

Quote:
ok thanks much. I may end up not being able to give you feedback, since I dont know what this net framework is and mostly use my win98 laptop and not my 2k office machine for obvious reasons -- thanks for your efforts however!
No prob. I didn't expect people get overly excited about something that already exists. Just needed something to do while playing around with a new programming language.
__________________
World Map
Reply With Quote
  #6  
Old August 12th, 2004, 10:54 AM
Esben Mose Hansen's Avatar

Esben Mose Hansen Esben Mose Hansen is offline
Second Lieutenant
 
Join Date: Jan 2004
Location: Copenhagen, Denmark
Posts: 410
Thanks: 0
Thanked 0 Times in 0 Posts
Esben Mose Hansen is on a distinguished road
Default Re: So i played a bit with C# lately

Quote:
You do need however the .net framework from microsoft. According to MS Win ME is no longer supported so i'd say forget about 98 too. For win2k you also need the service pack 2 but you should have that one anyways
The desperate coukd try Mono... but surely, using the C# Microsoft framework for this is akin to using mallets to squat houseflys...?
__________________
"It makes you wonder if there is anything to astrology after all. "Oh, there is," said Susan, "Delusion, wishful thinking and gullibility." (T. Pratchett)
Reply With Quote
  #7  
Old August 12th, 2004, 11:08 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: So i played a bit with C# lately

Quote:
Quote:
You do need however the .net framework from microsoft. According to MS Win ME is no longer supported so i'd say forget about 98 too. For win2k you also need the service pack 2 but you should have that one anyways
The desperate coukd try Mono... but surely, using the C# Microsoft framework for this is akin to using mallets to squat houseflys...?
Is it? It's just another language. Of course for the random user it's an inconvenience to have to install the framework but i have it on my machine for years now for other applications.
__________________
World Map
Reply With Quote
  #8  
Old August 12th, 2004, 11:58 AM
Agrajag's Avatar

Agrajag Agrajag is offline
Lieutenant Colonel
 
Join Date: Jul 2004
Location: Israel
Posts: 1,449
Thanks: 4
Thanked 8 Times in 2 Posts
Agrajag is on a distinguished road
Default Re: So i played a bit with C# lately

Not that I intend to download your program (no offence obviously) but I just wanted to say I have the framework installed and it keeps giving me problems.
My current theory is that the framework file attempts to update itself over the internet sometimes, so when it does the firewall stops it from doing so, it keeps trying again and again and jams my computer, I have to run the Task Manager and manualy close the framework.exe via the "processes" tab.
Its just annoying though, nothing more...
Just thought you frameworkers would like to know
__________________
I'm in the IDF. (So any new reply by me is a very rare event.)
Reply With Quote
  #9  
Old August 12th, 2004, 12:57 PM
Arryn's Avatar

Arryn Arryn is offline
Major General
 
Join Date: Jan 2004
Location: twilight zone
Posts: 2,247
Thanks: 0
Thanked 0 Times in 0 Posts
Arryn is on a distinguished road
Default Re: So i played a bit with C# lately

Quote:
It's just another language. Of course for the random user it's an inconvenience to have to install the framework but i have it on my machine for years now for other applications.
The real problem with using C#, and the reason why I'll be keeping your v0.6 on my website for downloading, is that it prevents many Dom 2 players from being able to use it. Namely, anyone who isn't using Win 2k/XP, which is arguably most Dom 2 players. I understand that you are learning the language for your own personal reasons, and that you've used Domsaver as a testbed app to do so, just as you did earlier when "playing around" with Java. However, may I suggest that you either continue supporting the Java Version, or release the Java Version's source code so that the broadest spectrum of players can utilize your nice, useful app?
__________________
Visit my Dominions II site
Reply With Quote
  #10  
Old August 12th, 2004, 08:55 PM

alexti alexti is offline
First Lieutenant
 
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
alexti is on a distinguished road
Default Re: So i played a bit with C# lately

Quote:
Quote:
You do need however the .net framework from microsoft. According to MS Win ME is no longer supported so i'd say forget about 98 too. For win2k you also need the service pack 2 but you should have that one anyways
The desperate coukd try Mono... but surely, using the C# Microsoft framework for this is akin to using mallets to squat houseflys...?
The desperate can pass the following script in Dom2 --postexec option ;-) :

Code:

gawk -f save_script.awk



where save_script.awk contains:
Code:

BEGIN {
timestamp_file = "Last-total-save-timestamp.txt";
t = systime();
stamp = strftime("%Y%m%d-%H%M%S",t);
stamp2 = strftime("%Y-%m-%d",t);
saveAll = 1;
if ((getline Last_stamp < timestamp_file) > 0)
{
if (stamp2 == Last_stamp)
saveAll = 0;
}
close(timestamp_file);

if (saveAll)
{
cmd = sprintf("zip -r save-all-%s * [email protected]",stamp);
print stamp2 > timestamp_file;
}
else
cmd = sprintf("zip -r -t %s save-%s * [email protected]",Last_stamp,stamp);
system(cmd);
}

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:15 AM.


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