Files
AnyPS5/docs/dev/debt/libSceNpUniversalDataSystem.md
T
Yunus Shaikh be9ade0f01 docs: say which posted trophy unlocks are refused and what stops a title
USAGE.md describes the refused posted unlocks and their log line, and
says that the icon queries and a damaged or unwritable unlock or
statistics file stop the game with an error. The debt entries of
libSceNpTrophy2 and libSceNpUniversalDataSystem no longer say that any
posted id is stored. Both USAGE.md and the libSceNpTrophy2 entry say
that without trophy data the platinum is not unlocked when the other
trophies are.
2026-10-17 23:29:24 +00:00

2.8 KiB

libSceNpUniversalDataSystem technical debt

Unknown function info

  • Events: sceNpUniversalDataSystemCreateEvent copies prop and returns the event's own property object through prop_ptr, as KytyPS5 does; sceNpUniversalDataSystemEventPropertyObjectSetObject, SetArray and the array setters for objects and arrays store a copy of value and return the stored copy through value_ptr. Destroying a property object or array that its Create function did not return (an event's property object or a stored copy) does nothing, as its owner frees it. These ownership rules are not verified on a console, nor are the output of sceNpUniversalDataSystemEventToString (still {}) and sceNpUniversalDataSystemEventEstimateSize (still 3).

Functional

  • Trophy events: sceNpUniversalDataSystemPostEvent stores an _UnlockTrophy event with an int32 _trophy_id of 0 or more as an unlock for the user and service label of its context, as KytyPS5 does, except an id that libSceNpTrophy2 refuses when the title's trophy data is loaded (one not in the data, a platinum or a progressive trophy). _UpdateTrophyProgress, named only by a third-party unlocker, is logged once per trophy and not interpreted. A context need not be registered, and every post of an event that sceNpUniversalDataSystemCreateEvent returned and that is not yet destroyed returns success (a null or any other event pointer stops the game): KytyPS5's errors for an unknown or unregistered context and for a malformed unlock are not verified. The storage statistics stay zero.
  • Statistics: every other event goes through the title's rules in sce_sys/uds/udsNN.ucp, which libSceNpTrophy2 reads. Only statistics with "aggregation":"latest" and dataType uint32 or uint64 are kept, as in KytyPS5; no public source documents the other aggregations or types, so their definitions and rules are skipped. Only rules whose condition is an eventName alone and whose input is a $.name path (dotted for nested objects) are applied. A value is used when it is an integer of any width that is not negative and fits the statistic's type and minValue/maxValue; KytyPS5 requires the statistic's exact width, and whether the console converts, clamps or rejects other values is not known. Statistics are stored per user and service label, and every trophy's unlockCondition is compared after each event that sets one.