Skip to content

Commit

Permalink
Update Nightsky - Night of Fire (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Windolon authored Nov 19, 2024
1 parent 7d8b26b commit d45aadd
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 147 deletions.
127 changes: 9 additions & 118 deletions scripts/population/mvm_nightsky_rc4d_int_night_of_fire.pop
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// File last updated 2.9.2024, update 3.3

// "Night of Fire" for Nightsky, an intermediate mission by Lobotomy
// Nightsky by Seelpit, Silentsky by PenolAkushari

Expand All @@ -22,7 +20,7 @@ LobotomySchedule
FixedRespawnWaveTime Yes
CanBotsAttackWhileInSpawnRoom No

FixHuntsmanDamageBonus 0 // Disables rafmod huntsman damage fix for non-potato servers compability
FixHuntsmanDamageBonus 0 [$SIGSEGV] // Disables rafmod huntsman damage fix for non-potato servers compability

Templates
{
Expand Down Expand Up @@ -132,7 +130,7 @@ LobotomySchedule
Name "Healing Spellbook Pyro"
Health 650
Scale 1.4
ClassIcon spell_healing
ClassIcon spell_overheal_seel
Item "The Bat Outta Hell"
Item "TF_WEAPON_SPELLBOOK"
Item "Point and Shoot"
Expand Down Expand Up @@ -454,25 +452,7 @@ LobotomySchedule
{
Target bignet
Action RunScriptCode
Param
"
IncludeScript(`popextensions_main.nut`, getroottable())

MissionAttrs
({
WaveStartCountdown = 5
ForceHoliday = 2
NoRome = 1
NoThrillerTaunt = 1
NoCrumpkins = 1
HuntsmanDamageFix = 1 // Enables popext huntsman damage fix instead
})

EntFire(`route1_holos*`, `SetModel`, `models/props_mvm/robot_hologram_color.mdl`)
EntFire(`route2_holos*`, `SetModel`, `models/props_mvm/robot_hologram_color.mdl`)
EntFire(`route1_holos*`, `color`, `169 56 214`)
EntFire(`route2_holos*`, `color`, `169 56 214`)
"
Param "IncludeScript(`night_of_fire_lobotomy.nut`, getroottable())"
}
StartWaveOutput
{
Expand Down Expand Up @@ -695,26 +675,7 @@ LobotomySchedule
{
Target bignet
Action RunScriptCode
Param
"
IncludeScript(`popextensions_main.nut`, getroottable())
IncludeScript(`night_of_fire_lobotomy.nut`, getroottable())

MissionAttrs
({
WaveStartCountdown = 5
ForceHoliday = 2
NoRome = 1
NoThrillerTaunt = 1
NoCrumpkins = 1
HuntsmanDamageFix = 1 // Enables popext huntsman damage fix instead
})

EntFire(`route1_holos*`, `SetModel`, `models/props_mvm/robot_hologram_color.mdl`)
EntFire(`route2_holos*`, `SetModel`, `models/props_mvm/robot_hologram_color.mdl`)
EntFire(`route1_holos*`, `color`, `169 56 214`)
EntFire(`route2_holos*`, `color`, `169 56 214`)
"
Param "IncludeScript(`night_of_fire_lobotomy.nut`, getroottable())"
}
StartWaveOutput
{
Expand Down Expand Up @@ -852,17 +813,7 @@ LobotomySchedule
Action RunScriptCode
Param
"
IncludeScript(`popextensions_main.nut`, getroottable())

MissionAttrs
({
WaveStartCountdown = 5
ForceHoliday = 2
NoRome = 1
NoThrillerTaunt = 1
NoCrumpkins = 1
HuntsmanDamageFix = 1 // Enables popext huntsman damage fix instead
})
IncludeScript(`night_of_fire_lobotomy.nut`, getroottable())

SendGlobalGameEvent(`show_annotation`, {
worldPosX = -5226
Expand All @@ -873,11 +824,6 @@ LobotomySchedule
lifetime = -1
})

EntFire(`route1_holos*`, `SetModel`, `models/props_mvm/robot_hologram_color.mdl`)
EntFire(`route2_holos*`, `SetModel`, `models/props_mvm/robot_hologram_color.mdl`)
EntFire(`route1_holos*`, `color`, `169 56 214`)
EntFire(`route2_holos*`, `color`, `169 56 214`)

ClientPrint(null, 3, `\x0799CCFFThis wave features a \x07FFFF66parachuting tank\x0799CCFF! The annotation on screen shows where it will land.`)
"
}
Expand Down Expand Up @@ -976,7 +922,7 @@ LobotomySchedule
Tank
{
Name "droptank0"
ClassIcon tank2_para
ClassIcon tank2_para [$SIGSEGV]
Health 12000
Speed 75
StartingPathTrackNode "tank_path_drop0_a"
Expand Down Expand Up @@ -1114,26 +1060,7 @@ LobotomySchedule
{
Target bignet
Action RunScriptCode
Param
"
IncludeScript(`popextensions_main.nut`, getroottable())
IncludeScript(`night_of_fire_lobotomy.nut`, getroottable())

MissionAttrs
({
WaveStartCountdown = 5
ForceHoliday = 2
NoRome = 1
NoThrillerTaunt = 1
NoCrumpkins = 1
HuntsmanDamageFix = 1 // Enables popext huntsman damage fix instead
})

EntFire(`route1_holos*`, `SetModel`, `models/props_mvm/robot_hologram_color.mdl`)
EntFire(`route2_holos*`, `SetModel`, `models/props_mvm/robot_hologram_color.mdl`)
EntFire(`route1_holos*`, `color`, `169 56 214`)
EntFire(`route2_holos*`, `color`, `169 56 214`)
"
Param "IncludeScript(`night_of_fire_lobotomy.nut`, getroottable())"
}
StartWaveOutput
{
Expand Down Expand Up @@ -1329,26 +1256,7 @@ LobotomySchedule
{
Target bignet
Action RunScriptCode
Param
"
IncludeScript(`popextensions_main.nut`, getroottable())
IncludeScript(`night_of_fire_lobotomy.nut`, getroottable())

MissionAttrs
({
WaveStartCountdown = 5
ForceHoliday = 2
NoRome = 1
NoThrillerTaunt = 1
NoCrumpkins = 1
HuntsmanDamageFix = 1 // Enables popext huntsman damage fix instead
})

EntFire(`route1_holos*`, `SetModel`, `models/props_mvm/robot_hologram_color.mdl`)
EntFire(`route2_holos*`, `SetModel`, `models/props_mvm/robot_hologram_color.mdl`)
EntFire(`route1_holos*`, `color`, `169 56 214`)
EntFire(`route2_holos*`, `color`, `169 56 214`)
"
Param "IncludeScript(`night_of_fire_lobotomy.nut`, getroottable())"
}
StartWaveOutput
{
Expand Down Expand Up @@ -1685,25 +1593,8 @@ LobotomySchedule
Action RunScriptCode
Param
"
IncludeScript(`popextensions_main.nut`, getroottable())
IncludeScript(`night_of_fire_lobotomy.nut`, getroottable())

MissionAttrs
({
WaveStartCountdown = 5
ForceHoliday = 2
NoRome = 1
NoThrillerTaunt = 1
NoCrumpkins = 1
HuntsmanDamageFix = 1 // Enables popext huntsman damage fix instead
})

EntFire(`tf_zombie`, `Kill`)

EntFire(`route1_holos*`, `SetModel`, `models/props_mvm/robot_hologram_color.mdl`)
EntFire(`route2_holos*`, `SetModel`, `models/props_mvm/robot_hologram_color.mdl`)
EntFire(`route1_holos*`, `color`, `169 56 214`)
EntFire(`route2_holos*`, `color`, `169 56 214`)
"
}
StartWaveOutput
Expand Down Expand Up @@ -1973,4 +1864,4 @@ LobotomySchedule
}
}
}
}
}
53 changes: 24 additions & 29 deletions scripts/vscripts/night_of_fire_lobotomy.nut
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
// File last updated 2.9.2024, update 3.3

