local weight_of_platform_foundation_tiles = 200
local shape_constant = 0.8862 -- (pi/4)^0.5. This value means that circular platforms are unaffected. A shape_constant of 1 would mean square platforms are unaffected.
local replacement_for_width = "(weight / ("
.. weight_of_platform_foundation_tiles
.. " * "
.. shape_constant
.. ")) ^ 0.5"
shape_constant has redundant square roots (or it is in the wrong bracket level)
fix:
local replacement_for_width = "(weight / "
.. weight_of_platform_foundation_tiles
.. ") ^ 0.5 * "
.. shape_constant