Feature #1254

Airstrike and artillery per-minute limitations

Added by Bystry 6 months ago. Updated 4 months ago.

Status:Fixed% Done:

100%

Priority:HighSpent time:-
Assignee:-
Category:Mod QAGAME
Target version:2.77
OS: Arch:

Description

Figure out how g_heavyweaponrestriction (etpro) cvar works regarding artillery and airstrikes limitations. It seems it sets an arty and airstrike per-minute limit based on field ops and total team players count.

g_heavyWeaponRestriction

100 is default. As i understand it, for soldier weapons it refers to the percentage of the team that can select EACH heavy weapon. e.g., if you set it to 20, and in the game there are 10 players on a team, bq. each side could then have up to two panzerfausts, two flamers, two mg42’s and two mortars. If the team has no flamers, this does not allow them to take any additional Panzers.
The Field Ops use of Artillery is also restricted, but is on a per-minuite basis and takes into account the number of Field Ops. The is calculation is something like the following:

n(g_heavyweaponrestriction * teamsize) = max number of artillery per team per minuite

where n = number of field ops, but minimum is 2 and max is six
(doesnt actually restrict how many field ops you can have, just the number for the formula).

so: if g_heavyweaponrestriction is 20, there are 10 on the team, and there are 2 field ops, between them they can set off
2(0.2*10)= 4 artillery per min?

So we’ve worked out how many artillery can be set up per minuite, which is all most people need to know. If you’re wondering how this “minuite” is calculated (think about it), read the next paragraph.

The counter starts at 0, and there are 6000msec in a minuite. Every time a player sets off an artillery, 6000/m is added to the counter, and the counter will start counting back down to 0. Once the counter reaches 6000, no more artillery can be fired until it has counted down to under 6000. Since of course the counter never goes below 0, this means in any given minuite there cant be more than m artillery set off, but note fractions do apply - an m of 2.5 will be rounded UP to 3 in the first minuite, but since the leftover msec is carried over, there will be only 2 allowed in the next minuite. Hence on average there can only be 2.5 artillery every minuite. It also means that once the counter has exceeded the cap, you dont have to wait a full minuite for it to count down, in order to fire artillery again.

btw Q for bani etc, in etpro does team_max~ overrule g_heavyweaponrestriction or vice versa, or be determined by whichever comes last?

Rain: g_heavyweaponsrestriction only controls airstrike/arty fire right now. We should probably move that into a team_* cvar as well, since to say the current usage of heavyweaponsrestriction with regards to airstrike/arty is not well understood would be an understatement.

See:

Associated revisions

Revision 2fca91c5
Added by Spyhawk 6 months ago

game: reworked airstrike and artillery restriction, refs #1254

  • Implement arty/aistrike limitation as per etpro
  • Changed team_airstrikeTime/artyTime cvars to team_maxAirtrike
    and team_maxArtillery to override default computed value per minutes
  • Get rid of g_misc 4 G_MISC_ARTY_STRIKE_COMBINE

Revision a9eaf8e7
Added by Spyhawk 6 months ago

misc: adjusted configs, refs #1254

History

#1 Updated by Bystry 6 months ago

  • Description updated (diff)

#2 Updated by Spyhawk 6 months ago

  • Tracker changed from Task to Feature
  • Category set to Mod generic
  • Target version set to 2.77

#3 Updated by Spyhawk 6 months ago

  • Description updated (diff)

#4 Updated by Spyhawk 6 months ago

  • Description updated (diff)

#5 Updated by Spyhawk 6 months ago

  • Description updated (diff)
  • Priority changed from Normal to High

#6 Updated by Spyhawk 6 months ago

  • Category changed from Mod generic to Mod QAGAME
  • Status changed from New to Feedback
  • % Done changed from 0 to 100

This is now implemented, as per etpro description above.

In addition,
  • the team_airstrikeTime and team_artyTime cvars to have been renommed team_maxAirstrike and team_maxArtillery. They can be used to override the default computed value per minutes from g_heavyWeaponRestriction. This is thus consistent with other team_* cvars (only active when >0, disabled by default).
  • the g_misc option 4 G_MISC_ARTY_STRIKE_COMBINE has been removed. I don’t think this is relevant nor useful anymore.

#7 Updated by Spyhawk 5 months ago

  • Status changed from Feedback to Fixed

#8 Updated by Spyhawk 4 months ago

  • Status changed from Fixed to Feedback

Looks like the default scaling algorithm (used by etpro, and by Legacy with default team_maxAirtrike and team_maxArtillery values) might be quite spammy with FieldsOps lvl 2. Check if that can be tweaked, and/or used better default for public settings (and keep auto scaling for comp only).

  • Add g_heavyweaponrestriction in config (it’s in etlserver.cfg already)
  • Change g_heavyweaponrestriction to team_heavyweaponrestriction?

#9 Updated by Spyhawk 4 months ago

  • Status changed from Feedback to In Progress
  • % Done changed from 100 to 90

Reported on TM forums:

it looks like that there is still a bug in airstrike/artillery settings - cvar is set to once per minute but i noticed on caen that was almost impossible to move tank because of so many airstrikes/artillery ... Need to look on that again ...

And indeed something with the artillery. Sometimes there even appear to be two at the same time.

Investigate and fix. EDIT: TM actually made in typo in their config file. The cvar was thus not used, and the default value was used instead - which means the autoscaling code was in effect (and well, it scale a bit much with 30+ players ^^').

#10 Updated by Spyhawk 4 months ago

  • Status changed from In Progress to Fixed
  • % Done changed from 90 to 100

I’m really not sure how to adjust etpro’s autoscaling so it works okay on small and big populated server at the same time. I guess the best move is to let pub servers use our team_maxAirstrikes/maxArtillery cvars so they can set their preference manually. I’ll thus consider this feature done.

Also available in: Atom PDF