Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontier Defense #472

Draft
wants to merge 114 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
ccecc95
Spawn Harvester and load Npc Routes
RoyalBlue1 Feb 17, 2022
3b017e1
Harvester Color change with health
RoyalBlue1 Feb 17, 2022
5fe2f99
moved harvester creation, added harvester sound, added smokes
RoyalBlue1 Feb 19, 2022
5579adf
Added wave event logic
RoyalBlue1 Feb 20, 2022
e5307e8
More Events and Titan Navigation
RoyalBlue1 Feb 22, 2022
2fe15bb
Added Array to track alive Titans
RoyalBlue1 Feb 24, 2022
2b7b091
Added waveend scoring
RoyalBlue1 Mar 10, 2022
12b8838
Added Restart and Win and Mortar Titan
RoyalBlue1 Mar 12, 2022
83131ab
Added Game End Conditions
RoyalBlue1 Mar 15, 2022
c717811
Spawn Harvester and load Npc Routes
RoyalBlue1 Feb 17, 2022
62a2ffd
Harvester Color change with health
RoyalBlue1 Feb 17, 2022
bc47d31
moved harvester creation, added harvester sound, added smokes
RoyalBlue1 Feb 19, 2022
c56e68e
Added wave event logic
RoyalBlue1 Feb 20, 2022
f306be5
More Events and Titan Navigation
RoyalBlue1 Feb 22, 2022
6bc02db
Added Array to track alive Titans
RoyalBlue1 Feb 24, 2022
9eb7612
Added waveend scoring
RoyalBlue1 Mar 10, 2022
0b5e815
Added Restart and Win and Mortar Titan
RoyalBlue1 Mar 12, 2022
5c44d18
Added Game End Conditions
RoyalBlue1 Mar 15, 2022
791d8ca
Merge remote-tracking branch 'upsteam/gamemode_fd' into gamemode_fd
RoyalBlue1 Mar 25, 2022
7b11a56
Added Game Loss screen
RoyalBlue1 Mar 25, 2022
db9778a
Harvester changes (#350)
x3Karma May 9, 2022
0c6ff13
Indent fix
RoyalBlue1 May 11, 2022
9d77289
Update _gamemode_fd.nut (#353)
x3Karma May 11, 2022
dd4a613
Frontier Defense stuff (#355)
x3Karma May 12, 2022
11b7f3e
give medals at game end
RoyalBlue1 May 12, 2022
4caa1a3
Merge remote-tracking branch 'upsteam/gamemode_fd' into gamemode_fd
RoyalBlue1 May 12, 2022
6e3f676
Made wait until events more readable
RoyalBlue1 May 12, 2022
1d45604
Fixed Nav
RoyalBlue1 May 13, 2022
1b35524
Another Frontier Defense update (#356)
x3Karma May 13, 2022
b20b1cc
Add Health and Damage Scaling to FD (#359)
x3Karma May 13, 2022
d525fbb
Fixed some ui stuff and moved droppod into one function again
RoyalBlue1 May 14, 2022
217f476
track gamestats for endgame medals
RoyalBlue1 May 16, 2022
c4a807c
Split FD into multiple files
RoyalBlue1 May 30, 2022
25bca6a
[FD] Stalker Changes Only (#372)
x3Karma May 30, 2022
9103a20
[FD] Sniper Titans Changes (#373)
x3Karma May 30, 2022
14b38ad
[FD] Cloak Drone Changes (#374)
x3Karma May 30, 2022
1b69604
Small fixes for gamemode_fd (#376)
x3Karma May 30, 2022
e2a9475
[FD] Add more Titan events as well as separate Reaper events (#378)
x3Karma May 30, 2022
db3129c
New wait events and split event
RoyalBlue1 May 31, 2022
d5989ed
fix crash in sniper titan ai
RoyalBlue1 Jun 16, 2022
6a2513f
improved sprinting and detonating logic for FD (#410)
ASpoonPlaysGames Jul 7, 2022
827025e
Changed Damage Scaling and Health Values to PlaylistVars
RoyalBlue1 Jul 8, 2022
519c6c4
[FD] Give grunts shield captains and anti titan weapons based on diff…
ASpoonPlaysGames Jul 8, 2022
64515b8
[FD] General Small Changes (#411)
ASpoonPlaysGames Jul 9, 2022
151263b
highlight friendly players through walls (#413)
ASpoonPlaysGames Jul 9, 2022
16f71ec
Enable Selecting FD gamemodes in Private Match
RoyalBlue1 Jul 9, 2022
2289030
Renamed Event Functions and added Drone event
RoyalBlue1 Jul 10, 2022
c40ad59
Add code generated forward base codai complete waves
RoyalBlue1 Jul 10, 2022
0ba7672
Prevent Harvester explosion fx when all players out of render range
RoyalBlue1 Jul 10, 2022
748c19b
Spelling Fix (#418)
x3Karma Jul 10, 2022
1b066f4
Add Generated Events for homestead
RoyalBlue1 Jul 11, 2022
0c7ee5e
Update homestead events
RoyalBlue1 Jul 11, 2022
b9cfd8d
Bunch of small fixes
RoyalBlue1 Jul 12, 2022
eb46de3
improve nav + a couple other things (#421)
ASpoonPlaysGames Jul 12, 2022
3739df3
set weapon.e.burnReward when giving a burn reward (#417)
ASpoonPlaysGames Jul 12, 2022
b601f40
[FD] Drone event functionality (#422)
ASpoonPlaysGames Jul 12, 2022
19dd033
[FD] Drone improvements + move homestead to use Weighted wait functio…
ASpoonPlaysGames Jul 13, 2022
88d765b
Basic Rise waves and Fix Nuke Titans doing Team Damage
RoyalBlue1 Jul 13, 2022
1d9b24f
Merge remote-tracking branch 'upsteam/main' into gamemode_fd
RoyalBlue1 Jul 14, 2022
7b166b5
why is there an extra } (#426)
x3Karma Jul 15, 2022
69976de
Add missing bracket in mp_rise_fd
RoyalBlue1 Jul 15, 2022
ee16444
Add Revive to Turrets
RoyalBlue1 Jul 17, 2022
d0f226b
Check if NPC is still valid in wait events
RoyalBlue1 Jul 17, 2022
78a92fd
Fix d0f226b23eae12e3b27199db673d45f37708d5fc
RoyalBlue1 Jul 17, 2022
7df82f8
Fixed stalkers running with missing leg(s)
RoyalBlue1 Jul 17, 2022
bcec5a5
dont remove amped weapons after entering titans
BobTheBob9 Jul 17, 2022
6e97ffc
Merge remote-tracking branch 'upsteam/permanent-amped-weapons-fix-pr'…
RoyalBlue1 Jul 18, 2022
3e72be3
Revert BurnMeter_getLimitedRewardCount changes
RoyalBlue1 Jul 18, 2022
c698f0a
replaced shield captains with "shield captains" to match vanilla (#442)
ASpoonPlaysGames Jul 21, 2022
5cee2bd
Add mortar spectre logic (no anims) (#441)
ASpoonPlaysGames Jul 21, 2022
39e7540
[FD] Quick mortar spectre fix (#443)
ASpoonPlaysGames Jul 21, 2022
ef5c3d4
[FD] Fixing another mortar spectre crash (#444)
ASpoonPlaysGames Jul 21, 2022
3376f72
Fix Turret dying
RoyalBlue1 Jul 21, 2022
96f061e
potentially fix nuke titan crash? (#445)
ASpoonPlaysGames Jul 21, 2022
2275ace
[FD] More Mortar Spectre fixes (#449)
ASpoonPlaysGames Jul 22, 2022
92e0c79
[FD] Tick Improvements (#450)
ASpoonPlaysGames Jul 23, 2022
14ee2ce
[FD] Forwardbase Kodai improvements + attempt to stop AI from clippin…
ASpoonPlaysGames Jul 23, 2022
d420367
[FD]Formatting Frontier Defense Gamemode Files (#439)
RoyalBlue1 Jul 24, 2022
e507514
[FD] Warning events, smoke changes, and improved kodai events (#456)
ASpoonPlaysGames Jul 27, 2022
3fdf27f
[FD] Drones fix + formatting (#457)
ASpoonPlaysGames Jul 27, 2022
ad82fac
Fix issue where cloak drones dont get removed from the UI (#462)
ASpoonPlaysGames Jul 29, 2022
f1c0ec0
fix potential crash where player leaves while being wave mvp (#460)
ASpoonPlaysGames Jul 29, 2022
fef599e
[FD] UI things + general cleanup (#458)
ASpoonPlaysGames Jul 29, 2022
960e64f
[FD] AI proficiency (#463)
ASpoonPlaysGames Jul 30, 2022
ff279c0
[FD]Fix unlimited ammo setting (#459)
zxcPandora Jul 31, 2022
4f41ac6
Dropship spawn
Aug 1, 2022
4fc6904
Fix Homestead Respawn crash
Aug 1, 2022
6a9d495
Merge remote-tracking branch 'upsteam/gamemode_fd' into gamemode_fd
Aug 1, 2022
0e379c6
[FD]Ronin Phase Shift fix (#473)
zxcPandora Sep 13, 2022
e32bd27
Fix respawn as titan
Oct 18, 2022
52dab1d
Merge remote-tracking branch 'upsteam/main' into gamemode_fd
Oct 18, 2022
3c00b69
Add game end awards
Oct 19, 2022
4d48eb8
Fix calling wrong function
Oct 20, 2022
a15ff4c
Rework game end awards
Oct 21, 2022
3e83c53
Set end game awards as epilogue
Oct 23, 2022
95f09ef
Prevent crash when playing with more than 4 players
Nov 13, 2022
2073313
[FD]Set Persistent Var (#547)
zxcPandora Dec 13, 2022
a735381
[FD]Player Data Collect (#465)
zxcPandora Dec 15, 2022
fb44295
[FD] Fix compile errors (#558)
ASpoonPlaysGames Dec 30, 2022
560c96d
[FD]Bug fix and new feature (#556)
zxcPandora Jan 2, 2023
cad416b
[FD] Allow players to change loadouts between waves (#461)
ASpoonPlaysGames Jan 8, 2023
bb8671e
Merge remote-tracking branch 'upsteam/main' into gamemode_fd
Jan 15, 2023
7ba6b05
Fix missing struct values from merge
Jan 17, 2023
540e4e5
Merge remote-tracking branch 'upsteam/main' into gamemode_fd
Jan 24, 2023
e8a2e28
[FD]New features and bug fix (#566)
zxcPandora Jan 24, 2023
c8e4d7e
[FD]New features and fix bug (#548)
zxcPandora Feb 6, 2023
b65bfb6
Merge remote-tracking branch 'upsteam/main' into gamemode_fd
Feb 13, 2023
dd457ef
[FD] Properly initialise mp_thaw.nut (#592)
ASpoonPlaysGames Feb 19, 2023
71ab870
Merge remote-tracking branch 'upsteam/main' into gamemode_fd
RoyalBlue1 May 11, 2023
9c13170
Merge remote-tracking branch 'upsteam/main' into gamemode_fd
RoyalBlue1 Jun 23, 2023
ad70253
Merge remote-tracking branch 'upsteam/main' into gamemode_fd
RoyalBlue1 Oct 15, 2023
a1502e9
Merge pull request #777 from R2Northstar/main
GeckoEidechse Dec 31, 2023
228aefe
Merge branch 'main' into gamemode_fd
Zanieon Sep 10, 2024
a4a27fe
Merge remote-tracking branch 'upstream/main' into gamemode_fd
Zanieon Dec 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void function InitialiseArenaLoadouts()
file.tier0Weapons.append( respawnData )

#if SERVER
SetBoostPurchaseCallback( GivePlayerArenaLoadoutItem )
//SetBoostPurchaseCallback( GivePlayerArenaLoadoutItem )
#endif
}

Expand Down
8 changes: 8 additions & 0 deletions Northstar.Custom/mod/scripts/vscripts/rodeo/_rodeo_titan.gnut
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ global function Rodeo_PilotPicksUpBattery_Silent

global function AddOnRodeoStartedCallback
global function AddOnRodeoEndedCallback
global function AddBatteryHealCallback

global function PilotBattery_SetMaxCount
global function ThrowRiderOff
Expand Down Expand Up @@ -92,6 +93,7 @@ struct
{
array<void functionref(entity,entity)> onRodeoEndedCallbacks
array<void functionref(entity,entity)> onRodeoStartedCallbacks
array<void functionref(entity,entity,int,int)> batteryHealCallbacks

table<entity, AntiRodeoPlayerData> antiRodeoPlayerData

Expand Down Expand Up @@ -537,6 +539,12 @@ void function AddOnRodeoEndedCallback( void functionref(entity,entity) callbackF
file.onRodeoEndedCallbacks.append( callbackFunc )
}

void function AddBatteryHealCallback( void functionref(entity,entity,int,int) callbackFunc )
{
Assert (!( file.batteryHealCallbacks.contains( callbackFunc ) ))
file.batteryHealCallbacks.append( callbackFunc )
}

function PlayerBeginsTitanRodeo( entity player, RodeoPackageStruct rodeoPackage, entity rodeoTitan )
{
entity soul = rodeoTitan.GetTitanSoul()
Expand Down
13 changes: 13 additions & 0 deletions Northstar.CustomServers/mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
"Name": "ns_allow_kill_commands",
"DefaultValue": "0"
},
{
"Name": "ns_use_phase_fix",
"DefaultValue": "1"
},
{
"Name": "ns_progression_enabled",
"DefaultValue": "0",
Expand Down Expand Up @@ -164,6 +168,15 @@
"UICallback": {
"Before": "Progression_Init"
}
},

{
"Path": "gamemodes/_gamemode_fd_events.nut",
"RunOn": "( SERVER ) && MP"
},
{
"Path": "gamemodes/_gamemode_fd_nav.nut",
"RunOn": "( SERVER ) && MP"
}
]
}
9 changes: 7 additions & 2 deletions Northstar.CustomServers/mod/scripts/vscripts/_harvester.gnut
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ global struct HarvesterStruct {
bool harvesterShieldDown
float harvesterDamageTaken
bool havesterWasDamaged

}

HarvesterStruct function SpawnHarvester( vector origin, vector angles, int health, int shieldHealth, int team )
Expand All @@ -32,14 +31,20 @@ HarvesterStruct function SpawnHarvester( vector origin, vector angles, int healt
SetObjectCanBeMeleed( harvester, true )
SetVisibleEntitiesInConeQueriableEnabled( harvester, true )
SetTeam(harvester,team)

// create dangerous area to all AI because we dont want any AI clipping into the harvester ever
// radius of 90 cos thats like 7.5 metres? AI shouldnt rally need to get closer than that (except nuke titans and stalkers)
// stalkers dont care about dangerous areas
// nuke titan detonation radius is larger than 90
AI_CreateDangerousArea_Static( harvester, null, 90, TEAM_INVALID, true, true, origin )
DispatchSpawn( harvester )

SetGlobalNetEnt( "FD_activeHarvester", harvester )

entity blackbox = CreatePropDynamic( MODEL_HARVESTER_TOWER_COLLISION, origin, angles, 0 )
blackbox.Hide()
blackbox.Solid()
// blackbox.kv.CollisionGroup = TRACE_COLLISION_GROUP_PLAYER
ToggleNPCPathsForEntity( blackbox, false )

entity rings = CreatePropDynamic( MODEL_HARVESTER_TOWER_RINGS, origin, angles, 6 )
thread PlayAnim( rings, "generator_cycle_fast" )
Expand Down
10 changes: 9 additions & 1 deletion Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ global function SvLoadoutsMP_Init

global function SetLoadoutGracePeriodEnabled
global function SetWeaponDropsEnabled
global function SetAllowLoadoutChangeFunc

global function AddCallback_OnTryGetTitanLoadout
global function GetTitanLoadoutForPlayer
Expand All @@ -22,6 +23,8 @@ struct {
array< TryGetTitanLoadoutCallbackType > onTryGetTitanLoadoutCallbacks

array<entity> dirtyLoadouts

bool functionref( entity ) allowChangeLoadoutFunc = null
} file

void function SvLoadoutsMP_Init()
Expand Down Expand Up @@ -58,6 +61,11 @@ void function SetLoadoutGracePeriodEnabled( bool enabled )
file.loadoutGracePeriodEnabled = enabled
}

void function SetAllowLoadoutChangeFunc( bool functionref( entity ) func )
{
file.allowChangeLoadoutFunc = func
}

void function SetWeaponDropsEnabled( bool enabled )
{
if( enabled )
Expand Down Expand Up @@ -295,7 +303,7 @@ void function TryGivePilotLoadoutForGracePeriod( entity player )
else
respawnTimeReal = expect float( player.s.respawnTime )

if ( ( ( Time() - respawnTimeReal <= CLASS_CHANGE_GRACE_PERIOD || GetGameState() < eGameState.Playing ) && file.loadoutGracePeriodEnabled ) || player.p.usingLoadoutCrate )
if ( ( ( Time() - respawnTimeReal <= CLASS_CHANGE_GRACE_PERIOD || GetGameState() < eGameState.Playing ) && file.loadoutGracePeriodEnabled ) || player.p.usingLoadoutCrate || ( file.allowChangeLoadoutFunc != null && file.allowChangeLoadoutFunc( player ) ) )
{
if ( !Loadouts_CanGivePilotLoadout( player ) && player.GetParent() != null && ( HasCinematicFlag( player, CE_FLAG_INTRO ) || HasCinematicFlag( player, CE_FLAG_CLASSIC_MP_SPAWNING ) || HasCinematicFlag( player, CE_FLAG_WAVE_SPAWNING ) ) )
thread GiveLoadoutWhenIntroOver( player )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void function CloakedDronePathThink( entity cloakedDrone )
continue

//Don't cloak arc titans
if ( guy.GetTargetName() == "empTitan" )
if ( IsEMPTitan( guy ) )
continue

if ( IsSniperSpectre( guy ) )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ untyped
global function EmpTitans_Init

global function EMPTitanThinkConstant
global function IsEMPTitan

const DAMAGE_AGAINST_TITANS = 150
const DAMAGE_AGAINST_PILOTS = 40
Expand All @@ -11,6 +12,11 @@ const EMP_DAMAGE_TICK_RATE = 0.3
const FX_EMP_FIELD = $"P_xo_emp_field"
const FX_EMP_FIELD_1P = $"P_body_emp_1P"

struct
{
array<entity> empTitans
} file

function EmpTitans_Init()
{
AddDamageCallbackSourceID( eDamageSourceId.titanEmpField, EmpField_DamagedEntity )
Expand All @@ -31,7 +37,8 @@ void function EMPTitanThinkConstant( entity titan )
DisableTitanRodeo( titan )

//Used to identify this titan as an arc titan
SetTargetName( titan, "empTitan" )
// SetTargetName( titan, "empTitan" ) // unable to do this due to FD reasons
file.empTitans.append( titan )

//Wait for titan to stand up and exit bubble shield before deploying arc ability.
WaitTillHotDropComplete( titan )
Expand Down Expand Up @@ -88,6 +95,8 @@ void function EMPTitanThinkConstant( entity titan )
{
StopSoundOnEntity( titan, "EMP_Titan_Electrical_Field" )
EnableTitanRodeo( titan ) //Make the arc titan rodeoable now that it is no longer electrified.
if (file.empTitans.find( titan ) )
file.empTitans.remove( file.empTitans.find( titan ) )
}

foreach ( particleSystem in particles )
Expand All @@ -108,7 +117,7 @@ void function EMPTitanThinkConstant( entity titan )
{
origin = titan.GetAttachmentOrigin( attachID )

RadiusDamage(
RadiusDamage(
origin, // center
titan, // attacker
titan, // inflictor
Expand All @@ -134,7 +143,7 @@ void function EmpField_DamagedEntity( entity target, var damageInfo )
entity titan = DamageInfo_GetAttacker( damageInfo )

if ( !IsValid( titan ) )
return
return

local className = target.GetClassName()
if ( className == "rpg_missile" || className == "npc_turret_sentry" || className == "grenade" )
Expand Down Expand Up @@ -178,4 +187,9 @@ void function EmpField_DamagedEntity( entity target, var damageInfo )
string function GetEMPAttachmentForTitan( entity titan )
{
return "hijack"
}
}

bool function IsEMPTitan( entity titan )
{
return file.empTitans.find( titan ) != -1 ? true : false
}
Loading
Loading