Skip to content

Scale build plan (construct block) with construct and deconstruct progress#11584

Draft
EggleEgg wants to merge 1 commit intoAnuken:masterfrom
EggleEgg:build-plan-hp-stuff
Draft

Scale build plan (construct block) with construct and deconstruct progress#11584
EggleEgg wants to merge 1 commit intoAnuken:masterfrom
EggleEgg:build-plan-hp-stuff

Conversation

@EggleEgg
Copy link
Contributor

@EggleEgg EggleEgg commented Jan 19, 2026

No more spending 2 minutes building a very expensive block or core just for a flare to destroy it instantly because it has 10 hp

Max buildplant health is 10 by default as before, but with an optional variable to set plan max health to a % of the block s health (constructHealthMultiplier).
Example: if a block has 5.8k hp and the multiplier is 0.5, the buildplan s health will increase with progress (0-1) up to its 2.9k maxhealth. If the multiplier is <=0 (default) it will only increase up to 10

Blocks with constructHealthMultiplier:

  • Impact reactor, neoplasia reactor, foreshadow, spectre, meltdown, scathe, smite, malign, multiplicative reconstructor, tetrative reconstructor -> 0.5
  • Core shard, foundation, nucleus, bastion, citadel, acropolis -> 0.65
2026-01-1918-24-58-ezgif.com-gif-maker.mp4
2026-01-19.20-32-33.mp4

.

And a release https://github.com/EggleEgg/Mindustry/releases/tag/34trre

If your pull request is not translation or serverlist-related, read the list of requirements below and check each box:

  • I have read the contribution guidelines.
  • I have ensured that my code compiles, if applicable.
  • I have ensured that any new features in this PR function correctly in-game, if applicable.

return progress;
}

public void scaleHealth(float progress){
Copy link
Contributor

@way-zer way-zer Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good, and I think it can be applied to all buildings.

However, this function seems to need some optimization:

  1. Why use tile.build instead of this?
  2. previousHealth and damaged are not persisted or synchronized.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could implement like this:

  • old = health / maxHealth
  • maxHealth = xxxx
  • health = old * maxHealth

@LeoSko
Copy link
Contributor

LeoSko commented Jan 20, 2026

I implemented this back in v6 for Ranked server, just would like to point out for thorough testing on building, then deconstructing building mid-build, then building it a bit up again until built, etc. Especially when mid-built the ConstructBlock got some damage (then, again, it started to de/re-construct by the player).

@EggleEgg EggleEgg marked this pull request as draft February 12, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants