-Global Aim Toggle: Added option to toggle auto-aim.
-Individual Timing Toggles: Added dedicated settings to enable or disable the execution delay timers for each specific skill slot (Primary, Secondary, Utility, Special).
-Sprint/Aim Decoupling: Separated the pause states for AutoAttack and AutoAim during sprinting. This ensures that while attacks are paused to preserve your sprint, the auto-aim also pauses to prevent the camera from snapping to targets and canceling your sprint state.
-Physics Tick Synchronization: Shifted the main auto-aim and auto-fire loop from LateUpdate to FixedUpdate. This synchronizes target tracking and input overrides with the game's physics engine, resulting in smoother crosshair tracking and more consistent fire-rate timing.
-Time Calculation Accuracy: Updated all cooldown and sprint delay calculations to use Time.fixedTime and Time.fixedDeltaTime to prevent frame-rate fluctuations from impacting attack delays.
-Camera Rig Compatibility: Added a custom fallback check for Risk of Rain 2's specific CameraRigController to ensure visual components render properly when Unity's default Camera.main reference is unavailable.
-Target Prioritization: Added a new configuration option allowing players to choose how the mod selects targets within the maximum range. Options include:
Closest (Default)
Highest Health
Lowest Health
-Target Tracking UI: Introduced a dynamic visual indicator that highlights the current enemy being targeted by the mod.
On-Screen: Displays targeting brackets [ ] around the enemy.
Off-Screen: Displays a directional arrow ► on the edge of the screen pointing toward the acquired target.
-Customizable Target UI: Allows users to input custom RGB values (0–255) to change the color of the tracking reticle and arrow on the fly.
-EnableTargetUI: Master toggle to show or hide the visual indicators.
-Added state tracking (currentTarget) to cleanly share targeting data between the logic controller and the UI rendering component.
Spent some time Refining and adding logic to the mod in order for more seamless use and customizability. Here are the changes as follows:
AutoFire v2.1.0 Changelog
General Features & Configurations
-Dynamic Configuration: Implemented a BepInEx config file, allowing players to adjust settings without recompiling the .dll.
-Line of Sight (LoS) Check: Added an optional terrain-mask raycast so the auto-fire avoids locking onto enemies hidden behind walls.
-Custom Targeting Range: Moved the hardcoded 100-meter limit into a configurable slider.
-Independent Skill Timers: Built distinct execution timers for Primary, Secondary, Utility, and Special skills.
-Adjustable Delays: Set a default 0.12-second throttle between attacks for a more natural firing rhythm, with individual toggles to disable the delay per skill slot.
-Smart Sprinting: Created a system that suspends both auto-aiming and auto-attacking while the sprint key is held or the character is in a sprint state.
-Sprint Grace Period: Added a 0.25-second protective timer when the sprint key is pressed to give the game engine enough time to transition the character's movement state without being interrupted.
Survivor-Specific Adjustments
-Acrid: Added an exclusion for the primary skill ("Vicious Wounds").
-Drifter: Added an exclusion for the primary skill ("Blunt Force").
-Loader: Added an exclusion for the primary skill ("Knuckleboom").
-Mercenary: Added an exclusion for the primary skill ("Laser Sword").
-Railgunner: Added an exclusion for the secondary skill ("M99 Sniper" / "HH44 Marksman").
Railgunner Scope Logic: Built custom dual-layer tracking to pause auto-attacks while the player is scoped or actively reloading. Auto-Aim still applies to scope.
-Stock Check Removal: Removed manual .stock > 0 ammo checks across all survivors so that characters with unique primary attack metrics (like Railgunner's unscoped primary) fire correctly.
Technical & Performance Optimizations
-CPU Optimization: Replaced heavy LINQ queries (.Where, .OrderBy) inside LateUpdate with a lightweight foreach loop utilizing sqrMagnitude for faster distance calculations.
-Compiler Compatibility: Reformatted inline variable declarations (such as out RaycastHit hit) to support older C# language versions required by standard Unity modding environments.
-String Formatting: Broken down long configuration descriptions to resolve word-wrapping compilation errors.
-Initial release