View Single Post
  #6  
Old September 30th, 2005, 01:59 PM

markgame markgame is offline
Corporal
 
Join Date: Nov 2000
Posts: 62
Thanks: 1
Thanked 0 Times in 0 Posts
markgame is on a distinguished road
Default Re: Adding new scenario utility

Quote:
jvankessel said:
If you can spec precisely what the program is supposed to do, I'll take a few hours to write it. Not this weekend though; I'm going sailing.
Enjoy your sail!

The utility should be able to extract the scenario files from a zip file and move them to the scenario folder in winSPMBT, renaming the files to place them in the next available unoccupied slot.

The files are in the format "spscnXXX.YYY" where XXX can range from 001 to 999. YYY is the extention which can be .cmt, .dat and .txt and all three should exist for each scenario. The files must be placed in the \Scenarios folder of the winSPMBT installation, so the path to that folder could be variable but the name "Scenarios" is fixed.

Example of files in the Scenarios folder:
spscn000.cmt
spscn000.dat
Spscn000.txt
spscn001.cmt
spscn001.dat
Spscn001.txt
SPSCN002.CMT
SPSCN002.DAT
Spscn002.txt
SPSCN003.CMT
SPSCN003.DAT
Spscn003.txt

The XXX should be replaced in the name of each of the three files with the next unused slot in the Scenarios folder. In the example above the next unused slot would be "004". If you feel so motivated you could add an option to specify the minimum value of XXX, so that add-on scenarios would always be placed in slots at or above that value, so that they can be grouped together.

The source location of the zips should be able to be specified using a "Browse to" button and saved in something like an .ini file so that the user doesn't have to re-specify locations on each use. The same of course for the destination "Scenarios" folder.

Scenarios are usually supplied in Zip compressed files, does this present a problem?

You did say "precisely", didn't you ? I review and approve software requirements and specifications for a living!
Reply With Quote