1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

Found a fix for armor deformation destroying nearby functional blocks. (Now with more 1.168 bugs!)

Discussion in 'Modding' started by ILL-UMINATI, Dec 22, 2016.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. ILL-UMINATI

    ILL-UMINATI Trainee Engineer

    Messages:
    17
    So anyone who has used a modded weapon has probably noticed this, but weapons that deal enough damage to cause a lot of deformation in a single frame, as well as large collisions between ships, can destroy blocks that are nearby if they aren't deformable. It's really been bugging me how obvious this becomes when I'm testing combat balance for my mod, a single hit from a weak weapon on a heavy armor block can destroy a 3x3x3 turret if the armor block is connected to another armor block that the weapon is resting on, without even destroying the armor block the projectile hit. This was also causing extensive damage to ships internally: destroying conveyor lines and other blocks when there's still two full sheets of heavy armor between them and the projectile causing minor deformation. Even non-modded missiles can destroy a functional block that is several blocks away if it deforms a nearby armor block. This still happens even if you set the deformation ratio of the armor to something extremely low like 0.0001.

    So after some extensive testing, I found a block that wasn't deformable but wasn't destroyed by nearby deformation: the blast door blocks.

    The fix is really simple as it turns out, you just have to give non-deformable blocks a deformation ratio anywhere in their definition. This doesn't make the blocks deformable, what defines whether or not a block is deformable is <BlockTopology>Cube</BlockTopology>; non deformable blocks have "TriangleMesh" instead of "Cube". Giving a non-deformable block a deformation ratio just makes them immune to being destroyed when a connected block is deformed.

    I'm assuming the relation of the bug is how deformation is handled, all blocks have a maxdeformation value that when exceeded destroys the block, and non-deformable blocks either don't have one or it is set at zero, but still checked by the damage system and returned as zero, causing any deformation to nearby blocks which transfers deformation to it, to exceed the value of 0 and destroy the block. No matter what the deformation ratio or the integrity of the non-deformable block is, as long as it has a deformation ratio it is unaffected, either because giving it a ratio automatically gives it a maxdeformation value above 0 and it can't be deformed so it can't exceed the value, or because it is handled differently by the damage calculation if it has a ratio.

    TL;DR give all your cubeblocks a deformation ratio, it's a huge difference, even without modded weapons.


    EDIT:
    1.168 update is now causing this issue with armor blocks adjacent to a hit armor block to be destroyed by excessive deformation damage when the damage of the original hit exceeds ~1/3rd of the hit block's integrity.

    I noticed this immediately when testing something and a cannon shot was destroying one or more adjacent heavy armor blocks every shot when it takes 2 hits to destroy the armor block it actually hits. The damage to integrity is still consistent across all block types, components, armor blocks etc. It's a problem exclusively with deforming blocks. Either they changed the deformation calculation and it's causing way, way too much deformation to be transferred to nearby blocks, or the Maxdeformation value for armor blocks was lowered in the case of single-frame deformation. Either way I'm pissed. I don't think I can find a workaround for this and it completely destroys the weeks of balance work I've put into my server's modpack. EDIT: Issue can be mitigated by changing deformation ratios to compensate (essentially lowering the deformation damage to allow blocks to handle the extreme deformation force of the bug). I've had to set it to insanely low values for heavy armor (0.0001) to get the bug to stop in all scenarios (projectile mass damage ranging from 8k to 40k), which of course effectively removes deformation from non-destroying hits as a feature from space engineers. Oh well.
     
    Last edited: Dec 30, 2016
    • Informative Informative x 5
  2. Phoera

    Phoera Senior Engineer

    Messages:
    1,713
    this describes why my first flaks was too powerfull(they exploded near ship, so explosion damage touched many surface blocks)
     
  3. ILL-UMINATI

    ILL-UMINATI Trainee Engineer

    Messages:
    17
    Edited for issue with new patch.
     
Thread Status:
This last post in this thread was made more than 31 days old.