fix(libSceNpTrophy2): accept greater-than filters in stat rules #18640
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18640"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-11-11T23:28:16Z.
What
ParseStatRuleskeeps a statistics rule filtered by an event property only when the comparator is==. Two titles here filter the rules for progressive trophies with>:udsStatId152, 153 and 154, targets 22, 30 and 12, allprogressive) fromDsCollectionevents:ShotBlazeTarget,BuiltCairnandCompletedClimbwith> 0. Each stat backs one progressive trophy and one other.These rules are now skipped with a
[trophy] ... filters DsCollection by more than its eventNameline, so those six trophies never show progress, and a progressive trophy unlocks only through its statistic.This adds a
>filter with an integer bound, which may be negative. A property passes when its value is an integer above the bound. A negative property is read from its text, since an event property stores only non-negative values as numbers. Other comparators, and bounds that are not integers, are still skipped.==and>are the only comparators in the rule files of the 116 extracted titles here that have one.Tested
np_trophy2_package_tests: the newtestGreaterFilterskeeps> -1and> 0rules, skips>with a non-integer bound and>=, and checks that a value equal to the bound does not pass, that a value above a negative bound passes, and that alateststat is not reset by a value at the bound. It fails on main at the first check and passes with this change.ctest -R 'trophy|uds|universal') pass on this head (43a54ba501), Linux, GCC 16, Release.DsCollectionin the first two minutes after boot, and no run here reached a point where it writes a trophy record.Related
#18642 also changes
readRuleand the libSceNpTrophy2 debt file. The code merges cleanly with it, but the two debt entries are on adjacent lines, so whichever lands second needs a one-line rebase.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)