Skip to content

Conversation

@Krzyhau
Copy link
Member

@Krzyhau Krzyhau commented Dec 17, 2025

Introduces changes to TAS tools:

  • add jump tool, which was the only missing raw tickbulk substitution tool
  • add pre-processing step for tools which do not require to be processed along user command processing (legacy breaking change, hence version 9)
  • implement missing functionality for sar_tas_toos_enabled and sar_tas_tools_force (presumably forgotten during rewrite)
  • introduce additional parameters for strafe tool: strength value for manipulating force of movement vector (same as in absmov, you just give a variable), as well as over/understrafing (osdeg and usdeg for constant offset of movement vector in degrees, or os and us for scalar inputs which are equivalent of radial distance from maximum acceleration to no acceleration for both under and over strafing)
  • clean up error handling and display in several places
  • extend stop tool functionality to give you more control over what type of tools to stop

I 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.

Copy link

Copilot AI left a 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., use tool)
  • Adds new jump tool for single-tick jumps (complementing the existing autojump continuous tool)
  • Implements missing sar_tas_tools_enabled and sar_tas_tools_force functionality
  • Extends strafe tool with force parameter and over/understrafing controls
  • Enhances stop tool 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.

Copy link

Copilot AI left a 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.
Copy link

Copilot AI Dec 18, 2025

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.

Suggested change
- 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.

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Dec 18, 2025

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.

Suggested change
- `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

Copilot uses AI. Check for mistakes.
Comment on lines +695 to 707
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;
}
Copy link

Copilot AI Dec 18, 2025

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".

Copilot uses AI. Check for mistakes.
Copy link
Member Author

@Krzyhau Krzyhau Dec 18, 2025

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.

Comment on lines 234 to 246
### `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.
Copy link

Copilot AI Dec 18, 2025

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.

Copilot uses AI. Check for mistakes.
@Krzyhau Krzyhau merged commit 9b03ca3 into master Dec 18, 2025
10 checks passed
@Krzyhau Krzyhau deleted the feat/tas-v9 branch December 22, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants