Ammo and Armor Commands

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Ammo and Armor Commands

Postby John Gaughan » Sun Aug 10, 2003 5:51 pm

Are there cheat codes or console commands to add specific amounts of ammunition, or specific amounts of armor?

I am working on a megawad right now and it would be nice to be able to give myself something between 50 bullets and a pistol and IDFA when I test a map in the middle somewhere. I know I can "give weapon" but that is only half the solution.

Another bonus would be those maps where "ammo balance" means "get used to the fist," but I do not want to "give ammo" or "IDFA" which gives too much.

I guess the second part of my question is if this is not possible, might it be added in the future?
John Gaughan

Postby Enjay » Sun Aug 10, 2003 6:54 pm

The give commands are what you are looking for, but instead of simply giving yourself ammo, give yourself specific ammo items.


give clip will give you 10 bullets

give clip 10 will give you 100 bullets

give clipbox gives 50 bullets IIRC

to get a list, use the console. type logfile log.txt to start dumping the console output into a file called log.txt, then type dumpclasses inventory to get a list of all valid inventory items.
User avatar
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
Joined: 15 Jul 2003
Location: Scotland

Postby John Gaughan » Mon Aug 11, 2003 1:04 am

Yes, that is what I was looking for. I kept trying stuff like "give shells 20" which is similar to the command for health.

Thank you.
John Gaughan

Postby HotWax » Mon Aug 11, 2003 10:21 am

Because I like to be thorough, and because I'm really bored, these are actually what the commands do...

give clip : Gives X amount of bullets, where X is the "small ammo" amount set in a deh/bex patch
give clip Y : Gives X * Y amount of bullets
give clipbox : Gives X * 5 amount of bullets
give clipbox Y : Gives (X * 5) * Y amount of bullets

and so on.

The ammo types and their default values are:

clip/clipbox: 10 (x5 = 50)
shell/shellbox: 4 (x5 = 20)
rocketammo/rocketbox: 1 (x5 = 5)
cell/cellpack: 20 (x5 = 100)

Therefore if you changed the rocket ammo small amount from 1 to say, 5, rocketammo would give 5 rockets, and the rocketbox would give 25.
User avatar
Do what you must, and pay the price later.
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Return to General

Who is online

Users browsing this forum: No registered users and 4 guests