// Helper script file to handle fireball rocket logic + huntsman arrow ignite
// Helper script file for Nightsky - Night of Fire, to reduce the amount of verbosity InitWaveOutput has

// Wave initialisation
IncludeScript("popextensions_main.nut", getroottable())
MissionAttrs
({
WaveStartCountdown = 5
ForceHoliday = 2
NoRome = 1
NoThrillerTaunt = 1
NoCrumpkins = 1
HuntsmanDamageFix = 1
})
EntFire("route1_holos*", "SetModel", "models/props_mvm/robot_hologram_color.mdl")
EntFire("route2_holos*", "SetModel", "models/props_mvm/robot_hologram_color.mdl")
EntFire("route1_holos*", "color", "169 56 214")
EntFire("route2_holos*", "color", "169 56 214")

// I basically stole the detect projectile logic from PopExt's customattributes.
// Credit to Royal who wrote the original code RocketPenetration from PopExt.
PopExt.AddRobotTag("bombi_explosion", {
OnSpawn = function(bot,tag) {
local scope = bot.GetScriptScope()
local wep = bot.GetActiveWeapon()
wep.ValidateScriptScope()
local wepScope = wep.GetScriptScope()

wepScope.last_fire_time <- 0.0
wepScope.forceAttacking <- false

wepScope.CheckWeaponFire <- function() {
local fire_time = GetPropFloat(self, "m_flLastFireTime")
if (fire_time > last_fire_time && !forceAttacking) {
local owner = self.GetOwner()
if (owner) {
OnShot(owner)
}
last_fire_time = fire_time
}
return
}

wepScope.FindRocket <- function(owner) {
scope.FindRocket <- function(owner) {
local entity = null
for (local entity; entity = FindByClassnameWithin(entity, "tf_projectile_*", owner.GetOrigin(), 500);) {
if (entity.GetOwner() != owner) {
Expand All @@ -37,12 +34,10 @@ PopExt.AddRobotTag("bombi_explosion", {
return null
}

wepScope.OnShot <- function(owner) {
local rocket = FindRocket(owner)
PopExtUtil.OnWeaponFire(wep, function(){
local rocket = scope.FindRocket(bot)

if (rocket == null) {
return
}
if (rocket == null) return

PopExtUtil.SetDestroyCallback(rocket, function(){
local impactPoint = self.GetOrigin()
Expand All @@ -53,8 +48,7 @@ PopExt.AddRobotTag("bombi_explosion", {
effect_name = "bombinomicon_burningdebris_halloween"
})
})
}
PopExtUtil.AddThinkToEnt(wep, "CheckWeaponFire")
})
}
})

Expand All @@ -69,6 +63,7 @@ CustomAttributes.TakeDamagePostTable["night_of_fire_lobotomy_bombi_explosion_ign

}

// Since popext's customattributes on bots is not working
PopExt.AddRobotTag("arrow_ignite", {
OnSpawn = function(bot,tag) {
bot.ValidateScriptScope()
Expand Down

0 comments on commit d45aadd

Please sign in to comment.