-
-
Notifications
You must be signed in to change notification settings - Fork 27
mod: detach upkeep duration from reward duration #1217
Conversation
I guess that would work. I'll look for the details later. @namidaka any opinion on this? |
The problem is that we only want the upkeep to be determined by the duration. Whereas gold reward will be defined for each wave, seperate from its duration, otherwise players have no incetive to clear waves quickly. |
This would be a change in upkeep philosophy as it would make the even breakpoint dependent on team performance. |
I think it is fair to reward the players with XP & gold determined by their ability to get through x amount of waves. Having a duration based reward defeats the purpose of clearing those waves, and I think it is important to reward both XP & gold in the same manner for this case. That said, I'm only looking to charge upkeep based on time rather than scaling together with the reward. |
Then for that purpose it's fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have a look to the details tomorrow
/// <param name="defenderMultiplierGain">Multiplier to add to the defenders. Can be negative.</param> | ||
/// <param name="attackerMultiplierGain">Multiplier to add to the attackers. Can be negative.</param> | ||
/// <param name="valourTeamSide">Team to give valour to.</param> | ||
/// <param name="constantMultiplier">Multiplier that should be given to everyone disregarding any other parameters.</param> | ||
/// <param name="updateUserStats">True if score and rating should be saved.</param> | ||
public async Task UpdateCrpgUsersAsync( | ||
float durationRewarded, | ||
float durationUpkeep, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of making this null by default and use durationRewarded
if it's null? That way you don't need to change the other game modes.
float durationUpkeep, | |
float? durationUpkeep = null, |
@@ -23,6 +23,7 @@ internal class CrpgDtvServer : MissionMultiplayerGameModeBase | |||
private bool _waveStarted; | |||
private MissionTimer? _waveStartTimer; | |||
private MissionTimer? _endGameTimer; | |||
private MissionTimer? _roundTimer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need a MissionTimer here but just a MissionTime.
private MissionTimer? _roundTimer; | |
private MissionTime _currentRoundStartTime; |
@@ -191,11 +193,13 @@ private void CheckForWaveEnd() | |||
{ | |||
bool viscountDead = !Mission.DefenderTeam.HasBots; | |||
bool defendersDepleted = Mission.DefenderTeam.ActiveAgents.Count == (viscountDead ? 0 : 1); | |||
float roundDuration = _currentRoundStartTime != null ? _currentRoundStartTime.ElapsedSeconds : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think MissionTime is a struct so the null check is redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the null check
I believe DTV upkeep should be the same as other servers, where it is only influenced by the duration of the round. As the reward system rewards players based on a duration, a workaround for DTV was implemented which also influenced the upkeep. Players' upkeep was influenced by the number of players & the round they are on. This made it difficult for them to understand & plan expenses when playing DTV.
This PR adds a
durationUpkeep
field to enable DTV upkeep to match other servers. It is likely that rewards will need to be reduced prior to release due to this change.