You can register a BUILDING_ASSET_PROCESSOR on any FBX to partially automatize the configuration of your building or monument building part nodes.
Register the asset processor on a FBX like that:
-- Apply building asset processor mod:registerAssetProcessor("models/MithrilFactory.fbx", { DataType = "BUILDING_ASSET_PROCESSOR" })
The processor will automatically add the COMP_BUILDING_PART component to each node containing the word Part
in their name.
The processor will automatically assign ConstructionVisual
to the building part if it exists another node, with the same name, same parent names, in a root node called ConstructionSteps
.
For instance, the part AA/BB/ChimneyPart
will search for a node called ConstructionSteps/AA/BB/ChimneyPart
to use as a ConstructionVisual
.
The processor will automatically add the COMP_BUILDING_ATTACH_NODE component to each node containing the word Attach
in their name.
Moreover, if we find one of the values of ATTACH_NODE_TYPE in the name of the object, we use it to determine the type of the attach node. If we do not find it in ATTACH_NODE_TYPE, we assign it as MINOR
.
Note: At this point in time (1.10.3.10), we are ignoring all objects that contain Visual
in their name. This restriction will be removed in a future patch.
Paths are building part entrances and exits. They are a list of nodes forming a path to enter the building.
Nodes with names starting with PATH_
will be interpreted as path for the parent part. PATH nodes must be direct children of their parent part.
Buildings can have many paths, each path is identified by a letter. For instance, each node starting with PATH_A_
will be part of Path A.
a number is then used to define the path sequence:
PATH_A_1
PATH_A_2
PATH_A_5
PATH_A_6
It's fine if there is holes in the number sequence, but you can't use the same number twice for the same path.
Nodes can also be used in more than one path:
PATH_AB_1
PATH_AB_2
PATH_A_3
PATH_B_3
In that case, path A and B are sharing the two first nodes.
Sharing nodes is specially important when agents can enter by a door and leave by another one. To do so, both door needs to end with a shared node:
PATH_A_1
PATH_A_2
PATH_A_3
PATH_B_1
PATH_B_2
PATH_AB_4
Since both path ends with node PATH_AB_4
, an agent could leave the building from path A or B as long as he entered the part with any of those path.
Note: automatic path setup doesn't allow to set a path's type. For this, paths need to setup manually in the building part (COMP_BUILDING_PART.PathList
)