=================================================
README.TXT for Mechanic On Call by Ptah Paracosma
=================================================

Thanks for checking out my very first mod! I hope you have fun with it. In any case, I'm always open to feedback. 

-----------------
[Version History]
-----------------

1.5.1 - [2026-05-24] - Feature improvement, performing tuning, and a bug fix.
	. Improvement: (by request!) raised the limit of insurable vehicles per character to 50 (from 20).
	. Bugfix: fixed a despawning issue related to entering & exiting multiple garaged vehicles on a garage floor.
	. Overhaul: tuned performance to accomodate the new 50-policy limit.

1.5 - [2026-05-09] - A BIG new feature, some minor improvements, and various nips & tucks.
	. New Feature: GARAGES - insured vehicles not in use can now be stored in a garage run by the insurance company. Details are in [Mod Features] below.
	. New Feature: particulars of the mechanic's ped model appearance can be configured (in the .INI).
	. Improvement: the recovery logic of insurance claims for lost vehicles was amended to also allow for delivery of vehicles currently in the insurance garage.
	. Improvement: the mechanic's animation for "thanking" the player on high regard differ depending on whether the player is in our out of a vehicle at the time.
	. Improvement: changing the "Safe Zone" profile will now trigger the same UI updates as changing the game's resolution.
	. Adjustment: the settings IncludeOnSiteBodyRepairs and BillHistorySize have been moved under the [Mechanic] section of the .INI file.
	. Bugfixes: numerous minor bugs were fixed.
	. Overhaul: The mod's code was further overhauled to pave the way for future improvements.
	
1.4.1 [2026-02-24] - Hotfix
	. Bugfix: the mod no longer (unneccessarily) requires SHVDN3 nightly 98 on Legacy; it will now run on nightly 93 or newer.
	. Bugfix: if jacking the mechanic's car (possible via a hack setting), it no longer despawns after moving away.

1.4 - [2026-02-21] - A BIG new feature, a small feature request, many more nips & tucks, and a huge internal overhaul. (You could argue this is effectively a 2.0 ... )
	. New Feature: INSURANCE for cars & motorcycles! Details are in [Mod Features] below. This brings some some new [Known Issues], and [Roadmap] items, too ...
	. New Feature: (by request!) IncludeOnSiteBodyRepairs - when set to false, the mechanic only performs mechanical repairs on-site, leaving the vehicle's visible body damage as-is.
	. Improvement: A per-tire replacement charge is now part of the repair bill.
	. Improvement: (by request!) The mechanic's car colors can now be configured to custom ARGB colors in the .INI.
	. Improvement: The mechanic's driving style has been adjusted. ALSO: a new DrivingStylePreset .INI setting (and hack option) allows for changing the mechanic's driving style.
	. Update: The mechanic's spawn-in logic has been adjusted/improved. 
	. Update: most of the mod's messages are now shown as help text (in the upper left) instead of subtitle-style text at the bottom.
	. Bugfix: A rare problem where bills / receipts / estimates come up blank has been fixed.
	. Overhaul: The mod's infrastructure was overhauled to accommodate this version's new features, but also to pave the way for enhancements coming in future versions. (See [Roadmap] for more)

1.3 - [2026-01-24] - Feature requests, immersion adds, more nips & tucks, and further hedging against potential issues with Enhanced.
	. New Feature: (By request!) If the mechanic notices you have a stolen vehicle (one that was jacked, broken into, hotwired, etc), and bribe money is not paid (yes, bribe is a new option on the payment menu), regard will be lost. And when regard is too low, the mechanic will report it to the police, resulting in a wanted level.
	. Improvement: made bills & estimates appear in a panel to the right of the menu, rather than below -- making more room for bill line-items (because before, it could spill over the minimap)
	. Improvemett: unified the format of estimates & bills (bills now include time/place/vehicle headers, too).
	. Improvement: Mechanic responds to selecting "don't pay" differently based on regard. At best, they may waive the bill, or perhaps just add it to the player's tab. At worst, they attack the player, as well as make them wanted by the police. 
	. Improvement: Mechanic reports the character who wastes them to the police. Takes effect at the point when the mechanic sends a displeased text to said character about being sent to the hospital.
	. Improvement: (By Request!) Oil and Fuel levels are now part of the repair bill. When either needs to be refilled, there is an additional charge for it.
	. Improvement: added a way to have the mechanic approach the engine, even in vehicles where the in-game model and the game's data disagree about where the engine is located. This is a work-in-progress. See [Known Issues] for more.
	. Improvement: added a panel to show the player's current money on the "Pay now." payment menu item.
	. Improvement: if the mechanic is fighting the player, they may switch to the leaving-state if a) combat is exited for any reason or b) there is too great a distance between them. Combined with the stalker response on low regard, this means the mechanic can go from fighting to leaving and back again ... until the player either leaves entirely, or the mechanic dies, or the player dies, etc ...
	. New Setting: (By Request!) WorkLengthCar - how long the mechanic works on cars. See [Settings & Customization] for more.
	. New Setting: (By Request!) WorkLengthBike - how long the mechanic works on motorcycles & quadbikes. See [Settings & Customization] for more.
	. New Setting: Bill_MaxRepairCost - a limit on the repairs part of the bill. See [Settings & Customization] for more.
	. New Setting: Bill_OilCostFactor - the per-unit price of oil See [Settings & Customization] for more.
	. New Setting: Bill_FuelCostFactor - the per-unit price of fuel. See [Settings & Customization] for more.
	. New Settings: WantedLevelUnpaid, WantedLevelTheft, WantedLevelWasted - how wanted the player gets for particular transgressions against the mechanic. See [Settings & Customization] for more.
	. New Hacks: related to what's new in the above.
	. Bugfix: fixed weather detection.
	. Bugfix: fixed biz hour detection on last hour.
	. Internal Refit: lots of internal rework was done to better support Enhanced, improve logging and diagnostics (hedging against Enhanced), and more.

1.2.2 - [2026-01-17] Pure "Under the Hood" Work: hotfixes and troubleshooting features; I hear ya Enhanced users! 
	. Bugfix attempt: in response to an issue reported by a few Enhanced users, further reworked startup code (now with fallbacks on failure), and added related logging.
	. New Setting: SafeMode - when True, disables certain code paths of the mod that rely on possibly troublesome (to Enhanced) startup, and activates a number of diagnostic features to aid in troubleshooting.
	. New Setting: FrameTimerOption - (and its hack menu option) to select which frame timer the mod uses for its own timekeeping purposes: one based on the game's own frame timer (which is the default), or one based on system ticks.
	. New Setting: DiagInfoInterval - (and its hack menu option) to configure the interval between live diagnostic info updates (for when it is enabled in the hacks menu; SafeMode forces a certain interval).

1.2.1 - [2026-01-16] Hotfix
	. Bugfix attempt: changed how screen dimensions are detected in an attempt to avoid a possible issue with Enhanced.
	. Improvement: properly react to screen resolution & aspect ratio updates w.r.t. screen positions of regard updates & live diagnostics

1.2 - [2026-01-16] More features, fine-tuning, and fixes.
	. New feature: mechanic sends text messages (that pop up over the map on the lower left) in response to certain events, and each such event has different text-message possibilities, all of which is configurable through the INI.
	. New feature: if the player wastes (that is, kills) the mechanic during their visit, the mechanic will remain unavailable to everyone for a certain (configurable) recovery period.
	. New feature: cost estimates for the player's current vehicle are available from the main menu.
	. Improvement: 1-10 prior bills can be remembered (by default:3) for review in the main menu. (Previously only the last one was saved)
	. Improvement: the mechanic's bills (in review) will include the license plate of the vehicle involved. Note: only for automobiles.
	. Improvement: the mechanic will now work on the correct side of rear-engine vehicles. This includes opening the correct "hood" or "trunk" (when possible). 
	. Improvement: the mechanic will stand to the side of the engine on vehicles with reverse-hinged hoods/trunks -- this prevents them from clipping through such hoods/trunks.
	. Improvement: the mechanic should no longer come to a sudden halt after a certain distance when leaving a visit.
	. Improvement: following the mechanic for too long after a visit results in annoyed texts, regard loss, and, if regard is (or sinks) low enough, the mechanic will go into fight mode.
	. Improvement: the mechanic's speech lines while working on a vehicle now differ between high and low regard.
	. Improvement: the vehicle's make (as displayed in bills, estimates, & diag info) is now title-cased rather then the game api's default all-uppercase.
	. Bugfix: the mod's initialization code has been reworked in an effort to adress a few reports of CTDs experienced by Enhanced users.

