Weapon selection order

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
Hypersonic
Posts: 134
Joined: Mon Aug 14, 2017 3:04 pm

Weapon selection order

Post by Hypersonic »

I was browsing the code, trying to find out how to alter the auto selection order. I noticed that weapons have Weapon.SelectionOrder values.

When I have all weapons and ammo, I noticed that when I run out of say goldwand ammo the skullrod is automatically selected. I suppose due to having the lowest selection number of the bunch.

https://github.com/coelckers/gzdoom/blo ... ullrod.txt
Weapon.SelectionOrder 200;

I thought crossbow would be the auto select choice, but it seems to have a higher number

https://github.com/coelckers/gzdoom/blo ... ossbow.txt
Weapon.SelectionOrder 800;

Is there a way to override this? Or would we just have to alter the zscripts?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Weapon selection order

Post by Graf Zahl »

Right now there is no way to override it.

I think it may be a good idea anyway to add a config lump that allows to change a selected set of actor properties, like the amount of ammo given by a pickup. This might also be added to such a lump.
Hypersonic
Posts: 134
Joined: Mon Aug 14, 2017 3:04 pm

Re: Weapon selection order

Post by Hypersonic »

That would be awesome!

I was also thinking about the idea of automatically switching to a weapon that has most ammo, percentage wise. So percentage wise 39/40 phoenix ammo is greater than 50/100 crossbow arrows. Though due to the self inflicting damage potential of the phoenix, I'd probably make exception with that weapon!
Post Reply

Return to “General”