Skip to content

AE attach/discard by health & ExtraWarheads & Aux/FeedbackWeapon & other tweaks #1643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

Coronia
Copy link
Contributor

@Coronia Coronia commented Apr 23, 2025

A sequel of #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.Warhead is 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.AbovePercent or DiscardOn.BelowPercent is set, the effect is discarded when the object's health percentage is above/below that value.
  • If AffectAbovePercent or AffectBelowPercent is 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 excludes AirburstWeapon).
    • ExtraWarheads.DamageOverrides can be used to override the weapon's Damage for the extra Warhead detonations. Value from position matching the position from ExtraWarheads is used if found, or last listed value if not found. If list is empty, WeaponType Damage is used.
    • ExtraWarheads.DetonationChances can be used to customize the chance of each extra Warhead detonation occuring. Value from position matching the position from ExtraWarheads is used if found, or last listed value if not found. If list is empty, every extra Warhead detonation is guaranteed to occur.
    • ExtraWarheads.FullDetonation can 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 from ExtraWarheads is used if found, or last listed value if not found. If list is empty, defaults to true.
    • 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.
    • FireInTransport setting of the auxiliary weapons are respected to determine if it can be fired when the original weapon is fired from inside OpenTopped=true transport. If auxiliary weapons are fired, it is fired on the transport. OpenToppedDamageMultiplier is not applied on auxiliary weapons.
  • AuxWeapon is fired at the original target, or another nearby target if AuxWeapon.Retarget set to true.
    • AuxWeapon.Offset defines the relative position to the firer that the auxiliary weapon will be fired from. AuxWeapon.FireOnTurret defines if the FLH is relative to the turret rather than the body.
    • If AuxWeapon.AllowZeroDamage set to true, the auxiliary weapon will be fired even if its damage on the set target is 0.
    • AuxWeapon.ApplyFirepowerMult determines whether or not the auxiliary weapon's damage should multiply the firer's firepower multipliers.
    • AuxWeapon.Retarget.AroundFirer determines whether the original target or the firer will be the center of the retargeting. AuxWeapon.Retarget.Range determines the radius of the retargeting, default to the auxiliary weapon's Range if the center is the firer, and 0 if the center is the original target.
    • AuxWeapon.Retarget.Accuracy defines the probability that the auxiliary weapon is fired to the original target.
  • FeedbackWeapon is fired at the firer.
  • If RevengeWeapon.RealLaunch/KillWeapon.OnFirer.RealLaunch set to true, the weapon will be fired through a real projectile from the TechnoType to the killer.

in rulesmd.ini:

[SOMEATTACHEFFECT]                                 ; AttachEffectType
Duration.ApplyVersus.Warhead=                      ; WarheadType
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
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
FeedbackWeapon=                                    ; WeaponType
RevengeWeapon.RealLaunch=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

@github-actions github-actions bot added the Minor Documentation is not required label Apr 23, 2025
@Coronia Coronia force-pushed the origin/ae-attach-discard-by-health-3 branch 4 times, most recently from aa07aa9 to 7dc3739 Compare April 23, 2025 04:10
@Coronia Coronia force-pushed the origin/ae-attach-discard-by-health-3 branch from 7dc3739 to 14f124f Compare April 23, 2025 04:17
Copy link

github-actions bot commented Apr 23, 2025

Nightly build for this pull request:

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.

@Coronia Coronia changed the title [Minor] AE attach/discard by health & other tweaks AE attach/discard by health & ExtraWarheads & FeedbackWeapon & other tweaks Apr 23, 2025
@TaranDahl TaranDahl added ❓New feature Needs testing ⚙️T1 T1 maintainer review is sufficient labels Apr 24, 2025
@Coronia Coronia force-pushed the origin/ae-attach-discard-by-health-3 branch 2 times, most recently from d3fc026 to 20b1282 Compare April 27, 2025 13:57
…-discard-by-health-3

# Conflicts:
#	docs/Whats-New.md
@Coronia Coronia force-pushed the origin/ae-attach-discard-by-health-3 branch 3 times, most recently from 575a0cf to 29f488e Compare April 28, 2025 06:10
@Coronia Coronia changed the title AE attach/discard by health & ExtraWarheads & FeedbackWeapon & other tweaks AE attach/discard by health & ExtraWarheads & Aux/FeedbackWeapon & other tweaks Apr 28, 2025
@Coronia Coronia force-pushed the origin/ae-attach-discard-by-health-3 branch from 29f488e to 7ecab6c Compare April 28, 2025 06:24
…-discard-by-health-3

# Conflicts:
#	docs/Whats-New.md
@Coronia Coronia force-pushed the origin/ae-attach-discard-by-health-3 branch 2 times, most recently from dc8a0a0 to b305f80 Compare May 6, 2025 03:57
…-discard-by-health-3

# Conflicts:
#	CREDITS.md
#	docs/Whats-New.md
@Coronia Coronia force-pushed the origin/ae-attach-discard-by-health-3 branch from b305f80 to 3b177b9 Compare May 6, 2025 04:29
@Coronia Coronia removed the Minor Documentation is not required label May 7, 2025
…-discard-by-health-3

# Conflicts:
#	docs/New-or-Enhanced-Logics.md
#	docs/Whats-New.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs testing ❓New feature ⚙️T1 T1 maintainer review is sufficient
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants