RimWorld

RimWorld

55 ratings
Raised Platforms
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.6
File Size
Posted
Updated
730.970 KB
2 Aug @ 11:08am
8 Aug @ 4:51am
3 Change Notes ( view )

Subscribe to download
Raised Platforms

Description
Introduction


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.

How It Works


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)


Content


Buildings
  • Large platform - a 4x4 platform of maximum height 5.
  • Medium platform - a 3x3 platform of maximum height 5.
  • Small platform - a 2x2 platform of maximum height 5.
  • Tiny platform - a 1x1 platform of maximum height 5.
37 Comments
千冥落 Just now 
This comment is awaiting analysis by our automated content check system. It will be temporarily hidden until we verify that it does not contain harmful content (e.g. links to websites that attempt to steal information).
千冥落 19 minutes ago 
Now all the turrets are unable to hit ground targets.
mjeiouws  [author] 2 hours ago 
Thanks for the quick reports! The burstfire thing should now be fixed, as well as a pretty serious bug where bullets wouldn't hit pawns. Unfortunately the tiny platforms are working just fine for me, so I don't have much insight on the issue.

To answer the question on how the mod works, roofs do in fact protect pawns by blocking line of sight. The interception checks aren't very thorough, however, so there are trajectories (mostly steeper ones) where bullets can still slip through.
I found that the tiny one is not working (at any height), but 2x2 or larger platforms are working. Has anyone else encountered the same problem?
by tanke12599 5 hours ago 
I found that the problem should be that after the previous bullet eliminates the enemy, the subsequent bullet loses its target and directly stays on the enemy's corpse, failing to explode or hit the target behind. This causes a logical freeze and red error messages. Therefore, this issue is particularly severe on burst-fire turrets.
fester_21 11 hours ago 
im also having this same issue as tanke12599, its causing red error spamming also
by tanke12599 11 hours ago 
The texture of the last bullet fired from a turret using a rapid-fire weapon will remain in place on the target after firing, and a long string of red letters will burst out.
Stokes52 18 hours ago 
Excited to see more updates for this!

So turrets and pawns on a platform can shoot over walls, but they cannot shoot into roofed rooms and mountains, is that correct?
StockSounds 19 hours ago 
So is this like SOS2 hardpoint turrets where they shoot above builds?
mjeiouws  [author] 20 hours ago 
Regarding CE, the answer's a no; they handle trajectories in a different way to vanilla, and while I suspect it shouldn't actually be too hard to have height-axis stuff, it won't be with my patches. I could probably put in something to turn them off, if someone comes up with something.