Page 2 of 2

Re: Changing Ammo Values - Simplfied

Posted: Thu May 05, 2011 10:09 am
by Eraser
The amount of armor or health that armor and health bubbles give can be modified in bg_misc.c

In the beginning of the file you'll find the bg_itemlist definition. This holds definitions for all the items in the game.

You'll find the value 5 in the definition for armor shards, for example, right under "Armor Shard" and above IT_ARMOR. This means that armor shards give 5 of whatever they give to the player (in this case, armor). You'll notice you'll find 50 and 100 under item_armor_combat and item_armor_body respectively. You can change these values to give different amounts of armor.

Same goes for the definitions for item_health_*

Re: Changing Ammo Values - Simplfied

Posted: Fri May 06, 2011 6:21 am
by Lordpalandus
Ah, but the thing is, if I change the amount given by the '5 hp bonus health' or the '100 hp bonus megahealth', it doesn't perform the 'bonus' part.

What I mean is, normally when you pick them up, they can increase your HP beyond the maximum of 100 to 200. If I change the values, they still heal health, but they do not increase health beyond the maximum.

The strange thing is tho, if I change the armor values, nothing bad happens and it can increase maximum armor past 100 just fine.

Also:
1) I'm trying to figure out how to increase those 'bonus' maximums from 200, to say, 300. Still haven't figured out how.
2) I can't find 'powerups' under any of the files currently... want to change say the regeneration from 5 hp/second to 10 hp/second for example. As well, what the hell does the battlesuit do?
3) How to modify the maximum clients per game without having to constantly type /sv_maxclients everytime I want more than 12 bots in a game.

Any thoughts?

Re: Changing Ammo Values - Simplfied

Posted: Fri May 06, 2011 12:19 pm
by Eraser
If you'd look a bit further in the BG_CanItemBeGrabbed function and the Pickup_Health function in g_items.c, The max health/armor thing can be adjusted there as well. I see something related to the health/armor countdowns when you're above 100 in the ClientTimerActions function in g_active.c, not sure if that's the only place that needs to be modified though. There's something there about the regen powerup as well.

Re: Changing Ammo Values - Simplfied

Posted: Fri May 06, 2011 7:14 pm
by Lordpalandus
K thanks. Found where it degenerates HP and armor. However, was wondering how I would remove it so that any amount gained over 100 hp/armor would remain that way until you took damage? If I simply delete the code, I get an error message.

Re: Changing Ammo Values - Simplfied

Posted: Fri May 06, 2011 7:23 pm
by Lordpalandus
Also, changed maximum health, I think, and the health pickups are still giving me problems.

Re: Changing Ammo Values - Simplfied

Posted: Fri May 06, 2011 7:32 pm
by Lordpalandus
K, finally fixed the problem with the health pickups and maximum health. Apparently, there was 3 different spots in 3 different files where you had to change numbers around for it to work. I had been trying to do it by only changing 1 or 2 files out of 3. Now it properly increases to up to 500 hp, however, Armor values are still giving me issues pushing past 200. I'll keep looking.

Re: Changing Ammo Values - Simplfied

Posted: Fri May 06, 2011 7:40 pm
by Lordpalandus
Also, now figured out the maximum armor as well. Now to only figure out how to mess around with other powerups, removing armor/hp degeneration, and modifying the armor/hp damage ratio.