Openra: Aircraft with both infinite and finite ammo weapons should not RTB when AmmoPool empty

Created on 17 Apr 2018  路  6Comments  路  Source: OpenRA/OpenRA

I've been looking at adding a chaingun to the longbow that has infinite ammo in addition to its limited-ammo missiles. The aircraft will attempt to RTB when out of missiles, despite still having a functioning weapon. It will also refuse new attack orders vs valid targets until loaded.

Aircraft with multiple weapons shouldn't RTB if one weapon is still operable.

Feature

Most helpful comment

I believe a better option here would be to split the RTB code from aircraft and make it conditional, that way each modder can decide what to do on each scenario.

All 6 comments

I believe a better option here would be to split the RTB code from aircraft and make it conditional, that way each modder can decide what to do on each scenario.

This should already be possible. There are some subtle details to be careful of in the yaml definitions, so I strongly suspect that this is just an oversight in your yaml. Can you please post your definitions here?

Armament@PRIMARY:
    Weapon: 30mm
    MuzzleSequence: muzzle
Armament@SECONDARY:
    Name: secondary
    Weapon: Hellfire
    LocalOffset: 0,213,-85, 0,-213,-85
    PauseOnCondition: !ammo
AmmoPool:
    Armaments: secondary

Combined HellfireAG and HellfireAA into one weapon for this. Is Armament@TERTIARY a thing if we want to keep them separate?

That example works as expected for me, although I changed 30mm to ChainGun and Hellfire to HellfireAG to avoid changing any weapon definitions.

  • The heli will fire both weapons against all targets (because there aren't any type restrictions).
  • The heli will continue firing the chaingun when out of missiles.
  • The heli will RTB to reload when pressing the F hotkey.
  • The heli will accept new attack orders both with missiles or without.

Can you please post the definition of your 30mm weapon?

The armament names are arbitrary. You can use tertiary if you want, or aamissile or anything else. You just need to make sure that the types match up across AmmoPool, Attack*, and Turreted.

But note that I implemented those changes directly in aircraft.yaml. If you apply them as a rule overlay in a map you will need to add -PauseOnCondition: under Armament@PRIMARY otherwise that will default through.

OK, must have been a rule overlay thing. Got it to work in dev mode.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheMightyAltroll picture TheMightyAltroll  路  3Comments

ghost picture ghost  路  4Comments

Maurice84 picture Maurice84  路  4Comments

MlemandPurrs picture MlemandPurrs  路  4Comments

AliT1993 picture AliT1993  路  3Comments