3 Commits
Author SHA1 Message Date
Yunus Shaikh a8dd45faa3 fix(libSceNpTrophy2): refuse a posted unlock of an unknown, platinum or progressive trophy
With the title's trophy data loaded, an _UnlockTrophy posted through UDS
no longer records an id the data does not have, the platinum, or a
progressive trophy. Each refusal logs the trophy and the reason, returns
false and calls no listener.

The statistics path and the platinum award now use an internal record
that keeps part 1's behaviour, so a progressive trophy still unlocks
through its statistic and the platinum with the last trophy that names
it. Without trophy data every id of 0 or more is recorded as before.
2026-10-17 23:29:17 +00:00
Yunus Shaikh 98c700ea02 feat(libSceNpUniversalDataSystem): keep event properties and record posted trophy unlocks
Events and property objects keep their typed properties instead of
dropping them. PostEvent records an _UnlockTrophy event with an int32
_trophy_id for the user and service label of its context, logs why a
trophy event is ignored, and prints every posted event with
APS5_TRACE_UDS.
2026-10-17 23:28:11 +00:00
Yunus Shaikh d374de5e38 feat(libSceNpTrophy2): report the title's trophy data from trophyNN.ucp
The title's sce_sys/trophy2/trophyNN.ucp is read on first use with a
bounds-checked .ucp reader and a small JSON reader. tropconf.json gives
each trophy's grade, group, hidden and reward flags, platinum and
unlock condition, and tropmeta_<tag>.json its texts in the console
language, then en-US, then the file's default language. Contexts
remember their user and service label, so the queries find the file.

The trophy, group and game queries report these names, grades, groups
and counts, list every trophy and group, and give progressive trophies
their target. Unlocks are not recorded yet, so every trophy reports as
locked and nothing is written to the host. A missing file is ignored
and a malformed one is logged once; either way the queries keep their
placeholders. A JSON document that nests deeper than 64 levels or holds
more than 1048576 values counts as malformed, which keeps the parsed
values to about 140 MiB.
2026-10-17 23:25:07 +00:00