Generator Destruction (a variation) Prefab

Generator Destruction (a variation) Prefab v12

Yaki

aa
Sep 3, 2018
422
261
Generator Destruction (a variation) Prefab - Custom game mode. Kinda like Gang Garrison 2!

NOTE: This is still a Work-In-Progress. Will keep this updated until I'm done working on it.

Please see the Overview page for more updated info on this project.

Generator Destruction is a custom game mode for TF2. Due to not being officially supported by Valve, this is one of the variations of this game mode. (one of which is called Generator Defense, or probably the same name as this one...) To keep it simple, the map prefix is just "gd_".

What is the goal in your take of Generator Destruction?
  • Each team has a generator the other team needs to destroy.
  • At the beginning of the round, both generators have uber and Wrangler shield.
  • To drop the uber and/or shield, each team must destroy the other team's shield batteries. Destroying these batteries reduces the shield's power.
  • There are two shield batteries on each team. They are weak but repairable by Engineers.
  • Destroy the batteries, destroy the generator, win the game.
About the Generator itself
  • The generator is a Dispenser. It is classified as a building: However it does not heal, give metal, and cannot be upgraded nor repaired.
About the Shield Batteries
  • Unlike other variations of this game mode, this one has something called a shield battery.
  • As of 3 July 2021, the shield batteries look like Repair Nodes (scrapped Engineer building)
  • Each battery destroyed reduces the shield's power. First battery removes Uber, second battery removes Wrangler shield.

Gameplay Theory
  • Players have to decide whether to go destroy the batteries first to weaken the shield, or to make a direct attack on the generator.
  • Players are rewarded for destroying the batteries quickly, because each battery resets the time it takes to reboot the shield's power.

Map-Design Theory
  • idk

Special Thanks @MegapiemanPHD , Da Spud Lord , Pdan , Mr. Burguers , and sonoma for helping me with this.
Credit Benjamoose and Murphy for Repair Node textures.
 
Last edited:

Yaki

aa
Sep 3, 2018
422
261
General Notes about V6
  • Both generators gain 400 HP per player on the server. (no cap)
  • Similarly, the generator's shield batteries gain 30 HP per player on the server, capped at 600 HP
  • Shield Batteries respawn the same way Robot Destruction robots spawn. Default in prefab is:
    • 1 battery destroyed = 60 seconds
    • 2 battery destroyed = 120 seconds
  • In V5 and below, Generators could sapped and destroyed prematurely with the Red-Tape Recorder. This was fixed in V6 (fix was just removing sappers immediately upon being placed).
  • Voicelines were added in V6 for when the generator is being attacked.
Damage Reduction Logic
  • Damage reduction calculations are actually just adding back the health via percentage.
Custom Assets Included
  • Repair Node model + textures (credit Benjamoose + Murphy for textures)
  • Uber Dispenser
  • HUD icons
    • Uber
    • Shield Dispenser
    • Dispenser
  • Spliced TF2 Announcer lines
    • "You must destroy the enemy's reactor!"
    • "Destroy the enemy's reactor core!"
  • .res HUD file
  • Sound script file (for removing intel capture lines on classes, removing all RD sounds, adding new announcer lines)
  • Custom MOTD / "whiteboard" description for GD
Intel/Flag Notes
  • The points added at the start of the round are actually from a Robot Destruction intel spawned by a point_template, then send RoundActivate. This workaround for Source reasons doesn't consider the game having zero points on either team, because if there are no points the intels don't spawn in RD. However because it's spawns via template, it exists permanently, and RoundActivate collects the points automatically. (credit Mr. Burguers for the find)
  • You can also subtract points by setting an RD intel with negative points to subtract on pickup.
    • This does not work using RoundActivate.
  • You can subtract all points on the scoreboard for a team by setting the value to 4294967295 or higher. Use Google for more info why.
    • This method does work with RoundActivate.
  • func_respawnroom prevents capturing the intel, resulting in the workaround to remove points from the HUD a little difficult. The work-around for this is the logic constantly searches for a player inside the map-wide trigger until it is captured. If it fails to find a player, the intel deletes itself and respawns in a loop until it finds a player to capture it.
Other
  • Robot Destruction entities work in Player Destruction, including the Robots, including the intelligences. (although not 100%, see below)
    • Due to the intel being set to RD in a PD game mode, the capture HUD notifications are actually disabled and don't give any notification.
  • math_counter has a input to GetValue and OutValue. It seems like GetValue processes after OutValue if done with the same delay. It's used a lot in this logic.
 
