A basic step-by-step is already provided in the description. Feel free to reach out for any questions. I would also love any and all feedback or suggestions.

Usage Notes

For Authors who want Direct Integration:

If you want to directly integrate the framework into your mod, the most important thing to copy will be my Collision Layer [COLL:xx000800]. All Penetrator Projectiles you create should then link to your integrated copy of this Collision Layer. The initial Projectile (the one that results from either the Ammunition used or an OMOD Override-Projectile) should not have its Collision Layer changed (it should either be a Null Reference or L_PROJECTILE [COLL:00088767]).

Everything else should be relatively simple; follow the step-by-step in the description and refer to the provided template examples in the framework [Ctrl+Click a template and your own entry > Right Click > "Compare"]. Just remember that at the end of the day you need to add 2 Explosions and 1 Projectile: (1) Explosion: the "Penetration Effect", which must spawn the Penetrator Projectile; (2) Projectile: the "Penetrator Projectile"; and (3) Explosion: the Penetrator Damage ("Determines Damage").

If the Projectile already creates an Explosion, You will need to combine the properties of my "Generic Penetration Effect" with the existing properties of the Explosion (or replace it). Crucially, you must flag it as "Ignore LOS Check" and copy the X, Y, and Z-axis for the Spawned Projectile (you can modify Spread Degrees and Count as you want). It took me a large amount of time and research and a lot of testing to figure this out and narrow things down, but I think these are the most important constants. If the numbers are changed, the penetrator will veer awkwardly off or result in a ricochet.

For examples of how to combine, see the proof of concept (Gauss Rifle 2mm EC Cover Penetration - the Vanilla 2mm EC has a GaussImpactExplosion which I modified), the Wasteland Ballistics Version of the same (WB works by applying Object Effects on hit, I forwarded the same effects to the penetrator Explosion), and/or the Combined Arms AKM High Penetration Ammo Plugin included in the Optional Files (the Combined Arms team had made the Projectile apply the AKM_HE_EXP Explosion, which was used by other weapons. To stop them from having penetration, I instead replaced it with my Penetration Effect and then mimicked the properties of the AKM_HE_EXP Explosion in the penetrator Explosion). 

For Use as Dependency:

Just flag the framework as a Master and edit your Projectiles accordingly. Should be slightly easier to do/less clicks required as you can simply modify/duplicate the existing template projectiles to your liking, because they are all set and ready. Alternatively, you can duplicate the "Generic Penetration Effect" to make a custom Penetration Effect, which you attach as an Explosion to your Projectiles (Usage Notes for Direct Integration apply mutatis mutandis).

Using the framework as a master might also help with compatibility if the framework sees some use, as everyone can just point towards the same Collision Layer in the Framework (I do not know what happens if you have multiple identical Collision Layers added by multiple mods, I suspect nothing much though). Any demonstrations or patches I make will probably follow this method.

Check out the two 50 Cal Optional Files which demonstrate how Real Time Cover Penetration can be easily added to Vanilla Projectiles. Note that I had to create a new Projectile just for the 50 Cal as Bethesda had made it shoot AssaultRifleProjectile for whatever reason. The new 50 Cal is created to prevent everything shooting AssaultRifleProjectile from blasting through walls. IMPORTANT: It seems that the Penetrator Projectile must be contained in the same plugin as the Penetration Effect Explosion. Simply copy as new record one of the template Penetrator Projectiles into your plugin and edit as desired.

Known Variables

(Labels per xEdit)


Initial Projectile (Ammunition/Projectile)
[Ammunition Record]: DNAM - DNAM > Projectile: Must be changed/linked to the Projectile you want to give penetrative power to.

OBND - Object Bounds: Values do not matter (keep as Vanilla or as preferred).

