Skip to content

Add subtick ability to keyboard (Similar to mouse paths) #164

@ScribbleTAS

Description

@ScribbleTAS

I was made aware that the keyaboard can perform subtick inputs as well, similar to the mouse.

This is only really useful in guiscreens when using the keyboard to switch hotbar positions.

This also fixes the issue of having to hold certain keys for an input to be registered in low tickrates for example.

  • Increase tasfile version to 2 Make TASFile versions strings.
  • Add unit tests to Virtual Input

New syntax

After thinking about this for a while, I should probably introduce a new syntax for proper subtick handling

Current

55|Keyboard:W,LCONTROL;w|Mouse:;[MOUSEMOVED,0,887,626]->[RC,0,1580,658]->[MOUSEMOVED,0,1580,658]|Camera:17.85;-202.74799~&

Subticks are stored in square brackets. ([MOUSEMOVED,0,887,626]->[RC,0,1580,658] etc...). This looks just very messy

Proposal

55|Keyboard:W,LCONTROL;w|Mouse:;0,887,626|Camera:17.85;-202.74799
	1|Keyboard:|Mouse:RC;0,1580,658|Camera:17.85;-202.74799
	2|Keyboard:|Mouse:;0,1580,658|Camera:17.85;-202.74799

The non indented lines are for ticks, while the indented lines are for subticks.

This way, we can support Mouse and Keyboard subticks, as well as Camera subticks while we are at it.
This also gets rid of the square bracket syntax.
We can also use the existing comparing system for ticks to also check for subticks and maybe add monitoring and control bytes for subtick commands.
And this system is upgradable, the old syntax can be converted into the new one.

Metadata

Metadata

Assignees

Labels

TASFileIssue relates to the playback file used to store inputs

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions