This thread is about suggestions how to solve the problem of implementing structural integrity and not about arguing if some specific idea is good for the current balance with cloak or stealth
Right now, you aren't forced to use hull, thus balance of stealth/cloak is done without hull.
But how to define structural integrity in code?
Here is one example implementation suggestion:
sif: structural-integrity factor. Generated for core and on each block instance. Means that this block is attached by to the core with a strength of sif (where sif is between 0 and 100%)
sif-modifer: Depends on block type (hull [, hard hull [, interior]], deko, vital-parts, etc)
[*]After blocks maybe 75%
If a block gets destroyed/removed, put the neighbours in some ToDo-list.
On each update (maybe after explosion calculations or 10^3 block from build tool is done) check if the block is either the core/center block or for the highest neighbouring sif - and if highest-sif*self.sifModifier = self.sif, or update and put neighbours with lower sif than old sif on the ToDo list.
What to do with all the sif-values? Here we go:
If a sif-value changes, calculate group.sif + (newSif-oldSif) /group.length(=number blocks) to get a new average.
Use sif^x with x>1 for all average-calculations, if you want to give the low-sif parts more weight in the average, sif^x with x
Right now, you aren't forced to use hull, thus balance of stealth/cloak is done without hull.
But how to define structural integrity in code?
Here is one example implementation suggestion:
sif: structural-integrity factor. Generated for core and on each block instance. Means that this block is attached by to the core with a strength of sif (where sif is between 0 and 100%)
- The core has a fixed sif=1. (Alternatively use a block close to the center of mass with a high sif-modifier)
sif-modifer: Depends on block type (hull [, hard hull [, interior]], deko, vital-parts, etc)
- Every other block has a sif of (highest neighbouring sif) * (the block's sif modifier)
never reaches 0 as long as the sif modifier is higher than 0!
[*]After blocks maybe 75%
If a block gets destroyed/removed, put the neighbours in some ToDo-list.
On each update (maybe after explosion calculations or 10^3 block from build tool is done) check if the block is either the core/center block or for the highest neighbouring sif - and if highest-sif*self.sifModifier = self.sif, or update and put neighbours with lower sif than old sif on the ToDo list.
What to do with all the sif-values? Here we go:
If a sif-value changes, calculate group.sif + (newSif-oldSif) /group.length(=number blocks) to get a new average.
Use sif^x with x>1 for all average-calculations, if you want to give the low-sif parts more weight in the average, sif^x with x