Phobos
Phobos copied to clipboard
AE attach/discard by health & ExtraWarheads & Aux/FeedbackWeapon & other tweaks
A sequel of https://github.com/Phobos-developers/Phobos/pull/1355. Was trying to use a generic condition group with many conditions for AE before, but it appeared to be quite laggy since it needed to be calculated on each techno with AE per frame. Hence, we had to abandon a group of unified conditions, and only add conditions when it's really needed. Together with some other tweaks here
- If
Duration.ApplyVersus.Warheadis set, it can multiply the duration by the set warhead's versus against the target's armor type if it's not negative. Can't reduce duration to below 0 by a negative versus. - If
DiscardOn.CumulativeCountis greater than 0, the effect is discarded when it hasCumulative=yesand been attached to the object more than this amount of times. - If
DiscardOn.AbovePercentorDiscardOn.BelowPercentis set, the effect is discarded when the object's health percentage is above/below that value. - If
AffectAbovePercentorAffectBelowPercentis set, the effect can be applied only when the object's health percentage is above/below that value. - Attached effect can allow the TechnoType's weapon to detonate multiple Warheads on impact by listing
ExtraWarheads. The warheads are detonated at same location as the main one, after it in listed order. This only works in cases where a projectile has been fired by a weapon and still remembers it when it is detonated (due to currently existing technical limitations, this excludesAirburstWeapon).ExtraWarheads.DamageOverridescan be used to override the weapon'sDamagefor the extra Warhead detonations. Value from position matching the position fromExtraWarheadsis used if found, or last listed value if not found. If list is empty, WeaponTypeDamageis used.ExtraWarheads.DetonationChancescan be used to customize the chance of each extra Warhead detonation occuring. Value from position matching the position fromExtraWarheadsis used if found, or last listed value if not found. If list is empty, every extra Warhead detonation is guaranteed to occur.ExtraWarheads.FullDetonationcan be used to customize whether or not each individual Warhead is detonated fully (as part of a dummy weapon) or simply deals area damage and applies Phobos' Warhead effects. Value from position matching the position fromExtraWarheadsis used if found, or last listed value if not found. If list is empty, defaults to true.ExtraWarheads.UseInvokerAsOwnercan be used to set the house and TechnoType that created the effect (e.g firer of the weapon that applied it) as the weapon's owner & invoker instead of the object the effect is attached to. Value from position matching the position fromExtraWarheadsis used if found, or last listed value if not found. If list is empty, defaults to false.- Note that the listed Warheads must be listed in
[Warheads]for them to work.
- You can now specify an auxiliary weapon to be fired when a weapon is fired.
FireInTransportsetting of the auxiliary weapons are respected to determine if it can be fired when the original weapon is fired from insideOpenTopped=truetransport. If auxiliary weapons are fired, it is fired on the transport.OpenToppedDamageMultiplieris not applied on auxiliary weapons.
AuxWeaponis fired at the original target, or another nearby target ifAuxWeapon.Retargetset to true.AuxWeapon.Offsetdefines the relative position to the firer that the auxiliary weapon will be fired from.AuxWeapon.FireOnTurretdefines if the FLH is relative to the turret rather than the body.- If
AuxWeapon.AllowZeroDamageset to true, the auxiliary weapon will be fired even if its damage on the set target is 0. AuxWeapon.ApplyFirepowerMultdetermines whether or not the auxiliary weapon's damage should multiply the firer's firepower multipliers.AuxWeapon.Retarget.AroundFirerdetermines whether the original target or the firer will be the center of the retargeting.AuxWeapon.Retarget.Rangedetermines the radius of the retargeting, default to the auxiliary weapon'sRangeif the center is the firer, and 0 if the center is the original target.AuxWeapon.Retarget.Accuracydefines the probability that the auxiliary weapon is fired to the original target.AuxWeapon.UseInvokerAsOwnercan be used to set the house and TechnoType that created the effect (e.g firer of the weapon that applied it) as the weapon's owner & invoker instead of the object the effect is attached to.
FeedbackWeaponis fired at the firer.FeedbackWeapon.UseInvokerAsOwnercan be used to set the house and TechnoType that created the effect (e.g firer of the weapon that applied it) as the weapon's owner & invoker instead of the object the effect is attached to.
- If
RevengeWeapon.RealLaunch/KillWeapon.OnFirer.RealLaunchset to true, the weapon will be fired through a real projectile from the TechnoType to the killer. PreventNegativeDamagecan be used to prevent the techno from taking negative damage. This includes both negativeDamageand negativeVerses.
in rulesmd.ini:
[SOMEATTACHEFFECT] ; AttachEffectType
Duration.ApplyVersus.Warhead= ; WarheadType
DiscardOn.CumulativeCount=-1 ; integer
DiscardOn.AbovePercent= ; floating point value, percents or absolute (0.0-1.0)
DiscardOn.BelowPercent= ; floating point value, percents or absolute (0.0-1.0)
AffectAbovePercent= ; floating point value, percents or absolute (0.0-1.0)
AffectBelowPercent= ; floating point value, percents or absolute (0.0-1.0)
ExtraWarheads= ; List of WarheadTypes
ExtraWarheads.DamageOverrides= ; List of integers
ExtraWarheads.DetonationChances= ; List of floating-point values (percentage or absolute)
ExtraWarheads.FullDetonation= ; List of booleans
ExtraWarheads.UseInvokerAsOwner=false ; boolean
AuxWeapon= ; WeaponType
AuxWeapon.Offset=0,0,0 ; integer - Forward,Lateral,Height
AuxWeapon.FireOnTurret=false ; boolean
AuxWeapon.AllowZeroDamage=true ; boolean
AuxWeapon.ApplyFirepowerMult=true ; boolean
AuxWeapon.Retarget=false ; boolean
AuxWeapon.Retarget.Range= ; integer
AuxWeapon.Retarget.Accuracy=1.0 ; floating point value, percents or absolute (0.0-1.0)
AuxWeapon.Retarget.AroundFirer=false ; boolean
AuxWeapon.UseInvokerAsOwner=false ; boolean
FeedbackWeapon= ; WeaponType
FeedbackWeapon.UseInvokerAsOwner=false ; boolean
RevengeWeapon.RealLaunch=false ; boolean
PreventNegativeDamage=false ; boolean
[SOMETECHNO] ; TechnoType
RevengeWeapon.RealLaunch=false ; boolean
[SOMEWARHEAD] ; WarheadType
KillWeapon.OnFirer.RealLaunch=false ; boolean
[SOMEWEAPON] ; WeaponType
AuxWeapon= ; WeaponType
AuxWeapon.Offset=0,0,0 ; integer - Forward,Lateral,Height
AuxWeapon.FireOnTurret=false ; boolean
AuxWeapon.AllowZeroDamage=true ; boolean
AuxWeapon.ApplyFirepowerMult=true ; boolean
AuxWeapon.Retarget=false ; boolean
AuxWeapon.Retarget.Range= ; integer
AuxWeapon.Retarget.Accuracy=1.0 ; floating point value, percents or absolute (0.0-1.0)
AuxWeapon.Retarget.AroundFirer=false ; boolean
Nightly build for this pull request:
- compiled-dll-17effc6907fea993aaa41ca4a857e0bdfec0892c.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.