Tier Upgrades

2commands
1permission
3files
2min read
Sheet 21 of 33 · Buildings

Filesschematics/buildings/cottage_t1.yml · schematics/buildings/cottage_t2.yml · schematics/buildings/cottage_t3.yml

Fileschematics/buildings/cottage_t1.ymlFileschematics/buildings/cottage_t2.ymlCommand/paste buildingsCommand/paste speedupChain schematics into tiers and a tracked building can be upgraded into the next one where it stands. The worker crew renovates it: blocks that are the same in both tiers are not touched, blocks that differ are replaced, and parts the new tier no longer covers go back to the original ground.

Building a chain

Each tier's sidecar points at the next with upgrade-to, using the selector name:

schematics/buildings/cottage_t1.yml
cost: 1000.0
construction-duration: 40
upgrade-to: buildings/cottage_t2
upgrade-cost: 2500.0             # omit to charge cottage_t2's own cost
upgrade-duration: 45             # omit to use cottage_t2's build time
schematics/buildings/cottage_t2.yml
cost: 3500.0
construction-duration: 60
upgrade-to: buildings/cottage_t3
upgrade-cost: 6000.0
upgrade-cost-items:              # items too, same syntax as cost-items
  - STONE_BRICKS:64
  - DEEPSLATE_TILES:32
upgrade-duration: 60
schematics/buildings/cottage_t3.yml
cost: 12000.0
construction-duration: 90
building: true                   # last tier; tracked if pasted directly

The upgrade settings live on the tier you upgrade from. Chains can be as long as you like. If upgrade-to names a schematic that does not exist, the building shows no upgrade.

Key (on the current tier)DefaultMeaning
upgrade-tononeNext tier's name
upgrade-costnext tier's costMoney for this step
upgrade-cost-itemsnoneItems for this step. FULL_SCHEMATIC counts all blocks of the next tier
upgrade-durationnext tier's build timeSeconds, clamped by construction.min-duration-seconds and max-duration-seconds. 0 is instant

Designing tiers that line up

An upgrade keeps the building's anchor, rotation and flips, and puts the next tier bottom-centred on the same spot, whatever origin each tier was saved with. Tiers of different sizes grow out evenly on all sides. To keep a door or a path in place from tier to tier, build the tiers on the same centre and the same floor level, and copy them the same way round.

Running an upgrade

Command/paste buildingsPermissionignitepaste.buildings.upgradeOpen /paste buildings, pick the building and click Upgrade. It needs ignitepaste.buildings.upgrade, and you must not be in paste mode.

In order, the upgrade:

  1. checks that there is a next tier, the building is not busy, and its world is loaded (building-world-missing otherwise),
  2. checks the money and the items (economy-no-balance, material-shortage),
  3. works out the difference between the building as it stands and the next tier,
  4. runs WorldGuard, PlotSquared, Towny and IgniteSky on the new bounding box (paste-region-denied, paste-plot-denied, paste-ignitesky-denied),
  5. takes the money and items up front,
  6. Command/paste speedupruns the renovation through the construction crew, with the boss bar and /paste speedup, or applies it instantly when the duration is 0.

Chat: Upgrading to buildings/cottage_t2. ETA: 45s · 863 blocks to change., and at the end Upgrade finished - the building is now buildings/cottage_t2.

Because it is paid up front, an upgrade keeps running if the owner logs out. The paste log records it as upgrade:<next tier>.

When a tier shrinks

If a block of the current tier is not part of the next one, it goes back to what was there before the first paste, from the ground snapshot taken back then, or air where there was nothing.

Loading the index

Enter openUp Down moveEsc close