1.1 - [2026-01-10] Overhauled & given new Quality-of-Life features and fixes.
	. New feature: mechanic can now extinguish a flaming vehicle prior to repairing it. However, if it explodes prior to their ability to put it out, the visit is cancelled on account of the vehicle being totalled. (However, if you use the "Skip Totalled" hack, the mechanic will attempt to "restore" the totalled, flaming wreck after extinguishing it).
	. New feature: each character's last repair bill now is remembered for later review (from the main menu). Includes the time, place, and vehicle model, as well as any charges added on post-visit (caused by special circumstances).
	. Improvement: rendezvous with the mechanic mid-arrival - so long as the player more-or-less consistently gets closer to the mechanic's approaching car along the way, it is possible for the player to meet the mechanic on the road, and from there, the mechanic will stop and get to work.
	. Improvement: repair bill calculation was adjusted to correct for excessive engine damage (such as with destroyed/burning vehicles) - excessive engine damage is calculated separately from main repairs, resulting in much cheaper (but still more expensive than usual) bills in such cases.
	. Improvement: the mechanic's behavior during a visit has been overhauled to smooth-out some cases that used to result in either stall or an immediate cancellation of the visit.
	. Improvement: most problematic conditions during a visit are now on cancellation-timers, and show warnings when detected. This gives the player a chance to possibly resolve them (when possible).
	. Improvement: stats shown on the menu have been re-worked to be more clear, particularly w.r.t. wait time and credit/debit balance
	. Improvement: mechanic will increase the player's debt if the repair bill is unresolved during the visit for any reason
	. Improvement: if the player kills the mechanic during a visit, hospital fees are added to the player's debt.
	. New/Improved Hacks: improved several hacks, and added new hacks covering the above.
	. Nips & Tucks: various edge cases are now handled more gracefully than immediately cancelling or stalling the mechanic's visit.

1.0 - [2025-01-03] Nipped, tucked, and improved.
	. New feature: mechanic can now repair motorcycles & quadbikes, including suitable working animations
	. New feature: mechanic can now repair helicopters & planes - with a brief fade-out/fade-in repair sequence - as long as such vehicles are landed somewhere reachble by land vehicle.
	. New feature: weather & biz hours now tied to possible billing fees & regard-based checks.
	. New function: optionally write log file  - log items written during script startup, shutdown, and mechanic visit state transitions.  
	. Bugfix: fix for a possible race condition in the phone contact init causing a null ref crash.
	. Bugfix: fix for detecting "not moving" state for some vehicles (like the OppressorMK2) and certain vehicles parked at certain angles, that read as non-zero speed even while standing still.

0.9 - [2026-01-01] Initial stable build released for testing.
	. Core features: mechanic visits, condition checks, phone contact, menus, hacks, regard, credit, & behaviors, INI and SAV files

--------------
[Requirements] 
--------------

The following requirements should be installed first.

1. ScriptHookV -- why? This opens the door to modding GTAV.
	http://dev-c.com/gtav/scripthookv
	
