Files
AnyPS5/docs/dev/debt/libSceNpUniversalDataSystem.md
T
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

1.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. Unlocks that a title drives through statistics (statsExtractionRuleArray in sce_sys/uds/udsNN.ucp and unlockCondition in sce_sys/trophy2/trophyNN.ucp) are not evaluated, and _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.