Armor Penetration system similar to Helldivers 2

Greetings!

As the title suggests, I am looking for help in creating an armor penetration system similar to the hit game “Helldivers 2”. So far, I am using a float variable that I can change the armor penetration value, and am planning on adding a way for an armor value varibale. If the armor pen is equal to the armor value, then the damage is reduced by 50% but if it is more, it deals 100% damage, and if it is less, then it does no damage (planning on making it ricochet, but it is not in the scope at the moment). I wanted to know if anyone knew a better way before I moved forward and tried to figure this out.

I haven’t been able to find much information on a system like this, so any help is much appreciated.

The solution depends on the enemies.
In Helldivers 2, as I understand it, enemies are divided into sections considered as armor and the enemy itself. Upon impact, armor, penetration, and the resulting damage are calculated accordingly.
However, if you need realistic armor and structure penetration mechanics, the Multi Line Trace node would be suitable-it allows you to record all objects that a line trace passes through.