Tsuey / L4D2-Community-Update

Help us shape the potential future of L4D2 vanilla.
68 stars 22 forks source link

Flaw in the boss spawn system #36

Open lunatixxx opened 2 years ago

lunatixxx commented 2 years ago

I have "sm_cvar versus_tank_flow_team_variation 0" and still sometimes there is a difference between tank and witch spawns, depending of the map this can cause big balance issues.

shqke commented 2 years ago

Any supplementary hints may help to locate and identify the issue. 👍

lunatixxx commented 2 years ago

Perfect example putting survivor in a difficult position: https://youtu.be/55ZpJ6lhY4g

Round 1 tank: 71% - Trigger at top of toboggans. Round 2 tank: 60% - Trigger when they enter the room with cabinet pills.

I only have a plugin who force the same coordinates for tank but it does not touch anything related to flow (it happens even without anyway), looks like the game decide to not respect the cvar versus_tank_flow_team_variation when it feels like it.

lunatixxx commented 2 years ago

Tsuey saying in sep 2020 that the variation is removed from official: https://steamcommunity.com/app/550/discussions/0/2261313417704618414/?ctp=3#c2944747978667072450

July 2021 new topic from the same person about the same problem, so unless you reverted back the variation there is clearly a problem: https://steamcommunity.com/app/550/discussions/0/3052861185487201098/

This cvar need to be fixed once for all please.

lunatixxx commented 2 years ago

Exact same problem with "versus_witch_flow_team_variation"

Treescrub commented 2 years ago

Reducing the value of the versus_boss_buffer cvar (potentially to 0) might reduce the variation.

lunatixxx commented 2 years ago

Reducing the value of the versus_boss_buffer cvar (potentially to 0) might reduce the variation.

What is the purpose of it ? There is no description.

Nesciuse commented 2 years ago

I think it's flow distance from survivor when tank should start spawning. If it was 0 though bosses that are at like 90% might not spawn

ProdigySim commented 2 years ago

I haven't tested much of this, but I've looked at the disassembly.

versus_boss_buffer appears to be the flow distance beyond the boss spawn flow that the tank/witch should actually spawn at.

pseudocode:

void CDirectorVersusMode::UpdateBossSpawning() {
  float furthestFlow = GetHighestSurvivorFlow();
  if (furthestFlow > this->m_flTankSpawnPct) {
     float tankSpawnFlow = furthestFlow + versus_boss_buffer.GetFloat();

     Vec3 tankSpawnPosition = TheEscapeRoute()->GetPositionOnPath(tankSpawnFlow);
     TheZombieManager->SpawnTank(GetNavArea(tankSpawnPosition));
  }
}

I think this would mean that lower values would make it MORE likely that late tanks could spawn, but that they would spawn closer to survivors. Of course, there could be other reasons for tank spawns to fail if they are too close to survivors.

You may be thinking of versus_boss_padding_min/max, which affects how far apart tank/witch should spawn from one another.

lunatixxx commented 2 years ago

Anyway i fixed it with https://github.com/SirPlease/L4D2-Competitive-Rework/blob/master/addons/sourcemod/scripting/witch_and_tankifier.sp