Maximising ammo for ChaosWeapons

All about Chaos for Unreal... (UT3, UT2004, UT2003, UT)
Post Reply
TheForgotten
Posts: 30
Joined: Wed Jun 09, 2004 5:49 am

Maximising ammo for ChaosWeapons

Post by TheForgotten »

I've be playing with a jailbreak addon I've created and have noticed that the MaxAmmo/MaxOutAmmo methods in the ut2k4 standard weapon class isn't overridden in the chaoswepon.uc, but the SuperMaxOutAmmo is.

Just thought I'd point this out and suggest that you consider doing so in your next release.
Card Carrying Mad Scientist
jb
Posts: 9825
Joined: Fri May 03, 2002 12:29 am
Location: Coral Springs, FL
Contact:

Post by jb »

Ok so what are we doing wrong that you need this? Just trying to find whats "broke" so we can fix it for you. Thanks!!!
Jb
jeditobe1
Inactive Chaos Team Member
Posts: 2638
Joined: Mon Mar 10, 2003 11:06 pm
Location: The Dagobah System
Contact:

Post by jeditobe1 »

short version:

There are three different functions in the weapon class that deal with maximizing the ammo. They are MaxAmmo, MaxOutAmmo, and SuperMaxOutAmmo.

The super version is the one we have tweaked, we didnt do tweaks for the other two. The difference is that the super version sets the max ammo amounts to 999, while the others do not. At least, thats what i remember.
I make Darth Vader look like a teenage punk with a lightsaber.
TheForgotten
Posts: 30
Joined: Wed Jun 09, 2004 5:49 am

Post by TheForgotten »

Spot on jeditobe.
Sorry to gripe, but it took me a while to work out what was wrong. You might also consider setting NUM_FIRE_MODES and overiding the methods that use it, such as add ammo.
Card Carrying Mad Scientist
R.Flagg
Chaotic Dreams Team
Posts: 8460
Joined: Thu May 09, 2002 2:55 pm

Post by R.Flagg »

I kinda curious about what Jb asked as well. What exactly isn't working?
jeditobe1
Inactive Chaos Team Member
Posts: 2638
Joined: Mon Mar 10, 2003 11:06 pm
Location: The Dagobah System
Contact:

Post by jeditobe1 »

There are a couple type of max-ammo commands, used by both mutators and the cheat codes. SuperMaxAmmo, which i referred to above as being the one that works, is used by the allammo and loaded cheats. However, it sets the maximum of each type of ammo to 999 and sets the ammo to 999. The other versions of the command dont raise it to the 999 max, but instead to whatever the maximum the weapon is set at.

To give an example:
If you have the nade launcher, and type allammo or loaded, right now you get 999 grenades of each ammo type.
If you use the maxammo/maxoutammo commands, it *should* give you 12 nades of each type excepting standard, which have a higher maximum. Right now, it doesnt, and im guessing it only gives out the maximum for whichever ammo type you have selected.
I make Darth Vader look like a teenage punk with a lightsaber.
R.Flagg
Chaotic Dreams Team
Posts: 8460
Joined: Thu May 09, 2002 2:55 pm

Post by R.Flagg »

Ok, that's interesting. Thanks for the info.

But I'm (or we're) still curious about what makes this relevant, as opposed to coding trivia. What happens in-game that brought it up?
jeditobe1
Inactive Chaos Team Member
Posts: 2638
Joined: Mon Mar 10, 2003 11:06 pm
Location: The Dagobah System
Contact:

Post by jeditobe1 »

Well, for instance an invasion-style gametype might want to refresh your ammo after each wave. Likewise a LMS style gametype would want to give you ammo for each weapon but not 999.

Also looked it up in the code: the MaxAmmo function he refers to does not change your ammo, but instead is supposed to return the maximum amount of ammo for a given firing mode. The idea for this is that you can get the ratio of ammo you have versus the maximum you can have.
Last edited by jeditobe1 on Wed Aug 18, 2004 4:44 pm, edited 1 time in total.
I make Darth Vader look like a teenage punk with a lightsaber.
R.Flagg
Chaotic Dreams Team
Posts: 8460
Joined: Thu May 09, 2002 2:55 pm

Post by R.Flagg »

Ok then, are you saying we have a bug in Invasion? :wink:

Hehe, sorry, just looking for the actual bug that was spotted.

(and now having fun with you at same time)
jeditobe1
Inactive Chaos Team Member
Posts: 2638
Joined: Mon Mar 10, 2003 11:06 pm
Location: The Dagobah System
Contact:

Post by jeditobe1 »

Well as he said he was trying a jailbreak addon where it was a problem.

Also, LMS does actually use this command ingame, but we override it specifically for that gametype. The better solution would be to fix the command so it would work for any gametype that uses it
I make Darth Vader look like a teenage punk with a lightsaber.
R.Flagg
Chaotic Dreams Team
Posts: 8460
Joined: Thu May 09, 2002 2:55 pm

Post by R.Flagg »

:wink:
Iceboy
Posts: 140
Joined: Mon Nov 11, 2002 5:14 pm
Location: At My PC, where else?
Contact:

Post by Iceboy »

And this is exactly why when I go to code stuff in my spare time my head starts to swim....

I really wish there was some sort of thing in print I could use a reference for making mutators and weapons.
Post Reply