2. ScriptHookVDotNet (*) -- why? This allows mods to be written in a .NET language (I've used C#).

	For Enhanced, SHVDNE 1.1.0.4 or newer : 
		https://github.com/Chiheb-Bacha/ScriptHookVDotNetEnhanced/releases
	
	For Legacy, use SHVDNE as above or SHVDN3 nightly 106 to 113 ONLY! 
		https://github.com/scripthookvdotnet/scripthookvdotnet-nightly/releases

		!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		!!! NOTE: Starting with nightly 114, SHVDN3 started introducing breaking changes in the API
		!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
			. Which is why this mod only works on SHVDN3 nightly up to 113, or on SHVDNE generally.

	!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	NOTE: the minimum versions above are important!
	!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		. In March of 2026, Rockstar pushed a patch to GTAV that broke compatibility with older versions of SHVDN3 and SHVDNE.
		. The minimal SHVDN3 and SHVDNE versions above are those that were updated to account for the March 2026 patch of GTAV.
		. As a result, this mod is NOT supported on older versions of SHVDN3 / SHVDNE.

3. LemonUI -- why? This plug-in provides the basics for adding in-game menus.
	https://github.com/LemonUIbyLemon/LemonUI
	https://www.gta5-mods.com/scripts/lemonui
	
4. iFruitAddon2 -- why? This plug-in provides the basics for adding a contact to the player's in-game phone.
	https://github.com/Bob74/iFruitAddon2/tree/master
	
Trouble with the mod starting or causing problems?
--------------------------------------------------
. See [Troubleshooting] below.
. Failing everything there, feel free to contact me for help. See [Contact Details] below.

--------------
[Installation]
--------------

To install ...

1. First ensure all the requirements are installed. See [Requirements] above.
2. Copy the following from the download's /install folder into the /scripts subfolder of your GTAV installation:
	a. The .DLL file  -- Paracosma.MechanicOnCall.DLL
	b. The "MechanicOnCall" folder -- the folder itself, copied into your /scripts at the same level as the .DLL file.
	c. If this is a NEW installation: the .INI file - Paracosma.MechanicOnCall.INI.

Upgrade Notes
-------------
. If your .INI is customized, you can just leave it as-is; the mod applies defaults for any new or changed settings that it can't find in (or use from) the .INI file it finds at startup.

. NOTE: 1.4 changes how save file(s) work compared to 1.3 and earlier.
. There can now be many .SAV files all stored under the "MechanicOnCall" folder within /scripts.
. .SAV files were changed in 1.4 for performance and maintainability reasons, and to accommodate the Insurance feature.
. For backward-compatibility, the mod can still load pre-1.4 .SAV files. But it always writes them in the new format.
. The net-effect will be that the pre-1.4 .SAV file is removed once its content has been re-saved in the new format.
. The older .SAV file migration will likely happen a few seconds after 1.4 starts up for the first time.

---------------
[Using the Mod]
---------------

1. Start the game.
2. Open the character's phone, then open contacts.
3. Toward the bottom of the phone's contact list should be an entry for the mechanic (whose default name will be "Roxie").
4. Call that contact. After a brief ringtone, the mod's main menu will open in the upper left corner of the screen.
5. From there, the menu and its submenus should be fairly self-explanitory.

--------------
[Mod Features]
--------------

Repair visits
-------------
. The mechanic can be asked to visit by calling their contact on the phone.
. If conditions are good for them to visit, they'll appear on the map with a specific icon. 
. Note: it is possible to cancel a visit at any point prior to their arrival; just call again, then select "cancel" from the menu.
. Once they arrive, they'll get to work repairing your vehicle.
. It is also possible to meet them en route, at which point they will stop and get to work.
. Once the vehicle is fixed, they'll present the itemized bill.
. You can :
	. pay (and choose to add an optional tip)
	. pay later using a line of credit (also with tip)
	. not pay
. If you pay (either immediately or on credit), they'll part ways and drive off.
. If you don't, get ready to deal with an upset mechanic. Moreover, you'll wind up owing them anyhow.
. If you take too long to decide, they lose their patience and bill you for it: you'll owe them.

Wait Periods
------------
. There is a delay between one visit of the mechanic and the next allowed; the delay varies based on the mechanic's regard for you (see below).
. The visit delay is tracked and saved in the character's .SAV file.

Firefighter
-----------
. If the vehicle to be repaired is on far when the mechanic arrives, they will attempt to put it out with a fire extinguisher, then get on with the repair work as usual.
. However, if the vehicle explodes before they can extinguish it, that interrupts the visit.

Estimates
---------
. Estimates are available from the main menu.
. They include all the projected repair costs, but not travel, or any other factors that only come up during a visit.

Regard
------
. The mechanic's regard is tracked on a scale of 1-100 for each character who calls them.
. Regard is gained or lost depending on how you interact with the mechanic. Good or bad tips, easy versus interrupted or abandoned visits, and so on.
. Changes to regard are reported on-screen as they occur.
. The current regard value is shown in the main menu, as well.
. The lower the regard, the more the mechanic dislikes you. The higher, the more they like you.
. There are five significant levels of regard within the 1-100 range:
	. Highest	81-100
	. High		61-80
	. Neutral	41-60
	. Low		21-40
	. Lowest	1-20
. Higher levels of regard levels yield various perks in the repair service, as well as friendly behavior (speech and animatons) from the mechanic.
. Lower regard causes longer waits between allowed visits, higher costs per visit, and also triggers ill-tempered behavior from the mechanic (in terms of speech and animations).
. What's more, beware: the mechanic brings heavier weaponry on visits when regard is low.
. The regard is tracked and saved in the character's .SAV file.

Credit
------
. The higher the mechanic's regard for a character, the higher the line of credit they'll extend them.
. Credit allows you to "pay later", as against paying the mechanic on-site.
. If you rack up a debt equal to (or greater than) the credit limit, the mechanic will refuse to visit until you pay them back.
. The debt/credit balance is shown in the main menu.
. The main menu allows you to repay the mechanic at your discretion.
. The credit line and any debt accrued to it is tracked and saved in the .SAV file.
. Note: credit is only extended to repeat customers. A first-time customer won't have any.

Bills
-----
. Bills are presented during a normal, uninterrupted repair visit, but are tabulated for every visit regardless.
. A number of prior bills are remembered per character.
. They are available for review from the main menu.
. Each includes the full details of the bill issued at the time, as well information about the time, place, and vehicle.
. Bill history is saved in the character's .SAV file.

Text Messages
-------------
. There are a variety of conditions in which the mechanic will text the player (in the form of pop-up notifications on the lower left, near the minimap).
. These are usually in response to calling them, paying them back, paying them or not to begin with, otherwise mistreating them during a visit, and so on.
. Some texts are immediate response, others happen a little later.

Stolen Vehicles & Bribes
------------------------
. The mechanic will take offense to you having them repair a stolen vehicle -- unless you offer them bribe money.
. The option to pay bribe momey appears in the payment menu when the mechanic detects a stolen vehicle.
. If bribe money is not paid, regard will drop, and -- when regard is too low -- the mechanic reports you to the police, resulting in a wanted level.
. Bribe money paid appears as a "Discretion fee" on the bill.
. The mechanic will notice a vehicle is stolen while actually repaiting the vehicle, not before.
. If the visit is interrupted (or abandoned, etc) after the mechanic detects the vehicle as a stolen but before payment completes, they will react in the negative way -- as if no bribe was offered.
. The mechanic won't react to the same stolen vehicle as "stolen" more than once: the first time. 
. Note: stolen detection is based on the following:
	. breaking into and/or hotwiring a parked vehicle
	. pulling a vehicle's original driver out (jacking the vehicle)
. Note: some cases that you'd think are "stealing" may not be registered beyond those above
	. I'm looking into improving this in a future release.

Preclusions and Interruptions
-----------------------------
. There are a variety of problematic conditions in which the mechanic won't be able to complete a visit, or to visit to begin with; experiment and you'll see.
. For instance:
. If the vehicle is at too steep an angle, off its wheels, not upright, in water, in the air, or is in some other unrepairable state, this either precludes a visit or interrupts one in progress. Warnings are given, of course.
. If the mechanic is blocked from accessing the engine of your vehicle, this either precludes a visit or interrupts one in progress. Warnings are given, of course.
. The mechanic charges more for inclemenent weather, or may simply refuse to visit when regard is low.
. The mechanic charges more for visits outside their normal busienss hours, or may simply refuse to visit when regard is low.
. The mechanic charges more for oil or fuel that needs refilling.
. The mechanic will consider a visit abandoned if the player leaves the work site for too long.
. Antagonizing the mechanic (aiming a weapon at them, striking them, and so on) will cause them to fight back. Regard is lost for this. A wanted level is likely, too.
. The mechanic adds post-visit charges to the bill (effectively, added debt) in the case of non-payment, being wasted by the player, and for any problem that interrupts or interferes with their visit. 

Wasting the Mechanic
--------------------
. The mechanic will report characters who waste them (as in: kill them) to the police, resulting in a wanted level.
. It happens shortly after the mechanic texts said character about their displeasure with being put in the hospital.
. Also, said character will owe the mechanic their hospitcal fees.

Insurance: Basics
-----------------
. Each character can have up to 10 different vehicles insured.
	. Most cars, trucks, vans, and motorcycles can be covered by an insurance policy.
	. But emergency, service, industrial, and certain other vehicles can't be.
. Coverage of an insured vehicle includes:
	. 50% of the mechanic's repair charges (not including their travel and other on-site fees).
	. 100% coverage when replacing a totalled vehicle. 
		. A vehicle is totalled if it is destroyed or otherwise considered "dead" by the game.
	. Also, when an insured vehicle is lost (despawned by the game, etc), it can be recovered (respawned).
. Policy Management:
	. Start a new policy: 
		. Begins coverage of a vehicle.
		. A one-time premium based on the vehicle's class (sedans, vans, sports, etc) must be paid to begin coverage.
	. Update an existing policy: 
		. Manually updates the policy's tracking of its vehicle's build, location, health, and so on.
	. Stop a policy:
		. Ends coverage of a vehicle. 
	. Make a claim
		. Repair a vehicle.
		. Locate or recover a lost vehicle.
		. Replace a totalled vehicle.

Insurance: Policies
-------------------
. How policies identify their vehicles:
	. The vehicle's make, model, and license plate are recorded as part of a policy at the time it started. 
	. This means that any vehicle having the same combination of make, model, and license plate (regardless of modifications, paint job, etc) will be considered a match to the policy.
	. This is intentionally so, since once a vehicle is covered by a policy, its owner may respray it, make modifications to it, and so on. 
	. This allows the policy to be flexible to such changes.
	. Note: when starting a policy on a vehicle with no license plate, the mod will generate one for it.
. A policy tracks its vehicle's build: 
	. A vehicle's build means: its colors, mods, extras, and so on. Anything about the vehicle other than its identifying elements above: make, model, and license plate.
	. This is tracked so that lost vehicles will be recovered just as they were, and totalled vehicles will be replaced with a build that matches the original.
	. The mod watches for changes to the build of an insured vehicle (at intervals in the background), and updates its corredponding policy automatically. 
	. Additionally, a policy can be manually updated (through the menu) to ensure its policy is up-to-date as such.
. A policy tracks its vehicle's last known location:
	. In terms of the game's "zones".
	. That is, the names it gives to all the different towns, neighborhoods, city districts, map regions, and so on.
. A policy tracks its vehicle's last known health:
	. Health meaning: the state of the engine, oil, fuel, tires, and so on -- the game's internal stats for these.
. A policy tracks its own status:
	. As in: is the vehicle with or recently with its owner, is it totalled, is it available for - or in the middle of -- a recovery or replacement claim, and so on.
. Policy summaries are shown at pertinent points the menus:
	. Each is a detailed breakdown of the policy, its holder, its vehicle, and everything else the policy tracks.

Insurance: Making Claims
------------------------
. Making a claim on the player's current insured vehicle will initiate a repair visit for it.
. Making a claim on the player's last vehicle, if insured, will either locate it on the map with a blip, or initiate a repair visit for it.
	. Which occurs depends on whether the claim was made from the insurance menu or the main menu, respectively.
	. Note: the main menu case was purposely done like this to be consistent with the non-insured case of asking the mechanic to arrive to repair a player's current or last vehicle.
. Making a claim on a lost (that is, despawned) insured vehicle will initiate the recovery of it -- just as it was, but repaired (if necessary).
	. A recovery always includes an (off-screen) repair by the mechanic.
		. Why? Because there's no way to spawn a vehicle with the exact same damage-state as another; thus the implicit repair visit explains how/why a damaged vehicle that's lost is always recovered in good condition.
	. Depending on the mechanic's regard, they will either deliver a recovered vehicle to the player's location, or to a parking spot for pickup.
		. The mod is programmed with the locations of nearly 300 such parking spots across the map.
	. In either case, the player is billed for the service (with insurance coverage applied to any repair charges, of course).
. Making a claim on a totalled (destroyed/dead) vehicle, if insured, will initialte its replacement -- with a fresh copy of it, essentially.
	. Depending on how the mechanic regards the player, they will either deliver the replacement vehicle to the player's location, or to an auto shop for pickup.
		. The mod is programmed with the locations of over 40 auto shops across the map.
	. If a replacement vehicle is left at an autoshop, it will be at one either nearer to the player's location or to the last-known location of the vehicle ... depending on the mechanic's regard.
	. If a replacement vehicle is delivered to the player, the mechanic will bill them for the travel and any on-site factors, but that's it.
	. There is never any cost for the replacement vehicle itself -- it is always 100% covered by the insurance policy.
. Note: mechanic preconditions:
	. Making claims that involve the mechanic are subject to all the same preconditions as repair visits in terms of regard vs. business hours, weather, wait times, being in too much debt, etc.
	. Also, claims that involve on-site delivery are subject to the same preconditions as repair visits in terms of the player's proximity to a road, etc. 
	
Insurance: Semi-Persistence of Delivered & Located Vehicles
-----------------------------------------------------------
. Whenever an insured vehicle is either delivered or located, it is made semi-persistent until ...
	. the vehicle is picked up by the player -- that is, they start to use it.
	. a mission starts, a character switch occurs, or the game reloads a save, replays a mission, relaunches it altogether, and so on.
	. the player has another vehicle either delivered or located -- only one vehicle can be semi-persisted at a time. 
	. ... or the game depawns it otherwise -- which is rare but possible.
. Meanwhile/otherwise, the vehicle will remain where it was either delivered or located, complete with a blinking blip on the map.
. If it somehow despawns prior to the player using it, the vehicle can be redelivered (see below) or located again at any time.

Insurance: Redeliveries & Locating Again
----------------------------------------
. In the event that a delivered or located vehicle depawns prior to pickup, it is possible to arrange redelivery by making another claim on the vehicle's policy.
. Regardless of the mechanic's regard, redeliveries are always made to a parking spot; they are never driven on-site by the mechanic.
. Recovered vehicles that are redelivered go to one of the ~300 parking spots mentioned above.
. Replacement vehicles that are redelivered go to one of the ~40 auto shops mentioned above.
. In either case, the mechanic's regard determines whether it will be delivered near the player or near the vehicle's last known location.
. Redelivered vehicles are semi-persisted, complete with a blip, just as initial deliveries are.
. Moreover, if a vehicle is damaged after being (re)delivered, and then it despawns for whatever reason, expect a repair bill to accompany any downstream redelivery.

Insurance: Garages
------------------
. Each character can have their own insurance garage.
. There are ~30 different garage locations to choose from.
. To change a character's insurance garage, use the insurance menu whilst playing as that character.
. If an insured vehicle is lost (as in: despawned for whatever reason), it will wind up in the character's insurange garage.
	. Note: this doesn't apply to vehicles that were totalled. Nor does it apply to a vehicle awaiting pickup from a prior delivery.
. A vehicle stored in the garage can be delivered like any other -- just make a claim on it.
. A blip on the map indicates the current character's garage location.
. The garage works like others in the game: you can drive or walk in, park a vehicle, drive out with one, or leave on foot.
	. Note: only insured vehicles can enter the garage.
	. Note: vehicles in the garage are arranged in order of their insurance policies.
. Approach the front of a garaged vehicle to see its policy status information.
. Approach the garage's radio to change the radio station or switch it off.
. Approach one of the laptops in the garage to review the status of all insured vehicles. 
. Enter and begin to drive a vehicle to leave the garage with it.
. Leave on foot or change floors by approaching one of the garage's doors.
. If the player's last vehicle exists (that is: it hasn't been despawned), it will be parked near the garage's main entrance.

