Hello again, I hope my repeated self posting is of interest. I am describing what I have found in case it may prove of some small help to others in the future. If I had a better way of documenting it, I would. Also if anyone has any advice.
Part 1: World Map Encounters
After a bit of poking, I have made the embarassing discovery that some encounters have their creatures listed as part of the entry in worldmap.gamedatabundle. So far as I can tell, this is mostly for ships, and also for small encounters with a default encounter map. The data there is fairly self-explanatory. It also appears that most game areas have an entry on this table. Those entries do not have entries for creature spawns, but they do have an "expected character level" entry. As I have found no entry concerning intended area level elsewhere, it may also be that area entries for "expected character level" from this table are used to scale zones. Awkwardly, these entries rely on referencing character prefabs.
Part 2: Architecture of Zone Files
As to spawns in most other areas, I have seen the following re the architecture of the Scene / node components of a levelXY file, as attached to the tree of the fbx file. Most / all nodes have an associated GameObject with the same name, which appears to contain the actual associated game information. It may be that they are one and the same, effectively, but I am not certain as yet. Certainly, the tree structure for both so far appears to be an exact mirror.
In order to see most of the monobehavior attributes, you need to "tools->Get Script Information". Unfortunately, I do not have the right dll. However, if you hit cancel repeatedly on the file selection box, it will give up fill in the data anyway.
NB: All "GameObjects" are from examination of the associated "GameObject" entry of the levelxy file in UABE. All scene "nodes" are from examination of the scene in blender as exported by Unity Asset Studio.
NB: All Monoscripts so far are pointers to namespaces/names in DLL files and pass an associated hash. I haven't found a way to interpret the hash. I assume to do that I would need to decompile the dll at a minimum. All MonoScripts are attached via a monobehavior containing a pointer to the creature gameobject and a pointer to the monoscript. I think this defines the actual behavior of the MonoBehavior.
For creature editing, the most interesting bits are in the CRE_XXX part, below.
On Order of entries: For entries in a vector or array, it is not clear if order actually matters, and sometimes it appears to change between different GameObjects of the same type.
Architecture analysis:
Root - "AR_XXX_NAME - Local Scene Objects"
GameObject: Corresponds to a "AR_XXX_NAME - Local Scene Objects" which has an associated transform, and among that transform's children, a transform and pointer to "GameObject 01 Design"
Subnodes-
"00_Art" : contains anchorpoints for a variety of art objects. Some objects may correspond to assets in an uncertain manner. Also defines the plane of various floor levels, contains maps defining areas as water, light locations and light blocking surfaces, etcetera.
"01_Design" : contains subnodes for "blockers", characters, containers, NPCS, encounters (containing enemies), etc. The data exported in a .fbx largely corresponds to a
"02_Sound" - contains a series of physical locations with names corresponding to sound entries, possibly acting as their origin.
"AR_XXX_NAME" - seems to correspond to the actual underlying mesh of the level, and a number of basic attachments to it
"Main Camera" - almost certainly attached to whichever unity camera system is used by Deadfire. When exported as a .fbx file, it is just some empty nodes.
Parallax Manager - Contains target for skybox, waterfalls, may be other things?
Party Spawner - Appears to contain location nodes for the party to be directly spawn, e.g. not with a usual area transition. Getting off the elevator in Old Neketaka would appear to be the example here.
01_Design:
GameObjects: Corresponds to a "GameObject 01_Design"
Among its attributes, contains an mComponent vector containing 1 component pair entry of 1 transform (location) with an attached vector of children.
mComponent (ultimate) contents:
Transform and Pointer to "Design_Encounters" - Relevant case for today
Transform and Pointer to a number of relevant scene components, a discussion for another day.
Also some less relevant, unclear contents.
Unsigned int m_Layer: usually 0
UInt16 mTag: Don't know what this does. May correspond to Unity-> Gameobject.tag, but that is usually a string.
Bool m_IsActive: (unity has a standard "is active in hierarchy" tag, but syntax appears difft")
mName: always "01_Design" for examples of this node.
Subnodes:
"Design_Encounters": This node has a number of children each corresponding to an encounter. Its transform appears to represent the origin from which those encounters are placed.
Design_Encounters:
Gameobject: LevelXYs contain a corresponding "Design_Encounters" or "GameObject Design_Encounters" File.
Contents:
m_Name: "Design_Encounters", identical to game
Unsigned int m_Layer: usually 0
m_Component Vector containing a transformation, likely the same as the FBX data.
Array containing child encounters, and their associated transformations.
"Enc_XXX" : Each entry represents an encounter. The associated transform represents the location of that encounter relative to the Design_Encounter node.
UInt16 mTag: Don't know what this does. May correspond to Unity-> Gameobject.tag, but that is usually a string.
Bool m_IsActive: (unity has a standard "is active in hierarchy" tag, but syntax appears difft")
Subnodes of Design_Encounters
Enc_XXX (each Entry representing an encounter)
Enc_XXX (Entry representing an encounter)
GameObject: Corresponds to a "Enc_XXX" ie "GameObject Enc_XXX" in the same file.
Contents
m_Name: String corresponding to the encounter name, identical to the node in the FBX file
Unsigned int m_Layer: usually 0
m_Component: Array containing
Entry 0: a transformation to the encounter origin, identical to FBX data.
Vector m_Children: child of that transformation containing a list of transformations pointing to the associated CRE_XXX gameobject for creatures in that encounter and its associated transformation (identical in FBX). Can also point to creature spawners and waypoints.
m_Component: Array containing
Entry 0: a transformation to the encounter origin, identical to FBX data.
Vector m_Children: child of that transformation containing a list of transformations pointing to the associated CRE_XXX gameobject for creatures in that encounter and its associated transformation (identical in FBX). Can also point to creature spawners and waypoints.
Entry 1: a monobehavior corresponding to the encounter, and tying it to a monoscript for "Game"->"Encounter" in Assembly-Csharp. Dll
Notable attributes include EncounterTeam, ExpectedLevel, and LevelScaling type, DelayEndEventForCombat, CombatEndsWhenAllAreDead (can all be 0)
EncounterData EncounterList - array with each entry:
Pointing to a creature in the encounter
Features for creatures which "spawn"(often empty for pre-placed creatures): Pointer to (self, animal companion) spawn point, spawnvfx, despawnvfx
Features for creatures which "emerge(often empty for pre-placed creatures): Int EmergeWhen, EmergeIndex, pointer to emergepoint
DifficultySettings AppearsInLevelOfDifficulty: Controls what difficulty levels spawn this creature
Entry 2: a monobehavior corresponding to the encounter, and tying it to a monoscript for "Game"->"InstanceID" in Assembly-Csharp. Dll
Attributes: UniqueID (A UUID), and int IsGuidConstant
Entry 3: a monobehavior corresponding to the encounter, and tying it to a monoscript for "Game"->"Persistence" in Assembly-Csharp. Dll
Notable attributes: points to an "Enc_Object.prefab" though this appears generic
Attributes: exportpackage, restoresavedtransform, m_isNativeSceneObject
Entry 4: a monobehavior corresponding to the encounter, and tying it to a monoscript for "Game"->"ConditionalToggle" in Assembly-Csharp. Dll
Attributes: m_persistentConditionalToggle, CheckOnce, ActivateOnlyThroughScript, ConditionalScript Scripts
Entry 5(Not Universal): a monobehavior corresponding to the encounter, and tying it to a monoscript for "Game"->"ScriptEvent" in Assembly-Csharp. Dll
Notable Attributes: ActionScript Scripts -> Contains a vector apparently able to use ActionScript entries to do something. Notably it can set global variables, for example.
UInt16 mTag: Don't know what this does
Bool m_IsActive: So far all true
Subnodes of each Enc_XXX
"CRE_XXX": Each entry represents a unique creature in that encounter. The associated transform represents the location of that creature from its parent encounter.
CRE_XXX
GameObject: Corresponds to a "GameObject CRE_XX" object in the same file.
Contents:
mComponent Array: This array seems to contain pointers to gameobjects and monobehaviors with most of the major attributes of a creature. See below.
mLayer: Corresponds to layer in Unity. All "10" so far
nName: String corresponding to the creature name (CRE_XX) identical to the FBX node.
mIsActive: see above
Subnodes: None
NB: All Monoscripts so far are pointers to namespaces/names in DLL files and pass an associated hash. I haven't found a way to interpret the hash. I assume I will need to decompile the dll. All MonoScripts are attached via a monobehavior containing a pointer to the creature gameobject and a pointer to the monoscrip, and a (usually empty) name.
mComponent Array Contents:
0 - usually a pointer (same file) to a transform corresponding to the creature location relative to the Enc_XXX location.
1 - pointer (same file) to a unique GameObject "AnimatorBase" associated with the creature.
Monobehavior:
Attributes: int m_Enabled, Pptr (Avatar) m_Avatar (?shared avatar in shared assets), pptr RunTimeAnimationController m_Controller(?shared controller in shared assets, int m_CullingMode, int m_updatemode, boolm_ApplyLinearVelocityBinding, bool m_hasTransformHierarchy, bool m_AllowConstantClipSampling
2 - pointer (same file) to a unique Object "RigidBody" associated with the creature. (Unity class containing physics simulation for the creature)
Monobehavior:
Attributes: float m_Mass, float m_Drag, float m_AngularDrag, float m_useGravity, float m_isKinematic, float m_Interpolate, float m_constraints, float m_CollisionDetection
3 - point (same file) to a unique GameObject "BoxCollider" corresponding to the creature, (Unity class for a box shaped collisionzone)
Monobehavior:
Attributes - PhysicsMaterial m_Material, bool m_IsTrigger, bool m_Enabled, Vector3f m_size, Vector3f m_center
4 - pointer (same file) to a unique Monobehavior attached to a (different file) "Faction" MonoScrip. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Notable attributes: TeamGameDataReferenceBaseTeam -> Contains a UUID pointing to the associated faction in Factions.GameDataBundle
Other attributes: Int (DrawSelectionCircle, DrawConversationCircle, HideSelectionCircleOutsideofCombat, ShowToolTips); Float (Tooltipheight, speakFOWradius, HideUIinfo)
5 - pointer (same file) to a unique Monobehavior attached to a (different file) "Health" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Notable Attributes:
PersistentData m_persistentHealth -> can contain an int ShouldDecay, or ?
Int CanRegenerateHealth
Float HitReactInterval
Int m_canBeTargeted
Int NeverGib
Int AlwaysGib
******************* Interesting ********************
6 - pointer (same file) to a unique Monobehavior attached to a (different file) "CharacterStats" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Notable Attributes:
CharacterStatsGameDataReference CharacterStatsData: Contains a UUID pointing to the creature entry in characters.gamedatabundle
Int OverrideStartingLevel -> usually 0 (?disabled) if active,
DatabaseString OverrideDisplayName -> contains a stringtable reference that can replace the display name
OtherAttributes: Int Overridestartinggender, int overridestartingrace, int overridestardingsubrace, overridestartingspeaker,
7 - pointer (same file) to a unique Monobehavior attached to a (different file) "Equipment" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Notable Attributes:
EquipmentSetDataReference BaseEquipment: UUID Pointing to ?; so far all 0s.
EquipmentSetReferences StartingItems: Contains a list of equipmentsetreference UUIDs for each slot. so far 0s. Also Ints flagging slots to not be droppable on death.
** I believe this has been superseded entirely by the Equipment components of characters.gamedatabundle
8 - pointer (same file) to a unique Monobehavior attached to a (different file) "Inventory" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Notable Attributes:
PersistentData m_persistentBaseInventory - contains a set of values for max item storage. Can be infinite or ??negative infinity
Other attributes: InspectorItem StartingItems; int OverrideRedirectToPlayer
9 - pointer (same file) to a unique Monobehavior attached to a (different file) "Loot" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Notable Attributes:
LootListGameDataReference LootLists - contains an array of UUIDs, pointing to entries in items.gamedatabundle (usually the lootlist for the creature)
Int dropEquipment - seems to determine if any equipment drops at all, maybe?
Other Attributes: Int usebodyaslootbag, Int fadebodyforlootbags - replace your corpse with a handy haversack. Pptr lootbagoverride (so far empty)
10 - pointer (same file) to a unique Monobehavior attached to a (different file) "Persistence" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Notable Attributes:
String Prefab: attaches to the location of the creature prefab. I don't know what information comes this way, as much of the prefab is now linked to gamedatabundles, which are also linked here.
Attributes: int ExportPackage, Int RestoreSavedTransform, Int m_isNativeSceneObject,
11 - pointer (same file) to a unique Monobehavior attached to a (different file) "InstanceID" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Notable Attributes:
PersistentData m_persistentInstanceID -> contains a UUID string UniqueIDString which may be this creatures specific identifier
String UniqueID: Contains exactly the same UUID string as the above. Don't know why.
Int IsGuidConstant: Can be 0. ??
12 - pointer (same file) to a unique Monobehavior attached to a (different file) "InstanceID" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Attributes: RandomUpdateTime, CutsceneSpeed, DisableAnimationCulling, RacialBodyTypeOverride, GenderOverride
13 - pointer (same file) to a unique Monobehavior attached to a (different file) "Mover" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Notable Attributes
MoverGameDataReference MoverData: Contains a UUID pointing to a MoverGameData in characters.gamedatabundle
Int m_overrideRadius, m_radius: flag and value to allow changing the ?Mover radius of the creature. ??
14 - pointer (same file) to a unique Monobehavior attached to a (different file) "AnimationBoneMapper" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Notable Attributes:
BoneMapperGameDataReference m_boneMapperData: contains a UUID pointing to a BoneMapperGameData in characters.gamedatabundle. Often the shared "human" entry.
15 - pointer (same file) to a unique Monobehavior attached to a (different file) "Audioemitter" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Attributes: isEnvironmentAware, listenerMask, isStaticObject, isOcclusionEnabled, isPartialOcclusionEnabled, isPanningEnabled
16 - pointer (same file) to a unique Monobehavior attached to a (different file) "AudioSoundBank" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
String bankname
Attributes: vector bankguid - at least in one case full of int = 0; loadAsynchronous
17 - pointer (same file) to a unique Monobehavior attached to a (different file) "AnimationAudioPlayer" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior - an empty name entry
18 - pointer (same file) to a unique Monobehavior attached to a (different file) "StatusEffectManager" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior - an empty name entry,
19 - pointer (same file) to a unique Monobehavior attached to a (different file) "AbilityList" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
GenericGameDataReference PermanentAbilities - contains an array, which has been empty in all cases so far.
20 - pointer (same file) to a unique Monobehavior attached to a (different file) "AIController" MonoScript.
Monobehavior
Notable Attributes; AIDecisionTreeReference m_decisionTreeReference -> contains a UUID pointing to an Onyx.AIDecisionTreeData in aidecisiontrees.aidecisiontreebundle (an exported file)
Other Attributes: ScheduleGameDataReference ScheduleReference (Contains a UUID); ScheduleInteractionObjectSet ScheduleInteractionObjects (Contains an array of timesliceinteractionobjects); pptr FollowObject; int WeaponPreference, int Scriptedbehavior, pptr scripteduseobject; float m_shout_range; int m_detectsStealthedCharactersSetting; Int m_isGuard; int CombatEndsOnDeath; Int Tethered; Float TetherDistance; Int OverrideSummonBehavior; Int HideOffScreenMeshes; PersistentData m_persistantAIController
21 - pointer (same file) to a unique Monobehavior attached to a (different file) "GenericAppearance" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior:
Notable Attributes:
PPtr <$CharacterModelVisualData> ModelVisualData: Contains a pointer to a ModelVisualData Entry in a shared asset file
This is a larger entry, but contains entries determining the model, LowPoly Model, Female override, submesh settings. It ? points at prefabs
Float scalemultiplier - controls this specific creatures scale
Other attributes: Int UpdateMeshWhenOffscreen, Int UseHDTextures, Int RegenerateApperance
22 - pointer (same file) to a unique Monobehavior attached to a (different file) "AlphaControl" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior
Attributes: float Alpha, float MaxAlpha, Int AlwaysRefresh, Int ForceIgnoreAlphaControl
23 - pointer (same file) to a unique Monobehavior attached to a (different file) "OVS" MonoScript. This MonoScript is shared between some creatures of the same type.
Monobehavior
NotableAttributes:
OVSGameDataReference OVSData: Contains a UUID pointing to a OVSGameData in characters.gamedatabundle, assigning a variety of visual effects.
VisualStateGameDataReference InitialState: Contains a UUID selecting a substate among the components of the OVSGameData entry; the UUIDs are shared between some components for different OVSGameData entries. (ie: both a wraith and another creature might have a substate with the same UUID)