Jump to content

Modifying Maps / Encounters


Recommended Posts

Many apologies, but I have just been playing through the game a second time. I have noticed that after the early game, even with level scaling, difficulty does tend to.... taper off a bit, even on POTD. In particular there seem to be a number of encounters that are unexpectedly easy, in particular when a large number of lower level enemies were used to try to buff difficulty. This has got me thinking, as a person who DMs occasionally for pen and paper games, whether it would be worthwhile to tune up those encounters in particular (rather than say increasing the strength of all enemies e.g. via the difficult table, which would be perhaps excessive at low levels, or increasing the strength of enemies used in multiple contexts). I recall a number of mods for e.g. Baldur's Gate 2 that did this, quite fondly. Sword Coast Tactics and some other thing that I can't recall.  

As such, is there any way to edit the location and number of enemies on various maps, or swap out the level or type of individual enemies? Heck, if I could even find the area-specific intended levels (to force scaling for specific areas), I suppose that might be helpful?

PS: I realize I could turn on more God Challenges or what not, but I just feel a number of these encounters need.... tuning up.  

PPS: is anyone noticing that Unbending Trunk seems to heal much more than 33% of all damage taken?  This may be contributing.  My, and my enemies, health still seem to actually increase from using it. 

PPS: There also seems to be insufficient scaling (and baseline growth) of human enemies in particular. They peak at Gorechi street and sortoff.... go downhill from there. 

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

Well, small update incase anyone else decides to take a crack at this problem.

For world map encounters, level and NPC type can be edited by editing encounter entries of the worldmap.  I think this largely covers encounters with a default small map to which a set number of enemies are loaded. I haven't tried it, though, but it seems simple enough.

For set encounters:

As noted elsewhere, the levelxy files contain most areas. They do not correspond to area numbers, e.g. AR_0610_slums is not in level610, it is in level38. Some of them appear to be menus and things.

It seems like it might be possible to modify creature spawn locations by use of Asset Studio to export the scene hierarchy for an area. This will export the locations of encounters (and creatures) as part of the scene as a .fbx file, which can be imported e.g. into blender. This allows you to see, and modify the location of various creatures an spawns. How one might alter which creature is which, I have no idea as yet.  My attempts to decipher the monobehaviors associated with the levelxy files have not, as yet, been successful. I suspect they somehow attribute creatures to these locations. 

I am also not entirely sure how to cram the .fbx scenes back into the levelxy files.

 

example.gif

  • Like 2
Link to comment
Share on other sites

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)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...