Insurance: KNOWN ISSUES
-----------------------
. There are known issues with:
	. character personal vehicles -- for instance, Michael's or Trevor's car
	. NPC personal vehicles -- for instance, Amanda's or Tracey's car.
	. vehicles parked in safehouses or garages
	. vehicles that the game impounds for pickup at the LSPD station
. Generally speaking, insurance works on them like any other vehicle, but some less-than-ideal side-effects are possible.

Insurance Garages: KNOWN ISSUES
-------------------------------
. There's a known issue involving garages using the 5-car garage interior.
. See [Known Issues] for more details.

Customization:
--------------
. The mod is highly customizable.
. See [Settings & Customization] below.

Hacks!
------
. You can think of the hacks submenu as a built-in trainer of sorts.
. The hacks menu provides a variety of ways to "hack" the behavior of the mod.
. Some hacks activate features that are in beta.
. Diagnostic / logging options are included, as well.
. All bets are off with hacks that change the mod's behavior; use at your own discretion, proceed at your own risk.
. Activated hacks can be persisted in the form of their own special settings saved in the .INI file.
. Otherwise, they do not persist across game sessions.

-------
[Q & A]
-------

Q: Why does the mechanic sometimes spawn far away, resulting in taking a long time to arrive?
A: Thing is, different places on the map have different reachability. 
	. Also, the mechanic's spawn locations are influenced by where the game's camera is aimed, so try changing that, if not call location.
	. As of 1.1, it is possible to drive toward the mechanic (even if they are far away) so long as you maintain a relatively consistent pattern of closing in on them (rather than getting further away).
	. Also-also, if you're really impatient, there's an option in the hacks menu to have the mechanic warp onto the scene rather then drive there.

Q: Why can't the mechanic reliably drive up a mountain, or down a gorge, or navigate a multi-level highway ramp network to get to me (parked under it)?
A: Be reasonable.
	. Thing is, NPC driving uses the game's navigation logic, not mine. I just set the style and general speed of driving. From there, the game does what it does.

Q: What do the line items of the mechanic's bill mean?
A: They go like this:
	. the possible "service fee" is the mechanic's base fee, and varies (goes up or down) based on regard. 
		. it will only be added to the bill if the mechanic's visit gets as far as approaching your vehicle for repairs.
	. the possible "repairs" cost is based on how damaged your car was; this is based on the damage scores tracked by the game.
		. it will only be added to the bill once the mechanic has begun the process of repairing the car.
	. the possible "travel fee" is based on how long the mechanic drove to reach your location from the moment you asked them to visit; different parts of the map take longer to reach than others.
		. it will only be added to the bil once the mechanic arrives to your location and/or you successfully rendezvous with them.
	. the possible "location fee" is based on how near or far your car was to the nearest roadway of some sort.
		. it will only be added to the bil once the mechanic arrives to your location and/or you successfully rendezvous with them.
	. the possible "weather fee" is based on inclement weather condtions, if any.
		. it will only be added to the bill when it is raining or snowing, and will increase the worst the weather condition is.
	. the possible "off-hours fee" is based on visits made outside of the mechanic's normal business hours (09:00 to 22:00 by default).
	. the possible "extinguisher fee" is added when the mechanic had to extinguish your flaming vehicle prior to repairing it.
	. the possible "hassle fee" is aded when the mechanic's visit was interrupted in a way that precluded payment on-site.
		. it will only be added to a bill after the visit, and will appear on later review of the bill through the main menu.
	. the possible "injuries fee" is added when the game detects that the player caused the mechanic's death during a visit.
		. it will only be added to a bill after the visit, and will appear on later review of the bill through the main menu.
	. the possible "discretion fee" represents any bribe money paid to have the mechanic overlook a stolen vehicle.
	. the "subtotal" sums all of the above.
	. lastly, the "total due" is the "subtoal" + any optional tip amount added.

Q: Why doesn't the mechanic always say certain lines they're configured to, even when the conditions seem just right? 
A: This is just how the game's incidental speech system works, it seems. 
	. As far as I can tell, even though the code tells them to say something, they may or may not say it. Or they may say a variant of line, if there is one.
	. I suspect that Rockstar did this intentionally, to add variety and unpredictability to the way peds speak?

Q: Why can't I steal the mechanic's vehicle?
A: This is by design; the rest of the game is Grand Theft Auto ... go do that there.
	. But if you really must, the hacks menu makes this possible ...

Q: Why does the mechanic's vehicle sometimes wind up damaged on arrival, or even destroyed in transit (which therefore interrupts the visit)? 
A: What can I say? The roads of GTAV are dangerous, and the mechanic drives dangerously.
	. You could change the .INI file to give them a tougher vehicle ...
	. You could use the hacks menu to make their ride invincibile ...
	. As of 1.1, you could drive to meet them halfway, reducing the wait as well as the wear-and-tear on the mechanic's vehicle.
	. Or you could cope.

Q: Why doesn't the mechanic give me any credit to "pay later" right away?
A: Although the starting "neutral" regard has a corresponding amount of credit offered (by default, anyhow), credit is only extended to repeat customers.
	. This is by design.
	. Of course, you can always add credit using the hacks menu, or even manipulate the .SAV file ...

Q: I don't like these text messages, how can I turn them off?
A: There is an option in the hacks menu, "Skip Text Messages".
	. Or if you want to customize them, see below re: "TxtMsg_(...)" in settings & customization.

Q: Why doesn't the mechanic come to North Yankton, or work well if (via hacks) called there?
A: In short, NY doesn't seem to have the same nav data on its map as the main map does. 
	. Basically, this means the mod can't determine where to put the mechanic (on or near a road), or how to have the mechanic drive to your location. Or away from it, for that matter.
	. There's not much I can do about it unless I got into the business of editing map data .. but that's way outside the scope of this mod.

--------------------------
[Settings & Customization]
--------------------------

You can customize many aspects of the mod by changing settings in its .INI file.

Config
------
. Settings under this section are about fundamental aspects of the mod.

ForceMenuKey:
. Configures a key that directly opens the main menu. (None by default)
. Uses the Windows.Form.Keys enumeration.
. The accepted values can be found here:

	https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.keys?view=windowsdesktop-10.0

ForceMenuKeyShift:
. True or False indicating whether the ForceMenuKey is only recognized whilst pressed with SHIFT held.

WriteLogFile:
. When True, the mod will write a detailed .LOG file.
. The .LOG contains a variety of diagnostic details, and is intended to either help troubleshooting or satisfy curiosity.

ResetLogFile:
. When True (and when WriteLogFile is also True), the mod clears any prior .LOG file contents each time it starts anew.
. This makes it so that the contents of the .LOG file only reflect the most recent (or ongoing) run of the mod.

SafeMode
. This is a setting for diagnostic & troubleshooting purposes; it isn't recommended for general use.
. When True, it disables certain potentialy troublesome (to GTAV Enhanced?) code paths, and it enables a host of diagnostic features.
. See [Troubleshooting] for more about SafeMode.

FrameTimerOption:
. This is a setting that can be changed for diagnostic & troubleshooting purposes; its default value should be fine for normal use.
. Which frame timer the mod will use for its own time-keeping purposes.
. The accepted values are:
	. GameFrameTimer: (the default) uses the game's internal frame time reporting.
	. SystemFrameTimer: uses system ticks to determine the time between between frames.
. In principle, one may be more accurate than the other depending on the system the game is running on.
. In practice, for maybe 99% of cases, the GameFrameTimer should work just fine.
. SystemFrameTimer is there "just in case", and as a diagnostic fallback (to avoid one more ~strictly unecessary~ native call to the game).

UpdateTextScale:
. The size of the update messages about regard & debt that appear on the left.

WantedLevelUnpaid
. How wanted, in terms of 1-5 stars, the player becomes for not paying the mechanci when regard is low.

WantedLevelWasted
. How wanted, in terms of 1-5 stars, the player comes for wasting the mechanic during their visit.

WantedLevelTheft
. How wanted, in terms of 1-5 stars, the player becomes when the mechanic discovers they were called to work on a stolen vehicle (only applies when the regard is low).

DiagInfoInterval:
. The interval (in milliseconds) at which the diagnostic info updates (if enabled in the hacks menu; SafeMode forces a certain interval).

