ch4nkyy / bg3wasd Goto Github PK
View Code? Open in Web Editor NEWWASD Character Movement Mod for Baldur's Gate 3
License: MIT License
WASD Character Movement Mod for Baldur's Gate 3
License: MIT License
Mouselook is already improved. A full mouselook toggle would be cool. I am already very far, but it still has some annoying edge cases that ruin the experience.
Cherry on top: "Inverse Toggle"
When in full mouselook mode, holding Rotate should display the cursor while held.
Is a complete own task though.
This issue is only relevant for users that bind Camera Rotate and Cancel Action on the same key. (Usually Rightclick.)
When you select a spell category, e.g. Level 1 Spells Slots, then clicking right will not rotate the camera anymore, but go back from the category UI. This feels pretty annoying.
Can we shift the priority? And does that work? Like is there still a good way to cancel the category then? Does it affect people who don't bind these 2 on the same key?
I prefer vanilla in combat, so it has low prio for me.
I have no clue how much effort it would be. If it is just 1 if check, we could enable it.
Edit:
I think it is a huge disadvantage though, because you don't know how far you can move.
For now, I would decline the request.
When you auto-move and then interact with something, e.g. looting a corpse, the loot dialog will open, when you reach the corpse, but you will not stop and the loot dialog will automatically close.
Requested by a user:
Make edge panning possible during character movement. This is already a challenge, because the game locks edge panning until you press a camera key.
The user wants to pan the camera ONLY with edge panning and with wasd ONLY move the character.
I get the idea, but it certainly isn't for everyone... And requires a lot of work.
Been playing bg3 with the native camera tweaks as well as this mod on Keyboard and mouse, but want to also play couch at points. When doing so the controller input whilst using this mod breaks, causing the left analogue stick to be inverted vertically. I have tested with no other mods and just this one and the same issue occurs.
Create base classes for hooks. Bundle hooks into features. Hooks should be usable by multiple features. Improve names.
Also, use https://github.com/kweatherman/sigmakerex for signatures.
Also, make inputconfig parsing more safe vs crashes and make try/catches more fine granular.
Add a config option so that only double pressing the key will jump to the character. Single presses will only be select.
It is useless and annoying that the controlled character has a hitbox that blocks click traces....
Would be cool if we could get rid of it.
Would also allow a control scheme like Elder Scrolls Online, where the cursor is centered, full mouse look and you can click to interact.
It sucks that people have to check/overwrite the toml file every release, especially on Vortex, where you cannot even control it.
We could generate the config, if the user has none, but the toml library does not support comments and comments are important!
We need to find a solution for this. Maybe hack the comments in afterwards with stupid string manipulation of the toml file?
Without the AHK script, if you bind Camera Rotation to Right Click, you deal with 2 annoying things:
-When you press the Right Mouse Button, you will immediately trigger an Action Cancel and the WASD movement will look janky.
-When you release the Right Mouse Button, you will open the context menu if you hover over some interactable, even if you were rotating for 3 seconds, which is very disrupting.
I want these fixes in the DLL! But it takes a lot more effort than with AHK.
The following is only relevant if you bound Camera Rotate, Context Menu and Cancel Action to the same key.
Personally, I bound them to Rightclick, hence the naming.
When you stop moving to open the Context Menu on some world object, the first keypress often does not work.
This is because the Character is still technically moving while it is playing the stopping animation and then Cancel Action eats the input and Context Menu is not called.
Context Menu should have priority there for a smoother experience.
The problem is: If Context Menu has priority over Cancel Action, you cannot stop accidental Leftclick moves, while the cursor is hovering over an interactable context. Because then you will not stop, but open the Context Menu. This will be awkward.
So I'd say I should only fix this after I managed to let WASD cancel Leftclick moves, so we have an easy and relaible way to cancel leftclick moves and not needing Cancel Action.
Otherwise Ping (Alt+Rightclick by default?) will collide and everything bugs.
After the update to Patch 2 (version 4.1.1.3686210) which was released today, the game immediately crashes upon pressing any button.
If we had this, disabling leftclick move wouldn't even be so necessary.
The recent hotfix for Baldur’s Gate 3 made the mod stop working again :(
could we get another update please?
Currently, only keyboard keys can be used as ModHotkeys.
Add Mouse Hook, so Mouse keys are also possible!
As BG3 Patch #6 has just released, the mod is not working any longer.
Can we get an update?
I want the option to toggle between mouse cursor and full mouse look!
In full mouse look the cursor should be hidden.
The toggle part is easy.
The problem is that the game doesn't center the cursor during rotation.
When the cursor hits the screen border it will stop rotating.
To properly do that, we would need to set SDL_SetRelativeMouseMode(True) when the RotateKey is pressed and SDL_SetRelativeMouseMode(False) when it is released. Not the physical key, but the logical command. That location is not easy to find...
Also, the game does not import this function from SDL2 according to IDA. So I am not sure how to call it.
Edit: I think I found an alternative to SDL_SetRelativeMouseMode in the comments of this thread:
https://stackoverflow.com/questions/10492143/sdl2-mouse-grab-is-not-working
Common in MMOs and Dragon Age.
In character move mode, the LeftClick/Interact move is pretty annoying. Maybe we can get rid of it. But looting must still work.
Should be a config option of course.
Also, when sneaking, the mouse cursor trace could be removed.
Edit: If WASD would cancel clickmoves, then disabling leftclick would not even be necessary.
#26
Will make it more comfortable to start.
Instead of reading keynames from the toml and writing them into the inputconfig, we can just read the inputconfig and copy the keyname from CameraLeft to CharacterMoveLeft. This way it can be bound ingame instead of editing the toml.
Add option so that Left/Right rotates the Camera during Character movement mode instead of moving the Character.
During Camera mode, it should still move the Camera like before, not rotate it.
Almost all code to achieve this is implemented.
You can find it by searching for "TODO character_leftright_is_rotate".
The problem is that in the game, Camera Left/Right eats the input and does not forward it to Camera Rotate Left/Right. This still needs to be fixed.
Hm also there is a problem if you hotreload the toml. It won't update the controls correctly.
Not high prio, but I noted the wish down :)
I think this should be possible.
Instead of mapping the keypress to FULL POWER, we somehow have to map it to a value that represents like a half-pushed stick, see SDL2 documentation.
And well, it must be toggleable.
Would it be possible to add a SprintSpeed
option under the Movement
section in the .toml
config file?
I'm on my second playthrough and jogging around everywhere is getting a bit tedious. The only option I've had is running a speedhack through a trainer, but that cuts dialogue lines short, so I have to enable and disable it a lot.
Maybe we can hook the ingame message popups to display errors and warnings
Hello,
i was trying to build your mod, but got errors despite following your instructions. CMake wants tomlplusplusConfig.cmake.
Here are last lines of output with error:
-- Searching for DKUtil using file include/DKUtil/Logger.hpp
-- Found DKUtil in D:/Soft/BG3WASD/extern/DKUtil; adding
CMake Error at C:/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
Could not find a package configuration file provided by "tomlplusplus" with
any of the following names:
tomlplusplusConfig.cmake
tomlplusplus-config.cmake
Add the installation prefix of "tomlplusplus" to CMAKE_PREFIX_PATH or set
"tomlplusplus_DIR" to a directory containing one of the above files. If
"tomlplusplus" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
extern/DKUtil/CMakeLists.txt:34 (find_package)
Could you help me resolve the issue?
[11/03/23 17:50:11]info Logger init - BG3WASD 10801
[11/03/23 17:50:11]info bg3.exe Version: 4.39.5.231
[11/03/23 17:50:11]info C:\Program Files (x86)\Steam\steamapps\common\Baldurs Gate 3\bin\NativeMods\BG3WASD.dll Version: 1.8.1.0
[11/03/23 17:50:11]info Config loaded successfully.
[11/03/23 17:50:11]warning WASD unlock not found!
[11/03/23 17:50:11]warning GetCameraObjectHook #0 not found
[11/03/23 17:50:11]warning GetInputValueHook #1 not found
[11/03/23 17:50:11]warning GetInputValueHook #2 not found
[11/03/23 17:50:11]warning GetInputValueHook #3 not found
[11/03/23 17:50:11]warning LoadInputConfig not found.
[11/03/23 17:50:11]warning AfterInitialLoadInputConfigHook #0 not found
[11/03/23 17:50:11]warning Character movement could not be enabled at all! Mod will be inactive.
Your game version is not completely compatible with the mod version!
For non-devs going to app data and editing a json might be too much.
On the flipside, then we would need to introduce a new config file if we don't want to hardcode the controls to wasd...
Maybe just keep it?.. Or make it some kind of wizard that asks for keys?
Simple request to allow Shift Click to still trigger movement when BlockInteractMove
is set to true
.
Currently, interact moves can be cancelled with WASD.
However, commands like jump or attack cannot be cancelled this way. Here, Cancel Action has to be pressed explicitly.
I guess because the game stops listening to WASD, when these commands are issued.
We should add a fix for this.
Hi, please bear with me if this is not the place to ask questions are request features - I'm not too familiar with github.
I'm wondering if it is possible to have this mod an MacOS. Can you make it happen?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.