Feature request: run/walk toggle

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
l0b0
Posts: 5
Joined: Sat Nov 09, 2024 9:58 am

Feature request: run/walk toggle

Post by l0b0 »

Autorun is not ideal for exploring dungeons and smaller interiors; I'd have to toggle it any time I want to stop and look at something, or to deal with platforming. Would it be possible to have a toggle so that pressing "W" results either in walking or running?

https://github.com/Interkarma/daggerfal ... -517982518 says it was implemented, but I can't find a setting to toggle run/walk, so I assume there was a misunderstanding.

Tkia
Posts: 23
Joined: Thu Dec 10, 2020 10:31 pm

Re: Feature request: run/walk toggle

Post by Tkia »

It's in there, I think the default key is Caps Lock but I could be wrong as I've remapped some things. Check your control settings.

User avatar
Jay_H
Posts: 4116
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Feature request: run/walk toggle

Post by Jay_H »

On my machine, Period activates autorun, and then Left Shift toggles it between running and walking speed. I know I've changed at least one of those binds so you'll have to look at your own configuration, but toggling is definitely in the game.

l0b0
Posts: 5
Joined: Sat Nov 09, 2024 9:58 am

Re: Feature request: run/walk toggle

Post by l0b0 »

Tkia wrote: Sat Nov 09, 2024 5:34 pm It's in there, I think the default key is Caps Lock but I could be wrong as I've remapped some things. Check your control settings.
Jay_H wrote: Sat Nov 09, 2024 6:47 pm On my machine, Period activates autorun, and then Left Shift toggles it between running and walking speed. I know I've changed at least one of those binds so you'll have to look at your own configuration, but toggling is definitely in the game.
This is my entire KeyBinds.txt (I've remapped a bit since I use a Dvorak layout):

Code: Select all

{
    "actionKeyBinds": {
        "A": "MoveLeft",
        "B": "TravelMap",
        "BackQuote": "ToggleConsole",
        "Backspace": "CastSpell",
        "C": "Status",
        "Comma": "MoveForwards",
        "D": "SwitchHand",
        "Delete": "LookDown",
        "E": "MoveRight",
        "Escape": "Escape",
        "F1": "StealMode",
        "F11": "QuickLoad",
        "F2": "GrabMode",
        "F3": "InfoMode",
        "F4": "TalkMode",
        "F5": "CharacterSheet",
        "F6": "Inventory",
        "F8": "PrintScreen",
        "F9": "QuickSave",
        "G": "UseMagicItem",
        "Home": "CenterView",
        "Insert": "LookUp",
        "J": "Crouch",
        "LeftAlt": "Sneak",
        "LeftArrow": "TurnLeft",
        "LeftControl": "Slide",
        "LeftShift": "Run",
        "M": "AutoMap",
        "Mouse0": "ActivateCenterObject",
        "Mouse1": "SwingWeapon",
        "Mouse2": "AutoRun",
        "N": "LogBook",
        "O": "MoveBackwards",
        "P": "Rest",
        "PageDown": "FloatDown",
        "PageUp": "FloatUp",
        "Period": "AbortSpell",
        "Quote": "RecastSpell",
        "Return": "ActivateCursor",
        "RightArrow": "TurnRight",
        "Semicolon": "ReadyWeapon",
        "Space": "Jump",
        "T": "NoteBook",
        "Y": "Transport"
    },
    "secondaryActionKeyBinds": {

    },
    "axisActionKeyBinds": {
        "Axis1": "MovementHorizontal",
        "Axis2": "MovementVertical",
        "Axis4": "CameraHorizontal",
        "Axis5": "CameraVertical"
    },
    "axisActionInversions": {
        "CameraHorizontal": "False",
        "CameraVertical": "False",
        "MovementHorizontal": "False",
        "MovementVertical": "False"
    },
    "joystickUIKeyBinds": {
        "JoystickButton0": "LeftClick",
        "JoystickButton1": "Back",
        "JoystickButton2": "MiddleClick",
        "JoystickButton3": "RightClick"
    },
    "removedPrimaryActions": [],
    "$version": "v1"
}
So middle mouse button toggles autorun, and Shift enables running while held down. None of these toggle running. If your client has a run toggle, could you please post the relevant configuration?

Update: Looking at the source code, there does seem to be functionality around this. Investigating…

Update 2: Looks like the functionality is there, but not in my client. There's no UI for toggling running next to "toggle sneak", if I add

Code: Select all

ToggleRun = True
to settings.ini it gets removed when I run the client, and pressing Caps Lock does nothing. I'm not a Unity or C# expert, so maybe I should file this as a bug?

User avatar
pango
Posts: 3463
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Feature request: run/walk toggle

Post by pango »

It works exactly as Jay_H described, you first toggle AutoRun (Mouse2 in your setup)

Code: Select all

        "Mouse2": "AutoRun",
then while it's on, to switch between auto walking and auto running you tap on your standard Running key (left shift in your setup)

Code: Select all

        "LeftShift": "Run",
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

l0b0
Posts: 5
Joined: Sat Nov 09, 2024 9:58 am

Re: Feature request: run/walk toggle

Post by l0b0 »

pango wrote: Sun Nov 10, 2024 9:14 am It works exactly as Jay_H described, you first toggle AutoRun (Mouse2 in your setup)

Code: Select all

        "Mouse2": "AutoRun",
then while it's on, to switch between auto walking and auto running you tap on your standard Running key (left shift in your setup)

Code: Select all

        "LeftShift": "Run",
Sorry, I'm not explaining this properly. When you press "w" the character walks forward. I want to be able to toggle so that pressing "w" causes the character to run forward, rather than having to hold down Shift (awkward after half an hour or so) or using autorun (bad for short bursts of speed, like in small rooms).

User avatar
pango
Posts: 3463
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Feature request: run/walk toggle

Post by pango »

Ah, I understand now. Well, I'm really not sure what that code does, way to convoluted.
I think that PlayerSpeedChanger.ToggleRun is what changes how you control the runningMode/isRunning flags, and it's set from the value of InputManager.Instance.ToggleAutorun each time you press the AutoRun key.
So from the look of it, it cannot be enabled outside of auto running.

Maybe jefetienne, the last one that worked on this code, remembers how it works?

P.S. I'm not sure how it could work otherwise, short of having either another key or an additional "RunByDefault" ("ForrestGumpMode"?) setting that would reverse the role of the Run key?
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Post Reply