DiagTextScale:
. The size of the diagnostic text that (if enabled in the hacks menu) appears on the right.

StartStopNotifications
. When True, the mod will post a notification of itself starting and stopping.

DialDuration
.How long, in milliseconds, the mechanic's contact should play the dialtone until the menu pops up.

InitSafetyWait
. How long, in milliseconds, the mod should hold off prior to game-object dependent initialization (a safety measure).

DisableContactIcon
. When True, the mechanic's custom phone icon image is disabled.

Mechanic
--------
. Settings under this section tailor the mechanic and their service.

Name:
. The mechanic's name.

Model:
. The mechanic's ped model.
. Uses GTAV's standard ped (as in pedestrian) model names. 
. One of many online references to review differet ped models is below:

	https://docs.fivem.net/docs/game-references/ped-models/
	
Voice:
. The mechanic's voice.
. Uses GTAV's standard voice names. 
. One reference for that, and for speech names associated with different voices, can be found here:

	https://gist.github.com/alexguirre/0af600eb3d4c91ad4f900120a63b8992

Style_(...):
. Each is a style option (aka "component") to be applied to the mechanic's ped model.
. Expressed in the format: {Component}, {Index}, {Texture}
. A reference for the possible {Component} values can be found here:

	https://github.com/scripthookvdotnet/scripthookvdotnet/blob/main/source/scripting_v3/GTA/Entities/Peds/PedComponentType.cs

. {Index} is an integer 0-N value indicating which style/component to apply.
. {Texture} is an integer 0-N value indicating which texture to apply to the above indexed style/component.
. Note: different ped models often have very different possible style options available.
	. I've not yet found any online reference for the different Index/Texture combinations possible to each Component of any given ped model ...

. Any "component" of style not specified will be up to game's random selection each time the mechanic is spawned.

Line_(...):
. The speech lines the mechanic may use for different situations during their visit.
. Uses GTAV's standard speech names. 
. Note: not all voices have the same speech lines available. 
. Note: as in the game, although a speech line may be possible, the ped may not use it (or may use alternate versions of it).
	. This is controlled by the game, not the mod.
. See Voice above for a reference on what lines are available to what voices.

TxtMsg_(...):
. The text messages that the mechanic can send based on certain events.
. Each event has a "_Count", indicating the number of different messages that the mechanic can send for it (the mod selects one at random on each occasion).
. Each event then has that number of different possible text messages, each prefixed with a 0-N indicator, where N is Count-1.

BlipColor:
. The mechanic's blip color.
. Uses the SHVDN3 BlipColor enumeration. 
. The range of accepted values can be found here:

	https://github.com/scripthookvdotnet/scripthookvdotnet/blob/main/source/scripting_v3/GTA/Blip/BlipColor.cs

BlipSprite:
. The mechanic's blip sprite.
. Uses the SHVDN3 BlipSprite enumeration.
. The range of accepted values can be found:

	https://github.com/scripthookvdotnet/scripthookvdotnet/blob/main/source/scripting_v3/GTA/Blip/BlipSprite.cs
	
NameDecoCode:
. The formatting tag that decorates the mechanic's name in subtitle messages.
. Uses GTAV's standard text formatting tags for coloring the mechanic name when shown in subtitles, etc.
. One online reference for the different values possible is:

	https://calamity.inc/text-formatting

UpdateTextColor:
. The color of updates messages that appear on the left side of the screen in large text.
. Uses the Windows.Drawing.KnownColor enumeration.
. The range of accepted values can be found here:

	https://learn.microsoft.com/en-us/dotnet/api/system.drawing.knowncolor?view=net-10.0

Vehicle:
. The vehicle used by the mechanic.
. Uses GTAV's standard vehicle model names.
. One of many online references to review differet vehicle models is below:
	
	https://docs.fivem.net/docs/game-references/vehicle-references/vehicle-models/#sedans
	
LicensePlate:
. The mechanic's license plate text.

RadioStation:
. The radio station the mechanic will play in their vehicle.
. Uses the SHVDN3 RadioStation enumeration.
. The range of accepted values can be found here:

	https://github.com/scripthookvdotnet/scripthookvdotnet/blob/main/source/scripting_v3/GTA/RadioStation.cs

VehicleColor1IsCustom & VehicleCustom2IsCustom:
. Whether the primary and secondary colors of the mechnic's vehicle are custom. 
. When True, the corresponing "Custom" color is used (see below).
. When False, the corresponding (basic) "Color" is used (see below); 

VehicleColor1Custom & VehicleColor2Custom:
. The custom primary and secondary colors of the mechanic's vehicle.
. Note, each applies only when its corresponding "IsCustom" is True (see above).
	. When a custom color is not applied, the basic color value is used (see below).
. These setttings accept 32-bit hex ARGB values.
. The following reference has some example color values.

	https://learn.microsoft.com/en-us/dotnet/api/system.drawing.color?view=net-10.0#properties
	
VehicleColor1 & VehicleColor2:
. The (non-custom-color) primary and secondary colors of the mechanic's vehicle.
. Each applies only when its corresponding "IsCustom" is False (see above).
. Uses the SHVDN3 VehicleColor enumeration.
. The range of accepted values can be found here:

	https://github.com/scripthookvdotnet/scripthookvdotnet/blob/main/source/scripting_v3/GTA/Entities/Vehicles/VehicleColor.cs
	
Weapon1, Weapon2, and Weapon3:
. The mechanic's weapons in increasing lethality.
. Uses the SHVDN3 WeaponHash enunmeration.
. The range of accepted values can be found here:

	https://github.com/scripthookvdotnet/scripthookvdotnet/blob/main/source/scripting_v3/GTA/Weapons/WeaponHash.cs

PullUpDistance:
. The minimal distance (in meters) from the call site the mechanic will pull up & stop within (approximately).
. This also establishes the (slightly larger) area within which the player must remain after calling for the mechanic; leaving it for too long abandons the visit.
. Modify with caution.

WorkLengthCar & WorkLengthBike
. The length (in milliseconds) the mechanic will spend repairing the respective vehicle type.

ArrivalUpdateInterval
. The interval (in seconds) at which the mechanic will send update messages about their arrival; for cases when the mechanic takes a while to arrive.
. Note: the minimum accepted by the mod is 10.

SpawnRadius:
. The maximum distance (in meters) at which the mechanic will spawn. 
. Modify with caution.

DespawnRadius:
. The distance (in meters) at which the mechanic will despawn.
. Modify with caution.

CreditLimit_(...):
. The credit limits given to the player depending on the mechanic's regard level.
. Each regard level has a corresponding credit limit.

ServiceFee_(...):
. The service fees the mechanic charges depending on the regard level.
. Each regard level has a corresponding service fee.

DiscretionFee_(...):
. The amount of money it takes to bribe the mechanic to overlook being called out to repair a stolen vehicle.
. Each regard level has a corresponding discretion fee.

Bill_(...):
. The factors and fees used in calculating the bill during a mechanic's visit.
. Each is a multiplier to a different quantity involved in determining the cost of a repair visit.
. Bill_BodyDamageFactor: this is multiplied to what the game reports as the amount of damage to the vehicle's body.
. Bill_EngineDamageFactor: this is multiplied to what the game reports as the amount of damage to the vehicle's engine.
. Bill_OilCostFactor: this sets how much each unit of oil replaced adds to the bill.
. Bill_FuelCostFactor: this sets how much each unit of fuel replaced adds to the bill.
. Bill_MajorDamageCostFactor: this is a multipler to adjust how much major engine damage costs.
. Bill_TireCharge: this is how much each replaced tire will cost. 
. Bill_TotalledFactor: this is a multiplier to the net body+engines costs when repairing a totalled (destroyed/dead) vehicle.
. Bill_TravelTimeFactor: this is multiplied by the total number of in-game mintes (roughly 1:1 with real-world seconds) the mechanic was on the road between when you called them and they arrived.
. Bill_OffroadFactor: this is multiplied by what the game reports as the distance (in meters) from the call site to the nearest road or roadside.
. Bill_WeatherFactor: this is multiplied by a 0-3 value derived from the game's weather; more inclement weather conditions result in higher values.
. Bill_OffHourCharge: this is essentially the fee for the mechanic visiting off-hours (outside of their normal business hours).
. Bill_ExtinguisherCharge: this is the amount charged when the mechanic has to extinguish a vehicle prior to repairing it.
. Bill_InjuriesCharge: this is the amount charged when the game detects that the player kills the mechanic during the visit.
. Bill_NonPaymentCharge: this is the amount charged when payment is prevented from being handled on-site for any reason (usually due to an interruption, abandoning the visit, etc).
. Bill_MaxRepairCost: when non-zero, this sets the maximum amount for the repairs portion of the bill. When zero, there is no limit.

BillHistorySize
. The number of prior bills each character should remember for later review.
. Values between 1 and 10 are accepted; the default is 3.

IncludeOnSiteBodyRepairs
. When True (the default), the mechanic will repair coemstic body damage to a vehcile during repair visits. 
. When False, the mechanic will NOT repair cosmetic body damage to a vehicle during repair visits.
. NOTE: off-screen mechanic visits (such as those during certain insurance claim conditions) always (effectively) repair body damage. 
	. Why? Because there's no way to persist/restore cosmetic damage on a vehicle that's been despawned, basically. 

