Skip to content
TECHNICALLYARTIST
FAB

Assignment Definitions

The Assignment Definitions data asset is the single place that ties an order together: it maps an order tag to the resource it harvests, the actor it carries, the Behavior Tree it runs, and the socket it carries on. Point your minion’s Gatherer Component at one of these (its Available Assignments Data Asset), and list one entry per order the minion can take.

Open the data asset (the demo’s is DA_Assignment_Definitions) and add an entry under Available Assignments with these fields:

FieldMeaning
Assignment TagUniquely identifies the order. This is the tag you pass to Try Begin Assignment.
Resource TagThe resource type this order harvests. Must match the Resource Tag on the target resource actors.
Extracted Resource Actor ClassThe actor spawned into the minion’s hand and carried home when a harvest completes.
Assignment Behavior TreeThe Behavior Tree the minion runs for this order. Use the included BT_Extract_Resource or your own.
Home Actor (optional)An actor spawned at the home location to mark the drop-off (for example a banner or flag).
Resource Socket NameThe skeletal mesh socket the carried actor attaches to. Different orders can use different sockets.

The DA_Assignment_Definitions data asset with Wood and Stone entries, each mapping its tags, carried actor, Behavior Tree, home actor, and socket

When you call Try Begin Assignment with an Assignment Tag, the asset is searched for an entry whose Assignment Tag matches exactly. If none is found (or the asset is empty), the order is rejected and an error is logged. Tag hierarchy is not used for matching here; the tags must be equal.

When the minion drops a harvested resource at home, the resources do not all land in the same spot; they stack into a tidy pile. The first items form the base layer, then the pile builds upward in progressively smaller layers (a 3x3 base, then 2x2, then a single item on top), giving a pyramid of up to fourteen items before a new pile starts.

The stacking is tuned for compact, log or block shaped meshes (think a woodpile or a stack of crates). If your carried mesh is a very different size or shape, expect the spacing to look off, and size your mesh to suit.