Under the hood
This page uses Transform from Unity. The glossary says what each one is.
How the framework reads the game, for modders who want to dig deeper.
Npcs
NPCDirector.globalDatabaseholds rows fromStreamingAssets/NPCBehavior.json.NPCManager.AddNpcToListraisesSpawned, beforeStartruns.NPCManager.RemoveNpcFromListraisesDespawned.NPCInfo.ChangeStateraisesDiedon a move toDead. OnlyNPCInfo.KillsetsDead, and nothing in the game calls it.Positionis the live transform. Otherwise it isNPCData.state.currentPosition.UpdateFadehides NPCs farther thanhideDistance(20).hideAlways(ChangeHiddenStatus) hides them at any distance.FadeGameObject.HideandFadeGameObject.ShowcallSetActive; culling sets onlyculled.FadeGameObjectController.ShowAllruns on save.PresentreadsisHidden,hideAlways, the parent andCurrentScene, andculledviaAccessTools.Field.InScene()listsNPCInfocomponents.IsDirectorchecks for a database entry.Handleis the component’sGUIDfield. Otherwise it isscene:Name[index]/.... Copies of a prefab can share it.
Feature groups
- Spawn and despawn use
obenseuer.moddingframework.npcs. Death usesobenseuer.moddingframework.npcs.died. Relationships useobenseuer.moddingframework.npcs.relationship.