OpenXcom Forum

Modding => Help => Topic started by: The Martian on October 08, 2019, 11:57:11 am

Title: Alien use of ammo: Can they run out?
Post by: The Martian on October 08, 2019, 11:57:11 am
Do enemy units consume the ammo in their inventory as they fire weapons and reload from their own personal inventory supplies when necessary?

Or do they just have an infinite supply of ammo and only the player is restricted by a units total ammo loaded/carried?
Title: Re: Alien use of ammo: Can they run out?
Post by: wcho035 on October 08, 2019, 11:59:04 am
Yeap, enemy do reload.
Title: Re: Alien use of ammo: Can they run out?
Post by: The Martian on October 08, 2019, 12:03:26 pm
Thank you for the information. ^_^
Title: Re: Alien use of ammo: Can they run out?
Post by: The Martian on October 13, 2019, 02:35:39 pm
(Question):
If an alien runs out of ammo in their currently held weapon and they have two different types of ammo in their inventory that could potentially be loaded into the weapon, how does the AI choose which of the two ammo types to reload with?
Title: Re: Alien use of ammo: Can they run out?
Post by: wcho035 on October 13, 2019, 02:39:07 pm
The AI load whichever it feels like. It happen in my mod where alien need to choose between a Stunt gas type warhead and napalm and alien choose napalm...
Title: Re: Alien use of ammo: Can they run out?
Post by: The Martian on October 13, 2019, 03:29:47 pm
Did your napalm weapon happen to have a higher power: value than the stun gas?
Title: Re: Alien use of ammo: Can they run out?
Post by: wcho035 on October 13, 2019, 10:49:06 pm
They are the same amount of damage.
Title: Re: Alien use of ammo: Can they run out?
Post by: The Martian on October 15, 2019, 02:13:51 pm
In that case perhaps it is one of the following that is determining which item has priority to be loaded:
. The value of listOrder: on the ammo.
. The position of the ammo in the units inventory.
. Which of the ammo clips is defined first inside the items: .rul file.