Modify Ammo Amounts, Standard Status Bar

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Modify Ammo Amounts, Standard Status Bar

Re: Modify Ammo Amounts, Standard Status Bar

by ramon.dexter » Wed May 23, 2018 1:38 am

Well, you could do this easily using decorate and making new actors. No dehacked really needed (dehacked is obsolete, since we have decorate, zscript and acs).

Re: Modify Ammo Amounts, Standard Status Bar

by RSSwizard » Tue May 22, 2018 7:51 pm

insightguy wrote:Might help with the backpack problem
and make a new SBARINFO in order to make it show.
Yeahh that IS the major problem though because then its not compatible with other mods or status bars which each also have their own SBARINFO.

Thanks for the link but I DO NOT even know how to do zscripting or ACS and I cant even compile scripts. Yknow its almost like the only thing I can do is Decorate coding. So I need to know how to do that in Decorate.

I would have no problem replacing all the ammo types and making my own status bar because ive done it before.
Im sick and tired of it not showing up on the Standard one, and by implication, all of the OTHER status bars out there which display vanilla ammo types. There are people making all sorts of cool status bars out there ("hurr-dee check out this awesome status bar space marine hud thing I made").

I remember hearing a way of doing it using dehacked, which I guess is preserved for legacy oldschool mods, but I tried making my own dehacked patch for it before and it did not register the changes. I dont even have it anymore so I cant post it to see if I did anything wrong with it. I learn best by example so if you know of any mods out there that have a dehacked patch that changes the ammo stuff I could get that and change the numbers.

And I really do need to change the actual pickup amount of the ammo types, I could replace all of them with custominventories that give the player ammo indirectly through the pickup state.

But changing the actual inherent maximum ammo of each type is a necessity. Maybe also the secondary icon used for the ammunition in the alternative hud too.

--Edit--

I finally managed to get it to work. However this should be put into the Tutorials or something because I couldnt find this fix/info anywhere.

Obtained WhackEd4
Made a .BEX patch
Loaded it into the root folder of my .pk3
it must be named DECORATE in order to work

Managed to change my ammo maximums to 300/200/100/100, which was a good sight to see.

Re: Modify Ammo Amounts, Standard Status Bar

by insightguy » Tue May 22, 2018 6:32 pm

Might help with the backpack problem

As for the ammo, just use ZSCRIPT to make a new ammo type that inherits from the ammo it replaces and make a new SBARINFO in order to make it show.

P.S. Dehacked is not really used anymore due to better options

Re: Modify Ammo Amounts, Standard Status Bar

by RSSwizard » Tue May 22, 2018 3:15 pm

So how's it done?

Modify Ammo Amounts, Standard Status Bar

by RSSwizard » Sun May 20, 2018 6:58 pm

Looked through Tutorials and its not there. This is a pretty basic thing and I cant find anything on it.

So lets say I want to modify standard ammo types and have those changes apparent on the normal status bar (or any status bar that references them). And change how much the standard ammo pickups give you, not the big boxes but the normal pickups. For example setting maximum energy cells to 800, or making rockets give you 2 rockets per pickup?

I can make an updated status bar with custom ammo types referenced, thats not what I want to do though, I want it to be compatible with other status bars too. Most of the custom status bars out there can read "bullets, shells, rockets, cells" and I dont mind altering the pickup sprites themselves if necessary.

What I Want To Do:
Maximum Bullets = 300
Maximum Shells = 200
Maximum Rockets = 100
Maximum Cells = 100 (they're very strong)
Because I will either be getting rid of the backpack, or changing the amount that a backpack would increase ammo capacity to.

Another idea I have is getting items that extend your maximum for specific ammo types. Is it possible to pick up an item that has the same ammo type but with a higher maximum so that it increases your maximum amount... like how the health bonuses have a 200 maximum while health normally only has 100...

Secondary to this is it possible to give you an item that alters the Inventory.MaxAmount of another custominventory item? Lets say that a Box Of Bullets is now an inventory item like the ones in heretic and activating it gives you 50 bullets. And getting a Backpack doesnt increase your ammo maximums it just allows you to carry more of these big-box ammo items. Thats what id really like to do to manage ammo capacity.
(id make the weapons check for big box items when you ran out of ammo as opposed to making the player have to activate them, possibly incorporating a reloading animation for it)


Regarding Dehacked:
I tried this trick using a dehacked lump but the game wouldn't apply the changes.

Top