FlightControl-Master / MOOSE

Mission Object Oriented Scripting Environment (MOOSE) for lua mission scripting design in DCS World
http://flightcontrol-master.github.io/MOOSE/
GNU General Public License v3.0
290 stars 94 forks source link

Use total cargo weight when computing asset score for transport missions #2065

Closed ttrebuchon closed 8 months ago

ttrebuchon commented 9 months ago

Pass along the TotalWeight parameter in order to incentivize choosing transport vehicles appropriate to the max amount of cargo that may need to be carried, instead of by sheer total cargo space on the asset.

This avoids something like a C-5 galaxy always outscoring every other transport vehicle due to sheer cargo capacity, even if the cargo in question is just a single infantryman.

I also tried using an equation to penalize excessive cargo capacity by making the computation:

if asset.cargobaymax < TotalWeight then
  score=score+UTILS.Round(asset.cargobaymax/10, 0)
else
  score=score+UTILS.Round((2*TotalWeight - asset.cargobaymax)/10, 0)
end

but this usually backfired too often and lead to worse results. So capping the score to a max positive value instead tends to work out better.