DNAM-Data 
  • > FlagsMust be flagged as Explosion. [Note: Pass Through Small Transparent relates to things that have been identified by the engine as Small Transparent, I have no way of adding this to specific materials/objects. Penetrates Geometry is (probably) used by the Penetrator Perk in VATS. Neither flag can result in real time cover penetration]
  • > Type: Penetration works regardless of whether initial Projectile is flagged as Beam, Missile, Arrow, or Lobber. You can therefore make plasma and lasers penetrate, but this would be odd thematically I think. 
  • > Gravity, Speed, Range: Can be changed as desired without impacting basic functionality.
  • > Explosion: Must be linked to either a Penetration Effect or Spalling Effect.
  • > Collision Layer: Should be left alone. Should be either a Null Reference or L_PROJECTILE [COLL:00088767].
  • > Tracer Frequency: Must be set at 1. Essential to penetration, no idea why. Was probably labelled as a "tracer" because Bethesda used the Spawn Projectile entry to generate non-damaging visual Projectiles that would act as "tracers" for their effectively hitscan bullets.

Penetration/Spalling Effect (Explosion)
OBND - Object Bounds: Values apparently do not matter or do not matter so far (keep as Vanilla or as preferred).

EITM - Object Effect: Can be modified to add effects (detrimental or otherwise) to initial hit without impact on functionality.

Model:
  • > MODL: Use any cosmetic model you want. Templates use effects\fxemptyexplosion01.nif by default (no visual explosion). You can add custom visual effects for the impact of AP rounds on surfaces by modifying this. Up to the artist.

DATA - Data 
  • > Light/Sound: Customize as you desire.
  • > Placed Object: Can be modified to add effects to initial hit without impact on functionality, unless you make it place a Deathclaw or something, which would probably block the Penetrator Projectile and be very angry.
  • > Spawn Projectile: EXTREMELY IMPORTANT. This is how penetration works. Must be linked to a Penetrator Projectile or a Spall Shard Penetrator Projectile. Directional properties controlled by Spawn field data.
  • > Force, Damage: Can be changed as desired without impacting basic functionality. Damage should be set at 0 unless you want your Projectile to explode on hit for additional damage. However, if damage is set very high, the need to ignore LOS means that the explosion itself will be a sphere of pure damage that ignores obstacles, thus resulting in kills to targets within the sphere radius. 
  • > Inner/Outer Radius: Do not appear to matter to penetration (Inner can be set at 0) but I like to keep Outer Radius at 10 just in case. Radius matters if your Projectile has any effect or damage.
  • > Flags: Must Flag Unknown 0; Ignore LOS Check; Ignore Image Space Swap. Ignore LOS Check is determinative of whether you can penetrate. DO NOT flag "Always Uses World Orientation", or ensure that it is unflagged. If modifying an existing Explosion, unflag this. If flagged, Penetrator will fly off in a straight line consistently in the same direction, depending on world orientation and completely ignore where the shoot originated from (precise direction depending on your Spawn X, Y, Z).

Spawn (X, Y, Z values are essential and should not be varied)
  • > X: 0. DO NOT CHANGE. 
  • > Y: -1. DO NOT CHANGE.
  • > Z: 0. DO NOT CHANGE.
  • > Spread Degrees: Degree of variation from the linear path that the Penetrator/Spall Projectile will experience. Adjust higher for greater randomness. Recommend 0 for direct penetration, 150-180 for Spall Effects. Any tighter and the Spalls tend to hit only one target.
  • > Count: Number of projectiles spawned. 1 for direct penetration, a whole lot for Spall Effects.

Penetrator Projectile (Projectile)
OBND - Object Bounds: Values do not appear to matter (keep as Vanilla or as preferred). The values used by the templates definitely allow penetration.

Model:
  • > MODL: Use any cosmetic model you want. Templates use Effects\DefaultTracerBeam.nif by default, which is invisible-ish. You can set the appearance of the Penetrator Projectile here. For consistency sake, you can reuse the data from your original Projectile (for example, see the proof of concept where I forwarded the Gauss tracer into the Penetrator Projectile). However, I doubt that end-users will be able to get much benefit from this as the generated Projectile is, after all, behind cover.