Last edited:

Yaki

aa
Sep 3, 2018
422
261
V2
  • Added sound script to replace robot / announcer sounds
  • Re-organized the logic. Split into two sides--One for stuff the player interacts with, and the other side stuff that needs to be out-of-bounds.
  • Fixed broken damage reduction refires.
  • Updated shield effects to FireUser.

Read the rest of this update entry...
 
Last edited:

True lemon

L3: Member
Feb 20, 2019
132
33
Good to know it's a variation since I was looking at this on the discord and felt it changed the gameplay enough to not be a replacement of the original. Granted, it's most likely a whole ton better in the logic department though.
 

Yaki

aa
Sep 3, 2018
422
261
Good to know it's a variation since I was looking at this on the discord and felt it changed the gameplay enough to not be a replacement of the original. Granted, it's most likely a whole ton better in the logic department though.
I'm glad you think it's appropriate too. I think this is one of those modes that won't ever have a standard way to implement it, and instead always going in a direction of experimentation.

I'm proud of this logic. And I hope it works well for people who might use it.
 

Yaki

aa
Sep 3, 2018
422
261
V3
  • Logic Updated
    • Damage Reduction logic tightened to calculate precisely the time of damage occurs. That means no lag or hiccups where the generator heals erroneously. It's flawless! Woooooo!
    • HUD counter logic tuned to be even more accurate, and less laggy.
      • The score only updates when someone picks up a flag to reduce the score. These flags spawn when the score needs to be updated, but this update lags the game if updated too fast.
      • To change the update speed, change the map-wide trigger's Delay Before Retrigger parameter to something over 1 second. (default in my prefab is 1.1) Anything faster will probably cause stuttering in the server.

Read the rest of this update entry...
 

Yaki

