Persistent References

From RPG Creation Kit
Revision as of 09:35, 21 August 2023 by Silvematt (talk | contribs) (Created page with "Persistent References are a special kind of GameObjects in the RCK that '''are always loaded and present while the game is running.''' Generally, a GameObject such as an AI, a chest or an item in world exists in a scene, such as an Interior cell, and is accessible only if that Interior cell is loaded. This can be the intended behavior for many situations, but there are others where you may want to access or modify GameObjects that are not in a loaded cell. This is...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Persistent References are a special kind of GameObjects in the RCK that are always loaded and present while the game is running.

Generally, a GameObject such as an AI, a chest or an item in world exists in a scene, such as an Interior cell, and is accessible only if that Interior cell is loaded. This can be the intended behavior for many situations, but there are others where you may want to access or modify GameObjects that are not in a loaded cell.

This is where Persistent References take place, they are GameObject present in the _PersistentReferences_ scene - which is always loaded, therefore every object inside the _PersistentReferences_ scene will always be present while the game is running.

You can easily access the _PersistentReferences_ scene by loading the _WorldLoader_ in the Cell View via the Cellview wl b.png button.

Types of Persistent References

Pref types.png

There are several types of Persistent References defined for the purposes of the RPG Creation Kit, but it is important to notice that you can at anytime add new objects and they will effetely be Persistent References, although you may have to define a way of quickly accessing them.

  • AI: Defines a special kind of AI which is a Persistent Referenced AI.
  • AIPaths: Contains AI Paths mainly used by Persistent Referenced AI.
  • LootingPoint: Contains LootingPoints that for a need have to be Persistent Referenced.
  • Door: Contains special kinds of Doors that needs to be accessible anytime, for example even when the AI that wants to use it is far away from the Door's transform.
  • Other: You can insert your own kind of PRefs in here.
  • Unregistered: If for a reason a Persistent Reference happens to be unregistered, it will be a child of this game object.
  • Quest Markers: contains the persistent positions of the locations that the compass have to point to while doing a quest.
  • QUEST_RELATED: Contains persistent references to Quest Related objects, such as the fire particles that is used in the City during the quest "They Shall Fall".

Creating a New Persistent Reference