DNAM - Data 
  • > FlagsMust be flagged as Explosion. Should be flagged to Pass Through Small Transparent and Penetrate Geometry.
  • > Type: Penetration works regardless of whether the Penetrator Projectile is flagged as Beam, Missile, Arrow, or Lobber.
  • > Gravity, Speed, Range: Can be changed as desired without impacting basic functionality. If used with a ballistics mod or for any other realism reasons, all three should be set at a level lower than the initial Projectile to simulate loss of energy. Gravity and Speed do not matter if set as Beam. For Spall Shard Penetrator Projectiles, I recommend reducing Range to around 700 to avoid being overly taxing on some systems.
  • > ExplosionMust be linked to "Determines Damage" Explosion for there to be any damage at all. In v0.3-Beta onwards, follows nomenclature of "[10-200] Damage Penetrator".
  • > Collision Layer: Must be set to my custom Collision Layer, [COLL:xx000800]. Alternatively, can use "Highest Penetration Layer" Collision Layer in v0.3-Beta onwards. 
  • > VATS Projectile: Leave as Null Reference, you cannot shoot this Projectile from a weapon anyways, and VAFS Redux/other bullet time mods do not change Projectiles into their VATS versions.

Damage Penetrator (Explosion)
OBND - Object Bounds: Values do not appear to matter (keep as Vanilla or as preferred). Templates use 0 as there is no visual explosion attached anyways..

Model:
  • > MODL: Use any cosmetic model you want. Templates use effects\fxemptyexplosion01.nif by default (no visual explosion). You can set the appearance of the final impact here. For consistency sake, you can reuse the data from your original Projectile (for example, see the Combined Arms AKM High Penetration Ammo Plugin where forwarded the original impact visuals made by the Combined Arms team (AKMnv\ExplosiveProjectile.nif) and mimicked the effects (Force, damage, radius)). However, I doubt that end-users will be able to get much benefit from this as the final impact occurs behind cover.

EITM - Object Effect: Can be modified to add effects (detrimental or otherwise) to post-penetration hit without impact on functionality. NOTE: Post penetration, any Object Effects you have added to the initial impact (the Penetration/Spalling Effect (Explosion)) will not be automatically forwarded to the Penetrator Projectile. If you have added an effect to the initial impact, you should also add the same effects here for consistency (same effect applied whether target is behind cover or exposed). For balance, you might also consider making a separate weaker effect to acknowledge the weakened energy of a projectile after passing through an obstacle.

DATA - Data
  • > Lights and Sounds: Use any cosmetic model you want. Templates are wholly invisible. Recommended to forward the data used in the original Projectile if any (see the Combined Arms AKM High Penetration Ammo Plugin).
  • > Placed Object: Can be modified to add effects (Hazards and such) to final hit without impact on functionality.
  • > Spawn Projectile: You can technically make this spawn yet another penetrator, so long as you follow the same requirements as the Penetration Effect.
  • > Force, Radius, Stagger: Can be changed as desired without impacting basic functionality. I recommend following the radius provided by the templates.
  • > Damage: IMPORTANT. This variable determines how much damage you do upon your ultimate impact. Adjust as desired. NB: scaling observations below.


Known Limitations
Interactions with Surfaces

1. Rounds May Penetrate Almost Everything

Depending on the location and the thing that is being shot at, the rounds may sometimes penetrate through anything, not just weak looking cover, regardless of thickness. The rounds will not shoot through the ground and most thick items (very large containers, thick trees, massive structures). However, there are cases where thick concrete/metal objects can be penetrated. In other places, thin looking cover may be not be penetrated. Shadow0fTheWind has released a simplified version of this mod that is said to fix the Alpha version of this mod and is said to differentiate between thin surfaces vs trees and concrete. That is not the case as Shadow's version uses the Collision Layer from this framework (no disrespect intended towards Shadow, who is a very reputable mod author).

