Advanced Turn Signals - v2.0.4 (Created By QuestDragon)
*This explanation uses Google Translate.

~How it was created~
There are many turn signal mods uploaded today, but most of them are manually turned on and off or have no turn signal sound, so I decided to create one to practice creating scripts.
The game has a turn signal sound, but it is very low pitched and only sounds for a small percentage of vehicles.

~Function~
You can operate the turn signals of the car. It is possible to turn left, right, and turn hazard lights on and off.
The behavior of the turn signals used in real Japanese cars is reproduced as closely as possible, and a function is provided to automatically turn off the turn signals when the steering wheel is turned and returned. (The angle of the steering wheel can be adjusted in the ini file.)
Other details such as turning the steering wheel in the opposite direction of the turn signal will also turn off the turn signals, and the turn signals and hazard lamps are independent of each other.
It also has a function that automatically turns on the direction indicators when you turn the steering wheel when driving at low speeds. (Request from NoRain)
You can use sound effects related to turn signals. Various sample sound effects are included in the scripts\AdvancedTurnSignals\TurnSignalSounds folder. It is also possible to customize each vehicle using xml files. (Sound effects can be enabled or disabled in the ini file)
The display language of notifications sent from scripts can be translated in scripts\AdvancedTurnSignals\Localization.ini.
It also supports controller operation. In addition, for those who do not operate turn signals with a controller, it is now possible to set whether to use them from the ini file. (Request from stevensonjnr and dustyblues)
It is also possible to combine modifier keys or two controller buttons. (Request from Reldam88)
Although not recommended, it is also possible to control the vehicle using headlights instead of turn signals. (Request from DiNagano)

~Additional features and feedback~
Since the creator is a beginner, I think there are some things that are lacking.
If you find any problems, please contact QuestDragon.
Also, if you have any requests such as "I want this feature!'' or "I want something like this!'', please contact us.
I also want to learn about script mods, so I'm always looking forward to your opinions and requests.

～Included items～
The zip file contains the following files:
Localization_JP folder: This is the folder that contains Japanese translation files.
	Localization.ini: You can customize the message content displayed in the notification field. (Japanese translated, please replace with the file in the AdvancedTurnSignals folder when using.)
scripts folder: This is the folder that contains the script mod itself and accompanying files.
	AdvancedTurnSignals folder: This folder contains the files necessary for the script mod to work.
		TurnSignalSounds folder: A folder that stores sound effects.
			HAZARD_BUTTON.wav: This is the sound played when the hazard lights are turned on or off.
			INDICATOR_SOUND.wav: This is the sound played while the direction indicator is activated.
			TURN_LEVER_INTRO.wav: This is the sound played when you press the key that operates the turn signal.
			TURN_LEVER_OUTRO.wav: This is the sound played when the turn signal turns off automatically.
		Localization.ini: You can customize the message content displayed in the notification field.
	TurnSignalSoundSetup.xml: You can specify the audio file to play by default and by vehicle.
	AdvancedTurnSignals.dll: This is the script body.
	AdvancedTurnSignals.ini: Configuration file.
	NAudio.Core.dll：NAudio related files. Required for playing turn signal sounds.
	NAudio.dll：NAudio related files. Required for playing turn signal sounds.
	NAudio.Wasapi.dll：NAudio related files. Required for playing turn signal sounds.
	NAudio.WinForms.dll：NAudio related files. Required for playing turn signal sounds.
	NAudio.WinMM.dll：NAudio related files. Required for playing turn signal sounds.	
Readme_JP.txt: Japanese instruction manual.
Readme_EN.txt: English instruction manual. (this file)

～Installation～
Copy the scripts folder to the Grand Theft Auto V folder.
Download Script Hook V from the link below, unzip it and copy the two dll files in the bin folder to your Grand Theft Auto V folder.
http://dev-c.com/gtav/scripthookv/
[Important] This script mod requires ScriptHookV DotNet version 3.7.0. At the time of publication, the stable version 3.7.0 has not been released, so you will need to use the Nightly build.
Download the Nightly build of Script Hook V .NET from the link below, unzip it, and copy the 7 files containing the string "ScriptHookVDotNet" to the Grand Theft Auto V folder.
https://github.com/scripthookvdotnet/scripthookvdotnet-nightly/releases/latest
If you want to use Advanced Turn Signals with Grand Theft Auto V Enhanced, please download Script Hook V .NET Enhanced from the link below:
https://www.gta5-mods.com/tools/script-hook-v-net-enhanced
Other requirements must be met for the above two to work. Please check the description section of each download page for details.

~About SCRIPT HOOK V ERROR during installation~
When you install ScriptHookV DotNet Nightly build and start GTA5, "SCRIPT HOOK V ERROR" may be displayed and all .NET scripts installed in the scripts folder may not be loaded.
This is caused by not meeting the ScriptHookV DotNet prerequisites. Even if it works in the Release build, it may not work in the Nightly build.
Therefore, please double check that the following components are installed.
.NET Framework 4.8 (BOTH runtime and developer build required)
Visual C++ Redistributable for Visual Studio 2019 x64

