Editing Subgraphs

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
[[Category:Animation]]
Animations use '''Subgraphs''' to break off logical components of the character graph.
This page will explain how Subgraphs work and also how to configure them for a [[Race]].


=== Summary ===
=== System Explanation ===
While working on Skyrim, BGS ended up using the ''behavior file reference'' functionality of Havok Behavior to break off logical components of the character graph into smaller, easier to understand chunks.   
While working on Skyrim, BGS ended up using the ''behavior file reference'' functionality of Havok Behavior to break off logical components of the character graph into smaller, easier to understand chunks.  Animation Sub Graphs further leverage this concept by dynamically attaching a behavior file reference to an active character behavior graph thus allowing use of the same graph logic for multiple animations.  This is particularly helpful for modders since Havok does not release their toolset for modifying behavior graphs.  Now modders can utilize one of the standard Fallout 4 graphs to add new content without needing Havok Behavior.  The graph logic contains the animation file names, so they are static, but the animation paths can change.  
Animation Sub Graphs further leverage this concept by dynamically attaching a behavior file reference to an active character behavior graph thus allowing use of the same graph logic for multiple animations.   
This is particularly helpful for modders since Havok does not release their toolset for modifying behavior graphs.   
Now modders can utilize one of the standard Fallout 4 graphs to add new content without needing Havok Behavior.   
The graph logic contains the animation file names, so they are static, but the animation paths can change.  


=== Data Setup ===
=== Data Setup ===
An [[Actor]]s Subgraph data is set up on its [[Race]] under the "Subgraph Data".  
The data is set up in the editor using the "Subgraph Data" tab in the NPC race. '''NOTE''': When modding, you should always create a new race and make it "additive" to an existing race.  This will prevent conflicts when loading multiple mods that both add new content to the same race.
When modding, you should always create a new [[Race]] and make it "additive" to an existing race.   
This will prevent conflicts when loading multiple mods that both add new content to the same race.


[[File:SubgraphDataEntry.jpg]]
[[File:SubgraphDataEntry.jpg]]
Line 19: Line 10:
==== Additive/Template Drop down ====
==== Additive/Template Drop down ====
* Additive should be used to add subgraph data to an existing race inside a plugin / masterfile.
* Additive should be used to add subgraph data to an existing race inside a plugin / masterfile.
* Template allows you to use the same subgraph animation data for a new race that another race used.  This allows you to reskin a race but use the same animations.   
* Template allows you to use the same subgraph animation data for a new race that another race used.  This allows you to reskin a race but use the same animations.  '''Note''': Skeleton & Behavior Graph have to be set to the same as the template race as well.  This should all happen automatically if you duplicate a race and rename it.
**'''Note''': Skeleton & Behavior Graph have to be set to the same as the template race as well.  This should all happen automatically if you duplicate a race and rename it.


==== Roles ====
==== Roles ====
The role of the subgraph data specifies when the graph & animations will be loaded.
The role of the subgraph data specifies when the graph & animations will be loaded.


* '''MT''': This is used when you didn't have a weapon readied.
* MT - used when you didn't have a weapon readied
** Changed when using [[ChangeAnimArchetype - Actor]] or [[ChangeAnimFlavor - Actor]]
** Changed when using [[ChangeAnimArchetype - Actor]] or [[ChangeAnimFlavor - Actor]]
* '''Weapon'''
* Weapon
** Should change when switching [[Weapon]]s and potentially changed when using [[ChangeAnimArchetype - Actor]] or [[ChangeAnimFlavor - Actor]].
** Should change when switching weapons and potentially changed when using [[ChangeAnimArchetype - Actor]] or [[ChangeAnimFlavor - Actor]]
* '''Furniture'''
* Furniture
* '''Pipboy''': This is only used for 1st person pipboy animations.
* Pipboy (only used for 1st person pipboy animations)
* '''Linking Only''': This is only useful for Bethesda's internal build process.
* Linking Only - Only useful for Bethesda internal build process.


==== Perspective ====
==== Perspective ====
Useful only for the player's [[Race]], this allows you to specify 1st or 3rd person animations.  Choose 3rd for all non-playable race data.
Useful only for the player's race, this allows you to specify 1st or 3rd person animations.  Choose 3rd for all non-playable race data.


