[MOD] A few keybind and script tricks, looking for insight

+
[MOD] A few keybind and script tricks, looking for insight

Hey, I just started playing the Witcher 3, and I was trying to get used to a keyboard + mouse setup I like. I found a few neat tricks you can do with the keybind file. You can separate the binds for in-combat from out of combat, so now I've got shift triggering dodge while in combat, but still acting as sprint/canter while exploring. Also the map key now binds to "R" when out of combat, overtaking the quick potion slot, but still binds to quick potion in combat. I've also been using 'C' to quick-cast Quen, but default back to Aard so I can easily slip it in before and during combat. In general you could add quick-cast onto all the number shortcut keys if you wanted, I might try that too. I could upload the keybind file, but that seems unnecessary. A simple example is here:

IK_C=(Action=SelectQuen)
IK_C=(Action=CastSign,State=Duration,IdleTime=0.1)
IK_C=(Action=SelectAard,State=Duration,IdleTime=0.2)

A 0.1 delay is fast enough that it triggers from a tap of the key, but with 0.2 you do have to hold it a little longer to get the 'select aard' to register. I also figured out how to enable saving during combat with fists and mobs, if anyone cares for that. In r4Player.ws, under the event OnCombatStart(), just comment out (//) the line "theGame.CreateNoSaveLock( 'combat', noSaveLock );".

I wanted some advice though, if anyone had it. One of the new keybinds I put in was to bind HeavyAttack to RightMouse in addition to the default LockAndGuard. I found in regular combat, it doesn't conflict with LockAndGuard at all. You can parry & riposte fine, but you don't have to remember to hit the alternate key when you want to use a heavy attack with an open opportunity. I find already it makes me want to use HeavyAttack a lot more, as previously I pretty much ignored it. The problem though is that it's not so seamless with fist fighting combat for some reason. With fist fighting, it always triggers the HeavyAttack and makes parry and riposte almost impossible. I've been digging through the scripts trying to see if I can mess with this at all but so far I can't see anything. My plan was originally to see if I could link fist fighting to a new category of input keys (seperate from [combat] or [diving] etc.) but I can't see a way to easily do that in the scripts. I was also thinking maybe there were some other "state" options I could play around with, or maybe it's something to do with how action priority differs between the fists and sword combat scripts. I don't know a whole lot, I've been making this up as I go along. Anyone know a way to make the HeavyAttack bind to RightMouse as seamless with fist fighting as it is with sword combat? Actually as I'm typing this I realized I might as well just assign LAlt (currently walk toggle) to LockAndGuard in combat only to use specifically in fist fights. Still, I'd be up for a more seamless solution. I like using RightMouse to block and riposte AND heavy quite a bit now. Anyways, please let me know if you have any ideas.
 
Last edited:
There is a function where you set the context. (don't recall now and never tried to use it)

Maybe setting with scripts to the Custom Context and setting a [CustomContext] and respective actions to the input.settings works.
 
Thanks for the reply. Honestly, the heavy attack and dodge rebinds are enough of a game changer to me that I think it's worth exploring. I found "default combatFistsInputContext=" under playerWitcher.ws a while ago, but changing it doesn't appear to do anything. Incidentally, obfuscating the [Combat] heading in input.settings does totally mess up the combat controls in game so SOMETHING is calling those headings directly, I just don't know what they are. Looking through the scripts I think that fist fighting and sword combat are just coded together with 'if' statements, and refer understandably to the single input context.

The main obstacle just seems to be: During sword combat, heavy attack triggers on a rapid release, but during fist fighting it triggers immediately on press. But now that I'm looking back through playerInput.ws, I'm going to try messing with this line of code:

if ( IsActionAllowed(EIAB_Parry) )
{
if( IsReleased(action) && thePlayer.GetCurrentStateName() == 'CombatFists' )
thePlayer.OnGuardedReleased();

if( IsPressed(action) )
{
thePlayer.AddCounterTimeStamp(theGame.GetEngineTime()); //cache counter button press to further check counter button spamming by the thePlayer
thePlayer.SetGuarded(true);
thePlayer.OnPerformGuard();
}
else if( IsReleased(action) )
{
thePlayer.SetGuarded(false);

And see how it goes. Maybe switching around perform and release commands does the trick. Thanks again.



Figured it out. Thanks for the inspiration to head back in. Found in "playerInput.ws" that heavy attacks were coded differently for fists vs. swords. With swords, it was triggered on a <0.2 gap between press and release. With fists, it was just triggered immediately on press. I just removed the specification for "fists" so it treats all heavy attacks the same. I wonder what the reason was for it in the first place. Also, there was an "OnExpFistFightHeavy" event that seemed redundant so I just removed it entirely.

Now guard, riposte, light and heavy are all performed just with the mouse buttons, with shift to dodge. Feels a lot more intuitive this way.
 
Last edited:
Top Bottom