Missile Explosions and Hull Damage Detection
-
Maybe instead of moving both shield and hull damage just move the hull damage to the [Munition] entries (Since Shield damage still works). Or leave the [damage] entry and balance the damage out between the munition and damage (So you have the splash damage and not an overly damaging weapon).
-
Decided to investigate the issue; here’s what I found.
0x0C->0x00 in server.dll, 0x960C = fixes explosion damage at full strength ```This should fix the issue (it has in my testing so far). Explanation FL hardcodes three different multipliers of damage for explosions - 1, 2/3, 1/3, and 0, depending on how far away from the center of the object the explosion is. As far as I can tell, this is computed using the following mapping: Distance^2 -> Strength <= (Explosion radius)^2 * 0.1111… -> 1 <= (Explosion radius)^2 * 0.4444... -> 2/3 <= (Explosion radius)^2 -> 1/3 > (Explosion radius)^2 -> 0 So when the hit is farther than the explosion's radius away from the root of the ship, no damage is dealt. The above hack fixes the multiplier at 1 regardless of the distance.
-
Absolutely amazing M0tah
-
Holy shit…that’s amazing!!
I’ll use this tomorrow when I start working on FW:ToW.
Nice find, M0tah!
-
In single player, this hack will generate additional damage. For example, I changed the Javelin to do 10 damage and Flint to a Rheinland battleship (rm_r_battleship). Firing a missile into the center hits two groups (Rh_main_lod1/DpMain & Rh_midfrnt_lod1/DpMidFrnt) for 20 damage. Applying the patch then does 30 damage - the two groups plus presumably the ship as a whole.
The damage is actually found a little further down, in the function at 0x(6ce)9690. In SP, GetRadius returns a valid value, but in MP it is returning 0. I think the real problem is with something used by GetBoundingSphere. That’s as far as I went, back to you, M0tah…
-
It worked beautifully for me. I’m so thrilled Thanks so much, M0tah!
-
It won’t be a problem for any model without subcomponents.
-
adoxa wrote:
In single player, this hack will generate additional damage. For example, I changed the Javelin to do 10 damage and Flint to a Rheinland battleship (rm_r_battleship). Firing a missile into the center hits two groups (Rh_main_lod1/DpMain & Rh_midfrnt_lod1/DpMidFrnt) for 20 damage. Applying the patch then does 30 damage - the two groups plus presumably the ship as a whole.The damage is actually found a little further down, in the function at 0x(6ce)9690. In SP, GetRadius returns a valid value, but in MP it is returning 0. I think the real problem is with something used by GetBoundingSphere. That’s as far as I went, back to you, M0tah…
Did some more testing, and I couldn’t get CArchGroup::GetRadius to be called at all, in either MP or SP (though 0x9690 is). You are referring to that call in 0x9690, correct?
-
It seems that part of the function is only called if the object has collision groups (restoring the original Flint still broke; commenting the [CollisionGroup] entries failed to break). Even so, these particular collision groups are different to the battleship ones, generating a radius of 0 (it skips the bounding sphere altogether).