OddsOfRefusedVisit:
. The X in "there's a 1 in X chance" that, while the mechanic's regard for you is 1, they may simply refuse to visit when asked.
. The lower the number, the higher the chance; the higher the number, the lower the chance.

OddsOfFreeVisit:
. The X in "there's a 1 in X chance" that, while the mechanic's regard for you is 100, they may not charge at all for a repair visit.
. The lower the number, the higher the chance; the higher the number, the lower the chance.

BusinessHoursFirst & BusinessHours Last:
. The first and last hours of the mechanic's regular service per day, each as measured on a 24-hour clock.
. If the player's regard is high enough, the mechanic will still visit even off-hours, but will charge an off-hours fee.

[Hacks]
. Settings under this section represent the different hack options that can be chosen in the hacks menu while in-game.
. While it is possible to change them here, it is best to use the in-game hacks menu to manipulate these.

ApproachCheck(...)
. These settings influence how the mod handles a specific situation: what happens if the player drives off before the mechanic arrives in response to a call?
. In that scenario, the mod spends a short period trying to determine whether the player is more approaching the mechanic, or more abandoning the visit.
	. That is, is the player driving closer to or farther away from the mechanic over the given period?
. ApproachCheckDuration: how long (in milliseconds) the mod will try to determine whether the player is getting "hotter" or "colder" to the mechanic's location.
. ApproachCheckInterval how often (in milliseconds) during the duration the mod will update its hot/cold determination.
. ApproachCheckColdCutoff: on a scale of 0 to 1, what is the % "cold" (determined to growing more distant to the mechanic during the duration) before the mod decides that the player has definitely abandoned the visit?

PaymentPatienceWarn
. How long (in milliseconds) before a warning is shown that the mechanic's patience for the player to make a payment choice is limited.

PaymentPatienceOver
. How long (in milliseconds) before the mechanic's patience runs out waiting for the player to make a payment choice.

WastedRecoveryMinutes
. How long (in game minutes) the mechanic remains unavailable while recovering from being wasted by the player.

MinDeliverOnsiteRegard
. The required level of Regard for the mechanic to perform on-site deliveries of recovered or replacement vehicles.
. When the level is this or higher, they will deliver vehicles on-site.
. When the level is lower, the vehicles will be delivered to a parking place. 
. (This applies only to the first delivery attempt of a vehicle; redeliveries always go to parking)
. It accepts one of the following values: Lowest, Low, Neutral, High, Highest.
. The default values is High.

