From 981bc3c9cf478bf57f384886a25009fa368cc300 Mon Sep 17 00:00:00 2001 From: E66666666 Date: Sun, 10 Sep 2017 14:09:36 +0200 Subject: [PATCH] Set up new defaults --- Gears/ScriptMenu.cpp | 10 +- Gears/ScriptSettings.cpp | 127 +++++++------- Gears/ScriptSettings.hpp | 14 +- doc/changelog.md | 2 +- .../Controller_Controls.txt | 56 ++++++ stage/ManualTransmission/settings_general.ini | 164 ++++++------------ stage/ManualTransmission/settings_menu.ini | 27 ++- stage/ManualTransmission/settings_wheel.ini | 86 ++++----- 8 files changed, 224 insertions(+), 262 deletions(-) create mode 100644 stage/ManualTransmission/Controller_Controls.txt diff --git a/Gears/ScriptMenu.cpp b/Gears/ScriptMenu.cpp index 2ef0e834..05fbadde 100644 --- a/Gears/ScriptMenu.cpp +++ b/Gears/ScriptMenu.cpp @@ -467,7 +467,8 @@ void update_menu() { menu.Subtitle("Steering wheel options"); if (menu.BoolOption("Enable wheel", settings.EnableWheel, - { "Enable usage of a steering wheel." })) { + { "Enable usage of a steering wheel. This needs to be enabled before configuring the axes! " + "After enabling, re-initialize the mod by toggling it." })) { settings.SaveWheel(&controls); } @@ -500,7 +501,9 @@ void update_menu() { } menu.MenuOption("Steering wheel axis setup", "axesmenu", - { "Configure analog controls, like throttle, steering and the like." }); + { "Configure analog controls, like throttle, steering and the like.", + "\"Enable wheel\" needs to be enabled before configuring the axes! " + "After enabling, re-initialize the mod by toggling it."}); menu.MenuOption("Steering wheel button setup", "buttonsmenu", { "Set up your buttons on your steering wheel." }); @@ -744,6 +747,8 @@ void update_menu() { menu.Subtitle(""); menu.BoolOption("Gear", settings.GearIndicator); + menu.BoolOption("Shift Mode", settings.ShiftModeIndicator); + menu.FloatOption("Gear X", settings.GearXpos, 0.0f, 1.0f, 0.005f); menu.FloatOption("Gear Y", settings.GearYpos, 0.0f, 1.0f, 0.005f); menu.FloatOption("Gear Size", settings.GearSize, 0.0f, 3.0f, 0.05f); @@ -751,7 +756,6 @@ void update_menu() { menu.IntOption("Gear Top Color Green", settings.GearTopColorG, 0, 255); menu.IntOption("Gear Top Color Blue", settings.GearTopColorB, 0, 255); - menu.BoolOption("Shift Mode", settings.ShiftModeIndicator); menu.FloatOption("Shift Mode X", settings.ShiftModeXpos, 0.0f, 1.0f, 0.005f); menu.FloatOption("Shift Mode Y", settings.ShiftModeYpos, 0.0f, 1.0f, 0.005f); menu.FloatOption("Shift Mode Size", settings.ShiftModeSize, 0.0f, 3.0f, 0.05f); diff --git a/Gears/ScriptSettings.cpp b/Gears/ScriptSettings.cpp index a1b4aed0..08848c62 100644 --- a/Gears/ScriptSettings.cpp +++ b/Gears/ScriptSettings.cpp @@ -224,72 +224,72 @@ void ScriptSettings::parseSettingsGeneral(ScriptControls *scriptControl) { ShiftMode = (ShiftModes)settingsGeneral.GetLongValue("OPTIONS", "ShiftMode", 0); SimpleBike = settingsGeneral.GetBoolValue("OPTIONS", "SimpleBike", false); EngDamage = settingsGeneral.GetBoolValue("OPTIONS", "EngineDamage", false); - EngStall = settingsGeneral.GetBoolValue("OPTIONS", "EngineStalling", false); + EngStall = settingsGeneral.GetBoolValue("OPTIONS", "EngineStalling", true); EngStallS = settingsGeneral.GetBoolValue("OPTIONS", "EngineStallingS", false); - EngBrake = settingsGeneral.GetBoolValue("OPTIONS", "EngineBraking", false); + EngBrake = settingsGeneral.GetBoolValue("OPTIONS", "EngineBraking", true); EngLock = settingsGeneral.GetBoolValue("OPTIONS", "EngineLocking", false); - ClutchCatching = settingsGeneral.GetBoolValue("OPTIONS", "ClutchCatching", false); - ClutchShiftingH = settingsGeneral.GetBoolValue("OPTIONS", "ClutchShiftingH", false); + ClutchCatching = settingsGeneral.GetBoolValue("OPTIONS", "ClutchCatching", true); + ClutchShiftingH = settingsGeneral.GetBoolValue("OPTIONS", "ClutchShiftingH", true); ClutchShiftingS = settingsGeneral.GetBoolValue("OPTIONS", "ClutchShiftingS", false); DefaultNeutral = settingsGeneral.GetBoolValue("OPTIONS", "DefaultNeutral", true); - ClutchCatchpoint = settingsGeneral.GetDoubleValue("OPTIONS", "ClutchCatchpoint", 15.0) / 100.0f; - StallingThreshold = settingsGeneral.GetDoubleValue("OPTIONS", "StallingThreshold", 75.0) / 100.0f; + ClutchCatchpoint = settingsGeneral.GetDoubleValue("OPTIONS", "ClutchCatchpoint", 10.0) / 100.0f; + StallingThreshold = settingsGeneral.GetDoubleValue("OPTIONS", "StallingThreshold", 85.0) / 100.0f; RPMDamage = settingsGeneral.GetDoubleValue("OPTIONS", "RPMDamage", 15.0) / 100.0f; - MisshiftDamage = settingsGeneral.GetDoubleValue("OPTIONS", "MisshiftDamage", 10.0); + MisshiftDamage = settingsGeneral.GetDoubleValue("OPTIONS", "MisshiftDamage", 20.0); EngBrakePower = settingsGeneral.GetDoubleValue("OPTIONS", "EngBrakePower", 1.0); EngBrakeThreshold = settingsGeneral.GetDoubleValue("OPTIONS", "EngBrakeThreshold", 0.75); HillBrakeWorkaround = settingsGeneral.GetBoolValue("OPTIONS", "HillBrakeWorkaround", false); AutoGear1 = settingsGeneral.GetBoolValue("OPTIONS", "AutoGear1", false); AutoLookBack = settingsGeneral.GetBoolValue("OPTIONS", "AutoLookBack", false); - ThrottleStart = settingsGeneral.GetBoolValue("OPTIONS", "ThrottleStart", false); + ThrottleStart = settingsGeneral.GetBoolValue("OPTIONS", "ThrottleStart", true); - CrossScript = settingsGeneral.GetBoolValue("OPTIONS", "CrossScript", false); + CrossScript = settingsGeneral.GetBoolValue("OPTIONS", "CrossScript", true); // [HUD] HUD = settingsGeneral.GetBoolValue ("HUD", "EnableHUD", true); - AlwaysHUD = settingsGeneral.GetBoolValue("HUD", "AlwaysHUD", false); - HUDFont = settingsGeneral.GetLongValue ("HUD", "HUDFont", 0); + AlwaysHUD = settingsGeneral.GetBoolValue ("HUD", "AlwaysHUD", false); + HUDFont = settingsGeneral.GetLongValue ("HUD", "HUDFont", 4); GearIndicator = settingsGeneral.GetBoolValue("HUD", "GearIndicator", true); - GearXpos = settingsGeneral.GetDoubleValue ("HUD", "GearXpos", 0.95); - GearYpos = settingsGeneral.GetDoubleValue ("HUD", "GearYpos", 0.95); - GearSize = settingsGeneral.GetDoubleValue ("HUD", "GearSize", 1.50); + GearXpos = settingsGeneral.GetDoubleValue ("HUD", "GearXpos", 0.952500); + GearYpos = settingsGeneral.GetDoubleValue ("HUD", "GearYpos", 0.885000); + GearSize = settingsGeneral.GetDoubleValue ("HUD", "GearSize", 0.700000); GearTopColorR = settingsGeneral.GetLongValue("HUD", "GearTopColorR", 255); - GearTopColorG = settingsGeneral.GetLongValue("HUD", "GearTopColorG", 0); - GearTopColorB = settingsGeneral.GetLongValue("HUD", "GearTopColorB", 0); + GearTopColorG = settingsGeneral.GetLongValue("HUD", "GearTopColorG", 63); + GearTopColorB = settingsGeneral.GetLongValue("HUD", "GearTopColorB", 63); ShiftModeIndicator = settingsGeneral.GetBoolValue("HUD", "ShiftModeIndicator", true); - ShiftModeXpos = settingsGeneral.GetDoubleValue("HUD", "ShiftModeXpos", 0.925); - ShiftModeYpos = settingsGeneral.GetDoubleValue("HUD", "ShiftModeYpos", 0.90); - ShiftModeSize = settingsGeneral.GetDoubleValue("HUD", "ShiftModeSize", 1.50); + ShiftModeXpos = settingsGeneral.GetDoubleValue("HUD", "ShiftModeXpos", 0.935000); + ShiftModeYpos = settingsGeneral.GetDoubleValue("HUD", "ShiftModeYpos", 0.885000); + ShiftModeSize = settingsGeneral.GetDoubleValue("HUD", "ShiftModeSize", 0.700000); Speedo = settingsGeneral.GetValue("HUD", "Speedo", "kph"); - SpeedoShowUnit = settingsGeneral.GetBoolValue("HUD", "SpeedoShowUnit", false); - SpeedoXpos = settingsGeneral.GetDoubleValue("HUD", "SpeedoXpos", 0.90); - SpeedoYpos = settingsGeneral.GetDoubleValue("HUD", "SpeedoYpos", 0.85); - SpeedoSize = settingsGeneral.GetDoubleValue("HUD", "SpeedoSize", 1.00); + SpeedoShowUnit = settingsGeneral.GetBoolValue("HUD", "SpeedoShowUnit", true); + SpeedoXpos = settingsGeneral.GetDoubleValue("HUD", "SpeedoXpos", 0.860000); + SpeedoYpos = settingsGeneral.GetDoubleValue("HUD", "SpeedoYpos", 0.885000); + SpeedoSize = settingsGeneral.GetDoubleValue("HUD", "SpeedoSize", 0.700000); RPMIndicator = settingsGeneral.GetBoolValue("HUD", "EnableRPMIndicator", true); - RPMIndicatorXpos = settingsGeneral.GetDoubleValue("HUD", "RPMIndicatorXpos", 0.475); - RPMIndicatorYpos = settingsGeneral.GetDoubleValue("HUD", "RPMIndicatorYpos", 0.950); - RPMIndicatorWidth = settingsGeneral.GetDoubleValue("HUD", "RPMIndicatorWidth", 0.0); - RPMIndicatorHeight = settingsGeneral.GetDoubleValue("HUD", "RPMIndicatorHeight", 0.0); - RPMIndicatorRedline = settingsGeneral.GetDoubleValue("HUD", "RPMIndicatorRedline", 1.0); + RPMIndicatorXpos = settingsGeneral.GetDoubleValue("HUD", "RPMIndicatorXpos", 0.120001); + RPMIndicatorYpos = settingsGeneral.GetDoubleValue("HUD", "RPMIndicatorYpos", 0.765000); + RPMIndicatorWidth = settingsGeneral.GetDoubleValue("HUD", "RPMIndicatorWidth", 0.140000); + RPMIndicatorHeight = settingsGeneral.GetDoubleValue("HUD", "RPMIndicatorHeight", 0.005000); + RPMIndicatorRedline = settingsGeneral.GetDoubleValue("HUD", "RPMIndicatorRedline", 0.845000); RPMIndicatorBackgroundR = settingsGeneral.GetLongValue("HUD", "RPMIndicatorBackgroundR", 0); RPMIndicatorBackgroundG = settingsGeneral.GetLongValue("HUD", "RPMIndicatorBackgroundG", 0); RPMIndicatorBackgroundB = settingsGeneral.GetLongValue("HUD", "RPMIndicatorBackgroundB", 0); - RPMIndicatorBackgroundA = settingsGeneral.GetLongValue("HUD", "RPMIndicatorBackgroundA", 255); + RPMIndicatorBackgroundA = settingsGeneral.GetLongValue("HUD", "RPMIndicatorBackgroundA", 128); RPMIndicatorForegroundR = settingsGeneral.GetLongValue("HUD", "RPMIndicatorForegroundR", 255); RPMIndicatorForegroundG = settingsGeneral.GetLongValue("HUD", "RPMIndicatorForegroundG", 255); RPMIndicatorForegroundB = settingsGeneral.GetLongValue("HUD", "RPMIndicatorForegroundB", 255); - RPMIndicatorForegroundA = settingsGeneral.GetLongValue("HUD", "RPMIndicatorForegroundA", 0); + RPMIndicatorForegroundA = settingsGeneral.GetLongValue("HUD", "RPMIndicatorForegroundA", 255); RPMIndicatorRedlineR = settingsGeneral.GetLongValue("HUD", "RPMIndicatorRedlineR", 255); - RPMIndicatorRedlineG = settingsGeneral.GetLongValue("HUD", "RPMIndicatorRedlineG", 0); + RPMIndicatorRedlineG = settingsGeneral.GetLongValue("HUD", "RPMIndicatorRedlineG", 92); RPMIndicatorRedlineB = settingsGeneral.GetLongValue("HUD", "RPMIndicatorRedlineB", 0); RPMIndicatorRedlineA = settingsGeneral.GetLongValue("HUD", "RPMIndicatorRedlineA", 255); @@ -298,37 +298,37 @@ void ScriptSettings::parseSettingsGeneral(ScriptControls *scriptControl) { RPMIndicatorRevlimitB = settingsGeneral.GetLongValue("HUD", "RPMIndicatorRevlimitB", 0); RPMIndicatorRevlimitA = settingsGeneral.GetLongValue("HUD", "RPMIndicatorRevlimitA", 255); - SteeringWheelInfo = settingsGeneral.GetBoolValue("HUD", "SteeringWheelInfo", false); - AlwaysSteeringWheelInfo = settingsGeneral.GetBoolValue("HUD", "AlwaysSteeringWheelInfo", true);; - SteeringWheelTextureX = settingsGeneral.GetDoubleValue("HUD", "SteeringWheelTextureX", 0.1); - SteeringWheelTextureY = settingsGeneral.GetDoubleValue("HUD", "SteeringWheelTextureY", 0.9); - SteeringWheelTextureSz= settingsGeneral.GetDoubleValue("HUD", "SteeringWheelTextureSz", 0.08); - PedalInfoX = settingsGeneral.GetDoubleValue("HUD", "PedalInfoX", 0.15); - PedalInfoY = settingsGeneral.GetDoubleValue("HUD", "PedalInfoY", 0.90); - PedalInfoH = settingsGeneral.GetDoubleValue("HUD", "PedalInfoH", 0.15); - PedalInfoW = settingsGeneral.GetDoubleValue("HUD", "PedalInfoW", 0.03); - PedalInfoPadX = settingsGeneral.GetDoubleValue("HUD", "PedalInfoPadX", 0.01); - PedalInfoPadY = settingsGeneral.GetDoubleValue("HUD", "PedalInfoPadY", 0.01); + SteeringWheelInfo = settingsGeneral.GetBoolValue("HUD", "SteeringWheelInfo", true); + AlwaysSteeringWheelInfo = settingsGeneral.GetBoolValue("HUD", "AlwaysSteeringWheelInfo", false); + SteeringWheelTextureX = settingsGeneral.GetDoubleValue("HUD", "SteeringWheelTextureX", 0.230000); + SteeringWheelTextureY = settingsGeneral.GetDoubleValue("HUD", "SteeringWheelTextureY", 0.890000); + SteeringWheelTextureSz= settingsGeneral.GetDoubleValue("HUD", "SteeringWheelTextureSz", 0.060000); + PedalInfoX = settingsGeneral.GetDoubleValue("HUD", "PedalInfoX", 0.290000); + PedalInfoY = settingsGeneral.GetDoubleValue("HUD", "PedalInfoY", 0.890000); + PedalInfoH = settingsGeneral.GetDoubleValue("HUD", "PedalInfoH", 0.100000); + PedalInfoW = settingsGeneral.GetDoubleValue("HUD", "PedalInfoW", 0.040000); + PedalInfoPadX = settingsGeneral.GetDoubleValue("HUD", "PedalInfoPadX", 0.000000); + PedalInfoPadY = settingsGeneral.GetDoubleValue("HUD", "PedalInfoPadY", 0.000000); // [CONTROLLER] - scriptControl->ControlXbox[static_cast(ScriptControls::ControllerControlType::Toggle)] = settingsGeneral.GetValue("CONTROLLER", "Toggle", "DpadRight"); + scriptControl->ControlXbox[static_cast(ScriptControls::ControllerControlType::Toggle)] = settingsGeneral.GetValue("CONTROLLER", "Toggle", "UNKNOWN"); scriptControl->ControlXbox[static_cast(ScriptControls::ControllerControlType::ToggleH)] = settingsGeneral.GetValue("CONTROLLER", "ToggleShift", "B"); BlockCarControls = settingsGeneral.GetBoolValue("CONTROLLER", "BlockCarControls", false); - scriptControl->CToggleTime = settingsGeneral.GetLongValue("CONTROLLER", "ToggleTime", 500); + scriptControl->CToggleTime = settingsGeneral.GetLongValue("CONTROLLER", "ToggleTime", 300); scriptControl->MaxTapTime = settingsGeneral.GetLongValue("CONTROLLER", "MaxTapTime", 200); - double tval = settingsGeneral.GetDoubleValue("CONTROLLER", "TriggerValue", 0.75); + double tval = settingsGeneral.GetDoubleValue("CONTROLLER", "TriggerValue", 0.85); if (tval > 1.0 || tval < 0.1) { - tval = 0.75; + tval = 0.85; } scriptControl->SetXboxTrigger(tval); - ToggleEngine = settingsGeneral.GetBoolValue("CONTROLLER", "ToggleEngine", "0"); + ToggleEngine = settingsGeneral.GetBoolValue("CONTROLLER", "ToggleEngine", false); scriptControl->ControlXbox[static_cast(ScriptControls::ControllerControlType::ShiftUp)] = settingsGeneral.GetValue("CONTROLLER", "ShiftUp", "A"); scriptControl->ControlXbox[static_cast(ScriptControls::ControllerControlType::ShiftDown)] = settingsGeneral.GetValue("CONTROLLER", "ShiftDown", "X"); - scriptControl->ControlXbox[static_cast(ScriptControls::ControllerControlType::Clutch)] = settingsGeneral.GetValue("CONTROLLER", "Clutch", "LeftThumbDown"); + scriptControl->ControlXbox[static_cast(ScriptControls::ControllerControlType::Clutch)] = settingsGeneral.GetValue("CONTROLLER", "Clutch", "LeftThumbUp"); scriptControl->ControlXbox[static_cast(ScriptControls::ControllerControlType::Engine)] = settingsGeneral.GetValue("CONTROLLER", "Engine", "DpadDown"); scriptControl->ControlXbox[static_cast(ScriptControls::ControllerControlType::Throttle)] = settingsGeneral.GetValue("CONTROLLER", "Throttle", "RightTrigger"); scriptControl->ControlXbox[static_cast(ScriptControls::ControllerControlType::Brake)] = settingsGeneral.GetValue("CONTROLLER", "Brake", "LeftTrigger"); @@ -339,11 +339,11 @@ void ScriptSettings::parseSettingsGeneral(ScriptControls *scriptControl) { // [CONTROLLER_LEGACY] scriptControl->UseLegacyController = settingsGeneral.GetBoolValue("CONTROLLER_LEGACY", "Enable", false); - scriptControl->LegacyControls[static_cast(ScriptControls::LegacyControlType::Toggle)] = settingsGeneral.GetLongValue("CONTROLLER_LEGACY", "Toggle", ControlFrontendRight); + scriptControl->LegacyControls[static_cast(ScriptControls::LegacyControlType::Toggle)] = settingsGeneral.GetLongValue("CONTROLLER_LEGACY", "Toggle", -1); scriptControl->LegacyControls[static_cast(ScriptControls::LegacyControlType::ToggleH)] = settingsGeneral.GetLongValue("CONTROLLER_LEGACY", "ToggleH", ControlFrontendCancel); scriptControl->LegacyControls[static_cast(ScriptControls::LegacyControlType::ShiftUp)] = settingsGeneral.GetLongValue("CONTROLLER_LEGACY", "ShiftUp", ControlFrontendAccept); scriptControl->LegacyControls[static_cast(ScriptControls::LegacyControlType::ShiftDown)] = settingsGeneral.GetLongValue("CONTROLLER_LEGACY", "ShiftDown", ControlFrontendX); - scriptControl->LegacyControls[static_cast(ScriptControls::LegacyControlType::Clutch)] = settingsGeneral.GetLongValue("CONTROLLER_LEGACY", "Clutch", ControlFrontendRightAxisY); + scriptControl->LegacyControls[static_cast(ScriptControls::LegacyControlType::Clutch)] = settingsGeneral.GetLongValue("CONTROLLER_LEGACY", "Clutch", ControlFrontendAxisY); scriptControl->LegacyControls[static_cast(ScriptControls::LegacyControlType::Engine)] = settingsGeneral.GetLongValue("CONTROLLER_LEGACY", "Engine", ControlFrontendDown); scriptControl->LegacyControls[static_cast(ScriptControls::LegacyControlType::Throttle)] = settingsGeneral.GetLongValue("CONTROLLER_LEGACY", "Throttle", ControlFrontendLt); scriptControl->LegacyControls[static_cast(ScriptControls::LegacyControlType::Brake)] = settingsGeneral.GetLongValue("CONTROLLER_LEGACY", "Brake", ControlFrontendRt); @@ -354,10 +354,10 @@ void ScriptSettings::parseSettingsGeneral(ScriptControls *scriptControl) { // [KEYBOARD] scriptControl->KBControl[static_cast(ScriptControls::KeyboardControlType::Toggle)] = str2key(settingsGeneral.GetValue("KEYBOARD", "Toggle", "VK_OEM_5")); scriptControl->KBControl[static_cast(ScriptControls::KeyboardControlType::ToggleH)] = str2key(settingsGeneral.GetValue("KEYBOARD", "ToggleH", "VK_OEM_6")); - scriptControl->KBControl[static_cast(ScriptControls::KeyboardControlType::ShiftUp)] = str2key(settingsGeneral.GetValue("KEYBOARD", "ShiftUp", "SHIFT")); - scriptControl->KBControl[static_cast(ScriptControls::KeyboardControlType::ShiftDown)] = str2key(settingsGeneral.GetValue("KEYBOARD", "ShiftDown", "CTRL")); - scriptControl->KBControl[static_cast(ScriptControls::KeyboardControlType::Clutch)] = str2key(settingsGeneral.GetValue("KEYBOARD", "Clutch", "X")); - scriptControl->KBControl[static_cast(ScriptControls::KeyboardControlType::Engine)] = str2key(settingsGeneral.GetValue("KEYBOARD", "Engine", "C")); + scriptControl->KBControl[static_cast(ScriptControls::KeyboardControlType::ShiftUp)] = str2key(settingsGeneral.GetValue("KEYBOARD", "ShiftUp", "LSHIFT")); + scriptControl->KBControl[static_cast(ScriptControls::KeyboardControlType::ShiftDown)] = str2key(settingsGeneral.GetValue("KEYBOARD", "ShiftDown", "LCTRL")); + scriptControl->KBControl[static_cast(ScriptControls::KeyboardControlType::Clutch)] = str2key(settingsGeneral.GetValue("KEYBOARD", "Clutch", "Z")); + scriptControl->KBControl[static_cast(ScriptControls::KeyboardControlType::Engine)] = str2key(settingsGeneral.GetValue("KEYBOARD", "Engine", "X")); scriptControl->KBControl[static_cast(ScriptControls::KeyboardControlType::Throttle)] = str2key(settingsGeneral.GetValue("KEYBOARD", "Throttle", "W")); scriptControl->KBControl[static_cast(ScriptControls::KeyboardControlType::Brake)] = str2key(settingsGeneral.GetValue("KEYBOARD", "Brake", "S")); @@ -390,7 +390,7 @@ void ScriptSettings::parseSettingsWheel(ScriptControls *scriptControl) { settingsWheel.LoadFile(settingsWheelFile.c_str()); // [OPTIONS] - EnableWheel = settingsWheel.GetBoolValue("OPTIONS", "EnableWheel", false); + EnableWheel = settingsWheel.GetBoolValue("OPTIONS", "EnableWheel", true); WheelWithoutManual = settingsWheel.GetBoolValue("OPTIONS", "WheelWithoutManual", true); // WheelForBoat = settingsWheel.GetBoolValue("OPTIONS", "WheelForBoat", false); PatchSteering = settingsWheel.GetBoolValue("OPTIONS", "PatchSteering", true); @@ -407,18 +407,11 @@ void ScriptSettings::parseSettingsWheel(ScriptControls *scriptControl) { // [FORCE_FEEDBACK] EnableFFB = settingsWheel.GetBoolValue("FORCE_FEEDBACK", "Enable", true); FFGlobalMult = settingsWheel.GetDoubleValue("FORCE_FEEDBACK", "GlobalMult", 1.0); - DamperMax = settingsWheel.GetLongValue("FORCE_FEEDBACK", "DamperMax", 50); - DamperMin = settingsWheel.GetLongValue("FORCE_FEEDBACK", "DamperMin", 20); - TargetSpeed = settingsWheel.GetDoubleValue("FORCE_FEEDBACK", "DamperTargetSpeed", 1.0); - PhysicsStrength = settingsWheel.GetDoubleValue("FORCE_FEEDBACK", "PhysicsStrength", 1.0); - DetailStrength = settingsWheel.GetDoubleValue("FORCE_FEEDBACK", "DetailStrength", 1.0); - - - // The DEVICE in the following sections should only be read by the directinput control parts - // I'll need to write a program that fills these or at least configures this part of the file - // idk somebody buy me a fancy fanatec set of stuff so i can pretend to care - // i need a handbrake - // santa pls + DamperMax = settingsWheel.GetLongValue("FORCE_FEEDBACK", "DamperMax", 67); + DamperMin = settingsWheel.GetLongValue("FORCE_FEEDBACK", "DamperMin", 12); + TargetSpeed = settingsWheel.GetDoubleValue("FORCE_FEEDBACK", "DamperTargetSpeed", 1.2); + PhysicsStrength = settingsWheel.GetDoubleValue("FORCE_FEEDBACK", "PhysicsStrength", 1.7); + DetailStrength = settingsWheel.GetDoubleValue("FORCE_FEEDBACK", "DetailStrength", 1.6); // [INPUT_DEVICES] int it = 0; diff --git a/Gears/ScriptSettings.hpp b/Gears/ScriptSettings.hpp index be6a340d..fe41ff31 100644 --- a/Gears/ScriptSettings.hpp +++ b/Gears/ScriptSettings.hpp @@ -27,7 +27,7 @@ class ScriptSettings { // settings_general.ini parts // [OPTIONS] - bool EnableManual = true; + bool EnableManual = false; ShiftModes ShiftMode = Sequential; // 0 Seq, 1 H, 2 Auto bool SimpleBike = false; bool EngDamage = false; @@ -40,8 +40,8 @@ class ScriptSettings { bool ClutchShiftingS = false; bool DefaultNeutral = false; - float EngBrakePower; - float EngBrakeThreshold; + float EngBrakePower = 0.0f; + float EngBrakeThreshold = 0.75f; float ClutchCatchpoint = 0.15f; float StallingThreshold = 0.75f; float RPMDamage = 1.5f; @@ -58,7 +58,7 @@ class ScriptSettings { bool AlwaysHUD = false; int HUDFont = 0; - bool GearIndicator; + bool GearIndicator = true; float GearXpos = 0.95f; float GearYpos = 0.95f; float GearSize = 1.0f; @@ -66,13 +66,13 @@ class ScriptSettings { int GearTopColorG = 255; int GearTopColorB = 255; - bool ShiftModeIndicator; + bool ShiftModeIndicator = true; float ShiftModeXpos = 0.925f; float ShiftModeYpos = 0.95f; float ShiftModeSize = 1.0f; // can be kph, mph, or ms - std::string Speedo; + std::string Speedo = "kph"; bool SpeedoShowUnit = false; float SpeedoSize = 1.5f; float SpeedoYpos = 0.85f; @@ -119,7 +119,7 @@ class ScriptSettings { // [DEBUG] bool DisplayInfo = false; - bool DisplayGearingInfo; + bool DisplayGearingInfo = false; bool DisplayWheelInfo = false; std::vector reggdGuids; diff --git a/doc/changelog.md b/doc/changelog.md index 18c29ee6..4ebf3329 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -2,7 +2,7 @@ ## 4.3.9 Thanks for your bug reports! -Config changes: Nope +Config changes: Updated defaults. No need to replace your config: it's just a more comprehensive start for new users/setups. Fixes: * Fix brake non-responsive while engine braking diff --git a/stage/ManualTransmission/Controller_Controls.txt b/stage/ManualTransmission/Controller_Controls.txt new file mode 100644 index 00000000..3007331c --- /dev/null +++ b/stage/ManualTransmission/Controller_Controls.txt @@ -0,0 +1,56 @@ +[CONTROLLER] +The following controls can be assigned: + * DpadUp + * DpadDown + * DpadLeft + * DpadRight + * Start + * Back + * LeftThumb + * RightThumb + * LeftShoulder + * RightShoulder + * A + * B + * X + * Y + * LeftTrigger + * RightTrigger + * LeftThumbLeft + * LeftThumbRight + * RightThumbLeft + * RightThumbRight + * LeftThumbUp + * LeftThumbDown + * RightThumbUp + * RightThumbDown + +[CONTROLLER_LEGACY] +Usable inputs. USE THE NUMBERS +Turn off a control by putting -1 there +Control name Xbox equivalent Control ID +ControlFrontendDown Dpad Down 187 +ControlFrontendUp Dpad Up 188 +ControlFrontendLeft Dpad Left 189 +ControlFrontendRight Dpad Right 190 +ControlFrontendRdown ?????????? 191 +ControlFrontendRup ?????????? 192 +ControlFrontendRleft ?????????? 193 +ControlFrontendRright ?????????? 194 +ControlFrontendAxisX Left stick X 195 +ControlFrontendAxisY Left stick Y 196 +ControlFrontendRightAxisX Right stick X 197 +ControlFrontendRightAxisY Right stick Y 198 +ControlFrontendPause Start 199 +ControlFrontendAccept A 201 +ControlFrontendCancel B 202 +ControlFrontendX X 203 +ControlFrontendY Y 204 +ControlFrontendLb Left shoulder 205 +ControlFrontendRb Right shoulder 206 +ControlFrontendLt Left trigger 207 +ControlFrontendRt Right trigger 208 +ControlFrontendLs Left stick click 209 +ControlFrontendRs Right stick click 210 +ControlFrontendDelete ??????????? 214 +ControlFrontendSelect Back 217 \ No newline at end of file diff --git a/stage/ManualTransmission/settings_general.ini b/stage/ManualTransmission/settings_general.ini index 14d98225..6eeb73cd 100644 --- a/stage/ManualTransmission/settings_general.ini +++ b/stage/ManualTransmission/settings_general.ini @@ -1,23 +1,27 @@ -[OPTIONS] +; Manual Transmission for GTA V +; Please refer to the readme or the in-game menu for option descriptions +; It's advised to use the in-game menu to configure the mod + +[OPTIONS] Enable = true ShiftMode = 0 -SimpleBike = true -EngineDamage = true +SimpleBike = false +EngineDamage = false EngineStalling = true +EngineStallingS = false EngineBraking = true +EngineLocking = false ClutchCatching = true ClutchShiftingH = true ClutchShiftingS = false DefaultNeutral = true -ClutchCatchpoint = 10.000001 +ClutchCatchpoint = 10.000000 StallingThreshold = 85.000000 -RPMDamage = 14.999996 +RPMDamage = 15.000001 MisshiftDamage = 20.000000 - -; At default GTA V applies brakes when standing still, while even -; at an angle. Enabling this will give your car a little push. -; Thanks to XMOD! -HillBrakeWorkaround = true +EngBrakePower = 1.000000 +EngBrakeThreshold = 0.750000 +HillBrakeWorkaround = false AutoGear1 = false AutoLookBack = false ThrottleStart = true @@ -26,23 +30,26 @@ CrossScript = true [HUD] EnableHUD = true +AlwaysHUD = false HUDFont = 4 +GearIndicator = true GearXpos = 0.952500 GearYpos = 0.885000 GearSize = 0.700000 GearTopColorR = 255 -GearTopColorG = 127 -GearTopColorB = 127 +GearTopColorG = 63 +GearTopColorB = 63 +ShiftModeIndicator = true ShiftModeXpos = 0.935000 ShiftModeYpos = 0.885000 ShiftModeSize = 0.700000 -; kph - mph - ms - none +; kph - mph - ms - off Speedo = kph SpeedoShowUnit = true SpeedoXpos = 0.860000 -SpeedoYpos = 0.883502 -SpeedoSize = 0.750000 +SpeedoYpos = 0.885000 +SpeedoSize = 0.700000 EnableRPMIndicator = true RPMIndicatorXpos = 0.120001 RPMIndicatorYpos = 0.765000 @@ -65,124 +72,66 @@ RPMIndicatorRevlimitR = 255 RPMIndicatorRevlimitG = 0 RPMIndicatorRevlimitB = 0 RPMIndicatorRevlimitA = 255 +SteeringWheelInfo = true +AlwaysSteeringWheelInfo = false +SteeringWheelTextureX = 0.230000 +SteeringWheelTextureY = 0.890000 +SteeringWheelTextureSz = 0.060000 +PedalInfoX = 0.290000 +PedalInfoY = 0.890000 +PedalInfoH = 0.100000 +PedalInfoW = 0.040000 +PedalInfoPadX = 0.000000 +PedalInfoPadY = 0.000000 -[CONTROLLER] +[DEBUG] +DisplayInfo = false +DisplayWheelInfo = false +DisplayGearingInfo = false -; The following controls can be assigned: -; DpadUp -; DpadDown -; DpadLeft -; DpadRight -; Start -; Back -; LeftThumb -; RightThumb -; LeftShoulder -; RightShoulder -; A -; B -; X -; Y -; LeftTrigger -; RightTrigger -; LeftThumbLeft -; LeftThumbRight -; RightThumbLeft -; RightThumbRight -; LeftThumbUp -; LeftThumbDown -; RightThumbUp -; RightThumbDown -; Turn off a control by putting UNKNOWN there -Toggle = DpadRight -ToggleShift = B +[CONTROLLER] +ToggleEngine = false ToggleTime = 300 - -; This is how far an analog input is pressed to register it -; as a button press. -TriggerValue = 0.900000 - -; Controller buttons +TriggerValue = 0.850000 +BlockCarControls = false +MaxTapTime = 200 +ShiftUpBlocks = -1 +ShiftDownBlocks = -1 +Toggle = UNKNOWN +ToggleShift = B ShiftUp = A ShiftDown = X Clutch = LeftThumbUp Engine = DpadDown - -; Turn on/off engine /w button, or only turn on engine? -ToggleEngine = false - -; Controls for realistic reversing Throttle = RightTrigger Brake = LeftTrigger [CONTROLLER_LEGACY] - -; Using something that works with GTA V but isn't an -; Xbox controller nor does it use the Xinput thing? Try this! Enable = false - -; Uses same TriggerValue and ToggleTime as [CONTROLLER] - -; Usable inputs. USE THE NUMBERS -; Turn off a control by putting -1 there -; Control name Xbox equivalent Control ID -; ControlFrontendDown Dpad Down 187 -; ControlFrontendUp Dpad Up 188 -; ControlFrontendLeft Dpad Left 189 -; ControlFrontendRight Dpad Right 190 -; ControlFrontendRdown ?????????? 191 -; ControlFrontendRup ?????????? 192 -; ControlFrontendRleft ?????????? 193 -; ControlFrontendRright ?????????? 194 -; ControlFrontendAxisX Left stick X 195 -; ControlFrontendAxisY Left stick Y 196 -; ControlFrontendRightAxisX Right stick X 197 -; ControlFrontendRightAxisY Right stick Y 198 -; ControlFrontendPause Start 199 -; ControlFrontendAccept A 201 -; ControlFrontendCancel B 202 -; ControlFrontendX X 203 -; ControlFrontendY Y 204 -; ControlFrontendLb Left shoulder 205 -; ControlFrontendRb Right shoulder 206 -; ControlFrontendLt Left trigger 207 -; ControlFrontendRt Right trigger 208 -; ControlFrontendLs Left stick click 209 -; ControlFrontendRs Right stick click 210 -; ControlFrontendDelete ??????????? 214 -; ControlFrontendSelect Back 217 -Toggle = 190 -ToggleShift = 202 -ShiftUp = 201 -ShiftDown = 203 +ShiftUpBlocks = -1 +ShiftDownBlocks = -1 +Toggle = -1 +ToggleShift = 194 +ShiftUp = 191 +ShiftDown = 193 Clutch = 196 Engine = 187 - -; Controls for realistic reversing Throttle = 208 Brake = 207 [KEYBOARD] - -; Refer to Keyboard_Keys.txt for usable keys - -; To disable: put UNKNOWN Toggle = VK_OEM_5 ToggleH = VK_OEM_6 ShiftUp = LSHIFT ShiftDown = LCTRL Clutch = Z Engine = X - -; Controls for realistic reversing Throttle = W Brake = S - -; Keyboard H-shifter buttons HR = NUM0 H1 = NUM1 H2 = NUM2 @@ -192,12 +141,3 @@ H5 = NUM5 H6 = NUM6 H7 = NUM7 HN = NUM9 - - -[DEBUG] -DisplayInfo = false -LogCar = false - - -[FILEVERSION] -VERSION = 430 diff --git a/stage/ManualTransmission/settings_menu.ini b/stage/ManualTransmission/settings_menu.ini index ea924011..6ebc4548 100644 --- a/stage/ManualTransmission/settings_menu.ini +++ b/stage/ManualTransmission/settings_menu.ini @@ -6,10 +6,11 @@ MenuLeft = LEFT MenuRight = RIGHT MenuSelect = RETURN MenuCancel = BACKSPACE -MenuX = 0.165000 -MenuY = 0.100000 -ControllerButton1 = -1 -ControllerButton2 = -1 +MenuX = 0.000000 +MenuY = 0.000000 +ControllerButton1 = 206 +ControllerButton2 = 202 + ; Usable inputs. USE THE CONTROL ID ; Turn off a control by putting -1 there @@ -47,21 +48,18 @@ Blue =255 Alpha =255 Font =1 - [Title Rect] Red =255 Green =255 Blue =255 Alpha =255 - [Scroller] -Red =255 -Green =255 -Blue =255 +Red = 255 +Green = 255 +Blue = 255 Alpha =255 - [Options Text] Red =255 Green =255 @@ -69,9 +67,8 @@ Blue =255 Alpha =255 Font =0 - [Options Rect] -Red =0 -Green =0 -Blue =0 -Alpha =0 +Red = 0 +Green = 0 +Blue = 0 +Alpha = 255 diff --git a/stage/ManualTransmission/settings_wheel.ini b/stage/ManualTransmission/settings_wheel.ini index ed5427b4..094ffa93 100644 --- a/stage/ManualTransmission/settings_wheel.ini +++ b/stage/ManualTransmission/settings_wheel.ini @@ -1,12 +1,11 @@ [OPTIONS] EnableWheel = true WheelWithoutManual = true -WheelBoatPlanes = true PatchSteering = true PatchSteeringAlways = false +PatchSteeringControl = true LogitechLEDs = false - -; If the controls SOMEHOW are inverted for you :/ +HPatternKeyboard = false InvertSteer = false InvertThrottle = false InvertBrake = false @@ -16,84 +15,64 @@ InvertClutch = false [FORCE_FEEDBACK] Enable = true GlobalMult = 1.000000 -DamperMax = 65 -DamperMin = 20 - -; Speed (m/s) at which damper effect is minimal +DamperMax = 67 +DamperMin = 12 DamperTargetSpeed = 1.200000 -PhysicsStrength = 1.000000 -DetailStrength = 1.000000 - - -[INPUT_DEVICES] - - -[TOGGLE_MOD] -DEVICE = -1 -BUTTON = -1 - +PhysicsStrength = 1.700000 +DetailStrength = 1.600000 -[CHANGE_SHIFTMODE] -DEVICE = -1 -BUTTON = -1 - -; Min - Left -; Max - Right [STEER] +ANTIDEADZONE = 0.250000 +SteerAngleMax = 900.000000 +SteerAngleCar = 720.000000 +SteerAngleBike = 180.000000 +SteerAngleBoat = 360.000000 +GameSteerMult = 1.000000 DEVICE = -1 AXLE = MIN = 0 -MAX = 65535 -FFB = -SteerAngleMax = 900 -SteerAngleCar = 900 -SteerAngleBike = 180 -SteerAngleAlt = 360 -GameSteerMult = 1.000000 +MAX = 0 [THROTTLE] +ANTIDEADZONE = 0.250000 DEVICE = -1 AXLE = -MIN = 65535 +MIN = 0 MAX = 0 [BRAKES] +ANTIDEADZONE = 0.250000 DEVICE = -1 AXLE = -MIN = 65535 +MIN = 0 MAX = 0 [CLUTCH] DEVICE = -1 AXLE = -MIN = 65535 +MIN = 0 MAX = 0 [HANDBRAKE_ANALOG] - -; Note: GTA V Activates it at >50%, but this option is here -; to enable use of a real handbrake device DEVICE = -1 AXLE = MIN = 0 MAX = 0 -[SHIFTER] +[TOGGLE_MOD] +DEVICE = -1 +BUTTON = -1 + + +[CHANGE_SHIFTMODE] DEVICE = -1 -GEAR_R = -1 -GEAR_1 = -1 -GEAR_2 = -1 -GEAR_3 = -1 -GEAR_4 = -1 -GEAR_5 = -1 -GEAR_6 = -1 -GEAR_7 = -1 +BUTTON = -1 [CLUTCH_BUTTON] @@ -111,22 +90,22 @@ DEVICE = -1 BUTTON = -1 -[HANDBRAKE] +[ENGINE] DEVICE = -1 BUTTON = -1 -[ENGINE] +[HANDBRAKE] DEVICE = -1 BUTTON = -1 -[LIGHTS] +[HORN] DEVICE = -1 BUTTON = -1 -[HORN] +[LIGHTS] DEVICE = -1 BUTTON = -1 @@ -174,10 +153,3 @@ BUTTON = -1 [INDICATOR_HAZARD] DEVICE = -1 BUTTON = -1 - - -[TO_KEYBOARD] -DEVICE = -1 - -[FILEVERSION] -VERSION = 430