******************************************
Loco backup tool / Map making Mod Ver 2.0
By Plastikman
******************************************

This all began as a simple script to backup and Restore My locomotion ObjData 
so I could have a clean folder for making maps and beta testing mods. This is a very 
basic yet useful script aimed at "Simple, yet functional".



Not everyone is aware of the fact that when you make a Map that has Mod files in it, 
even if they are not selected objects in the map, the result will still be a "dirty" 
map that requires many of those files. 

This "Tool" (for lack of a better word to describe it) should allow you to quickly 
make a self extracting backup while creating a perfectly clean environment for making a 
map.


If You are expecting Bells Whistles and Disco lights, Look elsewhere (for now).

I used to copy my objdata folder by hand and  it soon became a bit of a mess and 
I started loosing track of what was what. Also, those copies were quite large.
With 7zip I am getting mixed results but all much better then rar:

A 355mb Objdata folder zipped down to a 128meg backup.  a 35% compression ratio. (XP, Dualcore 6550)
A 895MB Objdata folder zipped down to a 137meg backup. A 16% Compression Ratio. (Vista, Quadecore Q9800)
that is a lot of hard  realestate saved.


******************************************
It has the very basic options.

1) Backup your Objdata folder:

Very handy before you try out a new mod, edit some dats, copy to a new pc, Etc. 

2) Backup your Objdata folder and remove all files in your Objdata folder and install 
the factory default objects: 

Perfect for making a map, changing between back up sets, maybe you have a back up of 
one bridge set one with another, maybe you want to try out some new mods that might 
conflict with other mods you installed, maybe you want to play a certain map and needs 
different mods, maybe you installed some mods that crashed your Locomotion build and 
you want to try and fix it, Etc.

3) Delete all files in the objdata folder without making a backup.

Dangerous but perfect if You have a good back up already, you just tested out some 
mods and you want to restore your old mods, Your locomotion game is crashed from bad 
mods and you just want to fix it (giving up on saving old files), You are about to 
install one of your back ups, Etc.

4/Extra Checkbox) "Process scenarios" this Works a little different with which option you choose.
With option 1, It just backs up your Scenarios folder. With option 2 and 3,
It backs up the Scenario folder then DELETES all non default Scenarios.
NOTE* I do not back up default scenarios or supply a virgin scenario pack.
if you altered your original scenarios and need them back, reinstall from cd.

**There is a known bug in Locomotion. If you have scenarios in Your Scenario folder that 
require 3rd party dats that are not in your objdata folder, There is a good chance 
your locomotion game will not start. While not every dat causes this problem, 
It is becoming more and more common with modern mods. 
Especially with new commodities, Sounds, and industries. 
If you chose not to refresh your  Scenario folder after Virgin Objdata restore,
You suffer the risk of Epic Fail.


******************************************
How to use:
******************************************

It is self explanatory. But, here goes...
Run the Loco Backup tool.exe from the Locomotion folder or from the start menu.

It will ask you how you want to use it (see above), 

1) Back up only
2) back up and restore default object files
3) Restore default Object file without backing up.
4/Extra checkbox) Process Scenarios.
That’s it. There is nothing more to it. Select the letter you want, say yes or quit two 
times, Presto... your done. (My old version didn't even have prompts so it was really 
mindless) i tried to keep it as simple as possible yet useful.


The backup naming auto naming format is based on the date created.
The format is "backup_of_objectdata_Month-Date-Year-Time.exe" (24 hour clock).

you will end up with a file "backup_of_objectdata_Oct-21-2007-1220.exe." (date will change of course)

to restore a backup:

when you want to restore your back up, just run the backup of your choice. it will 
bring up a self installing GUI box. install it to your /locomotion folder (its default). 
DO NOT install to /locomotion/objdata.

I would recommend deleting your objdata manually first (or running option 3 on the 
tool) . even if you installed new mods since that backup, Those new mods may not work 
properly now. you might have installed newer file versions then you are restoring. you 


can always add the mods again after the backup. after all, you do have a backup now 
incase it breaks right?



******************************************
Errors:
******************************************
There is some pretty decent fail safe scripting to try and keep you from loosing any 
data, 

The biggest problem is Drive space. The average backup is 100megs to 200megs. some 
people may get a bit larger if they have enough mods installed. i you run out of drive 
space mid backup, you could have a problem. Fortunately it will tell you if you run out 
of space and let you abort or fix the problem.


Error checking:

few things it needs.
1)Executable to be in the locomotion folder (installer places it here for you)
2)virgin_objectdata.dat file in the locomotion folder (installer installs this for you)
3)free drive space


Some of the built in logic to help you understand any of the error messages you get,

*****************
Program start
*****************
Check to see if it is the locomotion game folder, 
(program must be run inside the game folder)
Check to see if the default game pack is in the game folder.
offers you the menu choices (A,b,c,Q)
**********************************
if you chose a backup option, it will check that you have a objdata folder
if no objdata folder, it aborts backup and offers to rebuild regardless of choice you made
if you chose a backup option, it creates the backup auto named based on date/time
it then checks that you have any back up files. if none, it warns You.
if you chose "no rebuild", it ends.
**********************************
all the rest verify that you choose a rebuild option
**********************************
it will double check you want to erase your data.
It then tries to remove you objdata folder, if it can’t (file in use etc.)
if last step failed, then it deletes all the files inside the folder leaving it.
it then restores the factory fresh files for you.
**********************************
end
**********************************

some of these steps seem obvious. If they are not taken bad things can happen like 
loss of data. (trust me on that one..) as you can see I tried to do everything to make 
this as simple yet stable and the least possible chance of data loss, but anything is possible.

now supports 98/Me/2k/XP/2k3/Vista
(no longer tested on Win 9X since upgrade to 2.0, let me know)

Rev. updates:
2.1
Ugraded for Windows 7 64bit support
Reduced Timer for splash screen

2.0
massive overhaul
now GUI (sort of)
now Uses 7zip freeware compression
Is much more stable under vista, at times it was not 100%
UAC compliant
added the  Shinkansen Bullet Trains to default stock
added multi thread support (faster Backups on multi CPU's)
added scenario backing up.

1.4
Added the feature of resetting the plug-in database to the backups
 so restoring a backup will rebuild the plug-in database on restore.
updated the object restore file to include the airport from the .176 update
Spelling fixes

1.3
total script rewrite for Vista support.
Removal of choice.com and using all scripted menu
Bug and typo fixes.
fixed backup timestamps
new icon

1.2
migrated from three programs to one menu driven program 
added uninstall
added GUI self extracting backups
added start bar items
Bug and typo fixes
converted to exe

1.1
Bug fixes and improved logic to prevent data loss

1.0 personal program for my own use, a bit unfriendly


possible upgrades:
incremental backup, just backup dats that are not part of the original game.
making backup packs for maps, (any files a map might need.)
converting to a GUI program with more options. (bells whistles and disco lights)
winrar support for better backup speed (would require you owning winrar)