My current understanding is that this is because Bethesda has not set up a specific Collision Layer that applies only to cover that looks flimsy. Vanilla Collision Layers are wide categories (e.g. "Trees", "Clutter", "Ground"). I have assumed that there is no specific Collision Layer because otherwise Bethesda probably could have done what I have, but properly, without using this quirky interaction I found (also why else would planks of wood stop bullets?). Alternatively, I might not have pinpointed the precise Collision Layer because of insufficient testing or lack of Creation Kit know-how. In any event, the penetration effect requires not having interactions with certain Collision Layers, and I think my current layer is satisfactory.

The occasionally unrealistic depth of penetration should not affect end users or otherwise affect their immersion as it is unlikely that a player would know the precise location of the enemy for a precise wallbang, unless they decide to randomly spray at red dots on their compass (or use berry mentats I guess). I anticipate that the penetration effect will most commonly be used in firefights where the player already knows the cover the enemy is hiding behind. 

v0.2-Alpha provides two Collision Layers. The first is what I generally use, as it prevents penetration through the ground and other weird interactions. For certain objects such as thick trees, penetration can be achieved if shot through the edges, but not through the core. I think that's pretty snazzy. Notably, the "ground" generally means the lowest level surface, as I was able to shoot upwards from the tracks at Revere Beach Station and kill stuff at the gantry. Also, Bethesda might have been somewhat inconsistent with their application of the Collision Layers, as some things are just impregnable. The second only provides for interaction with Bipeds, dead Bipeds, the Player, and Critters. This should in theory make for "easier" penetration, but it is considerably less immersive. I will probably add a weak penetration Collision Layer that interacts with L_TREES [COLL:0008876A] and L_TERRAIN [COLL:0008876E].

I did most of my penetration in Revere Beach Station Interior, but after going to Sanctuary to do testing, I have observed some unexpected behavior such as unexpected changes in trajectory on the slanted glass at the Vault 111 Security Station (the walls are readily penetrated), and failure to penetrate the white picket fences (weird right?) in Sanctuary (all the walls in Sanctuary are easily penetrated). Probably related to how the Collision Layers are set up for those objects, so I might fiddle with the Collision Layers included. Any feedback from tests will be highly appreciated.

2. Penetration is not Contextual (Material/Angle of Impact)

To make penetration contextual — in other words sensitive to the specific surface, differentiating wood, concrete, glass, steel — I think it would require adding a new Collision Layer to everything based on its material. Then, set up interactions using a new Collision Layer that adds/subtracts interactions, and linking that to the Penetrator Projectile depending on caliber. I will not be doing this (and have no idea how). This will still fail to take into account thickness/length/width of the material, as most objects are after all a couple of surfaces stitched around an empty void.

Relatedly, the way I have the X, Y, and Z-axis set up means that rounds generally penetrate in a direct line, regardless of the angle of incidence (excluding the intentional Spalling Effect). You can simulate deflection by adjusting the Spread Degrees value of the spawned projectile, but I suspect this might end up making things feel unreliable. I am also not a physicist so I have no idea how it should work. Straight lines seem good enough for gameplay. However, I emphasize that this is how it generally works because I have observed a repeated (but rare) phenomena where the penetrator deflects and fails to travel in the same linear line (most obvious with the blue tracer from the GaussProjectile). Trial and error indicates this happens most often (but not invariably) with rounded surfaces, or surfaces that are very steeply slanted (check out the Vault 111 Security Station, the side with the window). When this occurs, the most common deflection direction is roughly parallel to the ground, so the best way to accurately penetrate ends up being shooting at a flat surface at dead on.

Penetrator Damage  

1. Penetrator does not adopt weapon damage, an Explosion is required for the Penetrator Projectile to do any Damage 

I am thus far unable to make the penetrator adopt the damage of the firearm. Nothing I can do to change this, as far as I can tell. You always need to add 2 Explosions and 1 Projectile.

In lieu of directly dealing damage through the Explosion, you can also make the Explosion apply a detrimental Object Effect or Placed Object. 

