REDNODE / DOCS

Refresh test

Example apps / refresh-test / v0.3.1

Node modarchives permission

Swap an archive, then try each way the game offers to load again what is already in the world: V's clothes, the inventory's preview of V, what V looks at, a spawned object.

Simulated game starting
Mod log

    Nothing changes on screen here: the preview's V wears a jacket, trousers and boots, and looks at a vendor, so the log shows the calls each button makes.

    How it works

    A swap replaces an archive, but what is already in the world keeps what it loaded. This is the spike of world.refresh (H2): each button calls the game through api and logs how long it took.

    V's clothes: **Scan** lists each attachment slot in TweakDB that holds an item (tweakdb.records("AttachmentSlot"), so slots a mod adds count too) and marks the clothing. The buttons then use RefreshAttachment, apply the item's appearance again, or take the items off and put them back. Type a slot name as Scan shows it to try one at a time.

    What V looks at: TargetingSystem.GetLookAtObject finds it, then ScheduleAppearanceChange applies its appearance again.

    A spawned object: spawned again in the same place, or its mesh component switched off and on.

    The inventory preview: a second character the in-game menu controller holds (GetPuppet("inventory"), reached through Codeware's menu layer). **Reset preview** applies its items' appearance again; **Game event** sends the event the game's wardrobe sends for the same.

    What it uses

    archives.reload api.GameInstance TransactionSystem tweakdb.records TargetingSystem DelaySystem world.spawn world.entity ui.list

    Try this

    Use it

    Copy the files into red4ext/plugins/REDnode/apps/refresh-test/ in the game folder, or start your own package from them: change id and name in the manifest first. The whole folder is on GitHub.