Skip to content

Add various form/3D load events#253

Draft
WallSoGB wants to merge 6 commits into
xNVSE:masterfrom
WallSoGB:LoadEvents
Draft

Add various form/3D load events#253
WallSoGB wants to merge 6 commits into
xNVSE:masterfrom
WallSoGB:LoadEvents

Conversation

@WallSoGB
Copy link
Copy Markdown
Contributor

@WallSoGB WallSoGB commented May 6, 2026

Adds:
OnCellAttach - sent when cell is attached to the world.
OnCellDetach - sent when cell is detached/unloaded.
OnCellRefsLoaded - sent when all references requested by a cell are loaded

OnRefSet3D - sent when reference receives its 3D model
OnRefUnset3D - sent when reference frees its 3D model
OnRefAttach - sent when reference is attached to the cell (when loaded, or moved)

Reference events have their NVSE-message equivalents. Cell messages are sent for all cell state changes, not just attach/detach (this level of granularity won't work for scripts).

Additionally, "OnNonPersistentFormLoad" NVSE message has been added, which is sent whenever a form (TESObjectREFR or NavMesh) is loaded by a cell, or save game.

Comment thread nvse/nvse/Hooks_Other.cpp
@korri123
Copy link
Copy Markdown
Member

korri123 commented May 7, 2026

This PR is still marked as draft, if you want me to merge then mark it ready for review

@WallSoGB
Copy link
Copy Markdown
Contributor Author

WallSoGB commented May 7, 2026

It's a draft because I need to get feedback from scriptoids first, and evaluate performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants