ModernColdWar / RedStormRising

Red Storm Rising
2 stars 0 forks source link

Improve base capture - OVERVIEW #123

Closed madrabbit711 closed 4 years ago

madrabbit711 commented 4 years ago

Problem: Mismatch between DCS baseCapture radiuses and RSR baseCapture (bases and FOBs) radiuses. This is confusing for players and effects lots of gameplay elements such as base defence spawn/resupply, slot blocking, CC acces, etc.

Base side owner is only determined by DCS and associated baseCapture eventHandler (EH), which is only triggered by an contesting unit within 2km.

~FOB side owner is only determined by DCS and associated baseCapture EH, which is only triggered by unit touching FARP pad approx. 100m~ This was wrong, see update below. FARP helipad raduis for DCS EH is also 2km, even if FARP helipad assoc. with neutral coalition.

Desired RSR radiuses for capture are much larger: RSR base radius: 5km RSR FOB radius: 2.5km

Solutions ~(X) Ignore DCS baseCapture EH and create our own loop. This won't solve contesting unit preventing rearm/refuel which is only controlled by DCS. Development of our own loop may be more performance inefficient.~ Excessive.

OR

(Y) Utilise DCS baseCapture EH (attacker <2km in base or ~touching~ FARP pad) to trigger RSR radius check. Therefore attackers will need to have a unit near the centre but also clear the surrounding area.

Implementation

~1. Incorporate RSR radius for unit enumeration AFTER the DCS baseCapture EH firing #124~

  1. Change base/FOB init dependent on the 'last owner' not whatever uncontested unit is present at the time. #125 This is important for...

  2. Change CC building coalition to neutral and only loyal to the current owner of that base. #126

    • Neutral buildings won't prevent rearm/refuel and don't require interception to exclude from baseCaptured DCS eventHandler.
    • Definitely for bases and Bunkers.
    • Unsure about FOBs + Outpost/Bunker.
    • Not need for deployable FOBs + Tent.
  3. Change CC building types #17

  4. Base ownership should never be persisted as neutral #98

Benefits:

madrabbit711 commented 4 years ago

Digital Combat Simulator  Black Shark Screenshot 2020 01 20 - 00 10 34 12

I was wrong about the inherent DCS mechanism for FARP helipad captures, but this is what really alarmed me in the beginning. Been doing some testing there's a 2km zone around FARP helipad objects that will prevent rearm when contested, even if the helipad is neutral (in screenshot, blue ammo truck is blocking rearm at neutral FARP helipad with red ammo truck, 1.9km away)

Therefore #124 not urgent, as it's a 2km zone for bases or FOBs with a FARP helipad for the DCS eventHandler to fire.

However, we should still make base init dependent on last owner #125 and exclude buildings from the baseCapturedHandler.lua #126 for both init and base capture.

Updating the above.

madrabbit711 commented 4 years ago

Remaining Tasks as of 4.0.4 on CAPTURE branch: NEXT TASKS:

00) Persistent group data array doubling during canUseStateFromFile == true conditions
    > Only occurs during saving persistence data
    > spawn queue duplication
    > M.updateGroupData(persistentGroupData)
        > SCRIPTING: Persistence|68: Number of persistent groups at save is 163
        > Handling spawn queue (length 326)
        > SCRIPTING: Persistence|68: Number of persistent groups at save is 326
0) Fix ctld.unloadInternalCrate
    > "Current Cargo Status" radio command correctly reports "Currently Transporting: ."
1) ctld.spawnCrate: add ability for player airplane but not helo to take internal crate from base without being near logistics centre or spawning crate
    > however keep crate unload and then unpack c.f. unload+unpack, to allow for deployable s and easier base origin testing
    > CTLD.lua: line 1546: need to add checks for existance of logistics centre AND if it's friendly!
2) add check to 'ctld.unpackLogisticsCentreCrates' to ensure that logistics crate brought from base different to that being repaired
    > also remove ability to take logistics centre crate from deployable s
    > CTLD.lua: line 2296: add base origin to crate details
3) check base.lua for neutral airbase/FARP after baseOwnershipCheck.lua
    > configureForSide: slotBlocker = make sure works for netural FARPs
    > configureForSide: pickup zone manager = make sure works for netural FARPs
    > resupply: base defences = make sure works for netural FARPs
    > resupply: spawn logistics <- PREVENT THIS UNLESS MISSION START
4) baseOwnershipCheck.lua: allow for neutral airbases but need to ensure they revert to neutral on CC destroy.  
    > Do contested bases report as neutral or nil?!  Neutral coalition is experimental from memory...
    > Check against RSRbaseCaptureZone color at campaign init
    > will need loop to check for logistics centre destruction OR add EH to all logistics centres (or just those constructed at neutral ABs?)
    >> https://wiki.hoggitworld.com/view/DCS_event_dead
    >> Tank1:HandleEvent( EVENTS.Dead ) = MOOSE DEAD eventHandler for logisitics centre -> baseOwnershipCheck -> no slot at neutral FARPs
5) Add limits to # of deployable s per team and/or player 
7) Add non-logisitics centre crate options as internal cargo to cargo planes
8) prevent unpack of crates if logisitics centre dead and/or too far
    > what about EWRs?
    > what about JTACs?
    >> make exception for internal cargo?
    > what about SAM sites far outside of FARP
    >>>>>>>>> better to make crates tied to logisitics centre of origin alive/dead
10) Check carrier logisitics
11) Fix upper and lower cases for logistics centre markers and make compatible with baseOwnership string searches
12) Remove hit notification for buildings i.e. logisitics centres
13) Remove side assoc. marker for dead logisitics centres?
14) Add logi centre specific unitID # increment c.f. current ctld.unitID
15) feature? consider adding ~10min LOCKDOWN to prevent fast capture-recapture problems = base added to LOCKDOWN global array upon capture
17) Add internal crate instant loading to red/blue gas platforms for helos as crates sink through gas platform
> ctld.spawnCrate: line 1121: _point = altitude (X?) of heli
madrabbit711 commented 4 years ago

Most tasks above are testing related and will change depending upon new/old bugs found. Primary coding for the capture mechanism update is done. Closing this overview.