Building

Key Features

  • Manages Player Builders: Provides a number of available builders, and interface for finding and/or starting building process.

  • Collection Module Integration: With configuration you can specify if builders should attempt to collect resources after working or when no more work is available for building and their last building task was a resource depot. If builders are also collectors, they can be sent to nearby resource node with a new task.

  • Building Animation: Abstract implementation for building animation behaviour and simple raise building implementation.

  • Auto-Build: Allows buildings to build automatically, without using builders.

  • Event-Driven Updates: Triggers events for UI or gameplay reactions when entity starts, updates or completes building process.


Structure

  • Building Module - Easy access to available builders and finding nearby buildable entities.

  • Builder Capability - Defines builders capabilities like build interval, build power, enable auto-pickup and pickup.

  • Builder - Management of the builder's state and interactions.

  • Buildable Capability - Defines if entity builds automatically and if it updates health during building process.

  • EntityBuilding - Implements IBuildable and manages the state of entity's building process.

  • Build Events - Global events for tracking building processes: start, update, cancel, building complete, builder finished work.


Usage Examples

Control Builders

When you wish to send builders to build a nearby buildable entity.

  • Retrieves module from the player if present

  • Module finds the closest buildable entity available

  • Optionally filters out full buildable entities. You can limit max active interactions on a building so only 1 or 2 builders can be assigned to it, or disable limitation completely.

  • Builder is ordered to go build, which internally starts the BuildTargetTask if the target is valid.

When you wish to send a builder to the specific target.

Display Available Builders

To show available builders to player on UI, you can use module's interface.

Finish Building Immediately

If there is a need to complete building process instantly.

Last updated