aa
Sep 3, 2018
422
261
V4
  • Fixed file directory not actually having a 'custom' folder in it! doh
  • Added effects for the shield batteries.
  • Fixed bug where vgui_screen would resize on all dispensers.
  • Added scaling health for shield batteries (+50 per player, cap 1200)
  • Fixed bug where shield batteries couldn't spawn. (due to env_entity_maker not spawning the template in brushes)
  • Added new assets
    • Uber Dispenser
    • "Generator" sign (it's kind of WIP)
    • "Uber" HUD icon

Read the rest of this update entry...
 

Yaki

aa
Sep 3, 2018
422
261
V5
  • The vgui_screen panel on the generator now disappear when ubered.
  • Added a fix for the HUD not deducting points when a player is in the respawn room.
  • Updated the files
    • Added a GD description for the whiteboard in the beginning of the map
    • Updated the level sounds to remove the intel-capture lines for all classes.
  • Updated readme
For those updating from V4 to V5
  • Copy and replace all the logic side of the prefab.
  • Copy the BLU generator (just the BLU one!) from this prefab and replace it with the one in your map.
  • Place the condition triggers in the respawn rooms.
    • You can make a new brush entity called "trigger_add_tf_player_condition" with condition 65, set to -1 duration.
  • Re-place all the map-wide triggers with the new ones in the prefab.
That's all for now. Have fun!

Read the rest of this update entry...
 
Last edited:

Yaki

aa
Sep 3, 2018
422
261
V6
Map with V4 (gd_texas_a1c: https://feedback.tf2maps.net/map/gd_texas_a1c/)

Shield Batteries
  • Dropped count from 3 -> 2
  • Now uses Repair Node model
  • Reduced health from 50 per player to 30 per player (cap 600)
  • Buildings now permanently disabled (can't heal etc)

Generator
  • Reduced health from 500 per player to 400 per player
  • (Bug Fix) Sappers are now removed immediately on placement. (Red-Tape broke the map)
  • (Bug Fix) Sappers don't re-enable buildings
  • Generator now only ubered, gains 66% damage resistance, then completely vulnerable.
Added new announcer voicelines
  • "You must destroy the enemy's reactor!"
  • "Destroy the enemy's reactor core!"

Added new assets

Read the rest of this update entry...
 

Yaki

aa
Sep 3, 2018
422
261
V7
  • (while throwing salt over my shoulder superstitiously) Squashed evil bugs with Sappers...
    • Fixed Red-Tape Recorder resetting health of Generator. (known bug: Does change health of batteries. Could potentially fix that later but it's a non-issue)
    • Fixed both sappers from crashing the game.
    • Thanks Da Spud Lord for helping me with figuring out a workable solution for this.
  • Updated HUD icon for shielded Dispenser and base Dispenser
  • (undocumented in V6) reduced HUD update for map-wide triggers from Retrigger rate 1.1 to 0.01

Read the rest of this update entry...
 

Yaki

aa
Sep 3, 2018
422
261
V8
  • Added explosion effect on generator destruction.
  • Increased cooldown of /Protect your reactor/ line from 5s to 12s.
  • All generators/shield batteries now heal 5HP/sec
  • Shield batteries leave a blueprint on destruction.
  • Added new voicelines for when both batteries are destroyed.
  • Added sounds when the generator's health changes on the HUD.
  • Fixed seeing robots outside the map w/ cond 114.
  • Reduced generator HP increments from 400 to 300.
  • Updated custom assets, folders and readme.
  • Fixed visgroups not filtering some entities in prefab.

Read the rest of this update entry...
 

Yaki

aa
Sep 3, 2018
422
261
V9
  • Fixed crash in server bootup I/O by placing the damage reduction logic into a point_template.
    • This ties in with the Red-Tape Recorder sapper fix. I had to make the building have a high enough level to make the Red-Tape not reduce the logic-modified health of the building...
  • Updated sappers to deal 30 damage per placement (up from 10).

VERSION NOTE: This'll be the last version that has the gameplay elements of having the generator be invincible until the nodes are destroyed. More on that coming soon.

Read the rest of this update entry...
 

Yaki

aa
Sep 3, 2018
422
261
Sorry gang! So apparently I didn't fix the feedback round crash. THIS VERSION MIGHT FIX IT--It's a small func_door that, when sent Open, kills most of the GD entities.

You can find the door right above the logic_auto on the right-hand side of the map!

Read the rest of this update entry...
 

Yaki

aa
Sep 3, 2018
422
261
V10
  • Reorganized everything. If you used this logic in a previous map, please reinstall everything from the ground up. (except the map-wide triggers. Those are OK to keep because I didn't change those)
  • Updated Readme with full installation guide.

Gameplay Changes
  • Generator size up from 2x -> 3x
  • Previously, shield batteries resurrected themselves on their own. Now, in order to restore one of your team's shield batteries, you must now capture a CP in the designated area.
  • The HUD now displays warnings for whenever the opposing team damages any objectives. (Batteries or main Generator)

To Map Authors
  • Made it easier to setup the logic. Simply place the obj_dispensers in the correct places and it'll spawn everything necessary to get the game mode to work.
  • Added several relays for shield battery events (When damaged, respawning, or being destroyed), as well as when the generator increases/loses its shields.
  • Each battery has their own version of:
    • relay_OnShieldbatteryDamaged // When the shield battery is damaged
    • relay_OnShieldbatteryRespawned // For when the battery respawns
    • relay_OnShieldbatteryDestroyed // On destruction of a battery
  • For the main generator:
  • Again, each relay has their own team variant.
    • relay_OnGeneratorShieldLv1 // no shield
    • relay_OnGeneratorShieldLv2 // wrangler shield
    • relay_OnGeneratorShieldLv3 //full shield+uber

Miscellaneous Changes
  • Heavy's damage output to main generator nerfed by 75%. (He deals 25% damage to the generator now!)
  • Batteries now generate metal.
  • Fixed the BLU generator sign looking weird
  • Changed battery explosion FX to something less graphic intensive

Read the rest of this update entry...
 

Yaki

aa
Sep 3, 2018
422
261
I remade the signs and posted them in a separate download.

Comes with all signs (small, large, left, right, hanging, each with RED/BLU + GENERATOR/BATTERY skin variants)


1653732736447.png
 

Yaki

aa
Sep 3, 2018
422
261
Yaki updated Generator Destruction (a variation) Prefab with a new update entry:

v12 Update

  • Updated whiteboard objective description when the map boots up
  • Updated model directories to use props_yaki/generator_destruction/
  • (Request by Sono) Added logic to fire relay when a generator gets to a certain HP value. Can have up to 16.
  • Fixed bug with BLU Generator looking like a RED...

Read the rest of this update entry...