You can also simply change the Collision Layer of the initial Projectile (which does follow weapon damage) to allow it to penetrate everything, but the projectile will ignore the environment completely and in an unsatisfactory way (interaction with the environment was the entire point of this framework).

2. Penetration Damage is Flat

Related to the first point, reliance on the second Explosion to impart damage means that penetration damage is always a flat amount. This is why I have provided a bunch of different templates for ease of use. I generally recommend applying less penetration damage than the gun's normal damage.

To make penetration damage somewhat modular, you can use the OMOD Override-Projectile to make the weapon fire a different Projectile that is linked to a higher damage Penetrator. For example, you can leave basic 5.56 without penetration. Adding a lower tier AP modification set to override the default 5.56 Projectile with an "AP" Projectile (a cloned 5.56 Projectile with a Penetration Effect Explosion attached) that generates a 10 Damage Penetrator. Repeat the process for a higher tier AP modification, but make it generate a 30 Damage Penetrator instead.

As discussed above, penetration is not contextual, which means that the Penetrator Projectile will do flat damage regardless of what material it is going through (i.e. same damage through wood or concrete), and regardless of how much material it is punching through.

3. Penetration Damage is Ballistic, Scales with Demolition Expert and Adrenaline (Survival)

Penetration damage is ballistic and interacts with Damage Resistance. Benefits from limb modifiers. Damage scales directly with Demolition Expert, Adrenaline Perk level, and global damage settings. It does not appear to scale with weapon perks at all.

4. Spalling Damage is low in practice 

Due to the way I have the two template Spalling Effects currently set up, the damage is actually a lot lower than one would expect.

As of v0.4-Beta, the library of Spalling Effects are differentiated only by the number of Spalls they generate (30 Spalls to 180 Spalls, 30 Spall increments). The greater the number of Spalls generated, the wider the cone (30 Spalls generate them in a 150 degree cone with apparently random distribution, 180 Spalls generate them in a 180 degree cone). All utilize the same Spalls, so each individual Spall does 40 damage. I have included a template for a higher damage Spall Shard (Spall Shard 60 Damage Penetrator  [EXPL:xx00082A]), which is not linked to anything. While 1200/2400 damage in a cone sounds somewhat excessive for only 30-60 Spalls, in practice the random distribution means that the Spalls may not actually hit any targets. Additionally, if there is an NPC standing very close to the point of impact (origin of the Spalls), chances are that they will tank all the Spalls and save nearby friends (the NPC invariably dies because the total damage from all Spalls hitting is usually significantly greater than the weapon damage). Between v0.1-v0.2 I tweaked the Spalling Effect as having too low damage on the Spalls made it feel unimpressive. 

As an alternative to increasing damage of individual Spalls, I considered increasing the quantity of Spalls significantly to improve hit probability. Although I have no issues with generating 150 Spalls, I was worried about possible performance impacts for other players [See Below]. Nevertheless, the included templates can just be adjusted to your liking.

5. Spall Range is limited compared to direct penetration

I limited the range of the Spalls to 700 units (Vanilla missile/plasma grenade explosion radius is 500) to prevent creating a shotgun/claymore killing everything. For direct penetration, I left the range values as normal so that it does not matter whether the cover is close to the Player or the Enemy. In sum, if Spalling Effect is set, player shooting cover close to them results in failure to reach target, but shooting cover near the enemy results in gooey chunks. For direct penetration, location of cover/obstacle does not (appear to) matter.

Frame Loss: Leaving the range of Spalls too high will result is performance hits.

6. Excessive Spalling may result in a performance hit

I have received reports that the Spalling Effect can result in performance losses. Although I myself have not experienced any significant performance loss, I would recommend against applying a Spalling Effect with a high number of Spalls, especially if an automatic weapon is used. A lower number of Spalls each (with higher damage to compensate for lower hit probability) could assist with mitigating performance loss.

Article information

Added on

Edited on

Written by

jojosmo

0 comments

  翻译: