Warhead activation target health thresholds
Customizable Warhead trigger conditions
- It is now possible to make warheads only trigger when target's HP is above and/or below certain percentage.
- Both conditions need to evaluate to true in order for the warhead to trigger.
In rulesmd.ini:
[SOMEWARHEAD] ; WarheadType
AffectsAbovePercent=0.0 ; floating point value, percents or absolute
AffectsBelowPercent=1.0 ; floating point value, percents or absolute
This PR is supposed to be a reimpl. of #627. @FS-21 please verify that it can achieve the same functionality, keeping in mind what we commented earlier.
Nightly build for this pull request:
- compiled-dll-802771893d64471fdc5740252d0bff8fcf9dd5f6.zip These artifacts will expire in 90 days and will not be available for download after that time.
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.
So basically we have to set multiple warheads in the same weapon and depending the threshold of the damage produced by the warhead it does any damage (or not)? Is for preparing the tests
depending the threshold of the damage produced
No, depending on the target health at the moment of hit.
Otherwise you're correct.
So you said:
1º) The weapon hits the target. 2º) Checks the target health 3º) checks if there are the 2 new tags 4º) if meets the criteria the weapon works or does nothing if doesn't meet the criteria of the new 2 tags.
I tried With a Yuri mind control weapon (as the ones used in #627 ):
[EMindControl] Damage=1 ;Number of mind control links ROF=20 Range=7 Projectile=PsychicControl Speed=100 Warhead=PsyController Anim=YURICNTL FireOnce=yes CanTargetHouses=enemies
[PsyController] ;Mind control warhead. Will skip normal damage like EMP did Verses=100%,100%,100%,100%,0%,100%,0%,0%,0%,100%,100% MindControl=yes AnimList=YURICNTL ; ... PenetratesBunker=no AffectsAbovePercent=0.0 ; floating point value, percents or absolute AffectsBelowPercent=0.5 ; floating point value, percents or absolute
It ignores this new logic and mind controls the target. Same with ExtraWarheads logic.
Anotehr test in a Chrono legionnaire temporal weapon [ChronoBeam] Verses=100%,100%,100%,100%,100%,100%,100%,100%,100%,100%,0% Temporal=yes Versus.ImmuneToTemporal_concrete_armor=0% Versus.defender_armor=0% Versus.defender_armor.ForceFire=no Versus.defender_armor.Retaliate=no Versus.defender_armor.PassiveAcquire=no AffectsAbovePercent=0.0 ; floating point value, percents or absolute AffectsBelowPercent=0.5 ; floating point value, percents or absolute
These tags are ignored and attacks & erase the target. I also tried the Ares KillDriver=yes logic in WH and the same, these tags doesn't work
Wait, I checked in the code that exists a EffectsRequireVerses=false, I want re-test these cases sicne they should be considered effects. EDIT: nah, it still doesn't works
Meh I know what's the issue, currently it only applies to Phobos warhead effects... will see later if it's possible to fix this
If helps : 0x4690B0 -> void __thiscall BulletClass::Logics(BulletClass *this, CoordStruct *coords) <- controls some WH effects (or all, I don't remember. Is what I was using in #627 for replacing the original warhead by another one if the threshold was reached)
If helps : 0x4690B0 -> void __thiscall BulletClass::Logics(BulletClass *this, CoordStruct *coords) <- controls some WH effects (or all, I don't remember. Is what I was using in #627 for replacing the original warhead by another one if the threshold was reached)
Yeah I am looking at this one too. I figured I'll ask other devs since for some reason it isn't hooked in order to be able to control all effects, might be cause of Ares. I might just move that check in the beginning of the function.
I updated the code with the suggested changes and I did basic tests and looks that it just works.
Applied feedback, pending that question between devs.
Finally I tested this online and no desyncs. Then should this be merged?
I just noticed EffectsRequireVerses is true by default and the documentation mentions it is false by default.
I'll change the docs later
tested, and it can do the effect we've expected: setting a series of ExtraWarheads with each of them having a warhead activation threshold, then it can detonate different warhead based on the target's strength