~Various settings~
Settings are made from the ini file.
Basically, the explanation is also written in the ini file, so I don't think you will have any trouble, but I will also write it here.
Enabled in the General section enables or disables this script. "true" enables, "false" disables.
UseSound enables and disables sound effects. Similarly, "true" will enable it, and "false" will disable it. However, if the audio file is not prepared correctly, the script will continue to work, but the audio file will not be played even if you perform an operation that originally requires an audio file.
InterSound toggles whether to play the default audio file if the sound effect audio file is not found. Similarly, "true" will enable it, and "false" will disable it. However, if the default audio file is not set or the default audio file does not exist, the audio file will not be played even if you perform an operation that originally requires an audio file.
HeadlightMode flashes the headlights instead of the turn signals. This is a function for those who want to use Advanced Turn Signals even in vehicles without turn signals, but it is not recommended as it may cause unstable operation.
The Keys section allows you to change the turn signal key settings. Left is a left turn, Right is a right turn, and Hazard is a hazard lamp. Please check the following site for the character string to specify. If the specification is incorrect, the default settings will be temporarily loaded when the script mod is loaded.
https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.keys?redirectedfrom=MSDN&view=windowsdesktop-7.0
In the Buttons section, you can change the button settings when operating the turn signals with a controller. If you use a controller to operate a script mod, please set UseButton to "true". The button settings are the same as in the Keys section: Left is for left turn, Right is for right turn, and Hazard is for hazard lamp. Please check the comment out field of ini for the character string to specify. If the specification is incorrect, the default settings will be temporarily loaded when the script mod is loaded.
The AutoOff section allows the user to set the turn signals to automatically turn off. True" enables it and "false" disables it. However, if the setting conditions are not correct, it will be temporarily disabled when the script mod is loaded.
ReadyAngle is the minimum angle of the handle that must be turned for the turn signal to automatically turn off. Turning the handle beyond this angle will activate the auto-off function.
OffAngle is the angle of the steering wheel at which the turn signals will automatically turn off. Turning the steering wheel back to this angle or turning the steering wheel relative to the direction of the turn signal to the opposite angle will cause the turn signals to automatically turn off.
KeyboardComp is an option to enable when using a script mod with an operation method that does not allow detailed handle operations such as a keyboard. You can enable it with "true" and disable it with "false." When enabled, the turn signal will automatically turn off after the specified milliseconds when the steering wheel angle returns to the specified value. Disable this if you are using an analog controller and want the light to turn off automatically when the handle returns to the specified angle.
AutoOffDuration allows you to specify the time in milliseconds for the turn signal to automatically turn off when it returns to the OffAngle value while KeyboardComp is enabled. *If the time is less than approximately 200 milliseconds, it may not work properly. If you want to immediately turn off the light automatically, please disable KeyboardComp.
The AutoOn section allows you to configure the automatic activation of the turn signals. AutoOn toggles between enabled and disabled. "true" enables it, "false" disables it. However, if the setting conditions are incorrect, it will be temporarily disabled when the script mod is loaded.
OnAngle is the minimum angle the steering wheel must be turned for the turn signals to automatically activate. If you turn the steering wheel beyond this angle and drive at a speed within the OnSpeed, the automatic activation function will be activated.
OnSpeed is the approximate vehicle speed at which the turn signals will automatically activate. If you drive within this speed and turn the steering wheel, the turn signals will automatically activate.
UseLeverSound controls whether a lever sound will be played when the turn signals automatically activate. UseSound must be true. "true" enables it, "false" disables it. However, if the setting conditions are incorrect, it will be temporarily enabled when the script mod is loaded.
The maximum angle of the steering wheel in GTA5 is 40 degrees, and I believe that script mods can successfully execute the auto-off function for values up to 40 degrees.

~How to use <Main unit>~
If Enabled is set to True in the ini file, it will be automatically loaded and enabled when the game is loaded.
When you get on the vehicle and press the key set in the ini file, the turn signal will operate. (Excluding some vehicles such as bicycles and helicopters)
If UseSound is set to True and the audio file is properly prepared, the sound effect will be played.
If AutoOff is set to True and the settings are correct, the turn signal will automatically turn off when the turn is completed. (Excluding motorcycles)
If KeyboardComp is set to True, the turn indicators will automatically turn off after the number of milliseconds specified by AutoOffDuration after keyboard operation.
If AutoOn is set to True and the conditions are met, the turn signals will automatically turn on.

～How to use <Localization.ini>～
You can edit the content of messages sent by script mods.
You can change the font color or make it bold.
Do not edit the characters on the key side (to the left of =). Script mods will no longer be able to recognize edited messages.
If the content of the message cannot be read, the corresponding message part will be temporarily written in English.

～How to use <TurnSignalSoundSetup.xml>～
You can specify the audio file of the sound effect to play.
It is also written in the xml file as a comment, but please do not delete the <DefaultSettings> tag. Sound effects will no longer play.
You can change the audio file to be played by editing the audio file name within each tag.
Below the DefaultSettings tag, audio file settings for each vehicle are described as samples. This is just a sample, so feel free to delete it.
If you want to specify an audio file for each vehicle, please copy the tag structure provided in the sample. (Copy-paste is recommended)
Please note that the script Mod will not be able to load unless each tag (SoundSetup etc.) is written exactly the same as the sample.
You can add multiple Vehicle tags within the Vehicles tag. If you want to play the same audio file on multiple vehicles, you can specify it simply by adding Vehicle tags.
Be sure to write a total of four Sounds tags: TURN_LEVER_INTRO, TURN_LEVER_OUTRO, INDICATOR_SOUND, and HAZARD_BUTTON.
If there is a part that you do not want to play, just write the tag name. Do not omit tags. (Example: <HAZARD_BUTTON /> or <HAZARD_BUTTON></HAZARD_BUTTON>)

~Aside~
Since it determines whether to automatically turn off the direction indicators based on the angle of the steering wheel, I thought about making it compatible with ikt's Manual Transmission Mod, but it turned out that it was no longer usable due to the GTA 5 update, so I decided not to implement it. I could not do it….

～Disclaimer～
I, QuestDragon, cannot be held responsible for any damage caused by using this script mod. Please use at your own risk.
Secondary distribution is prohibited.
Distribution may be stopped without notice. Please note.

Production: QuestDragon