Skip to main content

Module registry

Module registry 

Source
Expand description

The resources the game has loaded (Object::ExternalFactory’s objects), which it enumerates by type (ExternalFactory::FindNext): the toolbar entries, professions, raw materials and component descriptions (templates).

At startup Engine::UpdateLoop::LoadResources loads Game\GameResources.rsc (the loop’s name with Resources.rsc), then, for each enabled mod, the mod’s <file>Resources.rsc:resource when the packages hold it. Loading a resource loads the resources it points at (ExternalPtr), so the loaded set is everything those roots reach.

The port finds a resource’s pointers by their encoding rather than by each type’s serializer: a present flag (1) then a string naming an .rsc object.

Original: Runtime 0x1800e0020.

Structs§

Registry
The loaded resources: each Path\File.rsc:object (keyed in lower case) with its type id and the reference as first written.

Functions§

references
Every Path\File.rsc[:object] pointer in a compiled resource, in order.
roots
The game’s own root list and each enabled mod’s (<file>Resources.rsc:resource), as LoadResources names them.