diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-24 00:34:47 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-24 00:34:47 +0000 |
commit | 0fa8c57650daa9351f4cc4a153f7642001c7ce05 (patch) | |
tree | 3cb0025a54c76d9738ab654d65d1d8bb1c5d98ee /Northstar.CustomServers | |
parent | fb32cb1b780c1169a834c951bc0c928199a2b59e (diff) | |
download | NorthstarMods-0fa8c57650daa9351f4cc4a153f7642001c7ce05.tar.gz NorthstarMods-0fa8c57650daa9351f4cc4a153f7642001c7ce05.zip |
last minute changes before release probably
Diffstat (limited to 'Northstar.CustomServers')
5 files changed, 45 insertions, 29 deletions
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 ) |