kurrycat2004/MPKMod_2

Timings "do not work properly"

Opened this issue · 6 comments

srockw commented

HH, BWHH, FMM and Pessi do not work when using strafe keys (for hh and bwhh) and key combinations, like W+D, W+A, S+A, S+D.

I would try adding this myself, but I simply cannot comprehend the strats.json file, would be nice to have an explanation of it somewhere...

I took a look at the parsing of the file. It seems that timing entries are just conditions (you may want to look at the Operator enum in Timing.java) with the keys defined in the Player class.

The format of the timings entires seems to be the following: "{condition}:{key inputs}".
So, for example, in the timing entry "a{1,1}:WJ", the condition is a{1,1}, which means the value of a (variable, but not sure where its set) must be equal to 1. The key inputs associated with this condition are WJ, indicating that the player should press the W key (forward movement) and J key (jump) simultaneously.

the variable a in this case is set when it tries to match the WJ. meaning if you put a{1,1}, a will always be 1 but if you put just a:W and in game you do something like W W W WJ then a would be 3 because it managed to find 3 consecutive W inputs. every strat will try to match from a stop tick (no inputs but on ground) and the longest matching will be shown

there is currently no nice way go add an optional strafe to strats because i havent found a nice way to represent that in the strats.json yet. doing something like W(A|D) for a or d and WA?D? for W, WA or WD could work but the problem is how to then pass that information on what strafe key is pressed to the format string

srockw commented

but the problem is how to then pass that information on what strafe key is pressed to the format string

Is it really necessary to specify what keys were used in the timing? I believe not, there are other labels for that imo

ig i could just always check the mirrored version of a timing too, if it has strafe keys. that was the first idea i had and i think the mirror method still exists so that should be easy