==== Actor Keywords ====
==== Actor Keywords ====
These [[Keyword]]s need to exist on the [[Actor]] for this sub graph data to get picked.   
These keywords need to exist on the actor for this sub graph data to get picked.  Some keywords can be added dynamically (Archetype, Flavor & Injuries) and some are typically added in the editor to the race or actor (AnimSynth, AnimArchetypePlayer).  'Female' is a special actor keyword automatically added based on the combination of Actor's gender & 'opposite gender anims' checkbox. ''Note'': The game will always choose the subgraph data that matches the maximum number of actor keywords.  Matching number of target keywords is the tie breaker.  If two are tied in both those categories, it is undetermined which will get chosen.
Some keywords can be added dynamically (Archetype, Flavor & Injuries) and some are typically added in the editor to the [[Race]] or [[Actor]] (AnimSynth, AnimArchetypePlayer).   
'Female' is a special actor keyword automatically added based on the combination of Actor's gender & 'opposite gender anims' checkbox.  
The game will always choose the subgraph data that matches the maximum number of actor keywords.   
Matching the number of target keywords is the tie breaker.   
If two are tied in both those categories, it is undetermined which will get chosen.


==== Target Keywords ====
==== Target Keywords ====
The "target" is specific to a certain role.   
The "target" is specific to a certain role.  If the role has a target, that target must match all keywords in the "target keywords" set.  Targets broken down by role:
If the role has a target, that target must match all keywords in the "target keywords" set.   
 
Targets broken down by role.
* MT: No target.
* MT: No target.
* Weapon: The [[Weapon]] being equipped.
* Weapon: The weapon being equipped.
* Furniture: The [[Furniture]] being used.
* Furniture: The furniture being used.


==== Behavior Path ====
==== Behavior Path ====
The behavior graph that is used to provide the logic for this sub graph data.   
The behavior graph that is used to provide the logic for this sub graph data.  Bethesda only supports use of behavior graphs shipped as sub graphs to the particular root project on the race.  IE: For any Project in the body data tab, if there is a behavior graph you'd like to use in the Behavior Paths for that project already, you're ok to use it.  All others will not work properly.   
Bethesda only supports use of behavior graphs shipped as sub graphs to the particular root project on the race.   
For any project in the body data tab, if there is a behavior graph you'd like to use in the "Behavior Paths" for that project already, you're ok to use it.   
All others will not work properly.   


==== Animation Paths ====
==== Animation Paths ====
When loading a behavior graph for the sub graph data entry, the animation file names it uses will be searched for in the paths provided here.   
When loading a behavior graph for the sub graph data entry, the animation file names it uses will be searched for in the paths provided here.  The path order is important - it will check the first path before moving onto the next path and so on.
The path order is important - it will check the first path before moving onto the next path and so on.


=== Generating Metadata needed for Game ===
=== Generating Metadata needed for Game ===
Since the same graph logic is reused, the game needs some extra data to know how to translate the speeds the game wants into what animations play.   
Since the same graph logic is reused, the game needs some extra data to know how to translate the speeds the game wants into what animations play.  There is also data that is need to calculate furniture entries & exits as well as weapon sight lines & fire locations.  This data is generated through a build process that is run through the Creation Kit.  To run the process, after you've added your sub graph entries and have the necessary data, run, based on role:
There is also data that is need to calculate [[Furniture]] entries & exits as well as [[Weapon]] sight lines & fire locations.   
This data is generated through a build process that is run through the Creation Kit.   
To run the process, after you've added your sub graph entries and have the necessary data, run, based on role:


<code>CreationKit.exe -GenerateAnimInfo:<ESMFilename> <DataFilepath> <OutputFilepath> [--speed] [--stance] [--forceAll]</code>
<code>CreationKit.exe -GenerateAnimInfo:<ESMFilename> <DataFilepath> <OutputFilepath> [--speed] [--stance] [--forceAll]</code>
Line 82: Line 57:
<code>CreationKit.exe -GenerateAnimInfo:SubgraphExample.esm ..\Data ..\Data\Meshes\AnimTextData</code>
<code>CreationKit.exe -GenerateAnimInfo:SubgraphExample.esm ..\Data ..\Data\Meshes\AnimTextData</code>


== Notes ==
=== Notes & Caveats ===
* Create Archive should properly collect all this data into your mod archive.
* Create Archive should properly collect all this data into your mod archive.


== See Also ==
[[Category:Animation]]
*[[:Category:Animation|Animation Category]]
*[[:Category:Actor|Actor Category]]

Please note that all contributions to the Fallout4 CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see FalloutCK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)