=================================================================
=========   GT5 Master Mod 1.9.1 [for GT5 2.11]    ==============
=================================================================
                         by: Nenkai
                       Discord: nenkai
                       Twitter: https://twitter.com/Nenkaai
                        Github: https://github.com/Nenkai/
                         GTP: Nenkai
=================================================================
Mod Link: https://www.gtplanet.net/forum/threads/395844/
Modding Hub: https://nenkai.github.io/gt-modding-hub/

###################################################
# Introduction and Features
  This mod for Gran Turismo 5 adds several features to the game:
  - Debug features enabled for any game build.
    * Pressing SELECT on the main menu brings up a debug menu.
    * Holding R1 while going to the photo travel mode unlocks all locations.
    * Holding R1 while openning all tickets/vouches runs in debug mode; no tickets are consumed.
    * Pressing START in any event or license completes them.
    * Pressing START in the Used Car Dealership on a car gives you the car for free.
    * Pressing TRIANGLE in the Dealership on a car color gives you the car for free.
    * Holding R1 while viewing a car in the garage does not make the car spin.
    * Runviewer/QA/Debug features enabled in Course Maker.
	* Quick Location Switcher debug feature enabled in Photo Travel.
	* Runviewer features (Resolution Changing) enabled in Options.
	
  - Improved arcade mode (thanks ddm! / https://twitter.com/ddm999)
    * Filters (manufacturer, drivetrain, special categories)
	* All Cars tab in car selection
	* Power, Torque, Weight shown are always data values instead of display values
	* Standard (aka PS2) courses can be shown/hidden from course select by pressing Triangle
	* Master arcade difficulty
	* SELECT shows/hides filters for arcade car select
	
  - LAN Enabled & Online Experience Improvements (Original credits to Razerman and others for the initial discovery)
    * Improvements over the initial mod
     * More cars allowed in One-Make.
	 * All tracks had their "rain_situation" enabled, meaning you can now set any track rainy.
	 * Template02 and 04 are now playable online along with Top Gear variants.
	 * It is now possible to use karts and F1's in Online Rooms without regulations. FGT vs F1's are now possible.
	 * Updated ALL online car sets, credits to goongumps. (Full list: https://docs.google.com/document/d/1wP0jUh-rrbH_lI8PL3m6wU39RNbn3qalawl_T0BOcl8/edit?usp=sharing)
	 * Changed default track to Autumn Ring - Mini for faster room loading.
	 * Shuffle list rebalanced.
	 * Time to pick tracks increased from 40 to 45s.
	 * Countdown time increased.
	 
  - PS2 Tracks re-added
	 * 42 Tracks!
	 * Added missing logos, maps, previews for them.
	 * Fixed many issues related to the original files for them.
	 
  - Added scrapped cars:
    Polyphony Digital X1 (fan) - From GT5 QA Build of Sept. 16th 2010
	Red Bull X2010 S.Vettel (Old) - Model from GT5 QA Build of Sept. 16th 2010
	Nissan SKYLINE Coupe 370GT (GT Academy Version) '07 - Car from GT Academy 2012 that never carried to GT5.
	
  - Readded scrapped old template02 track (as template12).
  
  - New racing modifications
	* It's all up to you from now on. No list to provide to avoid spoilers :eyes:
	
  - Other changes
    * Special Settings are unlocked by default in options.
	* The DLC menu is now accessible offline and can be used to install paid DLCs without entitlement.
	* Added cut Red Bull Charity DLC packs.
	* Main menu target framerate has been raised to 60 (vanilla locked to 30 - RPCS3 users with decent enough hardware can reach this target framerate.).
	* Increased the AI difficulty of the arcade mode. Old "Professional" difficulty is "Normal".
    * It is now possible to go in the Photo Travel with a standard car.
	* Photo Mode in-race now lets you take the camera everywhere (Debug Cam Addon)
    * You can go in the museum menu, but it does not work much, still.
	* It is now possible to take photos of standards without the zoom restriction.
	* You can now paint special cars in GT Auto.
	* You can also paint wheels for special cars in GT Auto.
	* Added a notice in the main menu with mod details.
	* All Rally tracks had their AI in arcade increased from 4 to 12-16.
    * Added a RACE_EDIT/Event Creator event in A-Spec (Beginner)
	* Changed the base path for RACE_EDIT that makes saving xml files possible.
	* Removed ALL annoying gttop (Main Menu) PSN prompts while connected to the internet.
	* Update Main Menu year to 2020.
	* Changed some RACE_EDIT strings "WRITE FILE DONE"/"WRITE FILE FAILED" to more human readable strings.
	* Car dealership now sells all the cars.
	* Restored cut A-Spec events. (Removed as of 1.0.5 while polishing)
	* PS2 Tracks that did not have a map menu icon now have one. (Credits to Shy_Doge)
	* PS2 Tracks that did not have a logo now have one.
	* Restored a GTHD/GT5P scene for a car selection in GT Mode which looks a lot cooler.
	* Money limit increased from 20,000,000 to 2,000,000,000 (possibly only new saves).
	* Online: Minimum Shuffle Base changed from 300 to 240.
	* Online: Maximum Shuffle base changed from 500 to 1000.
	* Online: Shuffle list for higher PP ranges imported from GTPSP.
	* Online: Time to finish minimum changed from 20 seconds to 10.
	* Online: Time to pick during track vote has been increased from 40 to 45s, due to the added tracks.
	* Reimplemented offline login presents (and increased XP/Cash ratio).
	* Added some A-Spec dummy events just to test out template02 and 04.
	* It is now possible to use karts and F1's in GT Mode (the former will see grids full of F1 AIs though).
	* Added an Easter Egg. (Hint: IA-15 AI) - Credits to Xenn
	* Added Top Gear test tracks variants to Arcade and Online Modes.
	* Template02 and 04 can now be selected in Course Maker.
	* Some unobtainable tuning parts are now given when using the "Add All Tuning Parts" option. (New saves only).
	* Increased favorite limits :
	  - Courses (Online?) - 50 -> 200
	  - Photos - 50 -> 200
	  - Replays - 50 -> 200
	  - Cars - 100 -> 1000
	  
  - Fixes
    * Made RACE_EDIT functional and fixed some native bugs. (View 1.0.4 changelog)
	
###################################################
# Installation or Update
  [Requirements]
  You need Gran Turismo 2.11, not higher, not lower.
  Again, make double SURE you are on GT5 2.11. Patches need to be installed one by one until 2.11. You can NOT directly install 2.11.
  
  [Installation]
  Recommended guide URL: https://gist.github.com/Nenkai/f46bdce07c4ee019c57494319b292b30#1-game-version
  Or overly simplified for experienced users:
  - Copy the contents of the PDIPFS folder to \dev_hdd0\game\<game code>\PS3_GAME\USRDIR\PDIPFS
  - To restore the contents, copy the PDIPFS_ORIGINAL to your game's PDIPFS.
  IMPORTANT NOTE: The first boot after having installed the Master Mod can take a while - game databases are rebuilt.
  
  [Updating]
  You can directly apply a master mod update the same way as you install it.
  
  [Reverting to vanilla]
  If you would like to revert to original, drag the contents of the PDIPFS_ORIGINAL into your PS3's PDIPFS.
  Do make a save backup if needed as reverting to vanilla with added cars will softlock at boot, 
  or remove the added cars from the garage before reverting.
  
  [Debug Cam] 
  To Apply the Debug Cam Addon, Simply copy the PDIPFS folder at the same place, AFTER the Master Mod. Overwrite files if it prompts you.
 
###################################################
# Extra Notes
  - Pikes Peak PS2 will only work in split screen.
  - Some PS2 tracks are a bit broken but thats to be expected since they are leftover files.
  - The course maker has entries that can crash the game due to not having data.
  - If you are missing replays due to the old method of deleting system.db you can recover them ingame - Utility->Salvage Files.
  - Why 2.11? Above has patched hybrids, and no additional content.
  
###################################################
# Credits
  It's by crediting and acknowledging other individuals and effort that the modding community can advance!
  If you have an interest in modding or would like to know more, feel free to join on the GT modding community discord!
  -> https://nenkai.github.io/gt-modding-hub/
  
  Credits list
  - ddm - All Arcade Mode improvements, work towards track vision files (VLS)
  - Klitlika - Added cars to arcade and recommended, course list changes, UCD cars to dealership & restored & fixed cut events
  - Shy_Doge - Making the missing PS2 tracks maps and logos.
  - Xenn - Additional fixes to certain ps2 tracks
  - Jonny_0093 - PS2 tracks arcade previews, additional fixes to certain ps2 tracks
  - Goongumps - Online Mode car category changes, shuffle list
  - TheAdmiester - RM Suggestions
  - Original creators of the LAN Mod.
  - xFileFIN for the RT2 tool.
  - Xenn for the Easter Egg, help with boost params.
  - Paiky (GT Archive) & Dezent / Contributing and getting GT5 QA Build which allowed content to be ported over to GT5
  - Content Creators / DoVe_7, DustinEden, Paiky/GT Archive, Gustingorriz, ThunderTHR, Grand Prix, R4BBIT G4MING, ...
  - Gran Turismo Research Discord server.
  - Gran Turismo Modding Community Discord server / https://discord.io/gtonline / https://nenkai.github.io/gt-modding-hub/
  - You, for using this mod

###################################################
# Updates/Changelog

[1.9.1] 15/06/2023
      * Fixed a vanilla bug where going into GPS Replay/Data Visualization in the main menu causes the race screen to be resized.

[1.9.0] 13/06/2023
	Wow it sure has been a hot while since I modded instead of doing research/reverse-engineering/writing tools.
	This is the first release of the mod that incorporates *recompiled game code* (arcade & main menu). It will also
	expand to gtmode in the future, this is just a small update to test the waters.
	
	Recompiled game code may cause issues - make a mention if this is the case
	
	--------------------------------------------------------------------------
	Thanks to ddm for the following arcade mode improvements!
	* Filters (manufacturer, drivetrain, special categories)
	* All Cars tab in car selection
	* Power, Torque, Weight shown are always data values instead of display values
	* Standard (aka PS2) courses can be shown/hidden from course select by pressing Triangle
	* Master arcade difficulty
	* SELECT shows/hides filters for arcade car select

	Main Menu:
	* Update main menu notice & year.
	* Added credits screen.
	* Main menu target framerate has been raised to 60 (vanilla locked to 30 - RPCS3 users with decent enough hardware can reach this target framerate.).
	* The DLC menu is now accessible offline and can be used to install paid DLCs without entitlement.
	* Added cut Red Bull Charity DLC packs.
	* All previously unavailable buttons (Online Lounge, GPS Replay) are now available as-is.
	* The debug menu can now be used to set money to 0.
	* Added prompts to certain debug menu options.
	* Fixed a bug with the vanilla debug menu which would reset units.
	* Fixed a bug with the vanilla debug menu where the cursor was invisible.
	
	Misc:
	* Fixed an oversight where the tuning shop had options that did not function.
	
[1.8.1] 24/12/2021
	* Updated discord invite link.
	* Updated main menu year to 2022.
	* Made debug camera optional. Apply the Debug Cam Addon PDIPFS AFTER the Master Mod.
	
	<<<< Merry christmas! >>>>
	
[1.8.0] 25/07/2021
	* Fixed many issues with PS2 tracks (invisible roads, props, etc) by forcing them to appear at all times. 
	  Major credits to ddm for figuring it out.
	  Fixed tracks:
	    - Ice Arena
		- Chamonix
		- Smokey Mountain (Partial)
		- Complex String
		- Costa di Amalfi
		- Hong Kong
	* Added Sabine-Schmitz-Kurve to Nurburgring corner list.
	
[1.7.1] 13/05/2021
	* Swapped walking camera to Debug Camera in Photo Mode within Replays.
	* Fix missing thumbnail for the added Nissan SKYLINE Coupe 370GT (GT Academy Version) '07.
	
[1.7.0] 28/04/2021
	[NOTE]
	This is an experimental release as it actually adds cars to the game. 
	Be cautious! If you want to remove the mod make sure to first remove the cars from the save.
	Make a backup if needed before installing.
	
    * Added scrapped cars:
      Polyphony Digital X1 (fan) - From GT5 QA Build of Sept. 16th 2010
	  Red Bull X2010 S.Vettel (Old) - Model from GT5 QA Build of Sept. 16th 2010
	  Nissan SKYLINE Coupe 370GT (GT Academy Version) '07 - Car from GT Academy 2012 that never carried to GT5.
	
    * Tweaked AI in Arcade (Professional Difficulty). i.e AI was too slow behind.

	
[1.6.0] 22/02/2021
    * Major Change: system.db deletion is no longer needed ever!
	* Increased the AI difficulty of the arcade mode. Old "Professional" difficulty is "Normal".
	* Increased max cars from 4 for the following tracks to:
	  - Chamonix (All) : 16
	  - Chamonix (PS2) : 12
	  - Ice Arena (PS2) : 12
	  - Grand Canyon (PS2) : 12
	  - Tahiti Maze (PS2) : 12
	  - Toscana : 16
	  - Eiger (all) : 12
	  - Templates : 16
	* Some tweaks/fix to the course list. (Monza regular no longer has change weather, ps2 oval tracks now properly marked, all tracks allow karts)
	* Increased favorite limits :
	  - Courses (Online?) - 50 -> 200
	  - Photos - 50 -> 200
	  - Replays - 50 -> 200
	  - Cars - 100 -> 1000
	
[1.5.1] 20/01/2021
    * Debug Mode: "Add All Tuning Parts" can now give you unobtainable parts (possibly new saves only).
	* Online: Shuffle list is fixed for PP above 600. (Broken in 1.5.0).
	* Online: Car sets have been changed (again) to make better use of the 250 car slots. Credits to Goongumps
	* Other: Changed main menu year to 2021. Happy new year!
	
[1.5.0] 29/12/2020
	* Tracks: Motorland, and Opera de Paris are now fully working (aside from cameras). Credits to Jonny_0093
	* Tracks: Added Fuji 90's missing minimap. Credits to Doge_Plays
	* Tracks: Added missing Motegi Road Course (PS2) to the freerun section.
	* Online: Shuffle list has been tweaked - credits to Goongumps
	* Online: Time to pick during track vote has been increased from 40 to 45s, due to the added tracks.
	
[1.4.1] 27/12/2020 - system.db deletion is required for the new track.
	* Added Fuji 90's (PS2), Credits to Jonny_0093
	* Added missing icons, ported some cameras from PS3 versions of tracks to PS2, Credits to Jonny_0093
	* Added some missing PS2 loading backgrounds
	* Fixed an car that literally morphed into an unexplainable shape while applying a racing modification.
	* Added mod notice to the polyphony logo screen.
	
[1.4.0] 22/12/2020 - system.db deletion is required, but only for the removal of cars specified above.
	* Road surfaces for Tahiti Maze, Grand Canyon, ...and Citta di Aria have been fixed, huge credits to Xenn for fixing them!
	* Added a LOT more racing modifications. It's all up to you from now on. No list to provide to avoid spoilers :eyes: . Credits to TheAdmiester for a base list.
	* RM Cars have been removed from the dealership. They should not have been there.
	* Fixed tracks unavailable in 2-Player mode due to track weather changes.
	
[1.3.0] 30/11/2020 - system.db reset not required.
	* There is no more Lite version.
	* Added a brand new track, real template02 as template12. 
	  - It is the original template02 that was overwritten entirely with alaska in later updates.
	* It is now possible to take photos of standards without the zoom restriction.
	* Added tracks now display in the Practice (GT Mode).
	* Added the correct 787b to the Group-C car class (not the stealth one).
	* Added the correct R390 to the Road Going LM class (not the race one).
	* Some shuffle list rebalances:
		- RUF CTR "Yellow Bird" '87 is considered as 485PP rather than 508.
		- Nissan OPTION Stream Z is considered as 585PP rather than 603.
	* Fix: Softlock in special events.
	* Removed the cut events again, as they still seem to cause issues for some. Besides, they are unfinished, the AI sucks.
	Note: The F1 one make restriction might be back - need to solve an issue related to the specdb before bringing it back.
	
[1.2.0] 25/11/2020 - system.db reset **required**
    * Unrelated to this mod, but fixed a possible GTToolsSharp packing related issue - might fix some weird softlock issues
	* Added three tracks, not 100% working as intended, but are playable by using reverse layout files, road surface is messed up mainly (Creds Jonny_0093)
	  - Citta di Aria - Was present previously, but changed to use reverse layout files which fixes missing textures
	  - Grand Canyon - Course was originally crashing with original files - Most of the road is road rather than dirt though
	  - Tahiti Maze - Course was originally crashing with original files - Road is dirt, dirt is probably road
	* Fixed some snow/dirt courses that allowed non-normally allowed cars to be in the track
	
[1.1.11] 23/11/2020 - system.db reset could be required 
	* Attempted to fix the ranking menu in online mode softlocking.
	* Attempted to fix one of the Sarthe tracks not working.
	* Added a working camera to Mid-Field Raceway (PS2) (thank you Xenn).
	* Restored some Cut A-Spec Events "as is". Notes:
	  - Some events will softlock if you press the typical opponent button on them.
	  - Some regulations don't work. Pick an appropriate car!
	* Removed the rain condition for the first High Speed Ring which was conflicting with the Wet version (same name).
	
[1.1.1] 12/11/2020 - No system.db reset required (if you started from 1.1.01).
	* Added a lot of missing PS2 tracks arcade previews (Credits to Jonny_0093)
	* Added missing debug functions to the course maker.
	* Template02 and 04 can now be selected in course maker to create tracks on.
	* Added missing icon to Opera & Map to Pikes Peak.
	* Online Lounge Demo is no longer required in LAN Mode to get names and chat logs working.
	
[1.1.01] 12/11/2020 - MAJOR UPDATE. system.db clear REQUIRED.
	* Added some missing tracks.
	* Attempted to fix B-Spec softlock
	* Updated main menu discord invite.
	* Added missing icon to Opera & Map to Pikes Peak.
	
[1.1.0] 11/11/2020 - MAJOR UPDATE. system.db clear REQUIRED.
	* No more track swaps! Tracks are now actually added rather than swapped.
	* Restored a couple more PS2 tracks.
	* No more swaps means all reverse tracks are back.
	* No swaps reverts license events that were changed back to original.
	* This marks the total tracks added to 39 (!).

[1.0.61] 30/10/2020
	* Fixed some car set issues introduced with 1.0.6.
	* Added an Easter Egg (most likely to be temporary and removed on the next update.) - Credits to Xenn
	
[1.0.6] 30/10/2020
	* Updated ALL online car sets, credits to goongumps. (Full list: https://docs.google.com/document/d/1wP0jUh-rrbH_lI8PL3m6wU39RNbn3qalawl_T0BOcl8/edit?usp=sharing)
	* Changed default track to Autumn Ring - Mini for faster room loading.
	
[1.0.5] 25/10/2020
	* Removed restored events for now as they were unbalanced.
	* Dirt Shuffle List had a few additions for higher PP ranges
	* It is now possible to use karts and F1's in GT Mode (the former will see grids full of F1 AIs though)
	* It is now possible to use karts and F1's in Online Rooms without regulations. FGT vs F1's are now possible.
	
[1.0.41] 23/10/2020
	* Changed/Fixed the Gran Turismo Online discord invite link.
	* Fixed IC-4 happening on Smokey Mountain. It now happens on Eiger West Dirt instead of reverse, but was made tougher.

[1.0.4] 29/09/2020 ** system.db backup & reset required due to fixes for the dealership **
	* Fixed RACE_EDIT's load button. First Adhoc bug fixed caused by Polyphony Digital. Technical notes below.
	* - Was meant to possibly get something from the save data like last used load or save paths to display a list of local files. (main::GAME_STATUS) however some tables werent defined and caused object dereference.
	* - Fixed by passing NILs to the function arguments for loadGameParameter when pressing the button, and removing further instructions that checked with save params.
	* Fixed RACE_EDIT's course map. Was using an inexistant path.
	* Fixed some RACE_EDIT car thumbnail paths that were using GT5P path style.
	* Changed the RACE_EDIT default sample a bit to appear less broken. It also allows AI without crashing.
	* Reimplemented offline login presents (and increased XP/Cash ratio)
	* Online: Minimum Shuffle Base changed from 300 to 240.
	* Online: Maximum Shuffle base changed from 500 to 1000.
	* Online: Shuffle list for higher PP ranges imported from GTPSP.
	* Online: Time to finish minimum changed from 20 seconds to 10.
	* Money limit increased from 20,000,000 to 2,000,000,000 (possibly only new saves).
	* Added some A-Spec dummy events just to test out template02 and 04.
	* Fixed some missing stardard makers missing in dealership including PSP standards. (AC Cars is missing - this is intentional, made the debug menu crash for some reason.)
	* Fixed some A-Spec events causing soft-locks.

[1.0.32] 13/09/2020
	|> Release of LITE version.
	|> Attempt fix 2: B-Spec causing softlocks.
	|> Fixed Pagani maker missing in dealership.
	
[1.0.31] 10/09/2020 ** system.db reset & backup required due to new track swaps if you want**
    |> Readded RACE_EDIT event as it was accidentally removed while restoring cut A-Spec events.
	
[1.0.3] 10/09/2020 ** system.db reset & backup required due to new track swaps if you want**
    |> Car dealership now sells all the cars.
	|> Restored cut A-Spec events.
    |> PS2 Tracks that did not have a map menu icon now have one. (Credits to Shy_Doge)
	|> PS2 Tracks that did not have a logo now have one.
	|> Restored a GTHD/GT5P scene for a car selection in GT Mode which looks a lot cooler.
	|> Removed Pikes Peak due to being almost unplayable. Eiger Long Reverse is back in.
	|> Swapped Reverse Tokyo to Nurburgring PS2.
	|> Fix: Certain licenses that were running on Hong Kong instead of Sarthe due to track swaps.
    |> Fix: Mod notice was not showing in a few game languages.
	|> Attempt Fix: BSpec Debug feature which was causing a softlock.
	
[1.0.21] 05/09/2020 (no version change ingame)
    |> Hotfix for a black screen occuring with a play_movie project runviewer debug feature enabled, which made the game softlock on intro movie (unless you had it disabled).
	
[1.0.2] 04/09/2020 ** system.db reset might be required**
    |> Added a RACE_EDIT event in A-Spec (Beginner)
    |> Changed some RACE_EDIT strings "WRITE FILE DONE"/"WRITE FILE FAILED" to more human readable strings.
    |> Changed the base path for RACE_EDIT that makes saving xml files possible to both hard drive and USB (/APP_USB).
    |> Removed ALL annoying gttop (Main Menu) PSN prompts while connected to the internet.
    |> Update Main Menu year to 2020.
    |> Runviewer features enabled in Course Maker.
    |> Runviewer features enabled in Photo Travel.
    |> Runviewer feature (Resolution Changing) enabled in Options.
    |> Fix: Removed a car set that wasn't working.
	
[1.0.1] ** system.db reset required **
    |> Added a notice in the Main Menu with the Mod version.
	|> You can now paint special cars in GT Auto.
	|> You can also paint wheels for special cars in GT Auto.
    |> More cars added to the recommended section in Arcade. These also shows up in online -> Select From Garage -> Recommended. (carlist.xml)
	|> All tracks had their "rain_situation" enabled, meaning you can now set any track rainy.
	|> All DLC tracks had their "is_dlc" flag disabled (Arcade).
	|> Template02 and 04 are now playable online (LAN).
	|> Template08 has had its max entries increased from 4 to 8.
	|> Fix: Fixed Course Maker & GTTV not being accessible (fixed the original dirty LAN mode switch).
	|> Fix: Online car set issues.