aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-06-27 20:55:35 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-06-27 20:55:35 +0100
commit31c8a052e8f3cdccedb7f6f8d2bd11678189001a (patch)
tree869dae43cbbcb14d56e842cbd098a5db55854b20 /Northstar.Custom
parent3f31a4a37a2acf8df302117c99c060cec5996704 (diff)
downloadNorthstarMods-31c8a052e8f3cdccedb7f6f8d2bd11678189001a.tar.gz
NorthstarMods-31c8a052e8f3cdccedb7f6f8d2bd11678189001a.zip
added ttdm, more scoreevents and ctf comp
Diffstat (limited to 'Northstar.Custom')
-rw-r--r--Northstar.Custom/mod.json7
-rw-r--r--Northstar.Custom/playlists_v2.txt87
-rw-r--r--Northstar.Custom/scripts/vscripts/gamemodes/sh_gamemode_ctf_comp.gnut109
3 files changed, 203 insertions, 0 deletions
diff --git a/Northstar.Custom/mod.json b/Northstar.Custom/mod.json
index 2c82cb0b7..75a142915 100644
--- a/Northstar.Custom/mod.json
+++ b/Northstar.Custom/mod.json
@@ -162,6 +162,13 @@
},
{
+ "Path": "gamemodes/sh_gamemode_ctf_comp.gnut",
+ "RunOn": "( CLIENT || SERVER ) && MP",
+ "ClientPreCallback": "ShGamemodeCTFComp_Init",
+ "ServerPreCallback": "ShGamemodeCTFComp_Init"
+ },
+
+ {
"Path": "titan/sh_first_person_embark.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientPreCallback": "FirstPersonEmbark_Init",
diff --git a/Northstar.Custom/playlists_v2.txt b/Northstar.Custom/playlists_v2.txt
index be938cc36..56b566032 100644
--- a/Northstar.Custom/playlists_v2.txt
+++ b/Northstar.Custom/playlists_v2.txt
@@ -996,6 +996,34 @@ playlists
gamemode_score_hint #GAMEMODE_SCORE_HINT_TDM
}
}
+ ctf_comp
+ {
+ inherit defaults
+ vars
+ {
+ name #GAMEMODE_ctf_comp
+ lobbytitle #PL_capture_the_flag_lobby
+ description #PL_capture_the_flag_desc
+ hint #PL_capture_the_flag_hint
+ abbreviation #PL_capture_the_flag_abbr
+ image ctf
+ respawn_delay 8
+ scorelimit 5
+ suddendeath_timelimit 2
+ timelimit 12
+ max_players 10
+ phase_shift_drop_flag 1
+ ctf_flag_return_time 1
+ color "0 119 245 255"
+
+ gamemode_score_hint #GAMEMODE_SCORE_HINT_CTF
+ gamemode_bullet_001 #GAMEMODE_BULLET_CTF_001
+ gamemode_bullet_002 #GAMEMODE_BULLET_CTF_002
+ gamemode_bullet_003 #GAMEMODE_BULLET_CTF_003
+ gamemode_bullet_004 #GAMEMODE_BULLET_CTF_004
+ gamemode_bullet_005 #GAMEMODE_BULLET_CTF_005
+ }
+ }
// END OF MP GAMEMODES LINE ----------------------------------------------------
@@ -2684,6 +2712,63 @@ playlists
}
}
}
+ ctf_comp
+ {
+ inherit defaults
+ vars
+ {
+ name #GAMEMODE_ctf_comp
+ lobbytitle #PL_capture_the_flag_lobby
+ description #PL_capture_the_flag_desc
+ abbreviation #PL_capture_the_flag_abbr
+ image ctf
+ mixtape_slot 4
+ mixtape_timeout 120
+ visible 1
+
+ // comp-exclusive settings
+ // note: these don't display right on the private match menu yet
+ pilot_health_multiplier 1.25
+ respawn_delay 7.0
+
+ boosts_enabled 1 // this is actually disabled lol
+ earn_meter_pilot_overdrive 0
+ earn_meter_pilot_multiplier 0.5
+ earn_meter_titan_multiplier 0.5
+
+ scorelimit 6
+ timelimit 14
+ }
+ gamemodes
+ {
+ ctf
+ {
+ maps
+ {
+ mp_complex3 1
+ mp_drydock 2
+ mp_glitch 1
+ mp_homestead 2
+ mp_eden 2
+ mp_forwardbase_kodai 1
+ mp_black_water_canal 2
+ mp_glitch 1
+ mp_angel_city 1
+ mp_colony02 1
+ mp_relic02 1
+ mp_grave 2
+ mp_homestead 2
+ mp_drydock 2
+ mp_glitch 1
+ mp_thaw 1
+ mp_eden 2
+ mp_black_water_canal 2
+ mp_glitch 1
+ mp_relic02 1
+ }
+ }
+ }
+ }
// END OF MP PLAYLISTS LINE ----------------------------------------------------
@@ -4877,6 +4962,8 @@ playlists
"FASTBALL_PANEL_CAPTURED" "%s1 captured panel %s2"
"SCOREBOARD_FASTBALL_HACKS" "Panels Captured"
+ "GAMEMODE_ctf_comp" "Competitive CTF"
+
// FAQ - Community
//
diff --git a/Northstar.Custom/scripts/vscripts/gamemodes/sh_gamemode_ctf_comp.gnut b/Northstar.Custom/scripts/vscripts/gamemodes/sh_gamemode_ctf_comp.gnut
new file mode 100644
index 000000000..aff693c7d
--- /dev/null
+++ b/Northstar.Custom/scripts/vscripts/gamemodes/sh_gamemode_ctf_comp.gnut
@@ -0,0 +1,109 @@
+global function ShGamemodeCTFComp_Init
+
+global const string GAMEMODE_CTF_COMP = "ctf_comp"
+
+void function ShGamemodeCTFComp_Init()
+{
+ // create custom gamemode
+ AddCallback_OnCustomGamemodesInit( CreateGamemodeCTFComp )
+ AddCallback_OnRegisteringCustomNetworkVars( CTFCompRegisterNetworkVars )
+}
+
+void function CreateGamemodeCTFComp()
+{
+ GameMode_Create( GAMEMODE_CTF_COMP )
+ GameMode_SetName( GAMEMODE_CTF_COMP, "#GAMEMODE_ctf_comp" )
+ GameMode_SetGameModeAnnouncement( GAMEMODE_CTF_COMP, "ctf_modeDesc" )
+ GameMode_SetDesc( GAMEMODE_CTF_COMP, "#PL_capture_the_flag_hint" )
+ GameMode_SetIcon( GAMEMODE_CTF_COMP, $"ui/menu/playlist/ctf" )
+ GameMode_SetSuddenDeath( GAMEMODE_CTF_COMP, true )
+ GameMode_SetDefaultScoreLimits( GAMEMODE_CTF_COMP, 0, 5 )
+ GameMode_SetDefaultTimeLimits( GAMEMODE_CTF_COMP, 0, 3.0 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_CTF_COMP, "#SCOREBOARD_CAPTURES", PGS_ASSAULT_SCORE, 2 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_CTF_COMP, "#SCOREBOARD_RETURNS", PGS_DEFENSE_SCORE, 2 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_CTF_COMP, "#SCOREBOARD_KILLS", PGS_KILLS, 2 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_CTF_COMP, "#SCOREBOARD_TITAN_DAMAGE", PGS_DISTANCE_SCORE, 6 ) // gotta use a weird pgs here since we're running out of them lol
+ GameMode_SetColor( GAMEMODE_CTF_COMP, [61, 117, 193, 255] )
+
+ // this gamemode is literally just normal ctf + a few extra settings
+ // as such we do all the inits in this file, not enough logic to be worth splitting it up
+
+ #if SERVER
+ GameMode_AddServerInit( GAMEMODE_CTF_COMP, InitCTFCompSpecificSettings )
+ GameMode_AddServerInit( GAMEMODE_CTF_COMP, CaptureTheFlag_Init )
+ GameMode_SetPilotSpawnpointsRatingFunc( GAMEMODE_CTF_COMP, RateSpawnpoints_CTF )
+ GameMode_SetTitanSpawnpointsRatingFunc( GAMEMODE_CTF_COMP, RateSpawnpoints_CTF )
+ #elseif CLIENT
+ GameMode_AddClientInit( GAMEMODE_CTF_COMP, InitCTFCompSpecificSettings )
+ GameMode_AddClientInit( GAMEMODE_CTF_COMP, ClCaptureTheFlag_Init )
+ #endif
+ #if !UI
+ GameMode_SetScoreCompareFunc( GAMEMODE_CTF_COMP, CompareCTF )
+ GameMode_AddSharedInit( GAMEMODE_CTF_COMP, GamemodeCtfDialogue_Init )
+ GameMode_AddSharedInit( GAMEMODE_CTF_COMP, CaptureTheFlagShared_Init )
+ #endif
+}
+
+void function CTFCompRegisterNetworkVars()
+{
+ // copied from the vanilla ctf remote functions
+ RegisterNetworkedVariable( "imcFlag", SNDC_GLOBAL, SNVT_ENTITY )
+ RegisterNetworkedVariable( "milFlag", SNDC_GLOBAL, SNVT_ENTITY )
+
+ RegisterNetworkedVariable( "imcFlagHome", SNDC_GLOBAL, SNVT_ENTITY )
+ RegisterNetworkedVariable( "milFlagHome", SNDC_GLOBAL, SNVT_ENTITY )
+
+ RegisterNetworkedVariable( "imcFlagState", SNDC_GLOBAL, SNVT_INT, 0 )
+ RegisterNetworkedVariable( "milFlagState", SNDC_GLOBAL, SNVT_INT, 0 )
+
+ RegisterNetworkedVariable( "flagReturnProgress", SNDC_GLOBAL, SNVT_FLOAT_RANGE_OVER_TIME, 0.0, 0.0, 1.0 )
+ RegisterNetworkedVariable( "returningFlag", SNDC_PLAYER_EXCLUSIVE, SNVT_BOOL, false )
+
+ Remote_RegisterFunction( "ServerCallback_CTF_PlayMatchNearEndMusic" )
+ Remote_RegisterFunction( "ServerCallback_CTF_StartReturnFlagProgressBar" )
+ Remote_RegisterFunction( "ServerCallback_CTF_StopReturnFlagProgressBar" )
+
+ #if CLIENT
+ CLCaptureTheFlag_RegisterNetworkFunctions()
+ #endif
+}
+
+void function InitCTFCompSpecificSettings()
+{
+ #if SERVER
+ SetShouldUsePickLoadoutScreen( true )
+ TrackTitanDamageInPlayerGameStat( PGS_DISTANCE_SCORE )
+ SetSpawnpointGamemodeOverride( CAPTURE_THE_FLAG )
+ TeamTitanSelectMenu_Init()
+ #elseif CLIENT
+ ClTeamTitanSelectMenu_Init()
+
+ // gotta register the music here because this is done hardcoded to ctf in cl_music
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_ctf_intro_flyin", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_ctf_intro_flyin", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_ctf_epilogue_win", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_ctf_epilogue_win", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_ctf_halftime_losing", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_ctf_halftime_losing", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_SUDDEN_DEATH, "music_mp_ctf_draw", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_SUDDEN_DEATH, "music_mp_ctf_draw", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_ctf_epilogue_lose", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_ctf_epilogue_lose", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.ROUND_BASED_GAME_WON, "music_mp_ctf_halftime_winning", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.ROUND_BASED_GAME_WON, "music_mp_ctf_halftime_winning", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.ROUND_BASED_GAME_LOST, "music_mp_ctf_halftime_losing", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.ROUND_BASED_GAME_LOST, "music_mp_ctf_halftime_losing", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.GAMEMODE_1, "music_mp_ctf_flag_4", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.GAMEMODE_1, "music_mp_ctf_flag_4", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_ctf_lastminute", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_ctf_lastminute", TEAM_MILITIA )
+ #endif
+} \ No newline at end of file