//Include in every wave. //Didn't want to call it "fixes" but yes it fixes some stuff too. //Made for Potato's MvM Servers, may have unintended effects on other servers using different nav files. //But makes some additions you may not want. //If you want to, scoop out the fixes and name it mvm_crown_fixes.nut or something. //Just credit my fixes please ;-; printl("Crown changes by randomguy loaded.") ////////////////////FIXES: //NAVAVOIDS: local fixnavavoid_1 = SpawnEntityFromTable("func_nav_avoid", //Stairs by gatebot flank. { targetname = "navavoid_custom" origin = "-1525 1420 -350" startdisabled = 0 tags = "bomb_carrier common" team = "3" }) local fixnavavoid_2 = SpawnEntityFromTable("func_nav_avoid", //Stairs that the map tried to navavoid but failed. Causes issues with bomblaunch. { targetname = "navavoid_custom" origin = "-1800 930 -250" startdisabled = 0 tags = "bomb_carrier common" team = "3" }) //define trigger volumes fixnavavoid_1.SetSize(Vector(), Vector(100, 100, 100)) //Set size of the trigger. fixnavavoid_1.KeyValueFromInt("solid", 2) //Make trigger solid. fixnavavoid_2.SetSize(Vector(), Vector(350, 150, 150)) fixnavavoid_2.KeyValueFromInt("solid", 2) //NAVPREFERS local fixnavprefer_1 = SpawnEntityFromTable("func_nav_prefer", { targetname = "navprefer_custom" origin = "-500 700 -600" // going to have to answer to someone if they investigate these placements. They work so not my problem. startdisabled = 0 tags = "bomb_carrier" team = "3" }) local fixnavprefer_2 = SpawnEntityFromTable("func_nav_prefer", //Not necessarily a "fix" but it shuts down a stupid flank. { targetname = "navprefer_custom" origin = "-2800 400 -200" //Main entrance of the post-gate building. Trying to prevent flankers startdisabled = 0 tags = "bomb_carrier common" team = "3" }) //define trigger volumes fixnavprefer_1.SetSize(Vector(), Vector(250, 400, 50)) //Set size of the trigger. fixnavprefer_1.KeyValueFromInt("solid", 2) //Make trigger solid. fixnavprefer_2.SetSize(Vector(), Vector(250, 400, 50)) //Set size of the trigger. fixnavprefer_2.KeyValueFromInt("solid", 2) //Make trigger solid. //Doing what fixnavprefer_2 is trying to do, shut down this goddamn flank. Just a prefer won't cut it. // for ( local ent; ent = Entities.FindByClassname(ent, "func_nav_avoid"); ) // { // local hammerid = NetProps.GetPropInt(ent, "m_iHammerID") // if( hammerid == 110979 ) // ent.KeyValueFromString("tags","bomb_carrier common") // } //I guess I'm living with this flank these do nothing. //ANTIBOMBLAUNCH (front) //Debatable on whether this is a "fix" or not, but oh well. //Adds a bunch of dropdowns to deal with this. They are cleared on waves where this nutfile is not loaded. // ::AddDropdowns <- // { // Cleanup = function() //Called whenever wave/mission is reloaded to unmodify the nav. // { // delete ::AddDropdowns // //These are all front top -> bottom dropdown navs. // NavMesh.GetNavAreaByID(232).Disconnect(NavMesh.GetNavAreaByID(140)) // NavMesh.GetNavAreaByID(95).Disconnect(NavMesh.GetNavAreaByID(140)) // NavMesh.GetNavAreaByID(95).Disconnect(NavMesh.GetNavAreaByID(361)) // NavMesh.GetNavAreaByID(4169).Disconnect(NavMesh.GetNavAreaByID(96)) // NavMesh.GetNavAreaByID(4169).Disconnect(NavMesh.GetNavAreaByID(140)) // //These are all post-gate building top -> bottom dropdown navs. // NavMesh.GetNavAreaByID(32).Disconnect(NavMesh.GetNavAreaByID(3804)) // NavMesh.GetNavAreaByID(105).Disconnect(NavMesh.GetNavAreaByID(3367)) // NavMesh.GetNavAreaByID(42).Disconnect(NavMesh.GetNavAreaByID(4100)) // } // OnGameEvent_recalculate_holidays = function(_) { if (GetRoundState() == 3) Cleanup() } // OnGameEvent_mvm_wave_complete = function(_) { Cleanup() } // //^cleans up nav deletion after the wave. // } __CollectGameEventCallbacks(AddDropdowns) // //These are all front top -> bottom dropdown navs. // NavMesh.GetNavAreaByID(232).ConnectTo(NavMesh.GetNavAreaByID(140), 2) // NavMesh.GetNavAreaByID(95).ConnectTo(NavMesh.GetNavAreaByID(140), 2) // NavMesh.GetNavAreaByID(95).ConnectTo(NavMesh.GetNavAreaByID(361), 2) // NavMesh.GetNavAreaByID(4169).ConnectTo(NavMesh.GetNavAreaByID(96), 3) // NavMesh.GetNavAreaByID(4169).ConnectTo(NavMesh.GetNavAreaByID(140), 3) // //These are all post-gate building top -> bottom dropdown navs. // NavMesh.GetNavAreaByID(32).ConnectTo(NavMesh.GetNavAreaByID(3804), 0) // NavMesh.GetNavAreaByID(105).ConnectTo(NavMesh.GetNavAreaByID(3367), 1) // NavMesh.GetNavAreaByID(42).ConnectTo(NavMesh.GetNavAreaByID(4100), 2) //Getting rid of these because bots love using them randomly for no reason i love bot nav i love bot nav //FIX SPAWN ATTRIBUTES //The tank spawn is missing some "this is blue spawn" and "don't drop the bomb here" nav attributes. //Namespaced in the off chance some other mission maker wants to take advantage of this issue. ::AddTankSpawnAttributes <- { Cleanup = function() //Called whenever wave/mission is reloaded to unmodify the nav. { delete ::AddTankSpawnAttributes NavMesh.GetNavAreaByID(3166).ClearAttributeTF(4) // Unmark tank spawn nav square as BLU spawn NavMesh.GetNavAreaByID(471).ClearAttributeTF(4) NavMesh.GetNavAreaByID(3167).ClearAttributeTF(4) NavMesh.GetNavAreaByID(632).ClearAttributeTF(4) NavMesh.GetNavAreaByID(3189).ClearAttributeTF(4) NavMesh.GetNavAreaByID(3400).ClearAttributeTF(4) NavMesh.GetNavAreaByID(3401).ClearAttributeTF(4) NavMesh.GetNavAreaByID(3187).ClearAttributeTF(4) NavMesh.GetNavAreaByID(1184).ClearAttributeTF(4) NavMesh.GetNavAreaByID(631).ClearAttributeTF(4) NavMesh.GetNavAreaByID(847).ClearAttributeTF(4) NavMesh.GetNavAreaByID(3193).ClearAttributeTF(4) NavMesh.GetNavAreaByID(80).ClearAttributeTF(4) NavMesh.GetNavAreaByID(196).ClearAttributeTF(4) } OnGameEvent_recalculate_holidays = function(_) { if (GetRoundState() == 3) Cleanup() } OnGameEvent_mvm_wave_complete = function(_) { Cleanup() } //^cleans up nav deletion after the wave. } __CollectGameEventCallbacks(AddTankSpawnAttributes) NavMesh.GetNavAreaByID(3166).SetAttributeTF(4) // Mark tank spawn nav square as BLU spawn NavMesh.GetNavAreaByID(471).SetAttributeTF(4) NavMesh.GetNavAreaByID(3167).SetAttributeTF(4) NavMesh.GetNavAreaByID(632).SetAttributeTF(4) NavMesh.GetNavAreaByID(3189).SetAttributeTF(4) NavMesh.GetNavAreaByID(3400).SetAttributeTF(4) NavMesh.GetNavAreaByID(3401).SetAttributeTF(4) NavMesh.GetNavAreaByID(3187).SetAttributeTF(4) NavMesh.GetNavAreaByID(1184).SetAttributeTF(4) NavMesh.GetNavAreaByID(631).SetAttributeTF(4) NavMesh.GetNavAreaByID(847).SetAttributeTF(4) NavMesh.GetNavAreaByID(3193).SetAttributeTF(4) NavMesh.GetNavAreaByID(80).SetAttributeTF(4) NavMesh.GetNavAreaByID(196).SetAttributeTF(4) ////////////////////ADDITIONS: //Door closing indicator; Multiple playtester engineers got baited because you can't see the door beforehand. PrecacheModel("models/props_gameplay/door_slide_door.mdl") SpawnEntityFromTable("prop_dynamic", { targetname = "door_hologram" origin = "-1032 208 256" model = "models/props_gameplay/door_slide_door.mdl" skin = 1 angles = "0 -90 0" renderfx = 16 //i am peak hammer noob so i ripped this and the thing below from spanner switchup rendermode = 1 modelscale = 1.83 }) EntityOutputs.AddOutput(Entities.FindByName(null, "wave_start_relay"), "OnTrigger","door_hologram","Kill", null, 5, -1) //Kill the door closing indicator once the wave starts. EntityOutputs.AddOutput(Entities.FindByName(null, "wave_start_relay_notimer"), "OnTrigger","door_hologram","Kill", null, 5, -1) //Kill the door closing indicator once the wave starts. //Tanks speeding up if the gate ends up capped. Otherwise it ends up being pretty late. EntityOutputs.AddOutput(Entities.FindByName(null, "gate_a_relay"), "OnTrigger","tank_path_1","CallScriptFunction", "GateCapTankSpeeds", -1, -1) //Tanks passing this node will have their speed set to 300. EntityOutputs.AddOutput(Entities.FindByName(null, "wave_finished_relay"), "OnTrigger","wave_finished_relay","CallScriptFunction", "WaveEndTankSpeeds", -1, -1) //Tanks passing this node will have their modelscale set "back" to 75. ::GateCapTankSpeeds <- function() { EntityOutputs.AddOutput(Entities.FindByName(null, "tank_path_1"), "OnPass","!activator","SetSpeed", "300", -1, -1) //Tanks passing this node will have their speed set to 300. EntityOutputs.AddOutput(Entities.FindByName(null, "tank_path_17"), "OnPass","!activator","SetSpeed", "75", -1, -1) //Tanks passing this node will have their speed set "back" to 75. } ::WaveEndTankSpeeds <- function() { EntityOutputs.RemoveOutput(Entities.FindByName(null, "tank_path_1"), "OnPass","!activator","SetSpeed", "300") //Remove outputs from above. EntityOutputs.RemoveOutput(Entities.FindByName(null, "tank_path_17"), "OnPass","!activator","SetSpeed", "75") //See above. } //Smol Tanks. Clog up the map otherwise. EntityOutputs.AddOutput(Entities.FindByName(null, "tank_path_1"), "OnPass","!activator","SetModelScale", "0.75", -1, -1) //Tanks passing this node will have their modelscale set to 0.75. Probably trolls entity based custom tanks. //Remove the 2nd bomb from gate cap, because I personally don't see the point of it w/o multipath & I'm too deep in balancing these missions to bother balancing that. Maybe for an expert? EntFire("intel2","kill") //Remove the crits from gate cap, because I don't like them and this is my nutfile dammit. EntityOutputs.RemoveOutput(Entities.FindByName(null, "gate_a_relay"), "OnTrigger","bot_buff_condition","Enable",null) //"OnTrigger" "bot_buff_condition,Enable,,22,-1"