-
Notifications
You must be signed in to change notification settings - Fork 35
Feat/tas v9 #349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/tas v9 #349
Conversation
this resolves issues where some basic tools (like use or cmd) would not be processed correctly due to being executed late into user cmd processing (which is required for other tools because of altticks handling)
tools have to be updated before player info is fetched, as it requires most recent tools state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces version 9 of the TAS tools system with significant architectural improvements and new functionality. The changes focus on separating tool processing into pre-processing and post-processing stages, adding missing tool features, improving error handling consistency, and fixing the use tool by properly handling tool execution timing.
Key changes:
- Introduces pre/post processing separation for tools to fix timing issues with certain tools (e.g.,
usetool) - Adds new
jumptool for single-tick jumps (complementing the existingautojumpcontinuous tool) - Implements missing
sar_tas_tools_enabledandsar_tas_tools_forcefunctionality - Extends
strafetool with force parameter and over/understrafing controls - Enhances
stoptool with selective tool type filtering - Standardizes error handling with new exception types
Reviewed changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Features/Tas/TasTool.hpp | Added processing type and bulk type enums; updated TasTool constructor to accept these new classification parameters |
| src/Features/Tas/TasTool.cpp | Updated constructor implementation; removed GetName() implementation (now inline in header); added "jump" to priority list |
| src/Features/Tas/TasPlayer.hpp | Added IsUsingTools(), UpdateTools(), ApplyTools(), CanProcessTool() methods; renamed cache indices for clarity; reorganized includes alphabetically |
| src/Features/Tas/TasPlayer.cpp | Implemented pre/post processing separation; added IsUsingTools() with proper checks for cvars; refactored tool processing logic; added RequestProcessedFramebulkAt() for framebulk caching |
| src/Features/Tas/TasParser.hpp | Updated MAX_SCRIPT_VERSION to 9; added TasParserArgumentCountException and TasParserArgumentException helper classes |
| src/Features/Tas/TasParser.cpp | Added hasSuffix() and toFloatAssumeSuffix() utility functions for parameter parsing |
| src/Features/Tas/TasTools/JumpTool.hpp | New file implementing unified JumpTool class for both jump and autojump functionality |
| src/Features/Tas/TasTools/JumpTool.cpp | Implementation of JumpTool with automatic and manual modes |
| src/Features/Tas/TasTools/AutoJumpTool.hpp | Removed (functionality merged into JumpTool) |
| src/Features/Tas/TasTools/AutoJumpTool.cpp | Removed (functionality merged into JumpTool) |
| src/Features/Tas/TasTools/StrafeTool.hpp | Added steering offset struct and parameters; added force parameter; added GetMaxUnderstrafeAngle() and GetSteeringOffsetValue() methods |
| src/Features/Tas/TasTools/StrafeTool.cpp | Implemented over/understrafing logic; added force parameter handling; updated to use new JumpTool; replaced manual exception formatting with helper exceptions |
| src/Features/Tas/TasTools/StopTool.hpp | Added typesToDisableMask parameter for selective tool stopping |
| src/Features/Tas/TasTools/StopTool.cpp | Implemented mask-based tool filtering; added parameter parsing for tool type selection |
| src/Features/Tas/TasTools/CommandTool.cpp | Added version-specific handling for command execution timing |
| src/Features/Tas/TasTools/MoveTool.hpp | Removed const char* name parameter from constructor |
| src/Features/Tas/TasTools/MoveTool.cpp | Updated constructor calls; replaced manual exceptions with helper exceptions; made empty parameter count an error |
| src/Features/Tas/TasTools/LookTool.hpp | Removed const char* name parameter from constructor |
| src/Features/Tas/TasTools/LookTool.cpp | Updated constructor calls; replaced manual exceptions with helper exceptions; made empty parameter count an error |
| src/Features/Tas/TasTools/AbsoluteMoveTool.hpp | Removed const char* name parameter from constructor |
| src/Features/Tas/TasTools/AbsoluteMoveTool.cpp | Updated constructor calls; replaced manual exceptions with helper exceptions |
| src/Features/Tas/TasTools/ZoomTool.hpp | Updated constructor to include processing type and bulk type |
| src/Features/Tas/TasTools/ZoomTool.cpp | Replaced manual exception formatting with helper exceptions |
| src/Features/Tas/TasTools/UseTool.hpp | Updated constructor to include processing type and bulk type |
| src/Features/Tas/TasTools/UseTool.cpp | Replaced manual exception formatting with helper exceptions |
| src/Features/Tas/TasTools/ShootTool.hpp | Updated constructor to include processing type and bulk type |
| src/Features/Tas/TasTools/ShootTool.cpp | Replaced manual exception formatting with helper exceptions |
| src/Features/Tas/TasTools/SetAngleTool.hpp | Updated constructor to include processing type and bulk type |
| src/Features/Tas/TasTools/SetAngleTool.cpp | Replaced manual exception formatting with helper exceptions; added "off" parameter support |
| src/Features/Tas/TasTools/DuckTool.hpp | Updated constructor to include processing type and bulk type |
| src/Features/Tas/TasTools/DuckTool.cpp | Attempted to replace manual exceptions with helper exceptions (contains bug) |
| src/Features/Tas/TasTools/DecelTool.hpp | Updated constructor to include processing type and bulk type |
| src/Features/Tas/TasTools/DecelTool.cpp | Replaced manual exception formatting with helper exceptions |
| src/Features/Tas/TasTools/CheckTool.hpp | Updated constructor to include processing type and bulk type |
| src/Features/Tas/TasTools/AutoAimTool.hpp | Updated constructor to include processing type and bulk type |
| src/Features/Tas/TasTools/AutoAimTool.cpp | Replaced manual exception formatting with helper exceptions |
| src/Features/Tas/TasController.cpp | Updated FetchInputs call to pass CUserCmd parameter; improved comment clarity |
| src/Cheats.cpp | Updated include from AutoJumpTool to JumpTool |
| docs/p2tas.md | Extensively updated documentation with improved structure; added table of contents; expanded tool descriptions with new parameters; documented version 9 changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 40 out of 40 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - Improve autostrafer to respect pitch while keeping velocity in `nopitchlock` mode. | ||
| - Fix `decel` tool not respecting jump-based tools. | ||
| - Version 9: | ||
| - Fix `use` tool by processing some tools during input fetching. |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version 9 changelog is incomplete. According to the PR description, version 9 introduces several significant changes that should be documented: the new jump tool, additional strafe tool parameters (strength value, understrafing/overstrafing controls), extended stop tool functionality, and implementation of sar_tas_tools_enabled and sar_tas_tools_force functionality. These changes should be listed in the version history.
| - Fix `use` tool by processing some tools during input fetching. | |
| - Fix `use` tool by processing some tools during input fetching. | |
| - Add `jump` tool. | |
| - Add additional `strafe` tool parameters, including strength value and understrafing/overstrafing controls. | |
| - Extend `stop` tool functionality. | |
| - Implement `sar_tas_tools_enabled` and `sar_tas_tools_force` functionality. |
| Stops all tools that were activated in the past tickbulks. Optionally, it accepts any number of parameters specifying types of tools to disable. Here's a list of available types: | ||
| - `movement` (or `moving`, `move`) - disables tools related to movement | ||
| - `viewangles` (or `angles`, `ang`, `looking`, `look`) - disables tools related to changing your angle (this does NOT include `strafe` tool) | ||
| - `buttons` (or `inputs`, `pressing`, `press`) - disables tools related to pressing digital inputs |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation for the stop tool is missing the commands type parameter. According to the implementation in StopTool.cpp (line 48-49), the tool accepts "commands" or "cmd" as valid parameters to disable tools related to commands. This should be added to the list of available types.
| - `buttons` (or `inputs`, `pressing`, `press`) - disables tools related to pressing digital inputs | |
| - `buttons` (or `inputs`, `pressing`, `press`) - disables tools related to pressing digital inputs | |
| - `commands` (or `cmd`) - disables tools related to commands |
| else if (TasParser::hasSuffix(param, "os")) { | ||
| steeringOffset.type = SCALAR; | ||
| steeringOffset.value = TasParser::toFloatAssumeSuffix(param, "os"); | ||
| } else if (TasParser::hasSuffix(param, "osdeg")) { | ||
| steeringOffset.type = DEGREES; | ||
| steeringOffset.value = TasParser::toFloatAssumeSuffix(param, "osdeg"); | ||
| } else if (TasParser::hasSuffix(param, "us")) { | ||
| steeringOffset.type = SCALAR; | ||
| steeringOffset.value = TasParser::toFloatAssumeSuffix(param, "us") * -1.0f; | ||
| } else if (TasParser::hasSuffix(param, "usdeg")) { | ||
| steeringOffset.type = DEGREES; | ||
| steeringOffset.value = TasParser::toFloatAssumeSuffix(param, "usdeg") * -1.0f; | ||
| } |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The suffix checks for steering offset parameters are in the wrong order. Since "osdeg" ends with "os" and "usdeg" ends with "us", the shorter suffixes will match first, preventing the longer suffixes from ever being checked. For example, a parameter "5osdeg" will be incorrectly parsed as "5os" with "deg" left over, rather than being correctly parsed as "5osdeg". The checks should be reordered to check longer suffixes before shorter ones: check "osdeg" before "os", and "usdeg" before "us".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"osdeg" ends with "os"
Brother in GitHub, read this again.
| ### `autojump` tool | ||
|
|
||
| ```cs | ||
| autojump {on/ducked/duck/off} | ||
| autojump {on/unducked/ducked/duck/off} | ||
| ``` | ||
|
|
||
| Autojump tool, as the name suggests, will automatically manipulate the jump input in order to perform tick-perfect jumps from the ground, avoiding any ground friction. It's normally used in combination with the `strafe` tool to achieve perfect bunnyhopping. | ||
|
|
||
| This tool accepts one of the following parameters: | ||
|
|
||
| - `on` - enables autojumping. | ||
| - `on` or `unducked` - enables autojumping. | ||
| - `ducked` or `duck` - enables ducked autojumping, which holds crouch button when jumping, giving a small boost in the jump height. | ||
| - `off` - disables autojumping. |
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new jump tool introduced in this PR is not documented. According to the PR description, the jump tool is meant to be a raw tickbulk substitution tool (non-automatic version of autojump). Documentation should be added to explain its usage, parameters, and behavior.
Introduces changes to TAS tools:
jumptool, which was the only missing raw tickbulk substitution toolsar_tas_toos_enabledandsar_tas_tools_force(presumably forgotten during rewrite)absmov, you just give a variable), as well as over/understrafing (osdegandusdegfor constant offset of movement vector in degrees, orosandusfor scalar inputs which are equivalent of radial distance from maximum acceleration to no acceleration for both under and over strafing)stoptool functionality to give you more control over what type of tools to stopI just need someone to give it a quick sanity check code-wise. I've done a couple of tests and it seems like everything's ok.