                           _________________________
                          | |__|__|  |__|__|__|__|  |
                          |__/O\__|__|________/O\|__|
                            
                            LOS SANTOS BUS SERVICE

                                    By WTLS




ABOUT THIS TXT:

This txt content:
- Description,
- Requirements,
- Known issues and their fixes,
- Installation,
- Optional installation,
- Uninstallation,
- How to use,
- Changelog,
- Credits,
- Notes.





DESCRIPTION:

In GTA 5, the majority of players travel by car, legally acquired or 
requisitioned from a passerby, or by taxi, even if this has a cost, but few are 
those who think of public transport. It must be said that only the tram is an 
option accessible in the game as a passenger: the only means of taking the bus 
are to hold the wheel ... or to climb on the roof. That didn't stop a helpful 
GTA 5 fan from making and posting on reddit a fictitious map of the bus services 
that could be set up in Los Santos.

This mod makes this fictitious map real and brings bus service to Los Santos.

Line Types:
  - Metro Local,
  - Metro Express,
  - Metro Rapid (Driver Mode only).

Features:
- Passenger mode (as client) and Driver mode,
- Phone contacts,
- Realistic liveries inspired from real Los Angeles buses,
- Worktimes and similar frequency of the bus map,
- Ability to skip to next stop or a specific stop (fast travel),
- Voice announcements of bus stops with realistic echo effect in first person view,
- Stop requesting with bell sound and ignoring unnecessary stops,
- Ability to carry bicycle,
- Toggle mod,
- Bus ads in liveries,
- Bus interior lights,
- Bus display in bus stops (shows the name of the bus stop, bus lines with 
  direction and how many stops left for the bus to come) and in bus (shows the
  line with the direction and next stops),
- Bus stops markers Driver Mode,
- Controller support,
- Many customizable options in the settings file,

