diff options
-rw-r--r-- | Northstar.Client/mod.json | 2 | ||||
-rw-r--r-- | Northstar.Client/mod/resource/northstar_client_localisation_english.txt | bin | 18196 -> 18414 bytes | |||
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut | 36 | ||||
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut | 3 | ||||
-rw-r--r-- | Northstar.Custom/mod.json | 2 | ||||
-rw-r--r-- | Northstar.Custom/vpk/client_mp_northstar_common.bsp.pak000_000.vpk | bin | 95176823 -> 86104271 bytes | |||
-rw-r--r-- | Northstar.Custom/vpk/englishclient_mp_northstar_common.bsp.pak000_dir.vpk | bin | 6325 -> 5374 bytes | |||
-rw-r--r-- | Northstar.CustomServers/mod.json | 3 | ||||
-rw-r--r-- | Northstar.CustomServers/mod/cfg/autoexec_ns_server.cfg | 3 | ||||
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut | 59 | ||||
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut | 5 | ||||
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut | 4 |
12 files changed, 84 insertions, 33 deletions
diff --git a/Northstar.Client/mod.json b/Northstar.Client/mod.json index 1edf2ba1..ac1e0951 100644 --- a/Northstar.Client/mod.json +++ b/Northstar.Client/mod.json @@ -1,7 +1,7 @@ { "Name" : "Northstar.Client", "Description" : "Various ui and client changes to fix bugs and add better support for mods", - + "Version": "1.0.0", "LoadPriority": 0, // ui inits need to happen before so our init callbacks get called diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt Binary files differindex 1c912aad..a0a8026e 100644 --- a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt +++ b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut index 2c12f796..73e45831 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut @@ -137,11 +137,43 @@ void function NorthstarMasterServerAuthDialog() dialogData.header = "#DIALOG_TITLE_INSTALLED_NORTHSTAR" dialogData.image = $"rui/menu/fd_menu/upgrade_northstar_chassis" dialogData.message = "#AUTHENTICATION_AGREEMENT_DIALOG_TEXT" - AddDialogButton( dialogData, "#YES", void function() { SetConVarInt( "ns_has_agreed_to_send_token", NS_AGREED_TO_SEND_TOKEN ) } ) - AddDialogButton( dialogData, "#NO", void function() { SetConVarInt( "ns_has_agreed_to_send_token", NS_DISAGREED_TO_SEND_TOKEN ) } ) + AddDialogButton( dialogData, "#YES", NorthstarMasterServerAuthDialogAgree ) + AddDialogButton( dialogData, "#NO", NorthstarMasterServerAuthDialogDisagree ) OpenDialog( dialogData ) } +void function NorthstarMasterServerAuthDialogAgree() +{ + int oldValue = GetConVarInt( "ns_has_agreed_to_send_token" ) + SetConVarInt( "ns_has_agreed_to_send_token", NS_AGREED_TO_SEND_TOKEN ) + + if ( oldValue != 0 && oldValue != NS_AGREED_TO_SEND_TOKEN ) + { + DialogData dialogData + dialogData.header = "#DIALOG_TITLE_INSTALLED_NORTHSTAR" + dialogData.image = $"rui/menu/fd_menu/upgrade_northstar_chassis" + dialogData.message = "#AUTHENTICATION_AGREEMENT_RESTART" + AddDialogButton( dialogData, "#OK" ) + OpenDialog( dialogData ) + } +} + +void function NorthstarMasterServerAuthDialogDisagree() +{ + int oldValue = GetConVarInt( "ns_has_agreed_to_send_token" ) + SetConVarInt( "ns_has_agreed_to_send_token", NS_DISAGREED_TO_SEND_TOKEN ) + + if ( oldValue != 0 && oldValue != NS_DISAGREED_TO_SEND_TOKEN ) + { + DialogData dialogData + dialogData.header = "#DIALOG_TITLE_INSTALLED_NORTHSTAR" + dialogData.image = $"rui/menu/fd_menu/upgrade_northstar_chassis" + dialogData.message = "#AUTHENTICATION_AGREEMENT_RESTART" + AddDialogButton( dialogData, "#OK" ) + OpenDialog( dialogData ) + } +} + void function ActivatePanel( var panel ) { Assert( panel != null ) diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut index ffd9bc80..7c81149c 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut @@ -879,7 +879,8 @@ void function SpotlightButton_Activate( var button ) } else { - if ( link.find( "https://discord.gg" ) == 0 ) + // discord links don't work in origin overlay + if ( link.find( "https://discord.gg" ) == 0 || link == "https://northstar.tf/discord" ) LaunchExternalWebBrowser( link, WEBBROWSER_FLAG_FORCEEXTERNAL ) else LaunchExternalWebBrowser( link, WEBBROWSER_FLAG_MUTEGAME ) diff --git a/Northstar.Custom/mod.json b/Northstar.Custom/mod.json index c857291b..23132642 100644 --- a/Northstar.Custom/mod.json +++ b/Northstar.Custom/mod.json @@ -1,5 +1,7 @@ { "Name" : "Northstar.Custom", + "Description": "(ideally) Polished custom content for Northstar", + "Version": "1.0.0", "LoadPriority": 1, "RequiredOnClient": true, diff --git a/Northstar.Custom/vpk/client_mp_northstar_common.bsp.pak000_000.vpk b/Northstar.Custom/vpk/client_mp_northstar_common.bsp.pak000_000.vpk Binary files differindex 35313d15..036dd8ab 100644 --- a/Northstar.Custom/vpk/client_mp_northstar_common.bsp.pak000_000.vpk +++ b/Northstar.Custom/vpk/client_mp_northstar_common.bsp.pak000_000.vpk diff --git a/Northstar.Custom/vpk/englishclient_mp_northstar_common.bsp.pak000_dir.vpk b/Northstar.Custom/vpk/englishclient_mp_northstar_common.bsp.pak000_dir.vpk Binary files differindex 2d5cd687..4c36af3e 100644 --- a/Northstar.Custom/vpk/englishclient_mp_northstar_common.bsp.pak000_dir.vpk +++ b/Northstar.Custom/vpk/englishclient_mp_northstar_common.bsp.pak000_dir.vpk diff --git a/Northstar.CustomServers/mod.json b/Northstar.CustomServers/mod.json index c177ed98..8a37ef09 100644 --- a/Northstar.CustomServers/mod.json +++ b/Northstar.CustomServers/mod.json @@ -1,5 +1,8 @@ { "Name": "Northstar.CustomServers", + "Description": "Attempts to recreate the behaviour of vanilla Titanfall 2 servers, as well as changing some scripts to allow better support for mods", + "Version": "1.0.0", + "LoadPriority": 0, "ConVars": [ { diff --git a/Northstar.CustomServers/mod/cfg/autoexec_ns_server.cfg b/Northstar.CustomServers/mod/cfg/autoexec_ns_server.cfg index a16fddbc..3d323c01 100644 --- a/Northstar.CustomServers/mod/cfg/autoexec_ns_server.cfg +++ b/Northstar.CustomServers/mod/cfg/autoexec_ns_server.cfg @@ -14,10 +14,11 @@ everything_unlocked 1 // unlock everything // gameserver settings ns_should_return_to_lobby 1 // whether the server should return to private match lobby after completing a game, if 0, this will go to the next map/mode in the playlist -net_chan_limit_mode 1 // kick clients that go over the limit +net_chan_limit_mode 2 // kick clients that go over the limit net_chan_limit_msec_per_sec 30 // number of milliseconds of server netchan processing time clients can use per second before getting kicked base_tickinterval_mp 0.016666667 // default tickrate: 60 tick sv_updaterate_mp 20 // default updaterate: 20 tick sv_minupdaterate 20 // unsure if this actually works, but if it does, should set minimum client updaterate sv_max_snapshots_multiplayer 300 // this needs to be updaterate * 15, or clients will dc in killreplay net_data_block_enabled 0 // not really sure on this, have heard datablock could have security issues? doesn't seem to have any adverse effects being disabled +host_skip_client_dll_crc 1 // allow people to run modded client dlls, this is mainly so people running pilot visor colour mods can keep those, since they use a client.dll edit
\ No newline at end of file diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut index 9d5dbd24..1c776ede 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_mfd.nut @@ -24,11 +24,17 @@ void function GamemodeMfd_Init() SetShouldUseRoundWinningKillReplay( true ) Riff_ForceSetEliminationMode( eEliminationMode.Pilots ) } - + + AddCallback_OnClientConnected( SetupMFDPlayer ) AddCallback_OnPlayerKilled( UpdateMarksForKill ) AddCallback_GameStateEnter( eGameState.Playing, CreateInitialMarks ) } +void function SetupMFDPlayer( entity player ) +{ + player.s.roundsSincePicked <- 0 +} + void function CreateInitialMarks() { entity imcMark = CreateEntity( MARKER_ENT_CLASSNAME ) @@ -75,32 +81,11 @@ void function MFDThink() wait MFD_BETWEEN_MARKS_TIME // wait for enough players to spawn - array<entity> imcPlayers - array<entity> militiaPlayers - while ( imcPlayers.len() == 0 || militiaPlayers.len() == 0 ) - { - imcPlayers = GetPlayerArrayOfTeam( TEAM_IMC ) - militiaPlayers = GetPlayerArrayOfTeam( TEAM_MILITIA ) - + while ( GetPlayerArrayOfTeam( TEAM_IMC ).len() == 0 || GetPlayerArrayOfTeam( TEAM_MILITIA ).len() == 0 ) WaitFrame() - } - // get marks, wanna increment the mark each mark, reset on player change - int imcIndex = imcPlayers.find( imcMark ) - if ( imcIndex == -1 ) // last mark - imcIndex = 0 - else - imcIndex = ( imcIndex + 1 ) % imcPlayers.len() - - imcMark = imcPlayers[ imcIndex ] - - int militiaIndex = militiaPlayers.find( imcMark ) - if ( militiaIndex == -1 ) // last mark - militiaIndex = 0 - else - militiaIndex = ( militiaIndex + 1 ) % militiaPlayers.len() - - militiaMark = militiaPlayers[ militiaIndex ] + imcMark = PickTeamMark( TEAM_IMC ) + militiaMark = PickTeamMark( TEAM_MILITIA ) level.mfdPendingMarkedPlayerEnt[ TEAM_IMC ].SetOwner( imcMark ) level.mfdPendingMarkedPlayerEnt[ TEAM_MILITIA ].SetOwner( militiaMark ) @@ -132,6 +117,30 @@ void function MFDThink() } } +entity function PickTeamMark( int team ) +{ + array<entity> possibleMarks + + int maxRounds + foreach ( entity player in GetPlayerArrayOfTeam( team ) ) + { + if ( maxRounds < player.s.roundsSincePicked ) + { + maxRounds = expect int( player.s.roundsSincePicked ) + possibleMarks = [ player ] + } + else if ( maxRounds == player.s.roundsSincePicked ) + possibleMarks.append( player ) + } + + entity mark = possibleMarks.getrandom() + foreach ( entity player in GetPlayerArrayOfTeam( team ) ) + if ( player != mark ) + player.s.roundsSincePicked++ + + return mark +} + void function MarkPlayers( entity imcMark, entity militiaMark ) { imcMark.EndSignal( "OnDestroy" ) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut index 1e6d8271..fdcc468c 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut @@ -70,8 +70,9 @@ void function OnPrematchStart() // spawn dropships foreach ( entity dropshipSpawn in GetEntArrayByClass_Expensive( "info_spawnpoint_dropship_start" ) ) { - if ( GameModeRemove( dropshipSpawn ) || ( GetSpawnpointGamemodeOverride() != GAMETYPE && dropshipSpawn.HasKey( "gamemode_" + GetSpawnpointGamemodeOverride() ) && dropshipSpawn.kv[ "gamemode_" + GetSpawnpointGamemodeOverride() ] == "0" ) ) - continue + if ( dropshipSpawn.HasKey( "gamemode_" + GetSpawnpointGamemodeOverride() ) ) + if ( dropshipSpawn.kv[ "gamemode_" + GetSpawnpointGamemodeOverride() ] == "0" ) + continue // todo: possibly make this only spawn dropships if we've got enough players to need them int createTeam = HasSwitchedSides() ? dropshipSpawn.GetTeam() : GetOtherTeam( dropshipSpawn.GetTeam() ) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut index e52c9142..108909a3 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut @@ -216,7 +216,9 @@ void function ScoreEvent_SetupEarnMeterValuesForMixedModes() // mixed modes in t ScoreEvent_SetEarnMeterValues( "KillPilot", 0.7, 0.15 ) ScoreEvent_SetEarnMeterValues( "KillTitan", 0.0, 0.15 ) ScoreEvent_SetEarnMeterValues( "TitanKillTitan", 0.0, 0.0 ) // unsure - ScoreEvent_SetEarnMeterValues( "PilotBatteryStolen", 0.0, 0.35 ) + ScoreEvent_SetEarnMeterValues( "PilotBatteryStolen", 0.0, 0.35 ) // this actually just doesn't have overdrive in vanilla even + ScoreEvent_SetEarnMeterValues( "Headshot", 0.0, 0.02 ) + ScoreEvent_SetEarnMeterValues( "FirstStrike", 0.0, 0.05 ) // ai ScoreEvent_SetEarnMeterValues( "KillGrunt", 0.0, 0.02, 0.5 ) |