### Initializing Git Submodules for RATools Project Source: https://github.com/jamiras/ratools/blob/master/README.md These shell commands are essential for setting up the development environment by initializing and updating the 'Core' repository submodule. This ensures all required dependencies are available before compiling the RATools solution in Visual Studio. ```Shell git submodule init git submodule update ``` -------------------------------- ### Supporting Multiple Conditions in ResetNextIf with OrNext (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Highlights the new support for using multiple conditions within a `ResetNextIf` clause by utilizing `OrNext`. ```RA Script ResetNextIf ``` ```RA Script OrNext ``` -------------------------------- ### Optimizing A<1||A>1 to A!=1 (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Describes new logic to convert the expression `A<1||A>1` into the more optimized `A!=1`. ```RA Script A<1||A>1 ``` ```RA Script A!=1 ``` -------------------------------- ### Handling Collapsed Logic Chains in RA Script Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Explains how implicit `always_true()` and `always_false()` are no longer supported in logic chains. Script authors must explicitly use `always_false()` to prevent conditions like `0=1` from collapsing to `false`. ```RA Script 0=1 && never(byte(0x1234) == 3) ``` ```RA Script always_false() ``` -------------------------------- ### Comparing Memory Addresses to Boolean Values (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Clarifies that memory addresses can no longer be compared directly to `true` or `false`. Comparisons should now be made against `1` or `0`. ```RA Script true ``` ```RA Script false ``` ```RA Script 1 ``` ```RA Script 0 ``` -------------------------------- ### Fixing measured(bitcount(X) == 8) Optimization (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Addresses a fix where `measured(bitcount(X) == 8)` was incorrectly converted to `measured(byte(X) == 255)`. The optimization is now corrected. ```RA Script measured(bitcount(X) == 8) ``` ```RA Script measured(byte(X) == 255) ``` -------------------------------- ### Fixing Leaderboard Value Dumping with AddAddress (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Corrects an issue when dumping leaderboard values that include `AddAddress` with a non-integer multiplier. ```RA Script AddAddress ``` -------------------------------- ### Converting PauseIf to disable_when() (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Explains the conversion of `PauseIf` with hitcounts/ResetNextIf logic to the `disable_when()` function during script generation. ```RA Script PauseIf ``` ```RA Script disable_when() ``` -------------------------------- ### Converting AddHits Chain to tally() (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Describes the conversion of `AddHits` chains to the `tally()` function during script generation. ```RA Script AddHits ``` ```RA Script tally() ``` -------------------------------- ### Introducing array_map() Function (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Announces the addition of the `array_map()` function, providing new capabilities for array manipulation. ```RA Script array_map() ``` -------------------------------- ### Introducing tally_of() Function (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Announces the addition of the `tally_of()` function, extending tallying capabilities. ```RA Script tally_of() ``` -------------------------------- ### Optimizing Underflow Adjustment in RA Script Source: https://github.com/jamiras/ratools/blob/master/changelog.txt This snippet illustrates an optimization rule applied to expressions involving subtraction and comparison in RA Script. It transforms an expression `[a - b > n]` into an equivalent `[b + n < a]` to avoid the need for underflow adjustment, simplifying the generated statements. ```RA Script [a - b > n] => [b + n < a] ``` -------------------------------- ### Fixing measured(tally(), when=...) Script Dumping (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Addresses an issue preventing the correct dumping of scripts containing `measured(tally(), when=...)` clauses. ```RA Script measured(tally(), when=...) ``` -------------------------------- ### Replacing always_true/false in Leaderboard Values (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Details the new approach for `always_true()` and `always_false()` in leaderboard values. Instead of direct use, `measured(repeated(0, always_true()))` or `0` should be used. ```RA Script always_true() ``` ```RA Script always_false() ``` ```RA Script measured(repeated(0, always_true())) ``` ```RA Script 0 ``` -------------------------------- ### Fixing float(X) < 0 Optimization (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Resolves an issue where `float(X) < 0` was incorrectly converted to `always_false()`. The fix ensures the correct behavior for float comparisons. ```RA Script float(X) < 0 ``` ```RA Script always_false() ``` -------------------------------- ### Nested once() Clause Behavior (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Explains that `once(A && once(B))` now maintains separate hit counts for B and the entire clause, achieved by reordering or injecting an `always_false()`. ```RA Script once(A && once(B)) ``` -------------------------------- ### Fixing measured(X + 100 > 200) Optimization (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Corrects an optimization issue where `measured(X + 100 > 200)` was incorrectly converted to `measured(X > 100)`. The fix ensures proper conversion. ```RA Script measured(X + 100 > 200) ``` ```RA Script measured(X > 100) ``` -------------------------------- ### Fixing Leaderboard Value Dumping with Complex Measured Clause (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Resolves an error encountered when generating leaderboard values with a complex `measured` clause, specifically `measured(..., when=repeated() && never())`. ```RA Script measured(..., when=repeated() && never()) ``` -------------------------------- ### Correcting repeated(N, trigger_when(A)) Usage (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Indicates that `repeated(10, trigger_when(A))` now generates an error. The correct usage is `trigger_when(repeated(10, A))`. ```RA Script repeated(10, trigger_when(A)) ``` ```RA Script trigger_when(repeated(10, A)) ``` -------------------------------- ### Handling Integer Division in Leaderboard Values (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Explains that integer division is no longer implicitly converted to floats for leaderboard values. To force float conversion, one of the operands must be a float. ```RA Script byte(0x1234) * 3 / 2 ``` ```RA Script byte(0x1234) * 3.0 / 2 ``` -------------------------------- ### Correcting once(unless(A)) Usage (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt States that `once(unless(A))` now generates an error. Recommended alternatives are `unless(once(A))` or `disable_when(A)`. Also, `unless` cannot be used inside `repeated` or `tally`. ```RA Script once(unless(A)) ``` ```RA Script unless(once(A)) ``` ```RA Script disable_when(A) ``` -------------------------------- ### Correcting measured(A && B) Behavior (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Highlights that `measured(A && B)` now generates an error. The previous logic was `A && measured(B)` for triggers or `measured(repeated(0, A && B))` for values. ```RA Script measured(A && B) ``` ```RA Script A && measured(B) ``` ```RA Script measured(repeated(0, A && B)) ``` -------------------------------- ### Using repeated/tally with Zero Count (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Describes the change where `repeated` or `tally` with a count of 0 is only supported within a `measured` clause of a value expression. Outside, it implies an unreachable hit requirement, equivalent to `always_false()`. ```RA Script repeated(0, condition) ``` ```RA Script tally(0, condition) ``` ```RA Script __ornext(condition) ``` -------------------------------- ### Correcting repeated(N, measured(A)) Usage (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt States that `repeated(10, measured(A))` now generates an error. The correct usage is `measured(repeated(10, A))`. ```RA Script repeated(10, measured(A)) ``` ```RA Script measured(repeated(10, A)) ``` -------------------------------- ### Fixing tally(1, ...) Script Dumping (RA Script) Source: https://github.com/jamiras/ratools/blob/master/changelog.txt Resolves an issue preventing the correct dumping of scripts containing `tally(1, ...)` clauses. ```RA Script tally(1, ...) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.