Garry's Mod

Garry's Mod

Prospekt Defense (gm_prospektdefence)
 This topic has been pinned, so it's probably important
legoj15  [developer] 4 Apr, 2021 @ 7:51pm
Technical Details
This addon is only a map and models, there is no LUA code involved, the relationship between the player and the rebels & Combine are all done through a map entity named `ai_relationship`. If Combine are attacking you and/or rebels are friendly, it is an addon or mod you have installed, even if you don't think it is!!

Yes, I did have to write that 3 times.

From the get go, every Combine soldier from d2_coast_12 is already spawned. I messed around with keeping the original map triggers in place, but re-tooling them so that they trigger upon NPCs passing instead of the player, and while it was interesting to see Combine spawn as the rebels and antlions progressed, it didn't make for a good replayable map. Throughout the map, there are small "squads" of Combine, they will communicate with each other efficiently, but may not be aware of what is happening to other squads.

There are 2 types of Rebels, SMG & AR2* carrying rebels, and RPG equipped rebels, and they have different goals. The SMG and AR2 rebels will keep advancing until they reach the pipe at the end of the map, where once they do, text will appear on screen telling you that your mission has failed (unlike Arctic Defense, the map will not automatically reset). The RPG rebels will permanently disable thumpers and mounted guns upon a successful hit.
*Once all thumpers and turrets are destroyed, RPG and SMG rebels will no longer spawn, and the spawner for AR2 equipped rebels will become enabled. The maximum number of living SMG rebels is 10, the max for RPG rebels is 5, and the max for AR2 rebels is 15. That means that after all turrets and thumpers are disabled, there could be at most 30 rebels attacking! Once all the remaining SMG and RPG die, there will only be 15 AR2 rebels alive at any time.

Antlions have been set to be allied with Rebels, so they will not attack any NPC that is a coded as a 'npc_citizen'. They will attack everything else, including the player. Antlions actually have no goal, but are aware of all enemies in the map, and will move to attack. This gives the illusion of the Antlions fighting along side the rebels, but as the enemy count decreases, Antlions will appear to be less aggressive. There was a bug with the dedicated Antlion spawner that resulted in infinite Antlions, so I had to use the generic spawner. This means that you will see Antlions pop into existence, instead of burrow out of the ground like they do in HL2

There is a functional Combine dropship that spawns as soon as the map loads, and drops off 6 soldiers. It then flies off and despawns out of sight. After those soldiers die, another dropship will come to replace them with another 6 soldiers. This will continue until eventually the drop off point will be swarmed with enough rebels for the soldiers to all die before the dropship has despawned, and from there another one will not respawn. The 6 dropped off soldiers all respond to an assault task, which will take them across the map to the rebel's spawn, or until they encounter enemies and take over from there. The assault task is different from the rebel tasks as the soldiers can drop the task if they come under fire, which will stop them from advancing any further, unlike the rebels which will keep moving until they die or get stuck.

In the spawn bunker, there are 3 buttons. The rightmost one will have a label, "Remove map scripting". Pressing the button enables the 2 buttons left of it, stops the dropship from coming back, and kills all rebel and Antlion spawners, along with rebel tasks, so that any remaining rebels will be left to their AI, instead of being forced to advance. The middlemost button is toggleable, and when enabled, all
npc_citizen
,
npc_barney
, and
npc_alyx
entities will move to the original rebel goal. While toggled, the script will run every 15 seconds. If toggled on then off, the script will continue to run, but will not be "forced" every 15 seconds, so NPCs can use their AI more effectively, but might not move towards the end goal effectively, if at all. The leftmost button will remove all npc_bullseye entities, which is what the rebels with RPGs shoot at to disable thumpers and turrets.

There are Strider nodes in the map, but it appears that Striders don't want to move much once they've obtained an enemy for some reason.

Almost all Combine NPCs are friendly to the player. Exceptions are gunship and hunter-chopper based NPCs, since they require special map work for them to move around by default. The only rebel NPCs that will attack you are Alyx, and citizens with guns (aka rebels). For some reason, Rebels with RPGs will refuse to shoot you, so when you man a gun, it basically becomes invulnerable unless the RPG rebels shoot at something else near you, or a grenade is thrown and precisely explodes where the RPG bullseye is. To mitigate "spawn camping", there is a rebel manned turret by the rebel and Antlion spawn that has perfect accuracy, and will fire upon the player and all other enemies. If the gunner dies, another one will spawn to take its place, infinitely, unless map scripting is disabled.
Last edited by legoj15; 11 Apr, 2021 @ 1:34am
< >
Showing 1-2 of 2 comments
elmo 9 Apr, 2021 @ 9:04pm 
I appreciate the combine radio chatter detail in the combine emplacement bunkers. :steamthumbsup:
speednutt 10 Apr, 2021 @ 6:14pm 
The combine dont like me at all and neither are friendly and i have no other npc mod
< >
Showing 1-2 of 2 comments
Per page: 1530 50