5
« Last post by jnarical on Today at 10:28:57 am »
Added some fixes, including important one. Changes involve "missing shots" mostly, improving how they work.
1. When targeting a unit with autoshot, and that unit is killed before all the projectiles are launched - remaining projectiles no more target the floor, they still aim to that target voxel which was part of that unit's body.
That's normal targeting behaviour for OG and always was that way, and I considered it a bug in RA. Now it's gone, and heavy multiple projectile autofire weapons, like chainguns - work correctly. That was a small code change, but it'a big deal, really.
.
2. Now when shooting empty tile, roll-based hit/miss mechanics considers "virtual" medium-sized unit as target for calculating missing shots. So, if your accuracy roll gets a miss - shot will fly outside that "invisible" unit (but it surely could fly through the target tile at the same time)
3. Since the OG, when targeting empty tile, target voxel is fixed depending on tile type - 2 types of walls, floor, ceiling, object, or void. For example, for "void" tiles target is (8,8,12) inside that tile, its center. For RA, when targeting such tiles and rolling a hit - projectile now gets light deviation around that point. And when rolling a miss - yes, it'll fly outside invisible unit))
I've tested that code a little, in classic, XCF and 40k. All seems fine.
My next goal will be adding two things simultaniously:
1) "weightened" effect of target's exposure.
Possible options would be: 0% (off), 30% (light), 50% (medium), 70% (high), 100% (full)
In current version, it's 100%/full.
For example, you got 100% accuracy shot to 30% exposed target.
With different settings, final accuracy will be:
0%/off: 100%
30%/light: 70% + 30%*0.3 = 79%
50%/medium: 50% + 50%*0.3 = 65%
70%/high: 30% + 70%*0.3 = 51%
100%/full: 100% * 0.3 = 30% (current RA version)
2) "Sniper accuracy mechanics" - portion of accuracy, exceeding 100% initially, added after calculating exposure effect. And that could be weighted based on shot type, if needed. Time will tell.
For example, you get very high accuracy shot to a highly covered target. Initial accuracy 180%, target exposure is 5% (basically, some sectoid looking from a small window, with only its head exposed). Even with 100% exposure weight from the previous option, you get 180*0.05 (9%) + 180-100 (80%) = 89% chance to hit, where 80% part is for "sniping".