Hello and Welcome to the Driver Madness forums, "Steproy2000".
I must say I haven't been super interested in writing programs in the Microsoft Batch File Language because of a Lack of Interface for the end user.
I much prefer languages like Microsoft VisualBasic. It's fairly hard to learn but provides the end user with an Interface that'll assist their task in editing the car driven in Miami (Take A Ride).
But before I talk about that I'll explain a few problems we have.
1st Problem
copy mission46.dms "C:\program files\GT Interactive\Driver\Scripts\Missions\"
Not everyone has driver installed on that location, since the game installation gives an option to install it in another location.
2nd Problem
copy mission46.dms "C:\program files\GT Interactive\Driver\Scripts\Missions\"
If the end user has their own modifications made to that file, they'll be overwritten.
3rd Problem
The entire application could be ran from one executable or .bat file.
4th Major Problem
The end-user can unlock the ability of using any vehicle at the end of the game, or by using the cheat unlocking file. (I could be wrong it's been a while since I've played around with the first driver title)
5th Problem
The programs much more complicated and the end-user won't understand it as easily but similar tools already exist. They mainly for creating entire missions.
http://www.downloads.drivermadness.net/d1/tools/
Ways to improve
Here are some ways you can improve your script!
Microsoft Batch File Language
Note: I remember doing some of these things with batch files but not all.
First the end user will have to place the batch file in the Driver Directory, there is no easier way to determine the directory for a file using this language.
Then when they run the batch file, a batch file can be presented in steps the end user can take.
eg. A menu screen.
which city do you want to change your default vehicle
1) Miami
2) San Francisco
3) Los Angeles
4) New York
5) Newcastle
what vehicle do you want to change to
if "
1) miami"
display list of vehicles for miami
when the user selects a vehicle find the proper file to modify.
"
mission46.dms" and then look for line "
PlayerCarType ?" and change to "
PlayerCarType x"
^ I think you can do that, otherwise you can have all the files pre-created like you have and have it copy the correct file.
Now I haven't used batch files for a couple of years now and I've forgotten most of it, but I'm pretty sure you can do these things as I have done similar before.
Stand-Alone Executable
I've done little work with Visual Basic, but I know the skys the limit with this language as you have so much control over the interface and actions performed within the interface.
A wizard style interface
A introduction page (press next button to go to next step)
find the driver director
- try to use the registry entry to automatically determine the installation location of the driver game. Most but not everyone installs the game so leave this next option avaliable.
- allow the user to select the directory from the windows interface
a drop down menu with a list of all the cities
when a city is selected, a picture of this city is used alongside. Perhaps a screenshot of the city as seen in the driver game when you select a city.
then a drop-down list of all the vehicles avaliable for that city, with images alongside.
then the end user can press a process button.
the program will look in the correct file.
for miami "
mission46.dms"
then it'll look for "
PlayerCarType ?" and change it to "
PlayerCarType x"
and I can put this file on downloads.drivermadness.net instead of what your using if you want. Then you can directly link to it without any ads or waiting times.
I'm not sure were your at (if your learning this at school or just for fun), but it's a good idea to do little fun projects like this to learn these ways of programming.