7 Commits

Author SHA1 Message Date
EricPlayZ 5f1f6732cc Update README.md 2024-02-03 00:28:08 +02:00
EricPlayZ fb5ccd7ffe Update README.md 2024-02-03 00:27:24 +02:00
EricPlayZ 7469f1e9b7 Update README.md 2024-02-03 00:25:05 +02:00
EricPlayZ abc4a8a697 Update README.md 2024-02-03 00:24:37 +02:00
EricPlayZ 5b82f7512f update default config 2024-02-03 00:22:02 +02:00
EricPlayZ 154362f6a1 - Added Horizontal distance from player slider for Third Person
- Fixed a bug with hotkeys sometimes not working unless you opened the menu
2024-02-03 00:12:50 +02:00
EricPlayZ 0db4be9b19 - Fixed game crashing when Misc tab is open while exiting to main menu
- Fixed Disable HUD getting grayed out and not being able to toggle it back to false when exiting to main menu
- Fixed Player Variables loading/saving not working properly
2024-01-31 18:37:11 +02:00
13 changed files with 175 additions and 99 deletions
@@ -23,7 +23,7 @@ LRESULT __stdcall hkWindowProc(_In_ HWND hwnd, _In_ UINT uMsg, _In_ WPARAM wPara
break;
for (auto& option : *KeyBindOption::GetInstances()) {
if (option->GetImGuiDisabled())
if (option->GetChangesAreDisabled())
continue;
if (wParam == option->GetKeyBind()) {
KeyBindOption::wasAnyKeyPressed = true;
@@ -53,9 +53,4 @@ namespace ImGui {
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags | ImGuiItemStatusFlags_Checkable | (v->GetValue() ? ImGuiItemStatusFlags_Checked : 0));
return pressed;
}
void BeginDisabled(bool disabled, Option* v) {
BeginDisabled(disabled);
v->SetImGuiDisabled(disabled);
}
}
@@ -3,5 +3,4 @@
namespace ImGui {
bool Checkbox(const char* label, Option* v);
void BeginDisabled(bool disabled, Option* v);
}
@@ -4040,6 +4040,7 @@ namespace Config {
{ "Camera:ThirdPerson", "UseTPPModel", true, &Menu::Camera::tpUseTPPModel, OPTION },
{ "Camera:ThirdPerson", "DistanceBehindPlayer", 2.0f, &Menu::Camera::tpDistanceBehindPlayer, Float },
{ "Camera:ThirdPerson", "HeightAbovePlayer", 1.35f, &Menu::Camera::tpHeightAbovePlayer, Float },
{ "Camera:ThirdPerson", "HorizontalDistanceFromPlayer", 0.0f, &Menu::Camera::tpHorizontalDistanceFromPlayer, Float },
{ "Camera:Misc", "DisablePhotoModeLimits", true, &Menu::Camera::disablePhotoModeLimits, OPTION },
{ "Camera:Misc", "DisableSafezoneFOVReduction", true, &Menu::Camera::disableSafezoneFOVReduction, OPTION }
});
@@ -4139,7 +4140,7 @@ namespace Config {
switch (entry.type) {
case OPTION: {
Option* option = reinterpret_cast<Option*>(entry.optionPtr);
if (option->GetImGuiDisabled())
if (option->GetChangesAreDisabled())
break;
option->SetBothValues(reader.Get(entry.section.data(), entry.key.data(), std::any_cast<bool>(entry.value)));
break;
+3 -3
View File
@@ -27,8 +27,8 @@ public:
bool value = false;
void SetImGuiDisabled(bool newValue) { imGuiDisabled = newValue; }
bool GetImGuiDisabled() const { return imGuiDisabled; }
void SetChangesAreDisabled(bool newValue) { changesAreDisabled = newValue; }
bool GetChangesAreDisabled() const { return changesAreDisabled; }
void Toggle() { previousValue = value; value = !value; }
void Set(bool newValue) { previousValue = value; value = newValue; }
void SetBothValues(bool newValue) { previousValue = newValue; value = newValue; }
@@ -39,7 +39,7 @@ public:
constexpr bool HasChanged() const { return previousValue != value; }
constexpr bool HasChangedTo(bool toValue) const { return previousValue != value && value == toValue; }
private:
bool imGuiDisabled = false;
bool changesAreDisabled = false;
bool previousValue = false;
};
class KeyBindOption : public Option {
+107 -49
View File
@@ -199,9 +199,13 @@ namespace GamePH {
Vector3 forwardVec{};
viewCam->GetForwardVector(&forwardVec);
const Vector3 normForwardVec = forwardVec.normalize();
Vector3 leftVec{};
viewCam->GetLeftVector(&leftVec);
const Vector3 normLeftVec = leftVec.normalize();
Vector3 newCamPos = *pos - normForwardVec * -Menu::Camera::tpDistanceBehindPlayer;
newCamPos.Y += Menu::Camera::tpHeightAbovePlayer - 1.5f;
newCamPos -= normLeftVec * Menu::Camera::tpHorizontalDistanceFromPlayer;
*pos = newCamPos;
@@ -458,17 +462,6 @@ namespace GamePH {
#pragma endregion
#pragma region CameraFPPDI
Vector3* CameraFPPDI::GetForwardVector(Vector3* outForwardVec) {
Vector3* (*pGetForwardVector)(LPVOID pCameraFPPDI, Vector3 * outForwardVec) = (decltype(pGetForwardVector))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetForwardVector@IBaseCamera@@QEBA?BVvec3@@XZ");
if (!pGetForwardVector)
return nullptr;
return pGetForwardVector(this, outForwardVec);
}
Vector3* CameraFPPDI::GetPosition(Vector3* posIN) {
return Memory::CallVT<181, Vector3*>(this, posIN);
}
/*CameraFPPDI* CameraFPPDI::Get() {
__try {
PDWORD64 pg_CameraFPPDI = Offsets::Get_g_CameraFPPDI();
@@ -487,16 +480,6 @@ namespace GamePH {
#pragma endregion
#pragma region FreeCamera
Vector3* FreeCamera::GetForwardVector(Vector3* outForwardVec) {
Vector3* (*pGetForwardVector)(LPVOID pFreeCamera, Vector3 * outForwardVec) = (decltype(pGetForwardVector))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetForwardVector@IBaseCamera@@QEBA?BVvec3@@XZ");
if (!pGetForwardVector)
return nullptr;
return pGetForwardVector(this, outForwardVec);
}
Vector3* FreeCamera::GetPosition(Vector3* posIN) {
return Memory::CallVT<181, Vector3*>(this, posIN);
}
void FreeCamera::AllowCameraMovement(int mode) {
Memory::CallVT<187>(this, mode);
}
@@ -546,18 +529,26 @@ namespace GamePH {
namespace TimeWeather {
#pragma region CSystem
void CSystem::SetForcedWeather(int weather) {
void(*pSetForcedWeather)(LPVOID timeWeatherSystem, int weather) = (decltype(pSetForcedWeather))Utils::GetProcAddr("engine_x64_rwdi.dll", "?SetForcedWeather@CSystem@TimeWeather@@QEAAXW4TYPE@EWeather@@VApiDebugAccess@2@@Z");
if (!pSetForcedWeather)
return;
__try {
void(*pSetForcedWeather)(LPVOID timeWeatherSystem, int weather) = (decltype(pSetForcedWeather))Utils::GetProcAddr("engine_x64_rwdi.dll", "?SetForcedWeather@CSystem@TimeWeather@@QEAAXW4TYPE@EWeather@@VApiDebugAccess@2@@Z");
if (!pSetForcedWeather)
return;
pSetForcedWeather(this, weather);
pSetForcedWeather(this, weather);
} __except (EXCEPTION_EXECUTE_HANDLER) {
return;
}
}
int CSystem::GetCurrentWeather() {
int(*pGetCurrentWeather)(LPVOID timeWeatherSystem) = (decltype(pGetCurrentWeather))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetCurrentWeather@CSystem@TimeWeather@@QEBA?AW4TYPE@EWeather@@XZ");
if (!pGetCurrentWeather)
return EWeather::TYPE::Default;
__try {
int(*pGetCurrentWeather)(LPVOID timeWeatherSystem) = (decltype(pGetCurrentWeather))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetCurrentWeather@CSystem@TimeWeather@@QEBA?AW4TYPE@EWeather@@XZ");
if (!pGetCurrentWeather)
return EWeather::TYPE::Default;
return pGetCurrentWeather(this);
return pGetCurrentWeather(this);
} __except (EXCEPTION_EXECUTE_HANDLER) {
return EWeather::TYPE::Default;
}
}
CSystem* CSystem::Get() {
@@ -581,11 +572,15 @@ namespace GamePH {
#pragma region LevelDI
bool LevelDI::IsLoading() {
bool(*pIsLoading)(LPVOID iLevel) = (decltype(pIsLoading))Utils::GetProcAddr("engine_x64_rwdi.dll", "?IsLoading@ILevel@@QEBA_NXZ");
if (!pIsLoading)
return true;
__try {
bool(*pIsLoading)(LPVOID iLevel) = (decltype(pIsLoading))Utils::GetProcAddr("engine_x64_rwdi.dll", "?IsLoading@ILevel@@QEBA_NXZ");
if (!pIsLoading)
return true;
return pIsLoading(this);
return pIsLoading(this);
} __except (EXCEPTION_EXECUTE_HANDLER) {
return true;
}
}
bool LevelDI::IsLoaded() {
static float loadDeltaTime = 0.0f;
@@ -601,11 +596,15 @@ namespace GamePH {
return false;
}
LPVOID LevelDI::GetViewCamera() {
LPVOID(*pGetViewCamera)(LPVOID iLevel) = (decltype(pGetViewCamera))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetViewCamera@ILevel@@QEBAPEAVIBaseCamera@@XZ");
if (!pGetViewCamera)
return nullptr;
__try {
LPVOID(*pGetViewCamera)(LPVOID iLevel) = (decltype(pGetViewCamera))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetViewCamera@ILevel@@QEBAPEAVIBaseCamera@@XZ");
if (!pGetViewCamera)
return nullptr;
return pGetViewCamera(this);
return pGetViewCamera(this);
} __except (EXCEPTION_EXECUTE_HANDLER) {
return nullptr;
}
}
float LevelDI::GetTimeDelta() {
return Memory::CallVT<176, float>(this);
@@ -617,18 +616,26 @@ namespace GamePH {
return Memory::CallVT<317, float>(this);
}
void LevelDI::ShowUIManager(bool enabled) {
void(*pShowUIManager)(LPVOID iLevel, bool enabled) = (decltype(pShowUIManager))Utils::GetProcAddr("engine_x64_rwdi.dll", "?ShowUIManager@ILevel@@QEAAX_N@Z");
if (!pShowUIManager)
return;
__try {
void(*pShowUIManager)(LPVOID iLevel, bool enabled) = (decltype(pShowUIManager))Utils::GetProcAddr("engine_x64_rwdi.dll", "?ShowUIManager@ILevel@@QEAAX_N@Z");
if (!pShowUIManager)
return;
pShowUIManager(this, enabled);
pShowUIManager(this, enabled);
} __except (EXCEPTION_EXECUTE_HANDLER) {
return;
}
}
TimeWeather::CSystem* LevelDI::GetTimeWeatherSystem() {
TimeWeather::CSystem*(*pGetTimeWeatherSystem)(LevelDI* iLevel) = (decltype(pGetTimeWeatherSystem))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetTimeWeatherSystem@ILevel@@QEBAPEAVCSystem@TimeWeather@@XZ");
if (!pGetTimeWeatherSystem)
return nullptr;
__try {
TimeWeather::CSystem*(*pGetTimeWeatherSystem)(LevelDI* iLevel) = (decltype(pGetTimeWeatherSystem))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetTimeWeatherSystem@ILevel@@QEBAPEAVCSystem@TimeWeather@@XZ");
if (!pGetTimeWeatherSystem)
return nullptr;
return pGetTimeWeatherSystem(this);
return pGetTimeWeatherSystem(this);
} __except (EXCEPTION_EXECUTE_HANDLER) {
return nullptr;
}
}
LevelDI* LevelDI::Get() {
@@ -725,11 +732,15 @@ namespace GamePH {
#pragma region GameDI_PH
float GameDI_PH::GetGameTimeDelta() {
float(*pGetGameTimeDelta)(LPVOID pGameDI_PH) = (decltype(pGetGameTimeDelta))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetGameTimeDelta@IGame@@QEBAMXZ");
if (!pGetGameTimeDelta)
return -1.0f;
__try {
float(*pGetGameTimeDelta)(LPVOID pGameDI_PH) = (decltype(pGetGameTimeDelta))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetGameTimeDelta@IGame@@QEBAMXZ");
if (!pGetGameTimeDelta)
return -1.0f;
return pGetGameTimeDelta(this);
return pGetGameTimeDelta(this);
} __except (EXCEPTION_EXECUTE_HANDLER) {
return -1.0f;
}
}
DWORD64 GameDI_PH::GetCurrentGameVersion() {
return Memory::CallVT<225, DWORD64>(this);
@@ -889,6 +900,53 @@ namespace Engine {
}
#pragma endregion
#pragma region CBaseCamera
Vector3* CBaseCamera::GetForwardVector(Vector3* outForwardVec) {
__try {
Vector3*(*pGetForwardVector)(LPVOID pCBaseCamera, Vector3* outForwardVec) = (decltype(pGetForwardVector))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetForwardVector@IBaseCamera@@QEBA?BVvec3@@XZ");
if (!pGetForwardVector)
return nullptr;
return pGetForwardVector(this, outForwardVec);
} __except (EXCEPTION_EXECUTE_HANDLER) {
return nullptr;
}
}
Vector3* CBaseCamera::GetUpVector(Vector3* outUpVec) {
__try {
Vector3*(*pGetUpVector)(LPVOID pCBaseCamera, Vector3* outUpVec) = (decltype(pGetUpVector))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetUpVector@IBaseCamera@@QEBA?BVvec3@@XZ");
if (!pGetUpVector)
return nullptr;
return pGetUpVector(this, outUpVec);
} __except (EXCEPTION_EXECUTE_HANDLER) {
return nullptr;
}
}
Vector3* CBaseCamera::GetLeftVector(Vector3* outLeftVec) {
__try {
Vector3*(*pGetLeftVector)(LPVOID pCBaseCamera, Vector3* outLeftVec) = (decltype(pGetLeftVector))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetLeftVector@IBaseCamera@@QEBA?BVvec3@@XZ");
if (!pGetLeftVector)
return nullptr;
return pGetLeftVector(this, outLeftVec);
} __except (EXCEPTION_EXECUTE_HANDLER) {
return nullptr;
}
}
Vector3* CBaseCamera::GetPosition(Vector3* outPos) {
__try {
Vector3*(*pGetPosition)(LPVOID pCBaseCamera, Vector3* outPos) = (decltype(pGetPosition))Utils::GetProcAddr("engine_x64_rwdi.dll", "?GetPosition@IBaseCamera@@UEBA?BVvec3@@XZ");
if (!pGetPosition)
return nullptr;
return pGetPosition(this, outPos);
} __except (EXCEPTION_EXECUTE_HANDLER) {
return nullptr;
}
}
#pragma endregion
#pragma region CBulletPhysicsCharacter
Vector3 CBulletPhysicsCharacter::posBeforeFreeze{};
+18 -22
View File
@@ -76,7 +76,21 @@ namespace EWeather {
// Forward decl
namespace Engine {
class CBaseCamera;
class CBaseCamera {
public:
union {
DEFINE_MEMBER_N(float, yaw, 0x48);
DEFINE_MEMBER_N(float, X, 0x4C);
DEFINE_MEMBER_N(float, pitch, 0x58);
DEFINE_MEMBER_N(float, Y, 0x5C);
DEFINE_MEMBER_N(float, Z, 0x6C);
};
Vector3* GetForwardVector(Vector3* outForwardVec);
Vector3* GetUpVector(Vector3* outUpVec);
Vector3* GetLeftVector(Vector3* outLeftVec);
Vector3* GetPosition(Vector3* outPos);
};
class CoPhysicsProperty;
class CRTTI;
@@ -164,21 +178,17 @@ namespace GamePH {
static PlayerHealthModule* Get();
};
class TPPCameraDI {
class TPPCameraDI : public Engine::CBaseCamera {
public:
static TPPCameraDI* Get();
};
class CameraFPPDI {
class CameraFPPDI : public Engine::CBaseCamera {
public:
union {
DEFINE_MEMBER_N(Engine::CBaseCamera*, pCBaseCamera, 0x38);
};
Vector3* GetForwardVector(Vector3* outForwardVec);
Vector3* GetUpVector(Vector3* outUpVec);
Vector3* GetPosition(Vector3* posIN);
//static CameraFPPDI* Get();
};
@@ -189,7 +199,7 @@ namespace GamePH {
};
};
class FreeCamera {
class FreeCamera : public Engine::CBaseCamera {
public:
union {
DEFINE_MEMBER_N(CoBaseCameraProxy*, pCoBaseCameraProxy, 0x18);
@@ -199,9 +209,6 @@ namespace GamePH {
DEFINE_MEMBER_N(float, speedMultiplier, 0x1CC);
};
Vector3* GetForwardVector(Vector3* outForwardVec);
Vector3* GetUpVector(Vector3* outUpVec);
Vector3* GetPosition(Vector3* posIN);
void AllowCameraMovement(int mode = 2);
static FreeCamera* Get();
@@ -355,17 +362,6 @@ namespace Engine {
static CInput* Get();
};
class CBaseCamera {
public:
union {
DEFINE_MEMBER_N(float, yaw, 0x48);
DEFINE_MEMBER_N(float, X, 0x4C);
DEFINE_MEMBER_N(float, pitch, 0x58);
DEFINE_MEMBER_N(float, Y, 0x5C);
DEFINE_MEMBER_N(float, Z, 0x6C);
};
};
class CBulletPhysicsCharacter {
public:
union {
+14 -6
View File
@@ -21,6 +21,7 @@ namespace Menu {
KeyBindOption tpUseTPPModel{ VK_F2 };
float tpDistanceBehindPlayer = 2.0f;
float tpHeightAbovePlayer = 1.35f;
float tpHorizontalDistanceFromPlayer = 0.0f;
Option disablePhotoModeLimits{};
Option disableSafezoneFOVReduction{};
@@ -84,7 +85,6 @@ namespace Menu {
freeCam.SetPrevValue(false);
}
}
static void UpdatePlayerVars() {
if (!GamePH::PlayerVariables::gotPlayerVars)
return;
@@ -97,41 +97,49 @@ namespace Menu {
GamePH::PlayerVariables::ChangePlayerVar("CameraDefaultFOVReduction", baseSafezoneFOVReduction);
}
}
static void UpdateDisabledOptions() {
GamePH::LevelDI* iLevel = GamePH::LevelDI::Get();
freeCam.SetChangesAreDisabled(!iLevel || !iLevel->IsLoaded() || photoMode.GetValue());
teleportPlayerToCamera.SetChangesAreDisabled(!iLevel || !iLevel->IsLoaded());
thirdPersonCamera.SetChangesAreDisabled(freeCam.GetValue() || photoMode.GetValue());
tpUseTPPModel.SetChangesAreDisabled(freeCam.GetValue() || photoMode.GetValue());
}
Tab Tab::instance{};
void Tab::Update() {
UpdateFOV();
FreeCamUpdate();
UpdatePlayerVars();
UpdateDisabledOptions();
}
void Tab::Render() {
GamePH::LevelDI* iLevel = GamePH::LevelDI::Get();
ImGui::SeparatorText("Free Camera");
ImGui::BeginDisabled(!iLevel || !iLevel->IsLoaded() || photoMode.GetValue(), &freeCam); {
ImGui::BeginDisabled(freeCam.GetChangesAreDisabled() || photoMode.GetValue()); {
ImGui::Checkbox("Enabled##FreeCam", &freeCam);
ImGui::EndDisabled();
}
ImGui::Hotkey("##FreeCamToggleKey", freeCam);
ImGui::SliderFloat("Speed##FreeCam", &freeCamSpeed, 0.0f, 100.0f);
ImGui::BeginDisabled(!iLevel || !iLevel->IsLoaded(), &teleportPlayerToCamera); {
ImGui::BeginDisabled(teleportPlayerToCamera.GetChangesAreDisabled()); {
ImGui::Checkbox("Teleport Player to Camera", &teleportPlayerToCamera);
ImGui::EndDisabled();
}
ImGui::Hotkey("##TeleportPlayerToCamToggleKey", teleportPlayerToCamera);
ImGui::SeparatorText("Third Person Camera");
ImGui::BeginDisabled(freeCam.GetValue() || photoMode.GetValue(), &thirdPersonCamera); {
ImGui::BeginDisabled(thirdPersonCamera.GetChangesAreDisabled()); {
ImGui::Checkbox("Enabled##ThirdPerson", &thirdPersonCamera);
ImGui::EndDisabled();
}
ImGui::Hotkey("##ThirdPersonToggleKey", thirdPersonCamera);
ImGui::BeginDisabled(freeCam.GetValue() || photoMode.GetValue(), &tpUseTPPModel); {
ImGui::BeginDisabled(tpUseTPPModel.GetChangesAreDisabled()); {
ImGui::Checkbox("Use Third Person Player (TPP) Model", &tpUseTPPModel);
ImGui::EndDisabled();
}
ImGui::Hotkey("##TPPModelToggleKey", tpUseTPPModel);
ImGui::SliderFloat("Distance behind player", &tpDistanceBehindPlayer, 1.0f, 10.0f);
ImGui::SliderFloat("Height above player", &tpHeightAbovePlayer, 1.0f, 3.0f);
ImGui::SliderFloat("Horizontal distance from player", &tpHorizontalDistanceFromPlayer, -2.0f, 2.0f);
ImGui::SeparatorText("Misc");
Engine::CVideoSettings* pCVideoSettings = Engine::CVideoSettings::Get();
@@ -16,6 +16,7 @@ namespace Menu {
extern KeyBindOption tpUseTPPModel;
extern float tpDistanceBehindPlayer;
extern float tpHeightAbovePlayer;
extern float tpHorizontalDistanceFromPlayer;
extern Option disablePhotoModeLimits;
extern Option disableSafezoneFOVReduction;
+16 -3
View File
@@ -8,23 +8,36 @@ namespace Menu {
namespace Misc {
KeyBindOption disableHUD{ VK_F8 };
static void UpdateDisabledOptions() {
GamePH::LevelDI* iLevel = GamePH::LevelDI::Get();
disableHUD.SetChangesAreDisabled(!iLevel || !iLevel->IsLoaded());
}
Tab Tab::instance{};
void Tab::Update() {
UpdateDisabledOptions();
GamePH::LevelDI* iLevel = GamePH::LevelDI::Get();
if (!iLevel)
return;
if (!iLevel->IsLoaded() && disableHUD.GetValue()) {
disableHUD.SetBothValues(false);
iLevel->ShowUIManager(true);
return;
}
if (disableHUD.HasChanged()) {
disableHUD.SetPrevValue(disableHUD.GetValue());
iLevel->ShowUIManager(!disableHUD.GetValue());
}
}
void Tab::Render() {
GamePH::LevelDI* iLevel = GamePH::LevelDI::Get();
ImGui::SeparatorText("Misc##Misc");
ImGui::BeginDisabled(!iLevel->IsLoaded(), &disableHUD); {
ImGui::BeginDisabled(disableHUD.GetChangesAreDisabled()); {
ImGui::Checkbox("Disable HUD", &disableHUD);
ImGui::Hotkey("##GodModeToggleKey", disableHUD);
ImGui::Hotkey("##DisableHUDToggleKey", disableHUD);
ImGui::EndDisabled();
}
}
+6 -2
View File
@@ -6037,7 +6037,7 @@ namespace Menu {
if (lastQuotePos == std::string::npos)
return {};
return str.substr(firstQuotePos + 1, lastQuotePos - firstQuotePos - 1);
return str.substr(thirdQuotePos + 1, lastQuotePos - thirdQuotePos - 1);
}
static void replaceParamValue(std::string& str, const std::string& newValue) {
const std::string value = getParamValue(str);
@@ -6236,12 +6236,16 @@ namespace Menu {
playerHealth = playerHealthModule->health;
}
static void UpdateDisabledOptions() {
freezePlayer.SetChangesAreDisabled(!Engine::CBulletPhysicsCharacter::Get());
}
Tab Tab::instance{};
void Tab::Update() {
PlayerPositionUpdate();
PlayerVarsUpdate();
PlayerHealthUpdate();
UpdateDisabledOptions();
}
void Tab::Render() {
ImGui::SeparatorText("Misc");
@@ -6256,7 +6260,7 @@ namespace Menu {
ImGui::Checkbox("God Mode", &godMode);
ImGui::Hotkey("##GodModeToggleKey", godMode);
ImGui::SameLine();
ImGui::BeginDisabled(!Engine::CBulletPhysicsCharacter::Get(), &freezePlayer); {
ImGui::BeginDisabled(freezePlayer.GetChangesAreDisabled()); {
ImGui::Checkbox("Freeze Player", &freezePlayer);
ImGui::EndDisabled();
}
@@ -8,6 +8,7 @@ DisableSafezoneFOVReduction=1
DistanceBehindPlayer=2
Enabled=0
HeightAbovePlayer=1.35
HorizontalDistanceFromPlayer=0
UseTPPModel=1
[Menu]
Transparency=99
+6 -6
View File
@@ -20,7 +20,7 @@
<b>WORLD</b><br>
- Time slider<br>
- Weather control<br><br>
<b>Check <a href="https://trello.com/b/oRaJQEOi/egametools-dying-light-2">EGameTools' Trello</a> page to see what features or bug fixes I'm working on/planning to add!</b><br>
<b>Check the mod's <a href="https://trello.com/b/oRaJQEOi/egametools-dying-light-2">Trello</a> page to see what features or bug fixes I'm working on/planning to add!</b><br>
<img src="https://i.imgur.com/kOyrZYC.png"/><br>
<b>STEP 1: </b>Download the archive from the <a href="https://github.com/EricPlayZ/EGameTools/releases">Releases</a> section<br>
<b>STEP 2: </b>Extract the files from inside the archive to the game's exe folder (<b>Dying Light 2\ph\work\bin\x64</b>).<br><br>
@@ -29,15 +29,15 @@ To uninstall, delete <b>winmm.dll</b>, <b>EGameTools.asi</b> and <b>EGameTools.i
When you launch the game, a console window will appear. When it does, <b>DON'T CLOSE IT!</b> Closing it will also close the game.<br><br>
To toggle the mod menu, in-game press <b>F5</b> on your keyboard. The same key will open and close the menu.<br>
You can use your mouse to navigate the menu.<br><br>
A config file <b>EGameTools.ini</b> is stored in the same folder as the mod file. There's a value called <b>ToggleKey</b> where <b>VK_F5</b> is specified.<br>
This is the key for toggling the mod menu.<br>
To change it through the config file, visit <a href="https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes">this link from Microsoft</a> which contains all virtual key codes. Simply write the name of the keycode you want to use and save the config file.<br><br>
The menu includes hotkeys for each option which can be changed through the mod menu by clicking on the hotkey button and then pressing a key on your keyboard.<br><br>
To change the number of a slider value manually, press <b>Ctrl + Left Mouse Button</b> on the slider.<br><br>
A config file <b>EGameTools.ini</b> is stored in the same folder as the mod file which stores the mod menu's options.<br>
The menu includes hotkeys for each option which can be changed through the mod menu by clicking on the hotkey button and then pressing a key on your keyboard.<br>
To change them through the config file, visit <a href="https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes">this link from Microsoft</a> which contains all virtual key codes. Simply write the name of the keycode you want to use for each hotkey and save the config file.<br><br>
Changes to the mod menu or to the config file are always automatically saved or refreshed respectively.<br>
You <b>DO NOT NEED</b> to restart the game for changes in the config to be applied!<br>
If you want to regenerate the config file, delete it and it will automatically be regenerated.<br>
<img src="https://i.imgur.com/m0X9akl.png"/><br>
<b>Check <a href="https://trello.com/b/oRaJQEOi/egametools-dying-light-2">EGameTools' Trello</a> page to see what features or bug fixes I'm working on/planning to add.</b><br><br>
<b>Check the mod's <a href="https://trello.com/b/oRaJQEOi/egametools-dying-light-2">Trello</a> page to see what features or bug fixes I'm working on/planning to add.</b><br><br>
<b>DO NOT</b> use the discussions tab for bug reports.<br>
If there is a bug you're encountering, open a bug report, otherwise please refrain from using the discussions tab unless you need help or want to request additional features!<br><br>
Currently, this mod has been designed with <b>singleplayer</b> in mind. That means certain features might glitch out or completely stop working in <b>multiplayer</b>.<br>