Oktokolo Posted June 26, 2022 Report Share Posted June 26, 2022 10 hours ago, Obsttorte said: @OktokoloWhat would be the point then? You have two key to control speed now and you would have two keys to control speed then. The only addition might be to allow players to turn those keys into toggles. The difference would be the additional speeds between the three currently available speeds - still controlled by only two remappable keys. Quote Link to comment Share on other sites More sharing options...
Obsttorte Posted June 26, 2022 Report Share Posted June 26, 2022 30 minutes ago, Oktokolo said: The difference would be the additional speeds between the three currently available speeds - still controlled by only two remappable keys. But there are none. Currently the script only allows switching between the three different speeds via mouse wheel, it doesn't add any new functionality. And afaik noise propagation is tied to this trinary system, so you can't simple change to a system with more than three speeds without having to alter sound related files, too. 1 Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter Link to comment Share on other sites More sharing options...
AluminumHaste Posted June 26, 2022 Report Share Posted June 26, 2022 You can alter the volume at which the sound plays though, which would be good enough. Quote I always assumed I'd taste like boot leather. Link to comment Share on other sites More sharing options...
Obsttorte Posted June 26, 2022 Report Share Posted June 26, 2022 15 minutes ago, AluminumHaste said: You can alter the volume at which the sound plays though, which would be good enough. Currently the game propagates one of six sounds per surface, depending on whether the player is crouched and at which of the three speeds he is moving. As far as I can see this is controlled by the SDK. So there is no straight forward way to alter the noise the player makes. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild Mapping and Scripting: Apples and Peaches Sculptris Models and Tutorials: Obsttortes Models My wiki articles: Obstipedia Texture Blending in DR: DR ASE Blend Exporter Link to comment Share on other sites More sharing options...
snatcher Posted July 10, 2022 Author Report Share Posted July 10, 2022 (edited) Here is version 6 of the script. What's new in v6? 1) Mouse wheel sensitivity (number of steps up or down) is no longer a thing. Just move the mouse wheel up one or more steps in a row to accelerate. Move the mouse wheel down one or more steps in a row to decelerate. 2) You can again navigate the inventory, turn pages, numbered dials and move objects you are holding back and forth by using Parry/Manipulate plus the mouse wheel. Please pay attention to the configuration. ------------------------------------ If anyone wants to put this to test, follow below instructions (please note it takes some time to get used to it): Installation and execution: Download AutoHotkey, install it, open Notepad, paste the below script inside, save it as TDM.ahk and double click on the file you just saved. The script will run in the background. To end the script, go to the Windows taskbar, look for a green icon with an "H", right click on it and select Exit. Configuration: Settings > Controls > Weapons: Remove mouse wheel bindings from Next Weapon and Previous Weapon (or from any other setting you may have set the mouse wheel to) Settings > Controls > General: Make sure Toggle Crouch is enabled and Always Run is disabled Settings > Controls > Movement: The Forward, Backwards, Left, Right, Run and Creep keys must match in both TDM and the script. Settings > Controls > Actions: The Parry/Manipulate key must match in both TDM and the script. Settings > Controls > Inventory: The Next Inv. Item and Prev Inv. Item must match in both TDM and the script. Known limitations and workarounds: You can move through the inventory, turn pages, numbered dials and move objects you are holding back and forth using Next Inv. Item / Prev Inv. Item or Parry/Manipulate plus the mouse wheel. To prepare for a long jump from idle, move the mouse wheel up before executing your move. Remember the script will switch you automatically from running to walking after one second of inactivity. You cannot lean forward and switch speeds at the same time, for some reason... ; ===================================== ; Adjust player speed with mouse wheel ; ------------------------------------- ; An AutoHotkey script for The Dark Mod ; version 6.0 by Obsttorte & snatcher ; ===================================== ; ------------------------------------- ; Configure your keys below ; ------------------------------------- ; In-game movement keys key_left = a key_right = d key_forward = w key_backward = s ; In-game creep key key_creep = c ; In-game run key key_run = r ; In-game manipulate key (recommended right mouse button: RButton) key_manipulate = RButton ; In-game Next/Prev inventory keys key_next = Right key_prev = Left ; ------------------------------------- ; Do not edit anything past this point ; ------------------------------------- delay = 1000 ; delay in miliseconds between running > walking [default = 1000] speed = 0 ; init speed (-1 = creep | 0 = walk [default] | 1 = run) state = speed; counter for state switch #IfWinActive ahk_exe TheDarkModx64.exe ; run only when TDM is focused HotKey, *~%key_forward% up, keyForwardHandler return keyForwardHandler: if (speed == 1) ; we are running { sleep, delay if (!GetKeyState(key_forward) && !GetKeyState(key_backward) && !GetKeyState(key_right) && !GetKeyState(key_left)) { speed = 0 ; walk Send {%key_run% up} } } return *wheelup:: if (GetKeyState(key_manipulate)) { Send {%key_next%} } else { state += 1 if (speed == -1) ; we are creeping { speed = 0 ; walk Send {%key_creep% up} } else if (speed == 0) ; we are walking { speed = 1 ; run Send {%key_run% down} } state = 0 Sleep, 300 } return *wheeldown:: if (GetKeyState(key_manipulate)) { Send {%key_prev%} } else { state -= 1 if (speed == 0) ; we are walking { speed = -1 ; creep Send {%key_creep% down} } else if (speed == 1) ; we are running { speed = 0 ; walk Send {%key_run% up} } state = 0 Sleep, 300 } return Change-log: v6: You can now use as many mouse wheel steps as you like to switch speeds. You can navigate the inventory, turn pages, numbered dials and move objects you are holding back and forth by using Parry/Manipulate plus the mouse wheel. v5: To prevents sudden halts when running, a one-second delay has been added between the moment the player stops going forward and the script takes you automatically back to walking mode. To allow for a greater freedom of movement, the script requires to know now your backwards, right and left keys. v4: Altered so that when player is running and stops, you are back to walking mode. v3: The script only runs when TDM is in focus (tested in Win 10) v2: Second version by Obsttorte v1: First version by Obsttorte Cheers! Edited July 10, 2022 by snatcher Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.