MinDeliverNearbyRegard
. The required level of Regard for the mechanic to deliver vehicles near the player (rather than the vehicle's last known location).
. When the level is this or higher, they will deliver vehicles near the player.
. When the level is lower, the vehicles will be delivered somewhere near the vehicle's last known location.
. It accepts one of the following values: Lowest, Low, Neutral, High, Highest.
. The default value is Neutral.

DrivingStylePreset
. The driving style of the mechanic during repair visits.
. It accepts one of the following values: Normal, Aggressive, PlowThru
	. Normal: akin to standard NPC driving - stops at stoplights, for stopped cars, for pedestrials, avoids going off-road, and so on.
	. Aggressive: ignores traffic signals, swerves around obstacles including other vehicles and pedestrians, and will go off-road if necessary in doing so.
	. PlowThru: what it sounds like; like aggressive, but instead of swerving around other vehicles or pedestrians, the mechanic will plow through them.
. The default value is Aggressive.

DeliveryStylePreset
. The driving style of the mechanic while delivering a player's vehicle, be it a recovery or a replacement.
. It accepts the same values and works the same as DrivingStylePreset above.
. The default value is Normal -- intended to be a more careful approach to avoid damage to the vehicle in delivery.

Insurance
---------
. Settings under this section tailor the insurance company.

CompanyName
. The name of the insurance company as show in menus and messages.

CoveragePercent
. The percentage of coverage to repair costs for policies issued.
. Note: once started, each policy tracks its own coverage percent, as captured from what it was when the policy started.
. It accepts values from 1 to 100.

Premium_(...)
. These define the premium -- the one-time cost to start a policy -- for each of the supported vehicle classes.

FastUpdateInterval, MidUpdateInterval, and SlowUpdateInterval
. These specify the intervals (in milliseconds) for each of the three background update processes associated with bookkeeping insured vehicles.
. Adjust these with caution:
	. Setting them too low (that is, to run too quickly) ~may~ cause performance issues on lower-spec machines, or on machines already running lots of heavyweight mods.
	. Whereas setting them too high (that is, to run too slow) ~may~ cause annoying or problematic delays in the policy's tracking of its vehicle.
. The default settings have been tuned to be very conservative for a mid-to-low-spec machine running Legacy, so they should be perfectly acceptable on better machines, or while running Enhanced (which is generally better performanced-tuned to begin with), etc.
. For an idea of what each does ...
	. the fast update -- the most lightweight of them, and the one meant for things that can change rapidly -- watches for the player getting into or out of insured vehicles, tracking the location and health of an insured vehicle being driven, and if the player's current (or prior) insured vehicle gets totalled.
	. the mid update scans for insured vehicles in the world around the player (as in: not in or recently-in the player's use) in order to update their location, health, and to catch if they get totalled.
	. the slow update -- the most heavyweight of them, and the one meant for things that don't change rapidly -- watches for modifications to the build of a player's insured vehicle in order to update its policy's build-tracking.
. Altogether, these help the insurance feature work well in terms of recoverying lost vehicles or replacing destroyed ones -- and just as they were prior to being lost or totalled.

MaxPolicies
. The number of insurance policies allowed per character.
. Values between 1 and 50 are accepted; the default is 50.

Enable5CarGarages
. When True, garage locations that use the 5-car interior are available to choose from as an insurance garage.
. When False, they are not.

. This is configurable due to a potentially annoying problem when using 5-car garages with either Franklin or Trevor after they've purchased their respective 4-car garage in the base game.
. See [Known Issues]

EnableInsuredMessage
. When True (the default), entering an insured vehicle will cause "Insured" to show over the game's standard vehicle-entry text shown in the lower right.
. When False, no such "Insured" message will appear on-screen.

-----------------
[Troubleshooting]
-----------------

. If the mod seems to run sluggishly, or if you suspect it is causing frame drops, etc ...
	. Try adjusting these settings to higher values: FastUpdateInterval, MidUpdateInterval, and SlowUpdateInterval.
	. They control the intervals at which insurance-related background processes run.
	. Although effort was made to tune them for general use, I can't anticipate every machine and all the other mods that might be in the picture ...

. If the mod doesn't seem to load, or throws an error during loading, or appears to cause a CTD (crash-to-desktop) ...

. First: if you are using GTAV Enhanced, see [Requirements] above regarding the different ScriptHookDotNet compatibility possibilities with GTAV Enhanced.
.
. Next, open ScriptHookV.LOG in a text editor (Notepad will do).
	. Ensure you find a line that is something like: 

		[11:10:31] CORE: Launching main() for 'ScriptHookVDotNet.asi' (...), id ...

	. It indicates that ScriptHook itself is working correctly, and that ScriptHookVDotNet is being loaded by it.
	. If it's not there, or there's an error about it instead, check your ScriptHook and ScriptHookDotNetV setup. Something is amiss.

. Next, open ScriptHookVDotNet.Log in a text editor (Notepad will do).

	. Ensure you have run of lines similiar to those below:

		[11:42:08] [DEBUG] Loading assembly iFruitAddon2.dll ...
		...
		[11:42:09] [DEBUG] Loading assembly LemonUI.SHVDN3.dll ...
		...
		[11:42:09] [DEBUG] Loading assembly Paracosma.MechanicOnCall.dll ...
		...
		[11:42:09] [DEBUG] Instantiating script iFruitAddon2.iFruitAddon2 ...
		...
		[11:42:09] [INFO] Started script iFruitAddon2.iFruitAddon2.
		...
		[11:42:09] [DEBUG] Instantiating script Paracosma.MechanicOnCall.ModScript ...
		...
		[11:42:09] [INFO] Started script Paracosma.MechanicOnCall.ModScript.

	. Essentially, they indicate that the mod and its dependencies (iFruitAddon2, LemonUI) are being found and loaded successfully.
	. If anything is missing, or there's an error, check your setups of the dependencies.
	. If an exception is thrown tied to MechanicOnCall, please report it to me using the [Contact Details] below. It will help me identify and fix the issue in a following release.

. Next, if there's still trouble, enable the mod's own logging, then review the output.

	. Use a text editor (Notepad will do) to open Paracosma.MechanicOnCall.INI
	. Toward the top, under the [Config] section, change the WriteLogFile setting to this:

		WriteLogFile = True

	. Then relaunch the game/restart the mod. On the next fresh run, the mod should write out a detailed log file.
	. Use a text editor (again, Notepad will do) to review the mod's .LOG file: Paracosma.MechanicOnCall.LOG
	. Below is an example of a log generated by a successful launch of the mod (completely new/fresh install) running on Enhanced with SHVDNE (captured roughly 3 seconds after startup).
	. If your log doesn't resemble this, or, in particular, if it is missing a line like, "Script First Idle: detected.", then there's a problem: the mod didn't or couldn't start correctly.
	. If possible, contact me with a copy of the log and a description of the problem you're having. See [Contact Details] below.
	. (Once done, it's recommended you set WriteLogFile = False again)

		[2026-04-30 21:59:02:2480848] Paracosma.MechanicOnCall 1.5.0.0: log started by script constructor per settings.
		[2026-04-30 21:59:02:2480848] DLL: D:\SteamLibrary\steamapps\common\Grand Theft Auto V Enhanced\scripts\Paracosma.MechanicOnCall.dll
		[2026-04-30 21:59:02:2480848] Script: Paracosma.MechanicOnCall.MainScript.
		[2026-04-30 21:59:02:2485646] GTAV: Enhanced 2.0.1013.34.
		[2026-04-30 21:59:02:2495630] Dependency: ScriptHookVDotNet3 3.9.0.0.
		[2026-04-30 21:59:02:2500616] Dependency: iFruitAddon2 3.1.1.0.
		[2026-04-30 21:59:02:2500616] Dependency: LemonUI.SHVDN3 2.2.0.0.
		[2026-04-30 21:59:02:2510603] Frame Timer: GameFrameTimer
		[2026-04-30 21:59:02:2510603] Main Menu: hotkey(None)
		[2026-04-30 21:59:02:2510603] Mechanic: name(Roxie), model(G_F_Y_Vagos_01), voice(A_F_Y_BEACH_01_WHITE_FULL_01), vehicle(torero)
		[2026-04-30 21:59:02:2515588] Insurance: name(StreetWise SA)
		[2026-04-30 21:59:02:2515588] Frame Timer: started.
		[2026-04-30 21:59:02:2520579] Script Dir: subdirectory exists (D:\SteamLibrary\steamapps\common\Grand Theft Auto V Enhanced\scripts\MechanicOnCall)
		[2026-04-30 21:59:02:2585485] Memory loaded; 0 character(s) remembered; modelHashes().
		[2026-04-30 21:59:02:2615427] Memory: remembering new PC; identity(Michael)
		[2026-04-30 21:59:02:2630399] Memory: PC resolved; modelHash(225514697), identity(Michael)
		[2026-04-30 21:59:02:2655351] Phone Contact: setup.
		[2026-04-30 21:59:02:2660343] Script Constructor: completed.
		[2026-04-30 21:59:02:2974735] Script First Tick: begun.
		[2026-04-30 21:59:02:2984717] Script Init: begun.
		[2026-04-30 21:59:02:2989711] Script Init: Resolution change detector.
		[2026-04-30 21:59:02:2994849] Resolution: 1920 x 1080 aspect ratio 1.777778, safe zone 1
		[2026-04-30 21:59:02:2999836] Script Init: Bebop Worker for update-text displays.
		[2026-04-30 21:59:02:3014809] Script Init: Bebop Worker for diag-info displays.
		[2026-04-30 21:59:02:3094529] Script Init: MessageSchedule.
		[2026-04-30 21:59:02:3104510] Script Init: Insurance
		[2026-04-30 21:59:02:4586760] Menus: setup.
		[2026-04-30 21:59:02:4586760] Script Init: Deferring game-object-using init..
		[2026-04-30 21:59:02:4606727] Script Init: done.
		[2026-04-30 21:59:02:4611718] Script First Tick: done.
		[2026-04-30 21:59:02:5400231] Script Init (Deferred): begun; awaiting PC detection.
		[2026-04-30 21:59:02:5634798] Memory: saving.
		[2026-04-30 21:59:02:5814463] Memory: saved identity(Michael), file(Michael.SAV)
		[2026-04-30 21:59:03:0495763] Script Init (Deferred): PC detected as extant and controllable after 0 .5 sec. await cycle(s).
		[2026-04-30 21:59:03:0500762] Script Init (Deferred): Waiting 2000 per settings.
		[2026-04-30 21:59:05:0649947] Script Init (Deferred): First readying of PC memory.
		[2026-04-30 21:59:05:0649947] Script Init (Deferred): Bebop Worker for phone contact icon.
		[2026-04-30 21:59:05:0689878] Script Init (Deferred): done.
		[2026-04-30 21:59:05:0819636] HeadshotWorker: begun.
		[2026-04-30 21:59:05:5697445] HeadshotWorker: succesfully assigned headshot of temp mechanic ped to phone contact icon.
		[2026-04-30 21:59:05:5702313] HeadshotWorker: done; shutting down.
		[2026-04-30 21:59:05:5707288] Script First Idle: detected.


	. Lastly, if there is still a problem with the mod launching, or causing game launch problems, try:

		.SafeMode
		---------
		. Use a text editor (Notepad will do) to open Paracosma.MechanicOnCall.INI
		. Toward the top, under the [Config] section, change the SafeMode setting to this:

			SafeMode = True

		. SafeMode activates a special diagnostic mode. It modifies the mod's behavior in a number of ways: 
			. Disables phone contact functionality, and assigns a default menu key if there isn't one specified by ForceMenuKey.
			. Disables all strictly unnecessary deferred initilization.
				. To possibly avert a startup issue.
			. Special start notifications and menu decorations indicating "SAFE MODE.
			. Enables automatic log file generation (as if WriteLogFile was True, regardless of what it is actually set at).
				. Also: salient logging for "SAFE MODE" exceptional cases.
			. Uses SystemFrameTimer, regardless of what FrameTimerOption may be set to
				. This means the mod relies on one less possibly troublesome native call, and assures the mod's internal timing independent of the gane (version) itself, or how well it is or isn't performing on the system, etc.
			. Enables a variety of otherwise purely hack options that could aid in troubleshooting. For instance: 
				. Live diagnostics are enabled, and in a special mode.
				. Certain cases on timeouts during a mechanic visit will show timeout bars in the lower right.
				. Certain zones are shown on-screen during a mechanic visit.
			. Disables hack options that could interfere with SafeMode, as well as those that could result in SafeMode-forced settings escaping into the actual INI file.
			. For the most part, SafeMode only affects code paths that run once on startup -- but which have big downstream impact on how the mod runs; this is by design.

		. If the mod begins to start at all in SafeMode, it should write a .LOG file at Paracosma.MechanicOnCall.LOG.
		. Reviewing that log may provide useful details in troublehooting the problem.

	. Last Resort?
		. If there is STILL a problem after all this, then please round up all the details you can muster and send them to me using one of the options found in [Contact Details] below.

--------------
[Known Issues]
--------------

. The mechanic goes to the wrong face/end of some vehicles, relative to the apparent engine placement.
	. STATUS: The mod looks for where the game says the engine is located in the vehicle. Specifically, where the "engine" bone is within the vehicle's game model.
		. For the following vehicles, it is known that the game reports an engine location different than where the engine actually appears on the in-game model.
			. Albany Alpha
		. The above vehicle(s) are checked for in order to have the mechanic work at the engine location that is apparent on the in-game model, rather than what the game's own data (incorrectly) indicates.
		. I will keep a running list of these as I find them, and I welcome reports of others found! Please let me know if you find one. See [Contact Details] below.

. The mechanic's driving can sometimes lead to troublesome/funny results that interfere with their visit.
	. WORKAROUND: go to a different location, then try calling them again. This should result a different arrival path, one that might have fewer issues.
	. WORKAROUND: move the camera to a different angle, then call again; the mod generally tries to spawn the mechanic out-of-view; this means moving the camera angle can influence their spawn location, hence their arrival path.
	. STATUS: there's only so much that can be done about it? Either the mechanic drives carefully but slow, or they drive faster but recklessly ...
	. STATUS: as of 1.4, the mechanic's default driving style has been adjusted to reduce the probability of this occuring, but it is still possible.
	. STATUS: also as of 1.4, you can use an .INI setting (and/or its associated hack menu option) to change the mechanic's driving style to be more careful (that is, less aggressive).

. The mechanic can (either on arrival or departure) sometimes crash into the player's vehicle. (This is particularly funny/bad when it occurs right after they just fixed it)
	. STATUS: there's only so much that can be done about this, it seems ...
	. STATUS: as of 1.4, the mechanic's default driving style has been adjusted to reduce the probability of this occuring, but it is still possible.

. There's a janky transition between the mechanic's approach to the vehicle ... and their repair animation.
	. STATUS: working on it for a future release ... it's a fiddly thing, to say the least.
		
. The mechanic's repair animation clips through a hood that opens on a reverse hinge, or into the engine bay of a taller vehicle.
	. STATUS: as of 1.2, the mechanic should approach the side of an engine bay with a reverse-hinged hood, rather than face it head-on (which would cause them to clip through the hood).
	. STATUS: looking into addressing this more fully in a future release.

. If the mechanic can't find a path to the player (or the player's vehicles) to either get to work or present the bill, they may stall -- just stand there
	. WORKAROUND: approach the mechanic directly; once the player gets close, the mechanic should either get to work or go into billing mode.
	. WORKAROUND: don't put yourself or the vehicle in a difficult-to-reach place (such as a tight or obstructed spot) to begin with ...
	. STATUS: as of 1.1, the mod will try to warn of the main situations that can cause this, allowing the player a chance to adjust their character's or their vehicle's position, etc. 

. If the player antagonizes (or kills, etc) the mechanic once they have disengaged from a visit (due to cancellation, or just running or driving away), their regard is not impacted as might be expected.
	. WORKAROUND: don't do that.
	. STATUS: as of 1.2, the mechanic should react as expected, even if antagonizing them after leaving a repair visit.
	. STATUS as of 1.3, this has been further addressed.
	. STATUS: looking to address this more fully in a future release.

. Imsurance vs. garaged (or safehouse-parked) vehicles ... 
	. The tracking of an insured vehicle's location does not currently work well with vehicles that are left in a garage or safehouse parking spot.
	. The mod will think they are generally "lost" (if they despawn, such as when the player moves away from them), and so claims to recover them will do so without - as you might expect - removing them from the garage or safehouse parking spot.
	. Hence, this can result in duplicate copies of the vehicle -- one produced by an insurance claim plus one the game spawns in a character's garage or safehouse.
	. Not the worst, but also not the best ...
	. So while it is possible to insure and make claims on vehicles that wind up parked in a garage or safehouse parking spot, please do so aware that there can be unexpected/funny results when making claims or checking the policy status.
	. STATUS: on the one hand, there's only so much I can do, on the other ... I have promising prototypes for improving this in a near-term future release ...

. Insurance vs. personal vehicles ...
	. There can be some odd results with insuring and making claims on someone's personal vehicle. This includes those of the main characters and those of NPCS with their own vehicles (ex: Michael's family).
	. Since the game likes to spawn and despawn these, moving them around on its own, the location & status tracking of the insurance code can be confused.
	. The most common issue is that this can result in duplicate copies of the vehicle  -- one produced by an insurance claim plus one the game spawns on its own.
	. Not the worst, but also not the best ...
	. So while it is possible to insure and make claims on someone's personal vehicle, please do so aware that there can be unexpected/funny results when making claims or checking the policy status.
	. STATUS: on the one hand, there's only so much I can do, on the other ... I have promising prototypes for improving this in a near-term future release ...

. Insurance vs. impounded vehicles ... 
	. There can be some odd resoults with insured vehicles that are impounded for pickup at the police station.
	. The most common issue is that this can result in duplicate copies of the vehicle  -- the one the game spawns at the LSPD impound garage plus the one produced by an insurance claim.
	. Not the worst, but also not the best ...
	. STATUS: not sure what I can do about this case for now.

. 5-Car insurance garages & using the interior garage doors to exit on foot.
	. To begin with, see: Enable5CarGarages in [Settings & Customization] above.
	. Why? There is an annoying effect: when approaching the garage doors, the game may insist on popping the "Press [x] for special vehicles" prompt that is normally only meaningful in the standard 4-car garages purchasable in the base game.
	. In particular, this seems to only effect Franklin or Trevor, and only after they've purchased their respective 4-car garage in the base game.
	. The issue: when approaching the garage interior's main doors with either Franklin or Trevor, you'll see the game's "special vehicles" prompt instead of the mod's own "exit options" prompt tied to the same area.
	. However, when in range of the mod's "exit" prompt-area (which is closer to the center of each garage door than the game's), then pressing [x], the correct "exit options" menu ~will~ show and operate as expected -- and importantly, the game's "special vehicles" menu will NOT.
	. Getting this much to work necessitated disabling the "context" control from the game's general use whilst in this garage, which then has the mildly annoying side-effect of disabling use of the interior's stock laptop (the one that allows accessing the internet).
		. I felt this was a regrettable but reasonable compromise ...
	. WORKAROUND: set Enable5CarGarages to False in the .INI; this will preclude 5-car garages from being available to begin with.
	. STATUS: I hope to fully fix this in a future release! 
		. This is proving incredibly annoying to properly quash; prior to this release, I spent ~weeks~ trying to find a way to address this more seemlessly, alas ...

