psforever / PSF-LoginServer

Emulated PlanetSide 1 world and login server by the PSForever project.
https://psforever.net
GNU General Public License v3.0
75 stars 46 forks source link

Capture Experience #1199

Open ScrawnyRonnie opened 4 months ago

ScrawnyRonnie commented 4 months ago

There is an issue with capture experience being rewarded consistently. All of my testing has been done with towers due to the quick nature in capturing them. During our regular weekly fights, capturing and resecuring bases has rarely (if ever) granted experience. I've found there to be a few reasons why it results in 0 experience.

In TowerHackParticipation.scala, RewardFacilityCapture does some calculations for contributionVictorSize and contributionOpposingSize. For whatever reason, both or one of those will come out to 0. There is also a chance that baseExperienceFromFacilityCapture or totalExperienceFromKills (from FacilityHackParticipation.scala calculateExperienceFromKills) will be 0. Any of these resulting in 0 will make it so you do not get rewarded.

To demonstrate the randomness of this issue, I recorded myself hacking the same tower over and over again. Right before starting to hack it I killed the opposing player and had them respawn and stay within the SOI. There was a slightly less than 50% success rate in being granted cep. I had the different values print to the console to see why it didn't reward each time. Most of the failures was contributionVictorSize being 0, but the last one was contributionOpposingSize. https://github.com/psforever/PSF-LoginServer/assets/73139382/04665ea5-5093-4efe-832f-83a59f102bd0