FlipCams 1.0.3 by FL!P

--------------
- What it is -
--------------

LFS most conveniently allows you to define a custom view (often called the Wheels View). From the "Options > View" screen you can define the location of the camera, whether the car's body, the driver and the steering wheel are visible or not, whether the camera reflects accelerations or not, etc. This is great and very flexible, but there is only one custom view per car. 

This suite, composed of an executable and a series of LFS scripts, allows to save and use five different custom views per car, and to cycle through them by pressing one of two hotkeys (by default CTRL+F12 to switch to the next camera, and CTRL+F11 to switch the previous one). I hope you'll enjoy FlipCams.

----------------
- Requirements -
----------------

LFS S2 Alpha 0.5Z or greater. If you're still using the S2 Alpha 0.5X, get or keep using FlipCams 1.0.2.

----------------
- Installation -
----------------

1. Double-click on FlipCams-Installer.exe (leave it in its original folder along with the parts folder).

2. In the installer's window, select the LFS folder where you want FlipCams to be installed, the hotkeys you want to use, and click on Install.

That's it. FlipCams will then be installed and set-up automatically.

Notes: 

- If you're upgrading a previous installation of FlipCams, all the cameras you defined will be preserved.

- If you wish to use different hotkeys than in your previous installation, you'll have to delete the previous hotkeys by hand from LFS. To do so, go to Options > Game, and delete the shortcut(s) that read "/run fc_runCam*".

- If after some time you wish to change FlipCam's hotkeys, just run the installer again, choosing the new hotkeys. You'll have to delete the old ones from LFS by hand as described above, though. 

------------------
- Using FlipCams -
------------------

FlipCams.exe is launched from LFS scripts and you don't have to launch it by hand nor to keep it running. 

Each time you press the "Next Set" hotkey (CTRL+F12 if you chose to use the default hotkeys), FlipCams determines which is the current custom views set and activates the next one (or the previous one when you press the "Previous Set" hotkey, by default CTRL+F11). Then it reloads the custom view if it's the active one, and displays the active set name on the screen. 

It also binds the next set to the Next Set hotkey and the previous one to the Previous Set hotkey, so you can cycle through them by pressing one of those hotkeys repeatedly. 

At first, all the view sets will be identical, because FlipCams just duplicated your views folder. But from now on, the changes you'll make to a custom view will be saved into the current views set, and therefore will be loaded the next time you switch to that set.

--------
- Tips -
--------

- I'd recommend to be consistent in the way you chose into which set to save a new camera. For example you could use CAM 1 in every car for driving position, CAM 2 for F1-like overhead camera in single seaters and onboard camera in tin-tops, CAM 3 for a rear view camera in each car, and so on.

- If you do this, you may also want to edit the fc_runCam* scripts to replace "CAM *" in the line "/echo ^6 FlipCams:^7 CAM *" with a proper name like "Driving", "Onboard" or "Rear". Don't rename the scripts or the views_cam* folders, though, because FlipCams would then stop working.

- If you want the views set CAM 1 not to be loaded when you launch LFS, open the autoexec.lfs script and delete "/run fc_runCam1". The last views set you used will then remain active when you launch LFS.

- If you use to backup some of LFS' folders, you may want to backup also the views folder and all the view_cam* folders.

----------------
- How it works -
----------------

When you change the custom view settings of a car, these changes are saved in a file stored at [LFS]\data\views\[carcode].cvw, which is read again each time you switch to the custom view in that car.

FlipCams works by renaming the "views" folder and one of the "views_cam*" folders. So for example if you're using the CAM 1 set, the "views_cam1" folder doesn't exist, as it's then called "views". When you switch to CAM 2, the "views" folder is renamed into "views_cam1" and the "views_cam2" folder is renamed into "views". 

This is done from FlipCams.exe, a compiled AutoHotkey script (http://www.autohotkey.com/). This executable is launched from a LFS scripts each time you press the Next Set or the Previous Set hotkey, and quits immediately after having renamed the folders.

Renaming LFS' folders behind its back is a kind of a hack, but it works fine and doesn't require to mess with LFS' internals or with InSim. Besides, it should need less updates to keep working with each new patch.

------------------
- Uninstallation - 
------------------

To uninstall FlipCams:

1. Delete the following files:

[LFS]\FlipCams.exe
[LFS]\FlipCams-Readme.txt
[LFS]\data\script\fc_bindCam*.lfs (5 files)
[LFS]\data\script\fc_reloadView.lfs
[LFS]\data\script\fc_runCam*.lfs (5 files)

([LFS]\ represents the LFS folder you selected during the installation, and * represents a number from 1 to 5.)

2. Delete the following folders:

[LFS]\data\views_cam* (4 folders)

3. open LFS\data\script\autoexec.lfs and delete the line "/run fc_runCam1".

4. In LFS go to Option > Game, and delete the shortcut(s) that read "/run fc_runCam*".

-----------
- Credits -
-----------

Thanks to JasonJ for giving me the idea to write FlipCams and for his suggestions.
Thanks to Scawen for having implemented the /wait command in W29 to solve a problem I ran into when developing this, and for the /view save and /view reload commands in Z.
Thanks to my teammates at dbp (drivenbypassion.org) for being great teammates.
Thanks to you for being still reading this.
And most of all, many thanks to SCAVIER for LFS!

--------------------
- Versions history -
--------------------

- 1/11/2009 - 1.0.3
	Updated to work with patch Z: LFS no longer saves or refreshes the custom view automatically, so some FlipCams' scripts had to be edited. Thanks to Scawen for implementing the couple of commands required to force saving and refreshing the view!

- 28/01/2008 - 1.0.2
	The previous version recently started to trigger Avast Antivirus, which reported both FlipCams and its installer to contain a trojan horse named "Win32:Agent-QYH [Trj]". I believe this is due to bogus information recently added to Avast's database. I recompiled both executables with the latest version of AutoHotkey and they no longer trigger Avast antivirus. This is the only change in this version.

- 17/07/2007 - 1.0.1
	Fixed a bug in the installer that made impossible to use the ALT+F11/ALT+F12 hotkeys.

- 09/06/2007 - 1.0
	No changes except for the version number.

- 26/05/2007 - 1.0b2
	Creation of the installer (thanks to Stoney's request).

- 25/05/2007 - 1.0b1
	First public release of FlipCams 1.0b1

