Raised Platforms
This mod introduces platforms, raised structures that allow colonists and turrets to fire (and be fired at) over walls.
— —
Note – if you notice any bugs or performance issues, let me know! I definitely don’t feel like I’ve taken the safest approach to coding this.
Built platforms update a map component that tracks the elevation of each cell, with the assumption that 1 story is equivalent to the fill percentage of an impassable wall (e.g. 1). If either the target or origin cell have an elevation above zero, a patch replaces the game’s native LoS calculation with one that checks whether a line between the the origin level and end level is uninterrupted by cells of sufficient height.
Height offsets of targeting lines can be configured via settings. Heights of interrupting cells are calculated like such:
h = base height (from grid) + fill percentage (override: 10 if mountain roof, 1.2 if other roof)
- Large platform – a 4×4 platform of maximum height 5.
- Medium platform – a 3×3 platform of maximum height 5.
- Small platform – a 2×2 platform of maximum height 5.
- Tiny platform – a 1×1 platform of maximum height 5.