Advantages of LSBS Driver Mode than Bus Simulator V:
- Loop working (you can go for other trip once you finish a previous one, the mission doesn't stop showing you the big message "mission complete").
- You can change the line without the need to go to Dashound Bus Center.
- You can go Off Duty / On Duty.
- You work with other buses, you see other active buses in the city, you are not the only bus driver.





REQUIREMENTS:

- The two Scripthookvs,
- OpenIV,
- NativeUI (included),
- iFruitAddon2 (included),
- NAudio (included),
- Bus Simulator V (install only the dlc package, do not install the files of "scripts" folder, details in "Installation" section).
- XD40 Addon bus (You can set other addon bus models to be used, eventhough this installation is required). link of XD40 model: https://www.gta5-mods.com/vehicles/addon-replace-brampton-transit-based-new-flyer-xcelsior-pack




KNOWN ISSUES AND FIXES:

The edition spawns the old default buses:
> Reinstall XD40 and make sure its DLC line in dlclist.xml is at the end.

Game craches if you spawn a bus using a trainer or if you get in a bus not spawned by the mod.
> don't do that, if you want to play as Bus Driver go to Dashound Bus Center and take one of the buses there.

Rarely, the game craches if you get in the bus to start Driver Mode in Dashound Bus Center as soon as the game starts.
> when you open the game and the loading screen finishes, wait for like 30 seconds then use Driver Mode.

If no buses are spawned in the city and your computer time is from 10pm to 6am
that means that the script gets the time of the real world and not the time of
the game,
> disable "WORKTIMES" in the ini file to make buses work 24 hours.

Bus doesn't care about you and doesn't wait or you to get in,
> increase "WAITTIME" in the ini file.

Buses waits too much at stops even after decreasing WAITTIME,
> disable STOPREQUESTPM in the ini file

Path issues like when the bus, the player is in, blocks somewhere or doesn't move,
> skip track by pressing context.

Path issues with many buses, like: bus flipped, bus blocked somewhere, buses jam, bus doesn't move etc...
> decrease TASKRADIUS (warning: minimum value of TASKRADIUS is 20)

You find most buses have just started from a bus stop / you see buses doesn't move until you get closer to them
> increase TASKRADIUS

Rarely, may drop FPS,
> disable the mod (F11 by default) and enable it only if you want to use it.

Sometimes the player character doesn't enter the bus,
> just move a little bit and press enter key again.

Bus drivers drive like a maniac,
> welcome to Los Santos xD.

- Other?
> Report on #bugs-report channel on discord server. If it's a script error, include the text inside "ScriptHookVDotNet.txt" file in GTA5 main directory.





INSTALLATION:

Make sure you have installed all the requirements.
Make sure you install Bus Simulator like so: 
- Download BSV here: https://www.gta5-mods.com/scripts/bus-simulator-v
- Extract, Drag and Drop ONLY 'mods' folder from the downloaded pack into your Grand Theft Auto V Directory.
- DO NOT Drag and Drop the content of 'scripts' folder from the downloaded pack, it's unnecessary.
- Insert <Item>dlcpacks:/bussim/</Item> into ".\mods\update\update.rpf\common\data\dlclist.xml" using OpenIV. 

Open OpenIV and click tools then package installer then choose the downloaded "LSBSXD40.oiv" from "main installation" folder OR right clic the downloaded "LSBSXD40.oiv" and open with OpenIV, install in "Mods" folder.
Put "LosSantosBusServive2XD40.dll", "LosSantosBusSerive2XD40.ini", "NativeUI.dll", "iFruitAddon2.dll" and "NAudio.dll" from the downloaded "Main installation" folder in "scripts" folder.
Put "LosSantosBusService2" folder from the downloaded "Main installation" folder in "scripts" folder.







OPTIONAL INSTALLATION:

Only if you have the XD40 model installed: If you would like to have the wildshield not tinted install this (install after installing the addon model package and its compatibility package and files):
Open OpenIV and click tools then package installer then choose the downloaded
"LSBSXD40TEW.oiv" from "XD40 optional installation" folder OR right clic the downloaded "LSBSXD40TEW.oiv" and open with OpenIV, install in "Mods" folder.







UNINSTALLATION:

Reinstall Bus Simulator V and XD40 addon bus or uninstall them and remove "LosSantosBusSerive2XD40.dll"
and "LosSantosBusSerive2XD40.ini" from "scripts" folder.





HOW TO USE:

The mod is enabled from the start.
You can toggle the mod using toggle mod key (F11 by default), you can change this key by 
changing TOGGLEMODKEY in the ini file.

Passenger mode:
When you go next to a bus stop press context or custom bus display key for a display 
to appear indicating which lines are available in this current bus stop.
Press your default enter/exit vehicle to enter bus when doors 
are opened, press many times if the player doesn't want to enter.
When you are in bus a display will appear indicating next bus stops.
Press context to skip track if you want. If SKIPTOSPECIFICSTOP enabled, choose the stop
to skip to using phone keys left and right and select with phone select. If
SKIPTOSPECIFICSTOP disabled, you will skip to the next stop.
Use the bus map to know every bus line and check the game time.
To carry bike with you just exit it and enter bus normally.
If you want the buses to work 24 hours disable "WORKTIMES" in the ini file.
If you want the bike to be in the front of the bus disable "BIKEINSIDE" in
the ini file, enable it if you want the bike inside the bus.
Make your custom bus stop wait time in "WAITTIME" in half seconds.

Driver mode:
To be a bus driver go to Dashound Bus Center and you will find 2 buses bliped in the map, Metro Local and Metro Express buses. Get in one of them and a menu will pop up to choose what line to work in.
While you are a bus driver you can call LST Workforce in phone contacts to pop up a menu with different options, the menu is self-explanatory.



ADDING CUSTOM BUS MODELS REQUIREMENTS

There are 2 purposes of setting addon buses:
1- Using for Passenger Mode and Driver Mode (replacing the used buses by other bus models)
2- Using for a specific created custom route (with Route Creator)

These buses should meet these 3 requirements:
1- Must have 2 gates with 2 doors each. Otherwise bugs are expected.
  - Spawn the bus
  - open TrainerV menu
  - go to "Vehicle options" > "Vehicle Doors and Windows Menu"
  - Left Front and Right Front Doors are doors of the front gate, Left Rear and Right Rear Doors are for the rear gate.

2- Must have LCD signs as extras, not as liveries. Otherwise LCD signs will not work (but no big deal).
  - Spawn the bus
  - open TrainerV menu
  - go to "Vehicle options" > "Vehicle mod menu"
  - Select "Vehicle Components" repeatedly and see if something in the LCD sign is changing. If it is than it's good, if it's not than the bus model doesn't support LCD signs as extras.

3- Must have at least 10 passenger seats (excluding driver seat). Otherwise the mod may crash.
  - Spawn the bus
  - open TrainerV menu
  - go to "Vehicle options"
  - slide to the 2nd menu
  - Select "Cycle through passenger seats" with counting and count how many seatable passenger seats are (excluding the driver), if it is at least 10 than it's good. if it is not expect the mod to crash if you use this bus model.

How to add the bus model:

For the 1st purpose these are the settings (model names used) to change to use the custom addon model:
BUSMODELML1=bus   (used in Metro Local lines from 2 to 33)
BUSMODELML2=bus2   (used in Metro Local lines from 45 to 250)
BUSMODELME=airbus   (used in Metro Express)
BUSMODELMR=airbus2   (used in Metro Rapid)

For the 2nd purpose you set the model name in Route Creator menu after finishing creating a route (if you miss it you can edit it in the xml file of the created route).






CHANGELOG:

4.1.2x:
- Added License Verification System.

4.1.1x:
- Fixed errors and issues after starting a custom line Driver Mode.

4.1x:
- All changes of version 4.1,
- Added options to set custom addon bus model Driver Mode and Passenger Mode.

4.1: 
- Added option to set custom payout after finishing Bus Driver mission,
- Added option of stop requesting with bell sound Passenger Mode,
- Doors can be opened only if the bus is fully stopped Driver Mode,
- Added option to set volume of announcements and bell sound,
- Added option to disable bus display in bus,
- Added a debug option to minimize spawning bugs,
- Fixed some buses come without doors,
- Fixed sometimes the bus doesn't task to go to the next stop after closing the doors,
- Route bugs fix,
- Other fixes and improvements.

4.0.1 alpha:
- Fixed NullReferenceException error.

4.0x alpha:
- Added Metro Rapid lines Driver Mode,
- Added bus stops voice announcements,
- Added features of stop requesting with bell sound and ignoring unnecessary stops Driver Mode,
- Added new spawning system that reduces CPU usage,
- Added bus stop markers Driver Mode,
- Added more peds spawning at bus stops Driver Mode,
- Fixed peds wrapping out Driver Mode,
- Fixed swapping lines Driver Mode,
- Fixed many route bugs,
- Fixed and improved skipping stops,
- Fixed weird bus floated,
- Improved spawning time,
- Improved Driver Mode HUD,
- Improved Bus Display,
- Improved bus stopping at stops,
- Improved bus stops names,
- Added some stops to some lines,
- Other fixes and improvements.

3.0.1x:
- Implemented the XD40 addon bus model.

3.0.1:
- Improved liveries,
- Fixed bugs of lines 115 and 534,
- Fixed Driver Mode line 534 doesn't work,
- Now in Driver Mode all Downtown lines start in strawberry for easy lines switching,
- Added a fix to weird AI driving behavior,
- Fixed Driver Mode buses not spawning,
- Fixed bugs of peds entering bus,
- Fixed route show only when doors are opened,
- Fixed peds screaming when entering bus,
- Fixed buses disapear,
- Other fixes and improvements.

3.0:
- Added driver mode,
- Added phone contacts,
- Added controller support,
- Added Interior lights,
- Fixed bus flipped or floated,
- Fixed skip track bugs,
- Removed the hint "No buses available in this moment",
- Improved Bus Display,
- Improved hints,
- Other fixes and improvements.

2.8:
- Extended lines 30, 60, 430, 432, 434, 434 to go to Strawberry bus station,
- Added Strawberry bus station map display,
- Fixed NullReferenceException error,
- Other fixes and improvements.

2.7:
- Added Bus Display to public version,
- Added a bus stop in line 220,
- Improved bus stops names.

2.6:
- fixed toggle mod key not working properly,
- fixed custom display key not working,
- fixed custom enter bus key not working,
- fixed Pillbox Hill bus stop spelling wrong,
- fixed Pillbox Hill bus stop buses not stoping correctly,
- other fixes.

2.5:
- added ability to skip to a specific stop and not stop by stop.
- added ability to toggle the mod.

2.4.3:
- fixed animals enter bus,
- fixed bus floating after skiping to next stop,
- fixed player exit from rear door like other peds in terminal,
- other fixes.

2.4.2:
- fixed definitively FPS drop,
- fixed FPS disturbtion,
- fixed bus moving after skiping to thze next stop,
- improved client exiting bus.

2.4:
- added bus ads,
- completed all lines of Metro Local,
- added Metro Express with all its lines,
- added bus fare ($2 for Metro Local and $3 for Metro Express),
- added client exiting animation,
- added custom bus stop wait time,
- added a fix for NullReferenceException script error,
- improved bus stopping,
- fixed bus comes with no doors,
- fixed bus not coming in terminal,
- fixed path issues,
- other fixes.

2.2.1:
- extended bus waiting time to 7 seconds,
- fixed fps drop,
- fixed script error,
- fixed worktimes,
- fixed two buses spawned in the same area (bus flipped) (last one i promise),
- removed ClientsSpawner.dll
- other fixes.

2.2:
- added ability to carry a bicycle,
- fixed bus blocked and doesn't move,
- fixed two buses spawned in the same area (bus flipped),
- fixed clients don't enter bus,
- fixed one client stays on the bus in terminal station,
- fixed npc vehicles hit the bus from behind,
- fixed player enter bus (now just press one time),
- made skip track by pressing instead of pressing and holding context,
- added brake lights on when stopped at a bus stop,
- added custom bus speed in the ini file,
- other fixes.

2.1:
- added ability to skip to next stop (fast travel),
- fixed player doesn't want to enter,
- fixed same bus line spawn back to back,
- fixed bus blocked and doesn't move,
- fixed bus moving while in bus stop,
- fixed not all buses are spawned,
- fixed some path issues,
- added hint display,
- added enable/disable despawn unused buses,
- added custom enter key,
- added custom driving style,
- other fixes.

2.0.1 beta:
- added respawn bus if it has been exploded or driver is dead.

2.0 beta:
- first release.





CREDITS:

- Rockstar games,
- Alexander Blade,
- Crosire,
- I'm Not MentaL,
- Yoha,
- Devs of Naudio, NativeUI and iFruitAddon,
- m101m102m103 (for reddit map),
- OpenIV team,
- t1a2l,
- sollaholla.
- SCPDUnit23.




NOTES!:

The Driver Mode is not an imitation of Bus Simulator V, the feature is unique and has nothing to do with BSV.

You can't play Bus Simulator V if LSBS is installed.
This mod has been made after a long work and lot of fixing of annoying things 
like NPC's stupidity.
Enjoy!


                                        WTLS 