Disabling grenade resupply in vanilla BF2.
-
Manekk
- Posts: 8
- Joined: 2018-09-24 12:04
Disabling grenade resupply in vanilla BF2.
Hello guys,
thank you for accepting me to your community.
I am not a PR player. I play vanilla BF2 and love the **** out of it.
I would like to say hello to you guys from the vanilla community.
I come here, seeking knowledge. I am trying to fix grenade spam in BF2. We have tried solutions like reducing the amount of nades you get to two or even getting rid of nades.
The first solution did not solve the problem. You could still resupply your own two grenades and throw them infinitely. The 2nd solution is not for everyone. It creates other problems like (roof) camping and a much less dynamic gameplay.
I have seen other people add changes to the mods\bf2\python\game\gamemodes\gpm_cq.py scrypt on the server and was thinking that it might be possible to apply a fix as mentioned in the forum title. Another thing I could think of, is maybe increasing the time it takes to resupply nades to a rather high number.
I am asking you guys, because you seem so much more knowledgeable of the game in general. I have asked others from my scene, done some research but couldn't tackle the problem on my own.
I would be very happy to get some advice from our brothers here in Project Reality.
Keep up the good work!
Thank you,
Manekk
thank you for accepting me to your community.
I am not a PR player. I play vanilla BF2 and love the **** out of it.
I would like to say hello to you guys from the vanilla community.
I come here, seeking knowledge. I am trying to fix grenade spam in BF2. We have tried solutions like reducing the amount of nades you get to two or even getting rid of nades.
The first solution did not solve the problem. You could still resupply your own two grenades and throw them infinitely. The 2nd solution is not for everyone. It creates other problems like (roof) camping and a much less dynamic gameplay.
I have seen other people add changes to the mods\bf2\python\game\gamemodes\gpm_cq.py scrypt on the server and was thinking that it might be possible to apply a fix as mentioned in the forum title. Another thing I could think of, is maybe increasing the time it takes to resupply nades to a rather high number.
I am asking you guys, because you seem so much more knowledgeable of the game in general. I have asked others from my scene, done some research but couldn't tackle the problem on my own.
I would be very happy to get some advice from our brothers here in Project Reality.
Keep up the good work!
Thank you,
Manekk
-
Frontliner
- PR:BF2 Contributor
- Posts: 1884
- Joined: 2012-10-29 09:33
Re: Disabling grenade resupply in vanilla BF2.
I was about to write that there is no way to do this, but then I remembered that the game has code to distinguish between vehicle and air ammo as well as infantry munitions. If it's possible to mark grenades as vehicle/air ammo, then it would not be possible to replenish grenades with the support's ammo bag, hence minimizing the spam.
VTRaptor: but i only stopped for less than 10 secs and that fucking awesome dude put 2 of them
]CIA[ SwampFox: well my definition of glitching is using an enemy kit to kill the enemy
Just_Dave: i have a list about PR players, and they r categorized by their skill
Para: You sir are an arse and not what the game or our community needs.
AlonTavor: Is that a German trying to make me concentrate?
Heavy Death: join PRTA instead - Teamwork is a must there.
-
Manekk
- Posts: 8
- Joined: 2018-09-24 12:04
Re: Disabling grenade resupply in vanilla BF2.
This sounds very interesting. How do you think this is possible? I have been searching the code for a solution for days, but I could not find anything that solved my problem. Thanks!
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
Re: Disabling grenade resupply in vanilla BF2.
Its not. Soldiers are soldiers and all weapons used by them are considered soldier weapons. Selective disabling of reloading is not possible else we would do it in PR.

Mineral: TIL that Wire-guided missiles actually use wire
-
MaxP
- Posts: 117
- Joined: 2008-09-08 19:18
Re: Disabling grenade resupply in vanilla BF2.
Mats391, is there any explaining of resupply mechanics?Mats391 wrote:Its not. Soldiers are soldiers and all weapons used by them are considered soldier weapons. Selective disabling of reloading is not possible else we would do it in PR.
I.e., I can't clearly understand, what is the StorageSize, and how is it refers to the amount of replenished ammo.
The only things I've found out is that the ammo replenishing by percentage - i.e. if the the supplyobject resupply 200 rounds from total of 300, it will also resupply 2 of 3 grenades. But how is it calculated?
-
Fastjack
- PR:BF2 Contributor
- Posts: 525
- Joined: 2011-09-04 19:47
Re: Disabling grenade resupply in vanilla BF2.
Wouldn't fix a high reload time the nadespamming?
-
Manekk
- Posts: 8
- Joined: 2018-09-24 12:04
Re: Disabling grenade resupply in vanilla BF2.
I am trying to work with these values:
ObjectTemplate.activeSafe GenericFireArm ushgr_m67
ObjectTemplate.createComponent DefaultAmmoComp
ObjectTemplate.ammo.ammoType 1
ObjectTemplate.ammo.nrOfMags 4
ObjectTemplate.ammo.magSize 1
ObjectTemplate.ammo.reloadTime 0.5
ObjectTemplate.ammo.minimumTimeUntilReload 0.5
ObjectTemplate.ammo.autoReload 1
ObjectTemplate.ammo.instantReloadOnEnable 1
ObjectTemplate.ammo.toggleWhenNoAmmo 1
I bumped up the reload time via rcon command, but it just makes the nades buggy. You can still throw them without animation. It seems like a modded server meets an unmodded client, creating these bugs. Unfortunately modding the client is not an option, because I would like to make a server side mod without the need of players modifying their game and in that way splitting the community even further.
I have also tried fiddling with this:
Objects_server.zip\Weapons\Handheld\ammokit
ObjectTemplate.ammo.magSize 1
ObjectTemplate.ammo.reloadTime 0.7
ObjectTemplate.ammo.minimumTimeUntilReload 0.6
ObjectTemplate.ammo.autoReload 1
ObjectTemplate.ammo.instantReloadOnEnable 1
ObjectTemplate.ammo.toggleWhenNoAmmo 1
ObjectTemplate.ammo.abilityDrain 0.05
ObjectTemplate.ammo.abilityRadius 4
ObjectTemplate.ammo.abilityStrength 5.3
ObjectTemplate.ammo.abilityCost 0.25
ObjectTemplate.ammo.abilityMaterial 91
But I do not fully grasp the code, since I have no background in coding, except in R
Also I would like the change to only affect grenade resupply and not resupply in general.
ObjectTemplate.activeSafe GenericFireArm ushgr_m67
ObjectTemplate.createComponent DefaultAmmoComp
ObjectTemplate.ammo.ammoType 1
ObjectTemplate.ammo.nrOfMags 4
ObjectTemplate.ammo.magSize 1
ObjectTemplate.ammo.reloadTime 0.5
ObjectTemplate.ammo.minimumTimeUntilReload 0.5
ObjectTemplate.ammo.autoReload 1
ObjectTemplate.ammo.instantReloadOnEnable 1
ObjectTemplate.ammo.toggleWhenNoAmmo 1
I bumped up the reload time via rcon command, but it just makes the nades buggy. You can still throw them without animation. It seems like a modded server meets an unmodded client, creating these bugs. Unfortunately modding the client is not an option, because I would like to make a server side mod without the need of players modifying their game and in that way splitting the community even further.
I have also tried fiddling with this:
Objects_server.zip\Weapons\Handheld\ammokit
ObjectTemplate.ammo.magSize 1
ObjectTemplate.ammo.reloadTime 0.7
ObjectTemplate.ammo.minimumTimeUntilReload 0.6
ObjectTemplate.ammo.autoReload 1
ObjectTemplate.ammo.instantReloadOnEnable 1
ObjectTemplate.ammo.toggleWhenNoAmmo 1
ObjectTemplate.ammo.abilityDrain 0.05
ObjectTemplate.ammo.abilityRadius 4
ObjectTemplate.ammo.abilityStrength 5.3
ObjectTemplate.ammo.abilityCost 0.25
ObjectTemplate.ammo.abilityMaterial 91
But I do not fully grasp the code, since I have no background in coding, except in R
Also I would like the change to only affect grenade resupply and not resupply in general.
Last edited by Manekk on 2018-09-29 14:02, edited 1 time in total.
-
Fastjack
- PR:BF2 Contributor
- Posts: 525
- Joined: 2011-09-04 19:47
Re: Disabling grenade resupply in vanilla BF2.
Than i see only the option to reduce the amount of mags from the grenades.
ObjectTemplate.ammo.nrOfMags 4 - to a lower value
Sofar i understand serverside modding you can only change numbers/values but you cannot change things like adding codelines to a tweakfile.
ObjectTemplate.ammo.nrOfMags 4 - to a lower value
Sofar i understand serverside modding you can only change numbers/values but you cannot change things like adding codelines to a tweakfile.
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
Re: Disabling grenade resupply in vanilla BF2.
Each weapons requires 100 supply points to rearm to 100%. So a weapon with 1 magazine requires 100 supply points to rearm one magazine and a weapon with 4 magazines requires 100 supply points to rearm 4 magazines. That means if a weapons has more magazines it requires less supply points per magazine and also less time to rearm a single magazine (still same time required to rearm to 100%).MaxP wrote:Mats391, is there any explaining of resupply mechanics?
I.e., I can't clearly understand, what is the StorageSize, and how is it refers to the amount of replenished ammo.
The only things I've found out is that the ammo replenishing by percentage - i.e. if the the supplyobject resupply 200 rounds from total of 300, it will also resupply 2 of 3 grenades. But how is it calculated?![]()
With that you could do these to make a weapon less spammable:
- reduce the amount of magazines in the weapon so each magazine becomes more expensive and takes longer to reload
- reduce the total amount of supply points in the supply source to reduce amount of magazines you are able to rearm
- reduce the rearm rate of the supply source to slow down the rearming

Mineral: TIL that Wire-guided missiles actually use wire
-
Manekk
- Posts: 8
- Joined: 2018-09-24 12:04
Re: Disabling grenade resupply in vanilla BF2.
You guys are amazing. Thank you so much for trying to help me with my problem!
I will definitely leave you guys a donation for your project, should I be able to tackle the issue with your help!
So do you think changing
ObjectTemplate.ammo.nrOfMags 4
ObjectTemplate.ammo.magSize 1
to
ObjectTemplate.ammo.nrOfMags 1
ObjectTemplate.ammo.magSize 4
will give me the possibility to reduce either one of those two
ObjectTemplate.ammo.reloadTime 0.5
ObjectTemplate.ammo.minimumTimeUntilReload 0.5
so I can achieve a slower reload?
I am at work at the moment, so I cannot test it. Will do it, when I come home.
Maybe I made a mistake while changing it in rcon, but I remember changing this
ObjectTemplate.ammo.nrOfMags 4
ObjectTemplate.ammo.magSize 1
to this
ObjectTemplate.ammo.nrOfMags 1
ObjectTemplate.ammo.magSize 4
only changed the ammo count while I could still throw four nades, just without proper animation.
The client seems to refuse some changes I make to the server
I will definitely leave you guys a donation for your project, should I be able to tackle the issue with your help!
So do you think changing
ObjectTemplate.ammo.nrOfMags 4
ObjectTemplate.ammo.magSize 1
to
ObjectTemplate.ammo.nrOfMags 1
ObjectTemplate.ammo.magSize 4
will give me the possibility to reduce either one of those two
ObjectTemplate.ammo.reloadTime 0.5
ObjectTemplate.ammo.minimumTimeUntilReload 0.5
so I can achieve a slower reload?
I am at work at the moment, so I cannot test it. Will do it, when I come home.
Maybe I made a mistake while changing it in rcon, but I remember changing this
ObjectTemplate.ammo.nrOfMags 4
ObjectTemplate.ammo.magSize 1
to this
ObjectTemplate.ammo.nrOfMags 1
ObjectTemplate.ammo.magSize 4
only changed the ammo count while I could still throw four nades, just without proper animation.
The client seems to refuse some changes I make to the server
-
MaxP
- Posts: 117
- Joined: 2008-09-08 19:18
Re: Disabling grenade resupply in vanilla BF2.
Thank you. But how it works for multiple weapons?Mats391 wrote:Each weapons requires 100 supply points to rearm to 100%. So a weapon with 1 magazine requires 100 supply points to rearm one magazine and a weapon with 4 magazines requires 100 supply points to rearm 4 magazines. That means if a weapons has more magazines it requires less supply points per magazine and also less time to rearm a single magazine (still same time required to rearm to 100%).
I.e., I have 3 grenades at 1, 9 pistol mags at 2 and 10 rifle mags at 3.
The supply source has 100 supply points. Will I rearm all my weapons, or just only 1/3 of each?
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
Re: Disabling grenade resupply in vanilla BF2.
reloadTime and mimimumReloadTime are the time to reload, not the time to rearm. So it is the time when you still have an additional magazine to reload that magazine. For grenadiers you want to keep magSize at 1 else you wont get reloading between firing.Manekk wrote:You guys are amazing. Thank you so much for trying to help me with my problem!
I will definitely leave you guys a donation for your project, should I be able to tackle the issue with your help!
So do you think changing
ObjectTemplate.ammo.nrOfMags 4
ObjectTemplate.ammo.magSize 1
to
ObjectTemplate.ammo.nrOfMags 1
ObjectTemplate.ammo.magSize 4
will give me the possibility to reduce either one of those two
ObjectTemplate.ammo.reloadTime 0.5
ObjectTemplate.ammo.minimumTimeUntilReload 0.5
so I can achieve a slower reload?
I am at work at the moment, so I cannot test it. Will do it, when I come home.
Maybe I made a mistake while changing it in rcon, but I remember changing this
ObjectTemplate.ammo.nrOfMags 4
ObjectTemplate.ammo.magSize 1
to this
ObjectTemplate.ammo.nrOfMags 1
ObjectTemplate.ammo.magSize 4
only changed the ammo count while I could still throw four nades, just without proper animation.
The client seems to refuse some changes I make to the server![]()
All weapon rearm at once, so each gets 1/3 of the supply. In your case that is enough for 1 grenade, 3 pistol mags and 3.33 rifle mags. The 0.33 rifle mags will get lost tho.MaxP wrote:Thank you. But how it works for multiple weapons?
I.e., I have 3 grenades at 1, 9 pistol mags at 2 and 10 rifle mags at 3.
The supply source has 100 supply points. Will I rearm all my weapons, or just only 1/3 of each?

Mineral: TIL that Wire-guided missiles actually use wire
-
Manekk
- Posts: 8
- Joined: 2018-09-24 12:04
Re: Disabling grenade resupply in vanilla BF2.
All I find are these lines:Mats391 wrote:reloadTime and mimimumReloadTime are the time to reload, not the time to rearm. So it is the time when you still have an additional magazine to reload that magazine. For grenadiers you want to keep magSize at 1 else you wont get reloading between firing.
rem ---BeginComp:ThrownFireComp ---
ObjectTemplate.createComponent ThrownFireComp
ObjectTemplate.fire.fireLaunchDelay 0.39
ObjectTemplate.fire.altFireInput PIAltFire
ObjectTemplate.fire.addFireRate 0
ObjectTemplate.fire.projectileStartPosition 0/0/0.2
ObjectTemplate.fire.fireLaunchDelaySoft 0.8
ObjectTemplate.fire.showWeaponAfterReloadDelay 0.1
ObjectTemplate.fire.pullBackTime 0.45
rem ---EndComp ---
rem ---BeginComp
ObjectTemplate.createComponent DefaultAmmoComp
ObjectTemplate.ammo.ammoType 1
ObjectTemplate.ammo.nrOfMags 4
ObjectTemplate.ammo.magSize 1
ObjectTemplate.ammo.reloadTime 0.5
ObjectTemplate.ammo.minimumTimeUntilReload 0.5
ObjectTemplate.ammo.autoReload 1
ObjectTemplate.ammo.instantReloadOnEnable 1
ObjectTemplate.ammo.toggleWhenNoAmmo 1
rem ---EndComp ---
Any idea where I can alter the rearm time? Or ist it the wrong file?
-
MaxP
- Posts: 117
- Joined: 2008-09-08 19:18
Re: Disabling grenade resupply in vanilla BF2.
In SupplyObject itself.Manekk wrote: Any idea where I can alter the rearm time? Or ist it the wrong file?
I.e. for stock supply:
ObjectTemplate.healSpeed 3
ObjectTemplate.refillAmmoSpeed 7
-
Manekk
- Posts: 8
- Joined: 2018-09-24 12:04
Re: Disabling grenade resupply in vanilla BF2.
Sounds pretty interesting!
And in what file can I find that? Or how can I enter it into rcon?
Does it affect all soldiers or can I change it only for the support class?
Pretty lost at the moment, sorry.
And in what file can I find that? Or how can I enter it into rcon?
Does it affect all soldiers or can I change it only for the support class?
Pretty lost at the moment, sorry.
-
MaxP
- Posts: 117
- Joined: 2008-09-08 19:18
Re: Disabling grenade resupply in vanilla BF2.
Can't say about rcon, but you can search in your server archives with advanced file managers, like Total Commander (search by text SupplyObject in this case). It will find all the files containing this text.Manekk wrote:Sounds pretty interesting!
And in what file can I find that? Or how can I enter it into rcon?
Does it affect all soldiers or can I change it only for the support class?
Pretty lost at the moment, sorry.
But you have to know already what object you want to edit.
I.e., stock BF2 has only supply_crate object (airdrop).
This changes will affect all soldier classes, and it is not soldier depedent.
-
Manekk
- Posts: 8
- Joined: 2018-09-24 12:04
Re: Disabling grenade resupply in vanilla BF2.
A small update from me:
I tried all the suggestions made in this thread and am very thankful for what you provided so far. Your enthusiasm and helpfulness is heartwaming!
However I still have not found a solution for my problem. I am sure there is a way. I just can't figure it out, since I really lack knowledge of the deeper game mechanics.
I offer to make a donation to your project, should anyone find a solution to this problem.
At the moment the state of the game is simply saddening.
I would be very happy for any suggestion.
Thanks, Manekk
I tried all the suggestions made in this thread and am very thankful for what you provided so far. Your enthusiasm and helpfulness is heartwaming!
However I still have not found a solution for my problem. I am sure there is a way. I just can't figure it out, since I really lack knowledge of the deeper game mechanics.
I offer to make a donation to your project, should anyone find a solution to this problem.
At the moment the state of the game is simply saddening.
I would be very happy for any suggestion.
Thanks, Manekk
-
Rhino
- Retired PR Developer
- Posts: 47909
- Joined: 2005-12-13 20:00
Re: Disabling grenade resupply in vanilla BF2.
I very much doubt you can stop resupply for just grenades without modifying the engine itself.
-
AlonTavor
- PR:BF2 Developer
- Posts: 2991
- Joined: 2009-08-10 18:58
Re: Disabling grenade resupply in vanilla BF2.
Hello.
If you are serious about this, contact me on Discord.
I have some unusual tricks...
-Alon
If you are serious about this, contact me on Discord.
I have some unusual tricks...
-Alon

