Walt The more I think about this, the more I like it, and I think I have a pretty good way to code it without requiring multiple projectiles. The thing I wonder about though is, how does it interact with the existing penetration damage? Is just one pool of damage and when it runs out, the bullet despawns (if penetration doesn't run out first)? Does it get added to the existing penetration damage?
My suggestion to the Railgun's penetration damage.
Instead of having a pool of damage to be reduced. The damage of the Railgun should change based on how much Penetraion value (Pen.) was left in the bullet as it went through the ship.
The damage is calculated like this:
Damage = Basic Damage * Current Pen. / Original Pen.
For example, if a bullet with 10 Pen. went through 10 blocks with 1 Pen.. The damage it dealt to each block would be 100%, 90%, ..., 20%, and 10% respectively. (Before it was 100%, 25%, ...,25%.) It will run out of the damage as soon as it ran out of the penetration.
This will greatly increase the penetration damage of the Railgun. So I think the basic damage of it should be reduced a little.
(Now think of it, this damage calculation can apply prety well on the Cannons too.)
However, non of these matter if the Railgun can be stop by just a single layer of shield.
So I suggest that the Railgun able to go through multiple shields like an EB, but reduce the damage to 25% for each shield it went through.
In this way, a very powerful Railgun can still deal damage through multiple shields, but the damage will be significantly reduced.