Scriptables comparison

What is ScriptableSystem vs. ScriptableService?

RedScript's ScriptableSystem

Class in base RedScript.

  • Is bound to the game session (save)

    • Is created (attached) when loading a save

    • Is destroyed (detached) when unloading a save

  • Can store things in a save

    • persistent properties will be saved in game's save file and value can differ between saves

Example and documentation: Scriptable systems (singletons)

Codeware's ScriptableService

Class added by Codeware (Cannot be used without Codeware).

  • Independent of saves

    • Is created when starting the game

    • Is destroyed when quitting the game

  • Always runs with the game

  • Can store things globally for all saves

    • persistent properties will be saved globally and will be same between saves

  • Usually used for patching/modifying resources

Example and documentation: https://github.com/psiberx/cp2077-codeware/wiki#lifecycle

Previously was named ScriptableEnv. Kept for backwards compatibility, do not use that name in new code.

Last updated