So, The idea was pretty much to make a mod that did the cardinal car controls. However, getting the WASD keys isn't directly possible. I tried several ideas, and have a few more, but actually doing some of them is beyond me,
Capture "walking.direction" - only works with character, not when in vehicle.
Capture "player.riding_state" - Works, but I have to set this to alter Car behavior, which causes it to not work. - Current file displays this.
Hotkeys - Only registers keypressed, not holds or releases.
Options that might work.
- Override car behavior entirely. Not actually sure if there is a way to set the acceleration/turning without overriding controls. Might be able to do an on-tick manually cancel out movement (or set acceleration/turning to 0 or infinitesimal) and manually set the location of the car each tick. But I dont actually know how the car has to behave precisely, and those kinds of things tend to hog update cycles.
- Dummy player. Somehow add a dummy player/car that the player controls, rather than the actual vehicle, which can "Move" enough for the direction/riding_state to be set, captured, and not overridden by the car's instructions. Also probably needs to handle 2 players in a car and weapon control and inventory crap and so on, but might be possible.
-Capture Actual keypresses/holds/releases. Can't, API denied, for latency/performance reasons. Wish I could register as hotkeys anways.
Any other ideas, or ideas on how I might get one of the two ideas to work? Or am I missing something obvious?
Trying to intercept/get wasd input, for alternate car controls.
- Ranakastrasz
- Smart Inserter
- Posts: 2165
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Trying to intercept/get wasd input, for alternate car controls.
- Attachments
-
- VehicleTurn_1.0.0.zip
- (48.12 KiB) Downloaded 12 times
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Trying to intercept/get wasd input, for alternate car controls.
https://mods.factorio.com/mod/DMV_Direc ... t_Vehicles uses spidertrons.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- Ranakastrasz
- Smart Inserter
- Posts: 2165
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Trying to intercept/get wasd input, for alternate car controls.
Yea. However, it also has no collisions, different movement, no turn radius, and weird graphics (bouncy, preemptive turning as a side effect)
Might have collision, but no collision damage would have to check on that part.
Edit:
The idea was to got as close as physically possible to purely altering the control scheme, while leaving literally everything else untouched. So turn radius, collision, acceleration, appearance.
Might have collision, but no collision damage would have to check on that part.
Edit:
The idea was to got as close as physically possible to purely altering the control scheme, while leaving literally everything else untouched. So turn radius, collision, acceleration, appearance.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: Trying to intercept/get wasd input, for alternate car controls.
You don't want to just look at wasd. Many of us use the arrow keys.
- Ranakastrasz
- Smart Inserter
- Posts: 2165
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: Trying to intercept/get wasd input, for alternate car controls.
Arrow or WASD. Doesn't matter. I just want to be able to change car controls to polar controls. Ideally it would work with wasd and arrow keys, just the same.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16