. Rarely(?), when entering the garage (particularly on foot), sometimes the garage interior isn't visible; it looks like the player is in a void under the map.
	. WORKAROUND: move around or change the camera angle; the interior should pop into view.
	. STATUS: as of 1.5, I'm still not sure what's causing this.

. Rarely(?), the mechanic may pull up, stop on approach, but never get out of the vehicle.
	. WORKAROUND: pull your vehicle forward a bit; the mechanic should sense the proxmity and get to work.
	. STATUS: this seems more likely to occur if the mechanic's arrival was fraught with obstacles or uneven terrain (hence, throwing off their pathing?); looking to address this in a future release ...
	. STATUS: as of 1.1, the mechanic should be less likely to stall like that.

. Rarely(?), when leaving a visit, the mechanic may drive off for a distance, but then just stop in the middle of the road.
	. WORKAROUND: don't follow them after the visit -- they despawn once they're at a certain distance AND out-of-view.
	. STATUS: as of 1.2, this is generally fixed. However, like any NPC driving, it is possible the mechanic may occasionally get stuck on obstacles, etc. Not much I can do about that.
	. STATUS: as of 1.4, the mechanic's default driving style (the "Aggressive" preset) has been adjusted to further reduce the probability getting stuck on obstacles. But there remain cases I can't do much about.

. Rarely(?), the mechanic's phone's contact may show a default icon instead of their custom headshot.
	. NOTE: this can also happen when opening the phone within the first few seconds of the mod loading; try again in a few seconds.
	. STATUS: as of 1.2, some edge cases have been found and (hopefully) mitigated.
	. STATUS: I have a few theories; I hope to fix this in a future release.

---------
[Roadmap]
---------
These are some features that are on the horizon. Some were cut during development, some are simply low hanging fruit, and others are purely ideas for the future.

PERSISTED PARKING of insured vehicles:
. Insured vehicles can be (if chosen by the player) persisted where they are parked. They'll stay exactly where they are until moved by the player later. 
. Persistence as in: durable over game reloads and all the rest. Full persistence.
. This would work much like other vehicle persistence mods out there, but it would only apply to insured vehicles in this one.
. The claim logic would be adjusted to allow for the mechanic to deliver persistence-parked vehicles, of course (which would de-persist them from their prior spot, of course).
. This is ~super~ low-hanging fruit. I already have the vehicle persistence logic created to implement the insurance features; it could easily be adapted to full and arbitrary persistence.
. But ... does it makes sense for a mod called "Mechanic On Call?" Should I just leave parking-persistence to other mods dedicated to that?

(Brainstorm) Short transitional cutscenes:
. Instead of the full realtime animations of arriving, repairing, billing, then leaving, allow for skipping over - or smoothing out -- some (or all) with short transitional cutscenes.
. (Similiar to how random encounters work in the game already, such as retuning a stolen bike or wallet).
. Or if not skipping over the normal animations, instead giving them brief moments of "nice framing"?

[Tabled] The mechanic uses a helicopter to reach places difficult for other vehicles.
. Call the mechanic out in the hinter? Expect them to come and go by chopper, not their regular vehicle.
. But be ready to pay more for it.

-------------
[Development]
-------------
. Written in C# using Visual Studio 2026.
. All code is of my own authorship, obviously excepting the libraries I've built on.
	. Note: I had to significantly subclass LemonUI to pull off the menus as they are.
. The mod leverages some of my own (statically-linked) library code: Project "Bebop" for game-tick-based concurrent+async "Workers".
	. Bebop is being built more for the sake of that bigger, missions-oriented mod I'm working on ... but it wound up being useful here, too.

--------------
[Testing & QA]
--------------
. Each version is tested as much as possible on both Legacy and Enhanced prior to release.
. Each test comprises a full regression through all mod features old & new.
. While this should catch 90+% of problems, I'm only human. 
. So please feel free to let me know of issues that slip through. See [Contact Details] below.

------------
[My Mission]
------------
. To add new fun things to already fun games.
. To never charge a fee, or solicit for a donation, or even temporarily lock features behind paywalls.
. To yield as much power to the players as possible.
. Like Tron, I fight for the Users.

---------
[Credits]
---------
GTAV - Rockstar as a whole
ScriptHookV - Alexander Blade
ScriptHookVDotNet -  crosire / kagikn & all other contributors
ScriptHookV Enhanced - Chiheb-Bacha & all other contributors
LemonUI - justalemon & all other contributors
iFruitAddon2 - Bob74 & all other contributors
5Mods - all staff, contributors, & community members

YOU - for checking out my mod, and for reporting any bugs or feature-requests along the way. You help me make this better for everyone, thanks!

-----------------
[Contact Details]
-----------------

5Mods
-----
	. I'm "Paracosma" there, and I do my best to reply to comments ASAP: https://www.gta5-mods.com/users/Paracosma
	. I'm "Ptah" on the 5Mods Discord, and I'm open to DMs / mentions/ etc. there, too.

Email
-----
	Email: paradoxgod (at) hotmail (dot) com
	For best results, use the subject line, "Mechanic On Call Mod".
