A Build is a build task entity — an active construction, upgrade, recycling, or restocking order on a Build module ’s buildprocessor . Each build has a target macro, a customer faction, and a state (waiting / processing / complete / cancelled).
Inheritance: None — build is its own root datatype.
Property Type Description .existsbool Build exists .iscancelledbool Has been cancelled .isprocessingbool Currently being processed .mayrequireconstructionvesselbool May need a construction vessel
Property Type Description .isshipbuildbool Building a ship from scratch .isrecycleshipbuildbool Recycling a ship .isexpansionbool Expanding an existing station .isupgradebool Upgrading an existing ship .issoftwareonlyupgradebool Only updating software .isrestockbool Restocking (refilling consumables) .isshipmodificationbool Restock OR upgrade
These flags are mutually informative — vanilla code typically branches on the most-specific applicable flag.
Property Type Description .objectcontainer The station/dock processing the build .buildmodulebuildmodule The module .buildprocessorbuildprocessor The specific processor .buildobjectcontainer What’s being built (whichever of base / construction is valid) .basecontainer Pre-existing target (for upgrades / restocks) .constructioncontainer Newly-created target (for from-scratch builds) .factionfaction Faction the build is for .macromacro What’s being built
.base and .construction are mutually exclusive — one is null. Use .buildobject to get whichever is valid.
Property Type Description .timetime When created (game time) .agetime How long ago created
Property Type Description .loadoutstring Loadout id (null if custom or omitted) .loadoutfactionfaction Faction for loadout retrieval
Property Type Description .consumablestable Map of consumable macro → amount .pricemoney Price when build was added .transferredamountmoney Money already moved (+ from buyer, - refunded)
Property Type Description .constructionsequenceconstructionsequence The sequence backing this build
Property Type Description .zonezone Where the build lives .positionposition Position in zone .rotationrotation Orientation in zone
< do_if value = " $build.isshipbuild " >
<!-- new ship from a shipyard / wharf -->
< do_elseif value = " $build.isexpansion " >
<!-- adding modules to a station -->
< do_elseif value = " $build.isupgrade " >
<!-- refitting an existing ship -->
< do_elseif value = " $build.isrecycleshipbuild " >
<!-- breaking down a ship for resources -->
< set_value name = " $Target "
exact = " if @$build.construction
Or simply:
< set_value name = " $Target " exact = " $build.buildobject " />
The accessor .buildobject already abstracts this.
< find_station_by_true_owner name = " $Stations "
< set_value name = " $ActiveBuilds " exact = " 0 " />
< do_for_each name = " $s " in = " $Stations " >
< do_for_each name = " $build " in = " $s.builds.inprogress " >
< set_value name = " $ActiveBuilds "
operation = " add " exact = " 1 " />
text = " $ActiveBuilds + ' active player builds' " />
The .builds.inprogress accessor is on Container .
⚠ .base and .construction are mutually exclusive. One is null. Use .buildobject to get whichever is valid.
⚠ .isshipmodification is OR over .isupgrade + .isrestock. Don’t double-count.
⚠ .consumables is a table, not a wareamountlist. Iterate via table accessors, not .list.
⚠ .transferredamount is signed. Positive = paid by player, negative = refunded. Mod code that tracks “what’s spent” should use absolute values.
⚠ .macro is what’s being built, not the build’s own macro. Build is not a physical object — it has no macro of its own.
⚠ .zone is where the build will physically appear. For shipyard builds, that’s the shipyard’s zone. For expansions, the host station’s zone.
Pattern — task entity with type flags
Build is a task entity — long-lived but transient (minutes to hours). Branch by the type flags to handle ship-build vs station-expansion vs ship-upgrade differently. Same shape as Trade , Boardingoperation .