aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_english.txtbin22060 -> 23456 bytes
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_french.txtbin23384 -> 24492 bytes
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_german.txtbin19418 -> 23164 bytes
-rw-r--r--Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txtbin16684 -> 17334 bytes
-rw-r--r--Northstar.Client/mod/resource/ui/menus/connect_password.menu36
-rw-r--r--Northstar.Client/mod/resource/ui/menus/server_browser.menu32
-rw-r--r--Northstar.Client/mod/scripts/vscripts/sh_menu_models.gnut24
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut42
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut43
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut259
-rw-r--r--Northstar.Coop/mod.json2
-rw-r--r--Northstar.Custom/keyvalues/playlists_v2.txt124
-rw-r--r--Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_arena.txt11
-rw-r--r--Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_emptyhanded.txt9
-rw-r--r--Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_sword.txt11
-rw-r--r--Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman_n.txt28
-rw-r--r--Northstar.Custom/mod.json116
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/_disallowed_tacticals.gnut51
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/_force_melee.gnut36
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut19
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut71
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut127
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_sns.gnut144
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_gg.gnut2
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_sns.gnut55
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/_gg_earn_meter.gnut56
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/cl_gg_earn_meter.gnut82
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/sh_gg_earn_meter.gnut16
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut78
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut51
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/weapons/mp_weapon_peacekraber.nut23
-rw-r--r--Northstar.Custom/mod/scripts/weapons/melee_pilot_kunai.txt5
-rw-r--r--Northstar.Custom/mod/scripts/weapons/mp_titanweapon_predator_cannon.txt722
-rw-r--r--Northstar.Custom/mod/scripts/weapons/mp_weapon_peacekraber.txt28
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut22
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut3
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut24
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/conversation/_grunt_chatter_mp.gnut2
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/conversation/_spectre_chatter_mp.gnut2
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter.gnut22
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut24
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut288
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ps.nut4
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut7
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut4
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut4
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut6
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut8
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_angel_city.nut7
-rw-r--r--README.md11
50 files changed, 2281 insertions, 460 deletions
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
index af8a02290..7f994e8a6 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_english.txt
Binary files differ
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_french.txt b/Northstar.Client/mod/resource/northstar_client_localisation_french.txt
index 2a7a82f44..65581e316 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_french.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_french.txt
Binary files differ
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_german.txt b/Northstar.Client/mod/resource/northstar_client_localisation_german.txt
index 3d7a75510..e35378cbc 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_german.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_german.txt
Binary files differ
diff --git a/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt b/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt
index e61f9deb7..c9abfc046 100644
--- a/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt
+++ b/Northstar.Client/mod/resource/northstar_client_localisation_tchinese.txt
Binary files differ
diff --git a/Northstar.Client/mod/resource/ui/menus/connect_password.menu b/Northstar.Client/mod/resource/ui/menus/connect_password.menu
index b5e12ad25..d24214770 100644
--- a/Northstar.Client/mod/resource/ui/menus/connect_password.menu
+++ b/Northstar.Client/mod/resource/ui/menus/connect_password.menu
@@ -34,7 +34,7 @@ resource/ui/menus/mods_browse.menu
ControlName ImagePanel
InheritProperties MenuTopBar
}
-
+
ButtonRowAnchor
{
ControlName Label
@@ -43,7 +43,7 @@ resource/ui/menus/mods_browse.menu
xpos 120
ypos 160
}
-
+
MatchmakingStatus
{
ControlName CNestedPanel
@@ -62,6 +62,34 @@ resource/ui/menus/mods_browse.menu
ControlName TextEntry
wide 700
tall 53
+ zpos 1
+ visible 1
+ enabled 1
+ textHidden 0
+ editable 1
+ maxchars 32
+ NumericInputOnly 0
+ textAlignment "east"
+ font DefaultBold_53
+ keyboardTitle "#CONNECT_WITH_PASSWORD"
+ keyboardDescription "#ENTER_PASSWORD"
+ allowRightClickMenu 1
+ allowSpecialCharacters 0
+ unicode 0
+ paintborder 0
+ alpha 0
+
+ pin_to_sibling ButtonRowAnchor
+ pin_corner_to_sibling TOP_LEFT
+ pin_to_sibling_corner BOTTOM_LEFT
+ }
+
+ EnterPasswordBoxDummy
+ {
+ ControlName TextEntry
+ wide 700
+ tall 53
+ zpos 0
visible 1
enabled 1
textHidden 1
@@ -76,12 +104,12 @@ resource/ui/menus/mods_browse.menu
allowSpecialCharacters 0
unicode 0
paintborder 0
-
+
pin_to_sibling ButtonRowAnchor
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner BOTTOM_LEFT
}
-
+
ConnectButton
{
ControlName RuiButton
diff --git a/Northstar.Client/mod/resource/ui/menus/server_browser.menu b/Northstar.Client/mod/resource/ui/menus/server_browser.menu
index 959c1b099..a02cac461 100644
--- a/Northstar.Client/mod/resource/ui/menus/server_browser.menu
+++ b/Northstar.Client/mod/resource/ui/menus/server_browser.menu
@@ -435,6 +435,7 @@ resource/ui/menus/mods_browse.menu
pin_to_sibling BtnServerPasswordProtectedTab
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner TOP_RIGHT
+ navUp BtnFiltersClear
navDown BtnServer1
navRight BtnServerPlayersTab
}
@@ -683,8 +684,9 @@ resource/ui/menus/mods_browse.menu
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner TOP_RIGHT
navDown BtnServer1
- navLeft BtnServerNameTab
- navRight BtnServerMapTab
+ navLeft BtnServerNameTab
+ navRight BtnServerMapTab
+ navUp BtnFiltersClear
}
BtnServerPlayers1
@@ -929,8 +931,9 @@ resource/ui/menus/mods_browse.menu
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner TOP_RIGHT
navDown BtnServer1
- navLeft BtnServerPlayersTab
- navRight BtnServerGamemodeTab
+ navLeft BtnServerPlayersTab
+ navRight BtnServerGamemodeTab
+ navUp BtnFiltersClear
}
BtnServerMap1
@@ -1174,8 +1177,9 @@ resource/ui/menus/mods_browse.menu
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner TOP_RIGHT
navDown BtnServer1
- navLeft BtnServerMapTab
- navRight BtnServerLatencyTab
+ navLeft BtnServerMapTab
+ navRight BtnServerLatencyTab
+ navUp BtnFiltersClear
}
BtnServerGamemode1
@@ -1419,8 +1423,9 @@ resource/ui/menus/mods_browse.menu
pin_corner_to_sibling TOP_LEFT
pin_to_sibling_corner TOP_RIGHT
navDown BtnServer1
- navLeft BtnServerGamemodeTab
- navLeft BtnServerJoin
+ navLeft BtnServerGamemodeTab
+ navRight BtnServerJoin
+ navUp BtnFiltersClear
}
BtnServerLatency1
@@ -2142,6 +2147,7 @@ resource/ui/menus/mods_browse.menu
wide 1200
tall 153
xpos -8
+ classname FilterPanelChild
rui "ui/control_options_description.rpak"
@@ -2159,6 +2165,8 @@ resource/ui/menus/mods_browse.menu
InheritProperties RuiSmallButton
labelText "#SEARCHBAR_LABEL"
textAlignment west
+ classname FilterPanelChild
+
wide 500
xpos -23
ypos -16
@@ -2178,6 +2186,7 @@ resource/ui/menus/mods_browse.menu
BtnServerSearch
{
ControlName TextEntry
+ classname FilterPanelChild
zpos 100 // This works around input weirdness when the control is constructed by code instead of VGUI blackbox.
xpos -400
ypos -5
@@ -2204,6 +2213,7 @@ resource/ui/menus/mods_browse.menu
InheritProperties SwitchButton
labelText "#MAP_FILTER"
ConVar "filter_map"
+ classname FilterPanelChild
wide 500
pin_to_sibling BtnSearchLabel
@@ -2220,6 +2230,7 @@ resource/ui/menus/mods_browse.menu
InheritProperties SwitchButton
labelText "#GAMEMODE_FILTER"
ConVar "filter_gamemode"
+ classname FilterPanelChild
wide 500
pin_to_sibling SwtBtnSelectMap
@@ -2236,6 +2247,7 @@ resource/ui/menus/mods_browse.menu
InheritProperties SwitchButton
labelText "#HIDE_FULL_FILTER"
ConVar "filter_hide_full"
+ classname FilterPanelChild
wide 500
@@ -2259,6 +2271,7 @@ resource/ui/menus/mods_browse.menu
InheritProperties SwitchButton
labelText "#HIDE_EMPTY_FILTER"
ConVar "filter_hide_empty"
+ classname FilterPanelChild
wide 500
@@ -2282,6 +2295,7 @@ resource/ui/menus/mods_browse.menu
InheritProperties SwitchButton
labelText "#HIDE_PROT_FILTER"
ConVar "filter_hide_protected"
+ classname FilterPanelChild
wide 500
list
@@ -2303,6 +2317,7 @@ resource/ui/menus/mods_browse.menu
ControlName RuiButton
InheritProperties RuiSmallButton
labelText "#CLEAR_FILTERS"
+ classname FilterPanelChild
wide 100
xpos -17
ypos -57
@@ -2322,6 +2337,7 @@ resource/ui/menus/mods_browse.menu
BtnDummyAfterFilterClear {
ControlName RuiButton
+ classname FilterPanelChild
width 0
height 0
visible 1
diff --git a/Northstar.Client/mod/scripts/vscripts/sh_menu_models.gnut b/Northstar.Client/mod/scripts/vscripts/sh_menu_models.gnut
index cd663a06b..b1b97bc93 100644
--- a/Northstar.Client/mod/scripts/vscripts/sh_menu_models.gnut
+++ b/Northstar.Client/mod/scripts/vscripts/sh_menu_models.gnut
@@ -2,9 +2,9 @@
// Model tracking and save/Clear functions are temp. We already update the client knowledge of loadouts. Derive from that.
// Move the struct off the player?
-#if CLIENT && MP
+//#if CLIENT && MP
untyped
-#endif //client && MP
+//#endif //client && MP
#if CLIENT
const float CARD_TAG_SCALE = 0.0 // update to match same const in hud_defs.rui
@@ -207,12 +207,18 @@
#endif // CLIENT && MP
#if UI
+ struct
+ {
+ table MouseMovementCaptureFunctionsTable = {}
+ } file
+
const MOUSE_ROTATE_MULTIPLIER = 25.0
global function UpdateUIMapSupportsMenuModels
global function RunMenuClientFunction
global function UI_SetPresentationType
+ global function AddMouseMovementCaptureHandler
global function UICodeCallback_MouseMovementCapture
#endif // UI
@@ -2892,6 +2898,18 @@
}
}
+ void function AddMouseMovementCaptureHandler( var menu, void functionref( int, int ) func )
+ {
+ file.MouseMovementCaptureFunctionsTable.rawset( menu, func )
+ }
+
+ void function UpdateMouseMovementCaptureFunctions( int deltaX, int deltaY )
+ {
+ var activeMenu = GetActiveMenu()
+ if ( file.MouseMovementCaptureFunctionsTable.rawin( activeMenu ) )
+ file.MouseMovementCaptureFunctionsTable.rawget( activeMenu )(deltaX, deltaY)
+ }
+
void function UICodeCallback_MouseMovementCapture( var capturePanel, int deltaX, int deltaY )
{
float screenScaleXModifier = 1920.0 / GetScreenSize()[0] // 1920 is base screen width
@@ -2901,7 +2919,7 @@
float screenScaleYModifier = 1080.0 / GetScreenSize()[1] // 1920 is base screen width
float mouseYRotationDelta = deltaY * screenScaleYModifier * MOUSE_ROTATE_MULTIPLIER
- UpdateMouseDeltaBuffer( deltaX, deltaY )
+ UpdateMouseMovementCaptureFunctions( deltaX, deltaY )
RunMenuClientFunction( "UpdateMouseRotateDelta", mouseXRotateDelta, mouseYRotationDelta )
}
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut
index e1ed8991d..56db0cccf 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_connect_password.nut
@@ -1,5 +1,13 @@
global function AddNorthstarConnectWithPasswordMenu
+struct
+{
+ var menu
+ var enterPasswordBox
+ var enterPasswordDummy
+ var connectButton
+} file
+
void function AddNorthstarConnectWithPasswordMenu()
{
AddMenu( "ConnectWithPasswordMenu", $"resource/ui/menus/connect_password.menu", InitConnectWithPasswordMenu, "#MENU_CONNECT" )
@@ -7,24 +15,42 @@ void function AddNorthstarConnectWithPasswordMenu()
void function InitConnectWithPasswordMenu()
{
- AddMenuEventHandler( GetMenu( "ConnectWithPasswordMenu" ), eUIEvent.MENU_OPEN, OnConnectWithPasswordMenuOpened )
- AddMenuFooterOption( GetMenu( "ConnectWithPasswordMenu" ), BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
+ file.menu = GetMenu( "ConnectWithPasswordMenu" )
+
+ file.enterPasswordBox = Hud_GetChild( file.menu, "EnterPasswordBox")
+ file.enterPasswordDummy = Hud_GetChild( file.menu, "EnterPasswordBoxDummy")
+ file.connectButton = Hud_GetChild( file.menu, "ConnectButton")
+
+ AddMenuEventHandler( file.menu, eUIEvent.MENU_OPEN, OnConnectWithPasswordMenuOpened )
+ AddMenuFooterOption( file.menu, BUTTON_B, "#B_BUTTON_BACK", "#BACK" )
+
+ AddButtonEventHandler( file.connectButton, UIE_CLICK, ConnectWithPassword )
+
+ AddButtonEventHandler( file.enterPasswordBox, UIE_CHANGE, UpdatePasswordLabel )
- AddButtonEventHandler( Hud_GetChild( GetMenu( "ConnectWithPasswordMenu" ), "ConnectButton" ), UIE_CLICK, ConnectWithPassword )
RegisterButtonPressedCallback( KEY_ENTER, ConnectWithPassword )
}
+void function UpdatePasswordLabel( var n )
+{
+ string hiddenPSWD
+ for ( int i = 0; i < Hud_GetUTF8Text( file.enterPasswordBox ).len(); i++)
+ hiddenPSWD += "*"
+ Hud_SetText( file.enterPasswordDummy, hiddenPSWD )
+}
+
void function OnConnectWithPasswordMenuOpened()
{
UI_SetPresentationType( ePresentationType.KNOWLEDGEBASE_SUB )
- Hud_SetText( Hud_GetChild( GetMenu( "ConnectWithPasswordMenu" ), "Title" ), "#MENU_TITLE_CONNECT_PASSWORD" )
- Hud_SetText( Hud_GetChild( GetMenu( "ConnectWithPasswordMenu" ), "ConnectButton" ), "#MENU_CONNECT_MENU_CONNECT" )
- Hud_SetText( Hud_GetChild( GetMenu( "ConnectWithPasswordMenu" ), "EnterPasswordBox" ), "" )
+ Hud_SetText( Hud_GetChild( file.menu, "Title" ), "#MENU_TITLE_CONNECT_PASSWORD" )
+ Hud_SetText( file.connectButton, "#MENU_CONNECT_MENU_CONNECT" )
+ Hud_SetText( file.enterPasswordBox, "" )
+ Hud_SetText( file.enterPasswordDummy, "" )
}
void function ConnectWithPassword( var button )
{
- if ( GetTopNonDialogMenu() == GetMenu( "ConnectWithPasswordMenu" ) )
- thread ThreadedAuthAndConnectToServer( Hud_GetUTF8Text( Hud_GetChild( GetMenu( "ConnectWithPasswordMenu" ), "EnterPasswordBox" ) ) )
+ if ( GetTopNonDialogMenu() == file.menu )
+ thread ThreadedAuthAndConnectToServer( Hud_GetUTF8Text( Hud_GetChild( file.menu, "EnterPasswordBox" ) ) )
} \ No newline at end of file
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut
index cb1535d32..cc681e95b 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut
@@ -4,6 +4,8 @@ global function ReloadMods
struct {
bool shouldReloadModsOnEnd
+ string currentMod
+ var currentButton
} file
void function AddNorthstarModMenu()
@@ -83,9 +85,44 @@ void function SetModMenuNameText( var button )
void function OnModMenuButtonPressed( var button )
{
string modName = NSGetModNames()[ int ( Hud_GetScriptID( button ) ) ]
- NSSetModEnabled( modName, !NSIsModEnabled( modName ) )
- SetModMenuNameText( button )
-
+ if ( ( modName == "Northstar.Client" || modName == "Northstar.Coop" || modName == "Northstar.CustomServers") && NSIsModEnabled( modName ) )
+ {
+ file.currentMod = modName
+ file.currentButton = button
+ CoreModToggleDialog( modName )
+ }
+ else
+ {
+ NSSetModEnabled( modName, !NSIsModEnabled( modName ) )
+
+ SetModMenuNameText( button )
+
+ file.shouldReloadModsOnEnd = true
+ }
+}
+
+void function CoreModToggleDialog( string mod )
+{
+ DialogData dialogData
+ dialogData.header = "#WARNING"
+ dialogData.message = "#CORE_MOD_DISABLE_WARNING"
+
+ AddDialogButton( dialogData, "#CANCEL" )
+ // This can't have any arguments so we use the file struct
+ AddDialogButton( dialogData, "#DISABLE", DisableMod )
+
+ AddDialogFooter( dialogData, "#A_BUTTON_SELECT" )
+ AddDialogFooter( dialogData, "#B_BUTTON_CANCEL" )
+
+ OpenDialog( dialogData )
+}
+
+void function DisableMod()
+{
+ NSSetModEnabled( file.currentMod, false )
+
+ SetModMenuNameText( file.currentButton )
+
file.shouldReloadModsOnEnd = true
}
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
index 7c3e2fae2..7aadce897 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_serverbrowser.nut
@@ -4,12 +4,11 @@ untyped
global function AddNorthstarServerBrowserMenu
global function ThreadedAuthAndConnectToServer
-global function UpdateMouseDeltaBuffer
// Stop peeking
const int BUTTONS_PER_PAGE = 15
-const float DOUBLE_CLICK_TIME_MS = 0.2 // unsure what the ideal value is
+const float DOUBLE_CLICK_TIME_MS = 0.3 // unsure what the ideal value is
struct {
@@ -29,6 +28,17 @@ struct {
string filterGamemode
} filterArguments
+
+enum sortingBy
+{
+ NONE,
+ NAME,
+ PLAYERS,
+ MAP,
+ GAMEMODE,
+ LATENCY
+}
+
struct {
// true = alphabeticaly false = reverse
bool serverName = true
@@ -100,22 +110,22 @@ void function UpdatePrivateMatchModesAndMaps()
{
if ( filterArguments.filterMaps.find( map ) != -1 )
continue
-
+
filterArguments.filterMaps.append( map )
-
+
string localized = GetMapDisplayName( map )
Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectMap" ) , localized, string( enum_ + 1 ) )
- }
-
+ }
+
array<string> realModes = [ "private_match" ]
realModes.extend( GetPrivateMatchModes() )
-
+
foreach( int enum_, string mode in realModes )
{
string localized = GetGameModeDisplayName( mode )
if ( filterArguments.filterGamemodes.find( localized ) != -1 )
continue
-
+
filterArguments.filterGamemodes.append( localized )
Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectGamemode" ) , localized, string( enum_ + 1 ) )
}
@@ -125,6 +135,8 @@ void function InitServerBrowserMenu()
{
file.menu = GetMenu( "ServerBrowserMenu" )
+ AddMouseMovementCaptureHandler( file.menu, UpdateMouseDeltaBuffer )
+
// Get menu stuff
file.serverButtons = GetElementsByClassname( file.menu, "ServerButton" )
file.serversName = GetElementsByClassname( file.menu, "ServerName" )
@@ -136,7 +148,7 @@ void function InitServerBrowserMenu()
filterArguments.filterMaps = [ "SWITCH_ANY" ]
Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectMap" ), "SWITCH_ANY", "0" )
-
+
filterArguments.filterGamemodes = [ "SWITCH_ANY" ]
Hud_DialogList_AddListItem( Hud_GetChild( file.menu, "SwtBtnSelectGamemode" ), "SWITCH_ANY", "0" )
@@ -171,11 +183,11 @@ void function InitServerBrowserMenu()
AddButtonEventHandler( Hud_GetChild( file.menu, "BtnFiltersClear"), UIE_CLICK, OnBtnFiltersClear_Activate )
- AddButtonEventHandler( Hud_GetChild( file.menu, "BtnServerNameTab"), UIE_CLICK, SortServerListByName )
- AddButtonEventHandler( Hud_GetChild( file.menu, "BtnServerPlayersTab"), UIE_CLICK, SortServerListByPlayers )
- AddButtonEventHandler( Hud_GetChild( file.menu, "BtnServerMapTab"), UIE_CLICK, SortServerListByMap )
- AddButtonEventHandler( Hud_GetChild( file.menu, "BtnServerGamemodeTab"), UIE_CLICK, SortServerListByGamemode )
- AddButtonEventHandler( Hud_GetChild( file.menu, "BtnServerLatencyTab"), UIE_CLICK, SortServerListByLatency )
+ AddButtonEventHandler( Hud_GetChild( file.menu, "BtnServerNameTab"), UIE_CLICK, SortServerListByName_Activate )
+ AddButtonEventHandler( Hud_GetChild( file.menu, "BtnServerPlayersTab"), UIE_CLICK, SortServerListByPlayers_Activate )
+ AddButtonEventHandler( Hud_GetChild( file.menu, "BtnServerMapTab"), UIE_CLICK, SortServerListByMap_Activate )
+ AddButtonEventHandler( Hud_GetChild( file.menu, "BtnServerGamemodeTab"), UIE_CLICK, SortServerListByGamemode_Activate )
+ AddButtonEventHandler( Hud_GetChild( file.menu, "BtnServerLatencyTab"), UIE_CLICK, SortServerListByLatency_Activate )
AddButtonEventHandler( Hud_GetChild( file.menu, "SwtBtnSelectMap"), UIE_CHANGE, FilterAndUpdateList )
@@ -278,10 +290,12 @@ void function UpdateListSliderHeight( float servers )
var movementCapture = Hud_GetChild( file.menu , "MouseMovementCapture" )
float maxHeight = 562.0 * (GetScreenSize()[1] / 1080.0)
+ float minHeight = 80.0 * (GetScreenSize()[1] / 1080.0)
float height = maxHeight * (15.0 / servers )
if ( height > maxHeight ) height = maxHeight
+ if ( height < minHeight ) height = minHeight
Hud_SetHeight( sliderButton , height )
Hud_SetHeight( sliderPanel , height )
@@ -419,36 +433,29 @@ bool function IsFilterPanelElementFocused() {
var focusedElement = GetFocus();
var name = Hud_GetHudName(focusedElement);
- print(name)
-
- // kinda sucks but just check if any of the filter elements
- // has focus. would be nice to have tags or sth here
- bool match = (name == "FilterPanel") ||
- (name == "BtnSearchLabel") ||
- (name == "BtnServerSearch") ||
- (name == "SwtBtnSelectMap") ||
- (name == "SwtBtnSelectGamemode") ||
- (name == "SwtBtnHideFull") ||
- (name == "SwtBtnHideEmpty") ||
- (name == "SwtBtnHideProtected") ||
- (name == "BtnFiltersClear") ||
- (name == "BtnDummyAfterFilterClear");
+ foreach (element in GetElementsByClassname( file.menu, "FilterPanelChild")) {
+ if ( element == focusedElement ) return true
+ }
- return match;
+ return false;
}
void function OnKeyTabPressed(var button) {
- // toggle focus between server list and filter panel
- if (IsFilterPanelElementFocused()) {
- // print("Switching focus from filter panel to server list")
- Hud_SetFocused(Hud_GetChild(file.menu, "BtnServer1"))
- }
- else {
- // print("Switching focus from server list to filter panel")
- Hud_SetFocused(Hud_GetChild(file.menu, "BtnServerSearch"))
- HideServerInfo()
+ try
+ {
+ // toggle focus between server list and filter panel
+ if (IsFilterPanelElementFocused()) {
+ // print("Switching focus from filter panel to server list")
+ Hud_SetFocused(Hud_GetChild(file.menu, "BtnServer1"))
+ }
+ else {
+ // print("Switching focus from server list to filter panel")
+ Hud_SetFocused(Hud_GetChild(file.menu, "BtnServerSearch"))
+ HideServerInfo()
+ }
}
+ catch ( ex ) {}
}
void function OnHitDummyTop(var button) {
@@ -483,7 +490,7 @@ void function OnHitDummyBottom(var button) {
}
void function OnHitDummyAfterFilterClear(var button) {
- Hud_SetFocused(Hud_GetChild(file.menu, "BtnServer1"))
+ Hud_SetFocused(Hud_GetChild(file.menu, "BtnServerNameTab"))
}
@@ -570,30 +577,31 @@ void function FilterAndUpdateList( var n )
FilterServerList()
+
switch ( filterDirection.sortingBy )
{
- case 0:
+ case sortingBy.NONE:
UpdateShownPage()
break
- case 1:
+ case sortingBy.NAME:
filterDirection.serverName = !filterDirection.serverName
- SortServerListByName(0)
+ SortServerListByName_Activate(0)
break
- case 2:
+ case sortingBy.PLAYERS:
filterDirection.serverPlayers = !filterDirection.serverPlayers
- SortServerListByPlayers(0)
+ SortServerListByPlayers_Activate(0)
break
- case 3:
+ case sortingBy.MAP:
filterDirection.serverMap = !filterDirection.serverMap
- SortServerListByMap(0)
+ SortServerListByMap_Activate(0)
break
- case 5: // 4 skipped cause it doesn't work respawn pls fix
+ case sortingBy.GAMEMODE:
filterDirection.serverGamemode = !filterDirection.serverGamemode
- SortServerListByGamemode(0)
+ SortServerListByGamemode_Activate(0)
break
- case 6:
+ case sortingBy.LATENCY:
filterDirection.serverLatency = !filterDirection.serverLatency
- SortServerListByLatency(0)
+ SortServerListByLatency_Activate(0)
break
default:
printt( "How the f did you get here" )
@@ -1021,130 +1029,105 @@ void function ThreadedAuthAndConnectToServer( string password = "" )
//////////////////////////////////////
// Shadow realm
//////////////////////////////////////
-void function SortServerListByName( var button )
+int function ServerSortLogic ( serverStruct a, serverStruct b)
{
- filterDirection.sortingBy = 1
+ var aTemp
+ var bTemp
+
+ bool direction
+
+ // We can hard code this cause adding entire columns isn't as easy
+ switch ( filterDirection.sortingBy ) {
+ case sortingBy.NAME:
+ aTemp = a.serverName.tolower()
+ bTemp = b.serverName.tolower()
+ direction = filterDirection.serverName
+ break;
+ case sortingBy.PLAYERS:
+ aTemp = a.serverPlayers
+ bTemp = b.serverPlayers
+ direction = filterDirection.serverPlayers
+ break;
+ case sortingBy.MAP:
+ aTemp = Localize(a.serverMap).tolower()
+ bTemp = Localize(b.serverMap).tolower()
+ direction = filterDirection.serverMap
+ break;
+ case sortingBy.GAMEMODE:
+ aTemp = Localize(a.serverGamemode).tolower()
+ bTemp = Localize(b.serverGamemode).tolower()
+ direction = filterDirection.serverGamemode
+ break;
+ case sortingBy.LATENCY:
+ aTemp = a.serverLatency
+ bTemp = b.serverLatency
+ direction = filterDirection.serverLatency
+ break;
+ default:
+ return 0
+ }
- int n = file.serversArrayFiltered.len() - 1
+ int invert = direction == true ? 1 : -1
- serverStruct tempServer
+ if ( aTemp > bTemp )
+ return 1 * invert
- for ( int i = 0; i < n; i++)
- {
- for ( int j = 0; j < n - 1; j++)
- {
- if ( file.serversArrayFiltered[ j ].serverName < file.serversArrayFiltered[ j + 1 ].serverName && filterDirection.serverName || file.serversArrayFiltered[ j ].serverName > file.serversArrayFiltered[ j + 1 ].serverName && !filterDirection.serverName)
- {
- tempServer = file.serversArrayFiltered[ j ]
- file.serversArrayFiltered[ j ] = file.serversArrayFiltered[ j + 1 ]
- file.serversArrayFiltered[ j + 1 ] = tempServer
- }
- }
- }
+ if ( aTemp < bTemp )
+ return -1 * invert
+
+ return 0
+}
+
+void function SortServerListByName_Activate ( var button )
+{
+ filterDirection.sortingBy = sortingBy.NAME
+
+ file.serversArrayFiltered.sort( ServerSortLogic )
filterDirection.serverName = !filterDirection.serverName
UpdateShownPage()
}
-void function SortServerListByPlayers( var button )
-{
- filterDirection.sortingBy = 2
- int n = file.serversArrayFiltered.len() - 1
+void function SortServerListByPlayers_Activate( var button )
+{
+ filterDirection.sortingBy = sortingBy.PLAYERS
- serverStruct tempServer
-
- for ( int i = 0; i < n; i++)
- {
- for ( int j = 0; j < n - 1; j++)
- {
- if ( file.serversArrayFiltered[ j ].serverPlayers < file.serversArrayFiltered[ j + 1 ].serverPlayers && filterDirection.serverPlayers || file.serversArrayFiltered[ j ].serverPlayers > file.serversArrayFiltered[ j + 1 ].serverPlayers && !filterDirection.serverPlayers)
- {
- tempServer = file.serversArrayFiltered[ j ]
- file.serversArrayFiltered[ j ] = file.serversArrayFiltered[ j + 1 ]
- file.serversArrayFiltered[ j + 1 ] = tempServer
- }
- }
- }
+ file.serversArrayFiltered.sort( ServerSortLogic )
filterDirection.serverPlayers = !filterDirection.serverPlayers
UpdateShownPage()
}
-void function SortServerListByMap( var button )
+void function SortServerListByMap_Activate( var button )
{
- filterDirection.sortingBy = 3
-
- int n = file.serversArrayFiltered.len() - 1
+ filterDirection.sortingBy = sortingBy.MAP
- serverStruct tempServer
-
- for ( int i = 0; i < n; i++)
- {
- for ( int j = 0; j < n - 1; j++)
- {
- if ( Localize(file.serversArrayFiltered[ j ].serverMap) < Localize(file.serversArrayFiltered[ j + 1 ].serverMap) && filterDirection.serverMap || Localize(file.serversArrayFiltered[ j ].serverMap) > Localize(file.serversArrayFiltered[ j + 1 ].serverMap) && !filterDirection.serverMap)
- {
- tempServer = file.serversArrayFiltered[ j ]
- file.serversArrayFiltered[ j ] = file.serversArrayFiltered[ j + 1 ]
- file.serversArrayFiltered[ j + 1 ] = tempServer
- }
- }
- }
+ file.serversArrayFiltered.sort( ServerSortLogic )
filterDirection.serverMap = !filterDirection.serverMap
UpdateShownPage()
}
-void function SortServerListByGamemode( var button )
+void function SortServerListByGamemode_Activate( var button )
{
- filterDirection.sortingBy = 5
-
- int n = file.serversArrayFiltered.len() - 1
-
- serverStruct tempServer
+ filterDirection.sortingBy = sortingBy.GAMEMODE
- for ( int i = 0; i < n; i++)
- {
- for ( int j = 0; j < n - 1; j++)
- {
- if ( Localize(file.serversArrayFiltered[ j ].serverGamemode) < Localize(file.serversArrayFiltered[ j + 1 ].serverGamemode) && filterDirection.serverGamemode || Localize(file.serversArrayFiltered[ j ].serverGamemode) > Localize(file.serversArrayFiltered[ j + 1 ].serverGamemode) && !filterDirection.serverGamemode)
- {
- tempServer = file.serversArrayFiltered[ j ]
- file.serversArrayFiltered[ j ] = file.serversArrayFiltered[ j + 1 ]
- file.serversArrayFiltered[ j + 1 ] = tempServer
- }
- }
- }
+ file.serversArrayFiltered.sort( ServerSortLogic )
filterDirection.serverGamemode = !filterDirection.serverGamemode
UpdateShownPage()
}
-void function SortServerListByLatency( var button )
+void function SortServerListByLatency_Activate( var button )
{
- filterDirection.sortingBy = 5
+ filterDirection.sortingBy = sortingBy.LATENCY
- int n = file.serversArrayFiltered.len() - 1
-
- serverStruct tempServer
-
- for ( int i = 0; i < n; i++)
- {
- for ( int j = 0; j < n - 1; j++)
- {
- if ( file.serversArrayFiltered[ j ].serverLatency < file.serversArrayFiltered[ j + 1 ].serverLatency && filterDirection.serverLatency || file.serversArrayFiltered[ j ].serverLatency > file.serversArrayFiltered[ j + 1 ].serverLatency && !filterDirection.serverLatency)
- {
- tempServer = file.serversArrayFiltered[ j ]
- file.serversArrayFiltered[ j ] = file.serversArrayFiltered[ j + 1 ]
- file.serversArrayFiltered[ j + 1 ] = tempServer
- }
- }
- }
+ file.serversArrayFiltered.sort( ServerSortLogic )
filterDirection.serverLatency = !filterDirection.serverLatency
diff --git a/Northstar.Coop/mod.json b/Northstar.Coop/mod.json
index f4fafbf92..1e373d3d8 100644
--- a/Northstar.Coop/mod.json
+++ b/Northstar.Coop/mod.json
@@ -1,6 +1,6 @@
{
"Name" : "Northstar.Coop",
- "Description" : "Allows the singleplayer campaign to be played in multiplayer",
+ "Description" : "[WIP] Allows the singleplayer campaign to be played in multiplayer",
"LoadPriority": 0,
diff --git a/Northstar.Custom/keyvalues/playlists_v2.txt b/Northstar.Custom/keyvalues/playlists_v2.txt
index 3bf111b5b..1a7875579 100644
--- a/Northstar.Custom/keyvalues/playlists_v2.txt
+++ b/Northstar.Custom/keyvalues/playlists_v2.txt
@@ -258,6 +258,26 @@ playlists
gamemode_score_hint #GAMEMODE_SCORE_HINT_TDM
}
}
+ sns
+ {
+ inherit defaults
+ vars
+ {
+ name #PL_sns
+ lobbytitle #PL_sns_lobby
+ description #PL_sns_desc
+ hint #PL_sns_desc
+ abbreviation #PL_sns_abbr
+ image ffa
+ at_turrets_enabled 0
+ max_players 16
+ max_teams 20
+ scorelimit 300
+ classic_mp 1
+
+ gamemode_score_hint #GAMEMODE_SCORE_HINT_FFA
+ }
+ }
}
Playlists
{
@@ -531,7 +551,6 @@ playlists
mp_angel_city 1
mp_colony02 1
mp_glitch 1
- mp_lf_stacks 1
mp_relic02 1
mp_wargames 1
mp_rise 1
@@ -564,18 +583,18 @@ playlists
{
maps
{
- mp_forwardbase_kodai 1
- mp_grave 1
- mp_homestead 1
- mp_thaw 1
- mp_black_water_canal 1
- mp_eden 1
- mp_drydock 1
- mp_crashsite3 1
- mp_complex3 1
- mp_angel_city 1
- mp_colony02 1
- mp_glitch 1
+ mp_forwardbase_kodai 1
+ mp_grave 1
+ mp_homestead 1
+ mp_thaw 1
+ mp_black_water_canal 1
+ mp_eden 1
+ mp_drydock 1
+ mp_crashsite3 1
+ mp_complex3 1
+ mp_angel_city 1
+ mp_colony02 1
+ mp_glitch 1
mp_relic02 1
mp_wargames 1
mp_rise 1
@@ -626,7 +645,7 @@ playlists
mp_glitch 1
mp_angel_city 1
mp_colony02 1
- mp_relic02 1
+ mp_relic02 1
mp_grave 1
mp_homestead 1
mp_drydock 1
@@ -635,7 +654,7 @@ playlists
mp_eden 2
mp_black_water_canal 1
mp_glitch 1
- mp_relic02 1
+ mp_relic02 1
mp_wargames 1
mp_rise 1
mp_crashsite3 1
@@ -819,18 +838,69 @@ playlists
{
maps
{
- mp_forwardbase_kodai 1
- mp_grave 1
- mp_homestead 1
- mp_thaw 1
- mp_black_water_canal 1
- mp_eden 1
- mp_drydock 1
- mp_crashsite3 1
- mp_complex3 1
- mp_angel_city 1
- mp_colony02 1
- mp_glitch 1
+ mp_forwardbase_kodai 1
+ mp_grave 1
+ mp_homestead 1
+ mp_thaw 1
+ mp_black_water_canal 1
+ mp_eden 1
+ mp_drydock 1
+ mp_crashsite3 1
+ mp_complex3 1
+ mp_angel_city 1
+ mp_colony02 1
+ mp_glitch 1
+ mp_relic02 1
+ mp_wargames 1
+ mp_rise 1
+ }
+ }
+ }
+ }
+ sns
+ {
+ inherit defaults
+ vars
+ {
+ name #PL_sns
+ lobbytitle #PL_sns_lobby
+ description #PL_sns_desc
+ hint #PL_sns_desc
+ abbreviation #PL_sns_abbr
+ image ps
+ max_players 16
+ max_teams 20
+ scorelimit 300
+ classic_mp 1
+ mixtape_timeout 120
+ visible 0
+
+ gamemode_score_hint #GAMEMODE_SCORE_HINT_FFA
+ }
+ gamemodes
+ {
+ sns
+ {
+ maps
+ {
+ mp_lf_stacks 1
+ mp_lf_deck 1
+ mp_lf_meadow 1
+ mp_lf_traffic 1
+ mp_lf_township 1
+ mp_lf_uma 1
+ mp_forwardbase_kodai 1
+ mp_grave 1
+ mp_homestead 1
+ mp_thaw 1
+ mp_black_water_canal 1
+ mp_eden 1
+ mp_drydock 1
+ mp_crashsite3 1
+ mp_complex3 1
+ mp_angel_city 1
+ mp_colony02 1
+ mp_glitch 1
mp_relic02 1
mp_wargames 1
mp_rise 1
diff --git a/Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_arena.txt b/Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_arena.txt
new file mode 100644
index 000000000..79d5b86c6
--- /dev/null
+++ b/Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_arena.txt
@@ -0,0 +1,11 @@
+WeaponData
+{
+ Mods
+ {
+ allow_as_primary
+ {
+ "fire_mode" "offhand_melee_hybrid"
+ "attack_button_presses_melee" "1"
+ }
+ }
+} \ No newline at end of file
diff --git a/Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_emptyhanded.txt b/Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_emptyhanded.txt
index fa83ce07b..e1db3cdbc 100644
--- a/Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_emptyhanded.txt
+++ b/Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_emptyhanded.txt
@@ -6,4 +6,13 @@ WeaponData
"melee_damage" "5"
"impulse_force" "150000"
}
+
+ Mods
+ {
+ allow_as_primary
+ {
+ "fire_mode" "offhand_melee_hybrid"
+ "attack_button_presses_melee" "1"
+ }
+ }
} \ No newline at end of file
diff --git a/Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_sword.txt b/Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_sword.txt
new file mode 100644
index 000000000..79d5b86c6
--- /dev/null
+++ b/Northstar.Custom/keyvalues/scripts/weapons/melee_pilot_sword.txt
@@ -0,0 +1,11 @@
+WeaponData
+{
+ Mods
+ {
+ allow_as_primary
+ {
+ "fire_mode" "offhand_melee_hybrid"
+ "attack_button_presses_melee" "1"
+ }
+ }
+} \ No newline at end of file
diff --git a/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman_n.txt b/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman_n.txt
new file mode 100644
index 000000000..da0c26012
--- /dev/null
+++ b/Northstar.Custom/keyvalues/scripts/weapons/mp_weapon_wingman_n.txt
@@ -0,0 +1,28 @@
+WeaponData
+{
+ Mods
+ {
+ one_in_the_chamber
+ {
+ damage_near_value "9999"
+ damage_far_value "9999"
+ damage_very_far_value "9999"
+ }
+ sns
+ {
+ damage_near_value "9999"
+ damage_far_value "9999"
+ damage_very_far_value "9999"
+ ammo_clip_size "1"
+ reload_time "*0.5"
+ reload_time_late1 "*0.5"
+ reloadempty_time "*0.5"
+ reloadempty_time_late1 "*0.5"
+ bolt_bounce_frac "0.7"
+ projectile_damage_reduction_per_bounce "0.0"
+ projectile_damages_owner "0"
+ projectile_ricochet_max_count "3"
+ ads_move_speed_scale "1"
+ }
+ }
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod.json b/Northstar.Custom/mod.json
index 2aaa7eb77..0bf473da7 100644
--- a/Northstar.Custom/mod.json
+++ b/Northstar.Custom/mod.json
@@ -1,21 +1,31 @@
{
- "Name" : "Northstar.Custom",
- "Description": "(ideally) Polished custom content for Northstar",
+ "Name": "Northstar.Custom",
+ "Description": "Custom content for Northstar: extra weapons, gamemodes, etc.",
"Version": "1.1.0",
"LoadPriority": 1,
"RequiredOnClient": true,
-
"ConVars": [
{
+ "Name": "ns_disallowed_tacticals",
+ "DefaultValue": ""
+ },
+ {
+ "Name": "ns_disallowed_tactical_replacement",
+ "DefaultValue": ""
+ },
+ {
"Name": "ns_disallowed_weapons",
"DefaultValue": ""
},
{
"Name": "ns_disallowed_weapon_primary_replacement",
"DefaultValue": "mp_weapon_rspn101"
+ },
+ {
+ "Name": "ns_force_melee",
+ "DefaultValue": ""
}
],
-
"Scripts": [
{
"Path": "sh_northstar_custom_precache.gnut",
@@ -23,7 +33,6 @@
"ClientCallback": {
"After": "NorthstarCustomPrecache"
},
-
"ServerCallback": {
"After": "NorthstarCustomPrecache"
}
@@ -35,19 +44,16 @@
"After": "NorthstarDevCommands_Init"
}
},
-
{
"Path": "weapons/mp_weapon_peacekraber.nut",
"RunOn": "( CLIENT || SERVER ) && MP"
},
-
{
"Path": "gamemodes/sh_gamemode_chamber.nut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "Sh_GamemodeChamber_Init"
},
-
"ServerCallback": {
"Before": "Sh_GamemodeChamber_Init"
}
@@ -66,7 +72,6 @@
"ClientCallback": {
"Before": "Sh_GamemodeHidden_Init"
},
-
"ServerCallback": {
"Before": "Sh_GamemodeHidden_Init"
}
@@ -79,14 +84,31 @@
"Path": "gamemodes/cl_gamemode_hidden.nut",
"RunOn": "CLIENT && MP"
},
-
+ {
+ "Path": "gamemodes/sh_gamemode_sns.gnut",
+ "RunOn": "( SERVER || CLIENT ) && MP",
+ "ServerCallback": {
+ "Before": "SNSMode_Init"
+ },
+ "ClientCallback": {
+ "Before": "SNSMode_Init"
+ }
+ },
+ {
+ "Path": "gamemodes/cl_gamemode_sns.gnut",
+ "RunOn": "CLIENT && MP"
+ },
+ {
+ "Path": "gamemodes/_gamemode_sns.gnut",
+ "RunOn": "SERVER && MP"
+ },
+
{
"Path": "gamemodes/sh_gamemode_fw_custom.nut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "SHCreateGamemodeFW_Init"
},
-
"ServerCallback": {
"Before": "SHCreateGamemodeFW_Init"
}
@@ -99,14 +121,24 @@
"Path": "gamemodes/cl_gamemode_fw.nut",
"RunOn": "CLIENT && MP"
},
-
+ {
+ "Path": "gamemodes/gg_earn_meter/sh_gg_earn_meter.gnut",
+ "RunOn": "( CLIENT || SERVER ) && MP",
+ },
+ {
+ "Path": "gamemodes/gg_earn_meter/_gg_earn_meter.gnut",
+ "RunOn": "SERVER && MP"
+ },
+ {
+ "Path": "gamemodes/gg_earn_meter/cl_gg_earn_meter.gnut",
+ "RunOn": "CLIENT && MP"
+ },
{
"Path": "gamemodes/sh_gamemode_gg.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "Sh_GamemodeGG_Init"
},
-
"ServerCallback": {
"Before": "Sh_GamemodeGG_Init"
}
@@ -119,14 +151,12 @@
"Path": "gamemodes/cl_gamemode_gg.gnut",
"RunOn": "CLIENT && MP"
},
-
{
"Path": "gamemodes/sh_gamemode_tt.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "Sh_GamemodeTT_Init"
- },
-
+ },
"ServerCallback": {
"Before": "Sh_GamemodeTT_Init"
}
@@ -139,14 +169,12 @@
"Path": "gamemodes/cl_gamemode_tt.gnut",
"RunOn": "CLIENT && MP"
},
-
{
"Path": "gamemodes/sh_gamemode_inf.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "Sh_GamemodeInfection_Init"
},
-
"ServerCallback": {
"Before": "Sh_GamemodeInfection_Init"
}
@@ -159,7 +187,6 @@
"Path": "gamemodes/cl_gamemode_inf.gnut",
"RunOn": "CLIENT && MP"
},
-
{
"Path": "_droppod_spawn.gnut",
"RunOn": "SERVER && MP",
@@ -173,7 +200,6 @@
"ClientCallback": {
"Before": "Sh_GamemodeArena_Init"
},
-
"ServerCallback": {
"Before": "Sh_GamemodeArena_Init"
}
@@ -181,15 +207,12 @@
{
"Path": "gamemodes/sh_arena_loadouts.gnut",
"RunOn": "UI || MP",
-
"ClientCallback": {
"After": "InitialiseArenaLoadouts"
},
-
"ServerCallback": {
"After": "InitialiseArenaLoadouts"
},
-
"UICallback": {
"After": "InitialiseArenaLoadouts"
}
@@ -202,14 +225,12 @@
"Path": "gamemodes/cl_gamemode_arena.gnut",
"RunOn": "CLIENT && MP"
},
-
{
"Path": "gamemodes/sh_gamemode_kr.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "Sh_GamemodeKR_Init"
},
-
"ServerCallback": {
"Before": "Sh_GamemodeKR_Init"
}
@@ -222,14 +243,12 @@
"Path": "gamemodes/cl_gamemode_kr.gnut",
"RunOn": "CLIENT && MP"
},
-
{
"Path": "gamemodes/sh_gamemode_fastball.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "Sh_GamemodeFastball_Init"
},
-
"ServerCallback": {
"Before": "Sh_GamemodeFastball_Init"
}
@@ -246,14 +265,12 @@
"Path": "gamemodes/cl_gamemode_fastball.gnut",
"RunOn": "CLIENT && MP"
},
-
{
"Path": "gamemodes/sh_gamemode_hs.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "Sh_GamemodeHideAndSeek_Init"
},
-
"ServerCallback": {
"Before": "Sh_GamemodeHideAndSeek_Init"
}
@@ -266,41 +283,34 @@
"Path": "gamemodes/cl_gamemode_hs.gnut",
"RunOn": "CLIENT && MP"
},
-
{
"Path": "gamemodes/sh_gamemode_ctf_comp.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "ShGamemodeCTFComp_Init"
},
-
"ServerCallback": {
"Before": "ShGamemodeCTFComp_Init"
}
},
-
{
"Path": "gamemodes/sh_gamemode_tffa.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"Before": "Sh_GamemodeTFFA_Init"
},
-
"ServerCallback": {
"Before": "Sh_GamemodeTFFA_Init"
}
},
-
{
"Path": "gamemodes/_gamemode_tffa.gnut",
"RunOn": "SERVER && MP"
},
-
{
"Path": "gamemodes/cl_gamemode_tffa.gnut",
"RunOn": "CLIENT && MP"
},
-
{
"Path": "sh_3psequence_to_1p_hacks.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
@@ -308,49 +318,41 @@
"Before": "FirstPersonSequenceForce1P_Init",
"After": "FirstPersonSequenceForce1P_InitPlaylistVars"
},
-
"ServerCallback": {
"Before": "FirstPersonSequenceForce1P_Init",
"After": "FirstPersonSequenceForce1P_InitPlaylistVars"
}
},
-
{
"Path": "gamemodes/sh_riff_instagib.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"After": "RiffInstagib_Init"
},
-
"ServerCallback": {
"After": "RiffInstagib_Init"
}
},
-
{
"Path": "sh_custom_air_accel.gnut",
"RunOn": "CLIENT || SERVER",
"ClientCallback": {
"After": "CustomAirAccelVars_Init"
},
-
"ServerCallback": {
"After": "CustomAirAccelVars_Init"
}
},
-
{
"Path": "sh_promode.gnut",
"RunOn": "MP",
"ClientCallback": {
"After": "Promode_Init"
},
-
"ServerCallback": {
"After": "Promode_Init"
}
},
-
{
"Path": "sh_bleedout_damage.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
@@ -358,37 +360,31 @@
"Before": "BleedoutDamage_PreInit",
"After": "BleedoutDamage_Init"
},
-
"ServerCallback": {
"Before": "BleedoutDamage_PreInit",
"After": "BleedoutDamage_Init"
}
},
-
{
"Path": "sh_custom_oob_timer.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"After": "CustomOOBTimer_Init"
},
-
"ServerCallback": {
"After": "CustomOOBTimer_Init"
}
},
-
{
"Path": "rodeo/sh_classic_rodeo.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"After": "ClassicRodeo_InitPlaylistVars"
},
-
"ServerCallback": {
"After": "ClassicRodeo_InitPlaylistVars"
}
},
-
{
"Path": "_disallowed_weapons.gnut",
"RunOn": "SERVER && MP",
@@ -396,20 +392,31 @@
"After": "DisallowedWeapons_Init"
}
},
-
+ {
+ "Path": "_disallowed_tacticals.gnut",
+ "RunOn": "SERVER && MP",
+ "ServerCallback": {
+ "After": "DisallowedTacticals_Init"
+ }
+ },
+ {
+ "Path": "_force_melee.gnut",
+ "RunOn": "SERVER && MP",
+ "ServerCallback": {
+ "After": "ForceMelee_Init"
+ }
+ },
{
"Path": "sh_custom_pilot_collision.gnut",
"RunOn": "( CLIENT || SERVER ) && MP",
"ClientCallback": {
"After": "CustomPilotCollision_InitPlaylistVars"
},
-
"ServerCallback": {
"After": "CustomPilotCollision_InitPlaylistVars"
}
}
],
-
"Maps": [
{
"Name": "mp_skyway_v1",
@@ -417,8 +424,7 @@
"RPak": "sp_skyway_v1"
}
],
-
"Localisation": [
"resource/northstar_custom_%language%.txt"
]
-}
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/_disallowed_tacticals.gnut b/Northstar.Custom/mod/scripts/vscripts/_disallowed_tacticals.gnut
new file mode 100644
index 000000000..b4a41931e
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/_disallowed_tacticals.gnut
@@ -0,0 +1,51 @@
+global function DisallowedTacticals_Init
+
+struct {
+ array<string> disallowedTacticals
+ string disallowedTacticalsStringLastVal
+ string disallowedTacticalReplacement
+} file
+
+void function DisallowedTacticals_Init()
+{
+ UpdateDisallowedTacticalList()
+ AddCallback_OnPlayerRespawned( ReplacePlayerTactical )
+ AddCallback_OnPlayerGetsNewPilotLoadout( ReplacePlayerTacticalForLoadoutChange )
+}
+
+void function UpdateDisallowedTacticalList()
+{
+ string cvar = GetConVarString( "ns_disallowed_tacticals" )
+ if ( file.disallowedTacticalsStringLastVal == cvar )
+ return
+
+ file.disallowedTacticals = split( cvar, "," )
+ foreach ( string tactical in file.disallowedTacticals )
+ StringReplace( tactical, " ", "" )
+
+ file.disallowedTacticalReplacement = GetConVarString( "ns_disallowed_tactical_replacement")
+}
+
+void function ReplacePlayerTactical( entity player )
+{
+ UpdateDisallowedTacticalList()
+ if ( file.disallowedTacticals.len() == 0 )
+ return
+ array<entity> offhand = player.GetOffhandWeapons()
+
+ if ( file.disallowedTacticals.contains( offhand[1].GetWeaponClassName() ) )
+ {
+ player.TakeOffhandWeapon( 1 )
+ if ( file.disallowedTacticalReplacement != ""){
+ player.GiveOffhandWeapon( file.disallowedTacticalReplacement, OFFHAND_SPECIAL )
+ SendHudMessage( player, "Restricted tactical was replaced", -1, 0.4, 255, 255, 255, 255, 0.15, 3.0, 0.5 )
+ }
+ else { SendHudMessage( player, "Restricted tactical was removed", -1, 0.4, 255, 255, 255, 255, 0.15, 3.0, 0.5 ) }
+ }
+
+}
+
+void function ReplacePlayerTacticalForLoadoutChange( entity player, PilotLoadoutDef loadout )
+{
+ ReplacePlayerTactical( player )
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/_force_melee.gnut b/Northstar.Custom/mod/scripts/vscripts/_force_melee.gnut
new file mode 100644
index 000000000..cdc14ffff
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/_force_melee.gnut
@@ -0,0 +1,36 @@
+global function ForceMelee_Init
+
+struct {
+ string forcedMeleeWeapon
+} file
+
+void function ForceMelee_Init()
+{
+ GetForcedMelee()
+ AddCallback_OnPlayerRespawned( ReplaceMelee )
+ AddCallback_OnPlayerGetsNewPilotLoadout( ReplaceMeleeForLoadoutChange )
+}
+
+void function GetForcedMelee()
+{
+ string cvar = GetConVarString( "ns_force_melee" )
+ if ( cvar == "" || cvar.len() == 0 )
+ return
+
+ file.forcedMeleeWeapon = cvar
+}
+
+void function ReplaceMelee( entity player )
+{
+ GetForcedMelee()
+ if ( file.forcedMeleeWeapon.len() == 0 )
+ return
+
+ player.TakeOffhandWeapon( 5 )
+ player.GiveOffhandWeapon( file.forcedMeleeWeapon, OFFHAND_MELEE )
+}
+
+void function ReplaceMeleeForLoadoutChange( entity player, PilotLoadoutDef loadout )
+{
+ ReplaceMelee( player )
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut
index bbd669cd0..5768dcfaf 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_chamber.nut
@@ -22,6 +22,10 @@ void function ChamberInitPlayer( entity player )
UpdateLoadout( player )
}
+int function GetChamberWingmanN(){
+ return GetCurrentPlaylistVarInt( "chamber_wingman_n", 0 )
+}
+
void function ChamberOnPlayerKilled( entity victim, entity attacker, var damageInfo )
{
if ( !victim.IsPlayer() || GetGameState() != eGameState.Playing || attacker == victim)
@@ -29,10 +33,17 @@ void function ChamberOnPlayerKilled( entity victim, entity attacker, var damageI
if ( attacker.IsPlayer() )
{
- attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 )
- AddTeamScore( attacker.GetTeam(), 1 )
+ if ( (DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.mp_weapon_wingman_n) || (DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.mp_weapon_wingman) )
+ {
+ attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 )
+ AddTeamScore( attacker.GetTeam(), 1 )
+ }
+
if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.human_execution )
{
+ attacker.SetPlayerGameStat( PGS_ASSAULT_SCORE, attacker.GetPlayerGameStat( PGS_ASSAULT_SCORE ) + 1 )
+ AddTeamScore( attacker.GetTeam(), 1 )
+
string message = victim.GetPlayerName() + " got executed."
foreach ( entity player in GetPlayerArray() )
SendHudMessage( player, message, -1, 0.4, 255, 0, 0, 0, 0, 3, 0.15 )
@@ -75,8 +86,8 @@ void function UpdateLoadout( entity player )
player.TakeWeaponNow( weapon.GetWeaponClassName() )
array<string> mods = ["one_in_the_chamber"]
- player.GiveWeapon( "mp_weapon_wingman", mods)
- player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE )
+ player.GiveWeapon( (GetChamberWingmanN() ? "mp_weapon_wingman_n" : "mp_weapon_wingman"), mods)
+ player.GiveOffhandWeapon( "melee_pilot_kunai", OFFHAND_MELEE )
thread SetAmmo( player )
}
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut
index 405ef16ea..f6c0968cf 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut
@@ -120,6 +120,56 @@ void function GamemodeFastball_Init()
< -87, 1630, 22 >, < 0, 90.00, 0 >,
< -2167 , 448, 54 >, <0 , 90, 0 >
])
+
+ FastballAddBuddySpawnForLevel( "mp_glitch", TEAM_MILITIA, < -4450, -629, 320 >, < 0, 0, 0 > )
+ FastballAddBuddySpawnForLevel( "mp_glitch", TEAM_IMC, < 4100, 890, 320>, < 0, 180, 0 > )
+ FastballAddPanelSpawnsForLevel( "mp_glitch", [
+ < 2703, 2170, 25 >, < 0, 0.00, 0 >,
+ < -192, 129, -250 >, < 0, 90.00, 0 >,
+ < -3088, -1905, 25 >, < 0, -180.00, 0 >
+ ])
+
+ FastballAddPropForLevel("mp_glitch", $"models/containers/plastic_pallet_01.mdl", [
+ < -190, 0, -250 >, < 0, 90.00, 0 >,
+ < -190, 65, -250 >, < 0, 90.00, 0 >,
+ < -190, 130, -250 >, < 0, 90.00, 0 >,
+ < -190, 195, -250 >, < 0, 90.00, 0 >,
+ < -190, 250, -250 >, < 0, 90.00, 0 >,
+ < -125, 0, -250 >, < 0, 90.00, 0 >,
+ < -125, 65, -250 >, < 0, 90.00, 0 >,
+ < -125, 130, -250 >, < 0, 90.00, 0 >,
+ < -125, 195, -250 >, < 0, 90.00, 0 >,
+ < -125, 250, -250 >, < 0, 90.00, 0 >,
+ < -255, 0, -250 >, < 0, 90.00, 0 >,
+ < -255, 65, -250 >, < 0, 90.00, 0 >,
+ < -255, 130, -250 >, < 0, 90.00, 0 >,
+ < -255, 195, -250 >, < 0, 90.00, 0 >,
+ < -255, 250, -250 >, < 0, 90.00, 0 >
+ ] )
+
+ FastballAddBuddySpawnForLevel( "mp_relic02", TEAM_MILITIA, < 4504, -3500, 150 >, < 0, -170, 0 > )
+ FastballAddBuddySpawnForLevel( "mp_relic02", TEAM_IMC, < -4505, -3750, 367>, < 0, 10, 0 > )
+ FastballAddPanelSpawnsForLevel( "mp_relic02", [
+ < -2258, -5286, 356 >, < 0, 0.00, 0 >,
+ < -32, -2600, -75 >, < 0, 90.00, 0 >,
+ < 2028, -5332, 128 >, < 0, 90.00, 0 >
+ ])
+
+ FastballAddBuddySpawnForLevel( "mp_homestead", TEAM_MILITIA, < -3848.19.00, -2521, -25>, < 0, 0, 0 > )
+ FastballAddBuddySpawnForLevel( "mp_homestead", TEAM_IMC, < 6000, 1560, -137 >, < 0, -150, 0 > )
+ FastballAddPanelSpawnsForLevel( "mp_homestead", [
+ < 3672, -696, -10 >, < 0, 100.00, 0 > ,
+ < 1101, -911, 145 >, < -8, 40.00, 0 >,
+ < -1585 , -953, -79 >, <0, 135.00, 0 >
+ ])
+
+ FastballAddBuddySpawnForLevel( "mp_drydock", TEAM_MILITIA, < -4, -4350, 144 >, < 0, 80, 0 > )
+ FastballAddBuddySpawnForLevel( "mp_drydock", TEAM_IMC, < 679, 4674, 200>, < 0, -90, 0 > )
+ FastballAddPanelSpawnsForLevel( "mp_drydock", [
+ < 1726, 2290, 256 >, < 0, 0.00, 0 >,
+ < 100, 63, 265 >, < 0, 180.00, 0 >,
+ < -752, -863, 408>, <0, 180.00, 0 >
+ ])
}
void function SpawnPanelsForLevel()
@@ -159,6 +209,25 @@ void function FastballAddPanelSpawnsForLevel( string level, array<vector> positi
}
}
+void function FastballAddPropForLevel( string level, asset model, array<vector> positionsAndOrigins)
+{
+ if ( GetMapName() != level )
+ return
+
+ for ( int i = 0; i < positionsAndOrigins.len(); i += 2 )
+ {
+ entity prop = CreateEntity( "prop_control_panel" )
+ prop.SetValueForModelKey( model )
+ prop.SetOrigin( positionsAndOrigins[ i ] )
+ prop.SetAngles( positionsAndOrigins[ i + 1 ] )
+ prop.kv.solid = SOLID_VPHYSICS
+ DispatchSpawn( prop )
+
+ prop.SetModel( model )
+ }
+
+}
+
entity function CreatePanel( vector origin, vector angles )
{
entity panel = CreateEntity( "prop_control_panel" )
@@ -224,4 +293,4 @@ int function FastballDecideWinner()
return TEAM_IMC
return TEAM_UNASSIGNED
-}
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut
index 608fd869e..5943b8048 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut
@@ -10,12 +10,14 @@ void function GamemodeGG_Init()
SetWeaponDropsEnabled( false )
Riff_ForceTitanAvailability( eTitanAvailability.Never )
Riff_ForceBoostAvailability( eBoostAvailability.Disabled )
-
+
AddCallback_OnPlayerRespawned( OnPlayerRespawned )
AddCallback_OnPlayerKilled( OnPlayerKilled )
-
+
AddCallback_GameStateEnter( eGameState.WinnerDetermined, OnWinnerDetermined )
-
+
+ AddCallback_GGEarnMeterFull( OnGGEarnMeterFilled )
+
// set scorelimit if it's wrong, sort of a jank way to do it but best i've got rn
try
{
@@ -44,76 +46,127 @@ void function OnPlayerKilled( entity victim, entity attacker, var damageInfo )
{
if ( !victim.IsPlayer() || !attacker.IsPlayer() || GetGameState() != eGameState.Playing )
return
-
+
if ( attacker == victim ) // suicide
{
string message = victim.GetPlayerName() + " committed suicide."
foreach ( entity player in GetPlayerArray() )
SendHudMessage( player, message, -1, 0.4, 255, 0, 0, 0, 0, 3, 0.15 )
-
- if ( GameRules_GetTeamScore( victim.GetTeam() ) != 0 )
- {
- AddTeamScore( victim.GetTeam(), -1 ) // get absolutely fucking destroyed lol
- victim.AddToPlayerGameStat( PGS_ASSAULT_SCORE, -1 )
- }
+
+ DeRank( victim )
}
- else
+ else
{
if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) != eDamageSourceId.melee_pilot_emptyhanded )
{
- AddTeamScore( attacker.GetTeam(), 1 )
- attacker.AddToPlayerGameStat( PGS_ASSAULT_SCORE, 1 )
- UpdateLoadout( attacker )
+ float percentageReward = GetCurrentPlaylistVarFloat( "gg_kill_reward", 1.0 )
+ string scoreEvent = "KillPilot"
+
+ if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.human_execution )
+ {
+ string message = victim.GetPlayerName() + " got executed."
+ foreach ( entity player in GetPlayerArray() )
+ SendHudMessage( player, message, -1, 0.4, 255, 0, 0, 0, 0, 3, 0.15 )
+
+ DeRank( victim )
+
+ percentageReward = GetCurrentPlaylistVarFloat( "gg_execution_reward", 1.0 )
+ scoreEvent = "Execution"
+ }
+
+ Reward( attacker, victim, scoreEvent, percentageReward )
}
-
- if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.human_execution )
+ }
+
+ table<int, bool> alreadyAssisted
+ foreach( DamageHistoryStruct attackerInfo in victim.e.recentDamageHistory )
+ {
+ if( attackerInfo.attacker != attacker && !alreadyAssisted[attackerInfo.attacker.GetEncodedEHandle()] )
{
- string message = victim.GetPlayerName() + " got executed."
- foreach ( entity player in GetPlayerArray() )
- SendHudMessage( player, message, -1, 0.4, 255, 0, 0, 0, 0, 3, 0.15 )
-
- if ( GameRules_GetTeamScore( victim.GetTeam() ) != 0 )
- {
- AddTeamScore( victim.GetTeam(), -1 ) // get absolutely fucking destroyed lol
- victim.AddToPlayerGameStat( PGS_ASSAULT_SCORE, -1 )
+ if ( attackerInfo.damageSourceId != eDamageSourceId.melee_pilot_emptyhanded ) {
+ alreadyAssisted[attackerInfo.attacker.GetEncodedEHandle()] <- true
+
+ Reward( attackerInfo.attacker, victim, "PilotAssist", GetCurrentPlaylistVarFloat( "gg_assist_reward", 0.0 ) )
}
}
}
}
+void function Reward( entity player, entity victim, string scoreEvent, float percentageReward )
+{
+ percentageReward = clamp(percentageReward, 0.0, 1.0)
+ Sv_GGEarnMeter_AddPercentage( player, percentageReward )
+ Remote_CallFunction_NonReplay( player, "ServerCallback_ScoreEvent", GetScoreEvent(scoreEvent).eventId, 0, eEventDisplayType.MEDAL, victim.GetEncodedEHandle(), 0.0, percentageReward)
+}
+
+void function DeRank( entity player )
+{
+ Sv_GGEarnMeter_SetPercentage( player, 0.0 )
+
+ if ( GameRules_GetTeamScore( player.GetTeam() ) != 0 )
+ {
+ AddTeamScore( player.GetTeam(), -1 ) // get absolutely fucking destroyed lol
+ player.AddToPlayerGameStat( PGS_ASSAULT_SCORE, -1 )
+ UpdateLoadout( player )
+ }
+}
+
+bool function OnGGEarnMeterFilled( entity player )
+{
+ AddTeamScore( player.GetTeam(), 1 )
+ player.AddToPlayerGameStat( PGS_ASSAULT_SCORE, 1 )
+ UpdateLoadout( player )
+
+ int currentScore = GameRules_GetTeamScore( player.GetTeam() )
+ int maxScore = GetGunGameWeapons().len()
+
+ return currentScore >= maxScore
+}
+
void function UpdateLoadout( entity player )
{
// todo: honestly, this should be reworked to use PilotLoadoutDefs instead of directly modifying weapons and shit
-
+
int currentWeaponIndex = GameRules_GetTeamScore( player.GetTeam() )
array<GunGameWeapon> weapons = GetGunGameWeapons()
-
+
if ( currentWeaponIndex >= weapons.len() )
currentWeaponIndex = weapons.len() - 1
-
+
if ( currentWeaponIndex > 18 ) // play end of game music for special weapons
PlayMusicToAll( eMusicPieceID.LEVEL_LAST_MINUTE ) // this *shouldn't* overlap if done multiple times
-
+
GunGameWeapon weapon = weapons[ currentWeaponIndex ]
-
+
foreach ( entity weapon in player.GetMainWeapons() )
player.TakeWeaponNow( weapon.GetWeaponClassName() )
-
+
foreach ( entity weapon in player.GetOffhandWeapons() )
player.TakeWeaponNow( weapon.GetWeaponClassName() )
-
+
if ( weapon.offhandSlot != -1 )
{
- // TEMP: give archer so player so player has a weapon which lets them use offhands
- // need to replace this with a custom empty weapon at some point
- player.GiveWeapon( "mp_weapon_rocket_launcher" )
-
player.GiveOffhandWeapon( weapon.weapon, weapon.offhandSlot, weapon.mods )
+
+ player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE, [ "allow_as_primary" ] )
+ player.SetActiveWeaponByName( "melee_pilot_emptyhanded" ) // Let the player use the melee in the primary slot, and then force equip it. Effectively gives them an empty hand.
}
else
+ {
player.GiveWeapon( weapon.weapon, weapon.mods )
-
- player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE )
+
+ player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE )
+ }
+
+ if ( currentWeaponIndex == weapons.len() - 1 )
+ {
+ Sv_GGEarnMeter_SetFinalIcon( player )
+
+ return
+ }
+
+ GunGameWeapon nextWeapon = weapons[ currentWeaponIndex + 1 ]
+ Sv_GGEarnMeter_SetWeaponIcon( player, nextWeapon.weapon )
}
void function OnWinnerDetermined()
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_sns.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_sns.gnut
new file mode 100644
index 000000000..f3b7d2eee
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_sns.gnut
@@ -0,0 +1,144 @@
+global function SNS_Init
+
+struct {
+ string score_leader_highlight = "enemy_boss_bounty" // highlight effect applied to person in 1st place
+ string offhand_weapon = "mp_weapon_thermite_grenade" // offhand weapon
+
+ bool reset_pulse_blade_cooldown_on_pulse_blade_kill = true
+
+ int wme_kill_value = 10
+ int offhand_kill_value = 10
+ int reset_kill_value = 5
+ int melee_kill_value = 5
+} file
+
+
+void function SNS_Init()
+{
+ SetShouldUseRoundWinningKillReplay( true )
+ ClassicMP_ForceDisableEpilogue( true )
+ SetLoadoutGracePeriodEnabled( false ) // prevent modifying loadouts with grace period
+ SetWeaponDropsEnabled( false )
+ Riff_ForceTitanAvailability( eTitanAvailability.Never )
+ Riff_ForceBoostAvailability( eBoostAvailability.Disabled )
+
+ AddCallback_OnPlayerKilled( OnPlayerKilled )
+ AddCallback_OnPlayerRespawned( OnPlayerRespawned )
+ AddCallback_GameStateEnter( eGameState.WinnerDetermined, OnWinnerDetermined )
+}
+
+void function OnPlayerKilled( entity victim, entity attacker, var damageInfo )
+{
+ if ( victim != attacker && victim.IsPlayer() && attacker.IsPlayer() && GetGameState() == eGameState.Playing )
+ {
+ SetRoundWinningKillReplayAttacker(attacker)
+ if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.mp_weapon_grenade_sonar || DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.human_execution)
+ {
+ if (victim == GetWinningPlayer())
+ {
+ foreach ( entity otherPlayer in GetPlayerArray() )
+ {
+ if (otherPlayer == victim)
+ continue
+ Remote_CallFunction_NonReplay( otherPlayer, "ServerCallback_AnnounceKillLeaderBankrupt", victim.GetEncodedEHandle(), attacker.GetEncodedEHandle() )
+ }
+ }
+ if (file.reset_pulse_blade_cooldown_on_pulse_blade_kill)
+ {
+ attacker.TakeWeaponNow( "mp_weapon_grenade_sonar" ) // resets cooldown if you kill with it
+ attacker.GiveOffhandWeapon( "mp_weapon_grenade_sonar", OFFHAND_LEFT )
+ }
+
+ EmitSoundOnEntityOnlyToPlayer( attacker, attacker, "UI_CTF_3P_TeamGrabFlag" )
+ bankrupt(victim, attacker)
+
+ AddTeamScore( attacker.GetTeam(), file.reset_kill_value )
+ attacker.AddToPlayerGameStat( PGS_ASSAULT_SCORE, file.reset_kill_value )
+ attacker.AddToPlayerGameStat( PGS_TITAN_KILLS, 1 )
+ }
+ else if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.melee_pilot_emptyhanded )
+ {
+ AddTeamScore( attacker.GetTeam(), file.melee_kill_value )
+ attacker.AddToPlayerGameStat( PGS_ASSAULT_SCORE, file.melee_kill_value )
+ }
+ else if ( DamageInfo_GetDamageSourceIdentifier( damageInfo ) == eDamageSourceId.mp_weapon_wingman_n )
+ {
+ AddTeamScore( attacker.GetTeam(), file.wme_kill_value )
+ attacker.AddToPlayerGameStat( PGS_ASSAULT_SCORE, file.wme_kill_value )
+ }
+ else
+ {
+ AddTeamScore( attacker.GetTeam(), file.offhand_kill_value )
+ attacker.AddToPlayerGameStat( PGS_ASSAULT_SCORE, file.offhand_kill_value )
+ }
+
+ if (attacker == GetWinningPlayer())
+ SetHighlight( attacker )
+ }
+}
+
+void function bankrupt(entity player, entity attacker) {
+ while (GameRules_GetTeamScore(player.GetTeam()) > 0) {
+ AddTeamScore( player.GetTeam(), -1 )
+ }
+ player.SetPlayerGameStat( PGS_ASSAULT_SCORE, 0)
+
+ Remote_CallFunction_NonReplay( player , "ServerCallback_AnnounceBankrupt", attacker.GetEncodedEHandle() )
+ EmitSoundOnEntityOnlyToPlayer( player, player, "UI_InGame_MarkedForDeath_PlayerMarked" )
+}
+
+void function OnWinnerDetermined()
+{
+ SetRespawnsEnabled( false )
+ SetKillcamsEnabled( false )
+}
+
+void function OnPlayerRespawned( entity player )
+{
+ foreach ( entity weapon in player.GetMainWeapons() )
+ player.TakeWeaponNow( weapon.GetWeaponClassName() )
+
+ foreach ( entity weapon in player.GetOffhandWeapons() )
+ player.TakeWeaponNow( weapon.GetWeaponClassName() )
+
+ array<string> mods = ["sns", "pas_fast_ads", "tactical_cdr_on_kill", "pas_run_and_gun", "pas_fast_swap"]
+ player.GiveWeapon( "mp_weapon_wingman_n", mods)
+ player.GiveOffhandWeapon( "melee_pilot_emptyhanded", OFFHAND_MELEE )
+ player.GiveOffhandWeapon( file.offhand_weapon, OFFHAND_RIGHT )
+ player.GiveOffhandWeapon( "mp_weapon_grenade_sonar", OFFHAND_LEFT )
+
+ if (player == GetWinningPlayer())
+ SetHighlight( player )
+
+ thread OnPlayerRespawned_Threaded( player )
+}
+
+void function OnPlayerRespawned_Threaded( entity player )
+{
+ // bit of a hack, need to rework earnmeter code to have better support for completely disabling it
+ // rn though this just waits for earnmeter code to set the mode before we set it back
+ WaitFrame()
+ if ( IsValid( player ) )
+ PlayerEarnMeter_SetMode( player, eEarnMeterMode.DISABLED )
+}
+
+entity function GetWinningPlayer()
+{
+ entity bestplayer
+
+ foreach ( entity player in GetPlayerArray() ) {
+ if (bestplayer == null)
+ bestplayer = player
+
+ if (GameRules_GetTeamScore(player.GetTeam()) > GameRules_GetTeamScore(bestplayer.GetTeam()))
+ bestplayer = player
+ }
+
+ return bestplayer
+}
+
+void function SetHighlight(entity player) {
+ foreach ( entity player in GetPlayerArray() )
+ Highlight_ClearEnemyHighlight(player)
+ Highlight_SetEnemyHighlight( player, file.score_leader_highlight )
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_gg.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_gg.gnut
index de8a34491..6f4e015ec 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_gg.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_gg.gnut
@@ -23,4 +23,6 @@ void function ClGamemodeGG_Init()
RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_IMC )
RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_MILITIA )
+
+ Cl_GGEarnMeter_Init()
} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_sns.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_sns.gnut
new file mode 100644
index 000000000..f91c42556
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/cl_gamemode_sns.gnut
@@ -0,0 +1,55 @@
+global function ClGameModeSNS_Init
+global function ServerCallback_AnnounceKillLeaderBankrupt
+global function ServerCallback_AnnounceBankrupt
+
+void function ClGameModeSNS_Init()
+{
+ ClGameState_RegisterGameStateAsset( $"ui/gamestate_info_ffa.rpak" )
+
+ // add music for mode, this is copied directly from the ffa/fra music registered in cl_music.gnut
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_freeagents_intro", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_INTRO, "music_mp_freeagents_intro", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_freeagents_outro_win", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_WIN, "music_mp_freeagents_outro_win", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_freeagents_outro_lose", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_DRAW, "music_mp_freeagents_outro_lose", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_freeagents_outro_lose", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LOSS, "music_mp_freeagents_outro_lose", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_THREE_MINUTE, "music_mp_freeagents_almostdone", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_THREE_MINUTE, "music_mp_freeagents_almostdone", TEAM_MILITIA )
+
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_IMC )
+ RegisterLevelMusicForTeam( eMusicPieceID.LEVEL_LAST_MINUTE, "music_mp_freeagents_lastminute", TEAM_MILITIA )
+ AddCallback_GameStateEnter( eGameState.Postmatch, DisplayPostMatchTop3 )
+}
+
+void function ServerCallback_AnnounceKillLeaderBankrupt( int leaderEHandle, int killerEHandle )
+{
+ entity player = GetEntityFromEncodedEHandle( leaderEHandle )
+ entity killer = GetEntityFromEncodedEHandle( killerEHandle )
+ AnnouncementData announcement = Announcement_Create( "#SNS_LEADER_BANKRUPT" )
+ Announcement_SetSubText( announcement, Localize( "#SNS_LEADER_BANKRUPT_SUB", player.GetPlayerName(), killer.GetPlayerName()))
+ Announcement_SetTitleColor( announcement, <1,1,0> )
+ Announcement_SetPurge( announcement, true )
+ Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc
+ Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK )
+ Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK )
+ AnnouncementFromClass( GetLocalViewPlayer(), announcement )
+}
+
+void function ServerCallback_AnnounceBankrupt(int killerEHandle)
+{
+ entity killer = GetEntityFromEncodedEHandle( killerEHandle )
+ AnnouncementData announcement = Announcement_Create( "#SNS_BANKRUPT" )
+ Announcement_SetSubText( announcement, Localize( "#SNS_BANKRUPT_SUB", killer.GetPlayerName() ))
+ Announcement_SetTitleColor( announcement, <1,0,0> )
+ Announcement_SetPurge( announcement, true )
+ Announcement_SetPriority( announcement, 200 ) //Be higher priority than Titanfall ready indicator etc
+ Announcement_SetSoundAlias( announcement, SFX_HUD_ANNOUNCE_QUICK )
+ Announcement_SetStyle( announcement, ANNOUNCEMENT_STYLE_QUICK )
+ AnnouncementFromClass( GetLocalViewPlayer(), announcement )
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/_gg_earn_meter.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/_gg_earn_meter.gnut
new file mode 100644
index 000000000..1d4e73b73
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/_gg_earn_meter.gnut
@@ -0,0 +1,56 @@
+global function Sv_GGEarnMeter_SetWeaponIcon
+global function Sv_GGEarnMeter_SetFinalIcon
+global function Sv_GGEarnMeter_SetPercentage
+global function Sv_GGEarnMeter_AddPercentage
+global function AddCallback_GGEarnMeterFull
+
+struct
+{
+ array< bool functionref( entity ) > onGGEarnMeterFullCallbacks
+} file
+
+void function Sv_GGEarnMeter_SetWeaponIcon( entity player, string weaponReference )
+{
+ Remote_CallFunction_Replay( player, "ServerCallback_GGEarnMeter_SetWeaponIcon", eDamageSourceId[weaponReference] )
+}
+
+void function Sv_GGEarnMeter_SetFinalIcon( entity player )
+{
+ Remote_CallFunction_Replay( player, "ServerCallback_GGEarnMeter_SetWeaponIcon", -1 )
+}
+
+void function Sv_GGEarnMeter_SetPercentage( entity player, float percentage )
+{
+ player.SetPlayerNetFloat( "gunGameLevelPercentage", clamp(percentage, 0.0, 1.0) )
+
+ thread CheckPercentage( player )
+}
+
+void function Sv_GGEarnMeter_AddPercentage( entity player, float percentage )
+{
+ Sv_GGEarnMeter_SetPercentage(player, player.GetPlayerNetFloat( "gunGameLevelPercentage") + percentage)
+}
+
+void function AddCallback_GGEarnMeterFull( bool functionref( entity ) callbackFunc )
+{
+ Assert( !file.onGGEarnMeterFullCallbacks.contains( callbackFunc ), "Already added " + FunctionToString( callbackFunc ) + " with AddCallback_GGEarnMeterFull" )
+
+ file.onGGEarnMeterFullCallbacks.append( callbackFunc )
+}
+
+void function CheckPercentage( entity player )
+{
+ float percentage = player.GetPlayerNetFloat( "gunGameLevelPercentage")
+
+ if ( percentage < 1.0 )
+ return
+
+ wait 0.2
+
+ bool lastWeapon = false
+ foreach ( callbackFunc in file.onGGEarnMeterFullCallbacks )
+ lastWeapon = callbackFunc( player )
+
+ if ( !lastWeapon )
+ Sv_GGEarnMeter_SetPercentage(player, 0.0)
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/cl_gg_earn_meter.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/cl_gg_earn_meter.gnut
new file mode 100644
index 000000000..d6369b0cf
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/cl_gg_earn_meter.gnut
@@ -0,0 +1,82 @@
+global function Cl_GGEarnMeter_Init
+global function Cl_GGEarnMeter_RegisterNetwork
+global function ServerCallback_GGEarnMeter_SetWeaponIcon
+
+const float FILL_ANIM_DURATION = 0.2
+
+struct EarnChangeData
+{
+ float startValue = 0.0
+ float endValue = 0.0
+ float updateTime = 0.0
+}
+
+struct {
+ EarnChangeData lastEarnedData
+ var earnMeterRui
+} file
+
+void function Cl_GGEarnMeter_Init()
+{
+ AddCallback_OnClientScriptInit( CreateGGEarnMeterUI )
+}
+
+void function CreateGGEarnMeterUI( entity player )
+{
+ file.earnMeterRui = CreateCockpitRui( $"ui/earn_meter.rpak" )
+
+ RuiSetFloat( file.earnMeterRui, "fillAnimDuration", FILL_ANIM_DURATION )
+ RuiSetGameTime( file.earnMeterRui, "lastEarnChangeTime", RUI_BADGAMETIME )
+ RuiSetFloat( file.earnMeterRui, "earnedStartFrac", 0.0 )
+ RuiSetInt( file.earnMeterRui, "meterMode", 5 )
+
+ RuiTrackFloat( file.earnMeterRui, "earnedFrac", player, RUI_TRACK_SCRIPT_NETWORK_VAR, GetNetworkedVariableIndex( "gunGameLevelPercentage" ) )
+}
+
+void function Cl_GGEarnMeter_RegisterNetwork()
+{
+ RegisterNetworkedVariableChangeCallback_float( "gunGameLevelPercentage", GunGamePercentageUpdate )
+}
+
+void function GunGamePercentageUpdate( entity player, float oldValue, float newValue, bool actuallyChanged )
+{
+ if ( !actuallyChanged )
+ return
+
+ float currentValue = Cl_GGEarnMeter_GetCurrentMeterValue( file.lastEarnedData )
+ RuiSetGameTime( file.earnMeterRui, "lastEarnChangeTime", Time() )
+ RuiSetFloat( file.earnMeterRui, "earnedStartFrac", currentValue )
+
+ file.lastEarnedData.startValue = oldValue
+ file.lastEarnedData.endValue = newValue
+ file.lastEarnedData.updateTime = Time()
+}
+
+float function Cl_GGEarnMeter_GetCurrentMeterValue( EarnChangeData earnData )
+{
+ float elapsedTime = Time() - earnData.updateTime
+ float delta = earnData.endValue - earnData.startValue
+ return earnData.endValue - (delta * EaseIn( GraphCapped( elapsedTime, 0.0, FILL_ANIM_DURATION, 1.0, 0.0 ) ) )
+}
+
+void function ServerCallback_GGEarnMeter_SetWeaponIcon( int damageSourceId )
+{
+ asset weaponImage
+
+ if ( damageSourceId > -1 )
+ {
+ if ( !DamageSourceIDHasString(damageSourceId) )
+ {
+ return
+ }
+
+ weaponImage = GetItemImage( DamageSourceIDToString( damageSourceId ) )
+ }
+ else
+ {
+ weaponImage = RandomFloat( 1 ) > 0.1 ? $"rui/menu/boosts/boost_icon_random" : $"rui/faction/faction_logo_mrvn"
+ }
+
+ RuiSetImage( file.earnMeterRui, "goalBuildingIcon", weaponImage )
+ RuiSetImage( file.earnMeterRui, "goalReadyIcon", weaponImage )
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/sh_gg_earn_meter.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/sh_gg_earn_meter.gnut
new file mode 100644
index 000000000..0428ecfa7
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/gg_earn_meter/sh_gg_earn_meter.gnut
@@ -0,0 +1,16 @@
+global function Sh_GGEarnMeter_Init
+
+void function Sh_GGEarnMeter_Init()
+{
+ AddCallback_OnRegisteringCustomNetworkVars( RegisterSharedNetwork )
+}
+
+void function RegisterSharedNetwork()
+{
+ RegisterNetworkedVariable( "gunGameLevelPercentage", SNDC_PLAYER_EXCLUSIVE, SNVT_FLOAT_RANGE, 0.0, 0.0, 1.0 )
+ Remote_RegisterFunction( "ServerCallback_GGEarnMeter_SetWeaponIcon" )
+
+ #if CLIENT
+ Cl_GGEarnMeter_RegisterNetwork()
+ #endif
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut
index c4021a3cc..42d264d93 100644
--- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_gg.gnut
@@ -18,6 +18,9 @@ void function Sh_GamemodeGG_Init()
{
// create custom gamemode
AddCallback_OnCustomGamemodesInit( CreateGamemodeGG )
+
+ if ( GAMETYPE != GAMEMODE_GG )
+ Sh_GGEarnMeter_Init()
}
void function CreateGamemodeGG()
@@ -30,119 +33,122 @@ void function CreateGamemodeGG()
GameMode_AddScoreboardColumnData( GAMEMODE_GG, "#SCOREBOARD_SCORE", PGS_ASSAULT_SCORE, 2 )
GameMode_AddScoreboardColumnData( GAMEMODE_GG, "#SCOREBOARD_PILOT_KILLS", PGS_PILOT_KILLS, 2 )
GameMode_SetColor( GAMEMODE_GG, [147, 204, 57, 255] )
-
+
AddPrivateMatchMode( GAMEMODE_GG ) // add to private lobby modes
-
+ AddPrivateMatchModeSettingArbitrary( "#GAMEMODE_gg", "gg_kill_reward", "1.0" )
+ AddPrivateMatchModeSettingArbitrary( "#GAMEMODE_gg", "gg_assist_reward", "0.0" )
+ AddPrivateMatchModeSettingArbitrary( "#GAMEMODE_gg", "gg_execution_reward", "1.0" )
+
// setup guns
-
+
// smgs
// car
GunGameWeapon ggCar = { weapon = "mp_weapon_car", mods = [ "pas_run_and_gun" ], ... }
file.weapons.append( ggCar )
-
+
// alternator
GunGameWeapon ggAlternator = { weapon = "mp_weapon_alternator_smg", mods = [ "pas_run_and_gun" ], ... }
file.weapons.append( ggAlternator )
-
+
// volt
GunGameWeapon ggVolt = { weapon = "mp_weapon_hemlok_smg", ... }
file.weapons.append( ggVolt )
-
-
+
+
// rifles
// hemlok
GunGameWeapon ggHemlok = { weapon = "mp_weapon_hemlok", mods = [ ], ... }
file.weapons.append( ggHemlok )
-
+
// flatline
GunGameWeapon ggFlatline = { weapon = "mp_weapon_vinson", mods = [ "hcog" ], ... }
file.weapons.append( ggFlatline )
-
+
// r201
GunGameWeapon ggR101 = { weapon = "mp_weapon_rspn101", ... }
file.weapons.append( ggR101 )
-
-
+
+
// lmgs
// devotion
GunGameWeapon ggDevotion = { weapon = "mp_weapon_esaw", ... }
file.weapons.append( ggDevotion )
-
+
// l-star
GunGameWeapon ggLstar = { weapon = "mp_weapon_lstar", mods = [ "pas_run_and_gun" ], ... }
if ( RandomInt( 100 ) <= 5 )
ggLstar.mods.append( "rcee" ) // easter egg mod that changes the screen of the lstar
-
+
file.weapons.append( ggLstar )
-
-
+
+
// shotguns
// eva-8
GunGameWeapon ggEva = { weapon = "mp_weapon_shotgun", ... }
file.weapons.append( ggEva )
-
+
// mastiff
GunGameWeapon ggMastiff = { weapon = "mp_weapon_mastiff", ... }
file.weapons.append( ggMastiff )
-
-
+
+
// grenadiers
// softball
GunGameWeapon ggSoftball = { weapon = "mp_weapon_softball", ... }
file.weapons.append( ggSoftball )
-
+
// epg
GunGameWeapon ggEpg = { weapon = "mp_weapon_epg", mods = [ "jump_kit" ], ... }
file.weapons.append( ggEpg )
-
-
+
+
// primary pistols
// mozambique
GunGameWeapon ggMozam = { weapon = "mp_weapon_shotgun_pistol", mods = [ "pas_run_and_gun" ], ... }
file.weapons.append( ggMozam )
-
+
// wingman elite
GunGameWeapon ggWme = { weapon = "mp_weapon_wingman_n", mods = [ "pas_run_and_gun", "ricochet" ], ... }
file.weapons.append( ggWme )
-
-
+
+
// snipers
// double take
GunGameWeapon ggTaketake = { weapon = "mp_weapon_doubletake", ... }
file.weapons.append( ggTaketake )
-
+
// kraber
GunGameWeapon ggKraber = { weapon = "mp_weapon_sniper", mods = [ "pas_fast_ads", "ricochet" ], ... }
file.weapons.append( ggKraber )
-
-
+
+
// secondary pistols
// re-45
GunGameWeapon ggRe45 = { weapon = "mp_weapon_autopistol", mods = [ "pas_run_and_gun", "temp_sight" ], ... }
file.weapons.append( ggRe45 )
-
+
// p2016
GunGameWeapon ggP2016 = { weapon = "mp_weapon_semipistol", mods = [ "pas_run_and_gun" ], ... }
file.weapons.append( ggP2016 )
-
+
// wingman
GunGameWeapon ggWingman = { weapon = "mp_weapon_wingman", mods = [ "pas_run_and_gun" ], ... }
file.weapons.append( ggWingman )
-
-
+
+
// final/special weapons
// charge rifle
GunGameWeapon ggChargeRifle = { weapon = "mp_weapon_defender", ... }
file.weapons.append( ggChargeRifle )
-
+
// pulse blade
- GunGameWeapon ggPulseBlade = { weapon = "mp_weapon_grenade_sonar", mods = [ "pas_power_cell", "amped_tacticals" ], offhandSlot = 0 }
+ GunGameWeapon ggPulseBlade = { weapon = "mp_weapon_grenade_sonar", mods = [ "pas_power_cell", "amped_tacticals" ], offhandSlot = OFFHAND_SPECIAL }
file.weapons.append( ggPulseBlade )
-
-
+
+
// set this to the number of guns
GameMode_SetDefaultScoreLimits( GAMEMODE_GG, file.weapons.len(), 0 )
-
+
#if SERVER
GameMode_AddServerInit( GAMEMODE_GG, GamemodeGG_Init )
GameMode_AddServerInit( GAMEMODE_GG, GamemodeFFAShared_Init )
diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut
new file mode 100644
index 000000000..b3d2c2da3
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/sh_gamemode_sns.gnut
@@ -0,0 +1,51 @@
+globalize_all_functions
+
+global array<var> consoleVars;
+global const string GAMEMODE_SNS = "sns"
+
+void function SNSMode_Init()
+{
+ AddCallback_OnCustomGamemodesInit( CreateGamemodeSNS )
+ AddCallback_OnRegisteringCustomNetworkVars( SNSRegisterNetworkVars )
+}
+
+
+void function CreateGamemodeSNS()
+{
+ GameMode_Create( GAMEMODE_SNS )
+ GameMode_SetName( GAMEMODE_SNS, "#GAMEMODE_SNS" )
+ GameMode_SetDesc( GAMEMODE_SNS, "#PL_sns_desc" )
+ GameMode_SetGameModeAnnouncement( GAMEMODE_SNS, "ffa_modeDesc" )
+ GameMode_SetDefaultTimeLimits( GAMEMODE_SNS, 15, 0.0 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_SNS, "#SCOREBOARD_SCORE", PGS_ASSAULT_SCORE, 2 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_SNS, "#SCOREBOARD_PILOT_KILLS", PGS_PILOT_KILLS, 2 )
+ GameMode_AddScoreboardColumnData( GAMEMODE_SNS, "#SCOREBOARD_BANKRUPTS", PGS_TITAN_KILLS, 2 )
+ GameMode_SetColor( GAMEMODE_SNS, [147, 204, 57, 255] )
+
+ AddPrivateMatchMode( GAMEMODE_SNS ) // add to private lobby modes
+
+ GameMode_SetDefaultScoreLimits( GAMEMODE_SNS, 300, 0 )
+
+ #if SERVER
+ GameMode_AddServerInit( GAMEMODE_SNS, SNS_Init )
+ GameMode_AddServerInit( GAMEMODE_SNS, GamemodeFFAShared_Init )
+ GameMode_SetPilotSpawnpointsRatingFunc( GAMEMODE_SNS, RateSpawnpoints_Generic )
+ GameMode_SetTitanSpawnpointsRatingFunc( GAMEMODE_SNS, RateSpawnpoints_Generic )
+ #elseif CLIENT
+ GameMode_AddClientInit( GAMEMODE_SNS, ClGameModeSNS_Init )
+ GameMode_AddClientInit( GAMEMODE_SNS, GamemodeFFAShared_Init )
+ GameMode_AddClientInit( GAMEMODE_SNS, ClGamemodeFFA_Init )
+ #endif
+ #if !UI
+ GameMode_SetScoreCompareFunc( GAMEMODE_SNS, CompareAssaultScore )
+ GameMode_AddSharedInit( GAMEMODE_SNS, GamemodeFFA_Dialogue_Init )
+ #endif
+}
+
+void function SNSRegisterNetworkVars()
+{
+ if ( GAMETYPE != GAMEMODE_SNS )
+ return
+ Remote_RegisterFunction( "ServerCallback_AnnounceBankrupt" )
+ Remote_RegisterFunction( "ServerCallback_AnnounceKillLeaderBankrupt" )
+} \ No newline at end of file
diff --git a/Northstar.Custom/mod/scripts/vscripts/weapons/mp_weapon_peacekraber.nut b/Northstar.Custom/mod/scripts/vscripts/weapons/mp_weapon_peacekraber.nut
index a9da541f9..b910cff30 100644
--- a/Northstar.Custom/mod/scripts/vscripts/weapons/mp_weapon_peacekraber.nut
+++ b/Northstar.Custom/mod/scripts/vscripts/weapons/mp_weapon_peacekraber.nut
@@ -5,6 +5,7 @@ untyped
global function OnWeaponPrimaryAttack_peacekraber;
global function OnWeaponDeactivate_peacekraber
global function OnWeaponActivate_peacekraber
+global function OnWeaponOwnerChanged_weapon_peacekraber
#if SERVER
global function OnWeaponNpcPrimaryAttack_peacekraber
@@ -47,8 +48,19 @@ void function OnWeaponActivate_peacekraber (entity weapon) {
void function OnWeaponDeactivate_peacekraber (entity weapon) {
#if CLIENT
+ if (!IsValid( weapon.GetWeaponOwner() )) return
if (!weapon.GetWeaponOwner().IsPlayer() || weapon.GetWeaponOwner() != GetLocalViewPlayer()) return;
- isWeaponActive = false;
+ isWeaponActive = false
+ #endif
+}
+
+void function OnWeaponOwnerChanged_weapon_peacekraber (entity weapon, WeaponOwnerChangedParams changeParams)
+{
+ #if CLIENT
+ if (changeParams.oldOwner == GetLocalViewPlayer())
+ {
+ isWeaponActive = false
+ }
#endif
}
#if CLIENT
@@ -60,7 +72,11 @@ void function CrosshairCycle() {
int chargeLevel;
float chargeFrac;
while (isWeaponActive) {
- WaitFrame()
+ if (!IsValid( clientWeapon ))
+ {
+ isWeaponActive = false
+ continue
+ }
chargeLevel = clientWeapon.GetWeaponChargeLevel();
chargeFrac = clientWeapon.GetWeaponChargeFraction();
RuiSetFloat3(rui, "teamColor", colors[chargeLevel]);
@@ -89,6 +105,7 @@ void function CrosshairCycle() {
default:
break;
}
+ WaitFrame()
}
RuiDestroy(rui);
@@ -159,4 +176,4 @@ function FireWeaponPlayerAndNPC( WeaponPrimaryAttackParams attackParams, bool pl
}
return 1
-} \ No newline at end of file
+}
diff --git a/Northstar.Custom/mod/scripts/weapons/melee_pilot_kunai.txt b/Northstar.Custom/mod/scripts/weapons/melee_pilot_kunai.txt
index e8b7c181a..2faff2e28 100644
--- a/Northstar.Custom/mod/scripts/weapons/melee_pilot_kunai.txt
+++ b/Northstar.Custom/mod/scripts/weapons/melee_pilot_kunai.txt
@@ -145,5 +145,10 @@ WeaponData
"melee_damage" "5"
"impulse_force" "50000"
}
+ allow_as_primary
+ {
+ "fire_mode" "offhand_melee_hybrid"
+ "attack_button_presses_melee" "1"
+ }
}
}
diff --git a/Northstar.Custom/mod/scripts/weapons/mp_titanweapon_predator_cannon.txt b/Northstar.Custom/mod/scripts/weapons/mp_titanweapon_predator_cannon.txt
new file mode 100644
index 000000000..81919e435
--- /dev/null
+++ b/Northstar.Custom/mod/scripts/weapons/mp_titanweapon_predator_cannon.txt
@@ -0,0 +1,722 @@
+// NOTE: This doesn't change anything about the predator cannon. This only gives more room for making custom mods.
+// (previously max. 5 changes in weapon mod before crashing, now 30)
+WeaponData
+{
+ // General
+ "printname" "#WPN_TITAN_PREDATOR_CANNON"
+ "shortprintname" "#WPN_TITAN_PREDATOR_CANNON_SHORT"
+ "description" "#WPN_TITAN_PREDATOR_CANNON_DESC"
+ "longdesc" "#WPN_TITAN_PREDATOR_CANNON_LONGDESC"
+
+ "leveled_pickup" "1"
+
+ "menu_icon" "r2_ui/menus/loadout_icons/titan_weapon/titan_weapon_predator"
+ "hud_icon" "r2_ui/menus/loadout_icons/titan_weapon/titan_weapon_predator"
+
+ "weaponClass" "titan"
+ "pickup_hold_prompt" "Hold [USE] [WEAPONNAME]"
+ "pickup_press_prompt" "[USE] [WEAPONNAME]"
+ "minimap_reveal_distance" "32000"
+
+ "OnWeaponActivate" "OnWeaponActivate_titanweapon_predator_cannon"
+ "OnWeaponDeactivate" "OnWeaponDeactivate_titanweapon_predator_cannon"
+ "OnWeaponPrimaryAttack" "OnWeaponPrimaryAttack_titanweapon_predator_cannon"
+ "OnWeaponNpcPrimaryAttack" "OnWeaponNpcPrimaryAttack_titanweapon_predator_cannon"
+ "OnWeaponStartZoomIn" "OnWeaponStartZoomIn_titanweapon_predator_cannon"
+ "OnWeaponStartZoomOut" "OnWeaponStartZoomOut_titanweapon_predator_cannon"
+ "OnWeaponOwnerChanged" "OnWeaponOwnerChanged_titanweapon_predator_cannon"
+ "OnWeaponNpcPreAttack" "OnWeaponNpcPreAttack_titanweapon_predator_cannon"
+
+ // Menu Stats
+ "stat_damage" "65"
+ "stat_range" "75"
+ "stat_accuracy" "80"
+ "stat_rof" "75"
+ "ads_dof_disable" "1"
+
+ // Models
+ "viewmodel" "models/weapons/titan_predator/atpov_titan_predator.mdl"
+ "playermodel" "models/weapons/titan_predator/w_titan_predator.mdl"
+
+ "fire_rate" "15"
+
+ MP_BASE
+ {
+ "damage_near_value" "35"
+ "damage_far_value" "25"
+ "damage_near_value_titanarmor" "100"
+ "damage_far_value_titanarmor" "72"
+ "explosion_damage" "0"
+ "explosion_inner_radius" "0"
+ "explosionradius" "0"
+
+ "deploy_time" "0.85"
+
+ "ammo_clip_size" "100"
+
+ "enable_highlight_networking_on_creation" "<KEEP_DEFAULT>"
+ }
+
+ SP_BASE
+ {
+ "damage_near_value" "110"
+ "damage_far_value" "100"
+ "damage_near_value_titanarmor" "130"
+ "damage_far_value_titanarmor" "100"
+ "explosion_damage" "50"
+ "explosion_inner_radius" "50"
+ "explosionradius" "100"
+
+ "deploy_time" "1.75"
+
+ "ammo_clip_size" "150"
+
+ "enable_highlight_networking_on_creation" "1"
+ }
+
+ "ammo_min_to_fire" "1"
+ "explosion_damage_heavy_armor" "0"
+
+ "damage_near_distance" "1200"
+ "damage_far_distance" "1800"
+ "npc_damage_near_value" "52"
+ "npc_damage_far_value" "37"
+ "npc_damage_near_value_titanarmor" "150" // need to compensate for NPCs not firing as fast as players (1 shot per frame max)
+ "npc_damage_far_value_titanarmor" "108" // need to compensate for NPCs not firing as fast as players (1 shot per frame max)
+
+ "ammo_no_remove_from_stockpile" "1"
+
+ // Effects
+ "tracer_effect" "P_weapon_tracers_predator"
+ "tracer_effect_first_person" "P_weapon_tracers_predator"
+ "impact_effect_table" "predator_bullet"
+ "vortex_absorb_effect" "wpn_vortex_projectile_20mm_FP"
+ "vortex_absorb_effect_third_person" "wpn_vortex_projectile_20mm"
+ "vortex_absorb_sound" "Vortex_Shield_AbsorbBulletLarge"
+ "vortex_absorb_sound_1p_vs_3p" "Vortex_Shield_AbsorbBulletLarge_1P_VS_3P"
+ "vortex_drain" "0.0"
+ "projectile_adjust_to_gun_barrel" "1"
+ //For long range power shot
+ "projectilemodel" "models/weapons/bullets/projectile_40mm.mdl"
+ "bolt_hitsize" "12.0"
+
+ "fx_shell_eject_view" "wpn_shelleject_20mm_FP"
+ "fx_shell_eject_world" "wpn_shelleject_20mm"
+ "fx_shell_eject_attach" "shell"
+
+ "fx_muzzle_flash_view" "P_muzzleflash_predator_FP"
+ "fx_muzzle_flash_world" "P_muzzleflash_predator"
+ "fx_muzzle_flash_attach" "muzzle_flash"
+
+ // Sound
+ "looping_sounds" "1"
+ "fire_sound_1_player_1p" "Weapon_Predator_SecondShot_1P"
+ "fire_sound_1_player_3p" "Weapon_Predator_SecondShot_3P"
+ "fire_sound_1_npc" "Weapon_Predator_SecondShot_3P"
+ "fire_sound_2" ""
+ "sound_dryfire" "titan_dryfire"
+
+ "low_ammo_sound_name_1" "Predator_LowAmmo_Shot1"
+
+ "burst_or_looping_fire_sound_start_1p" "Weapon_Predator_FirstShot_1P"
+ "burst_or_looping_fire_sound_middle_1p" "Weapon_Predator_FireLoop_ShortRange_1P"
+ "burst_or_looping_fire_sound_end_1p" "Weapon_Predator_LoopEnd_1P"
+
+ "burst_or_looping_fire_sound_start_3p" ""
+ "burst_or_looping_fire_sound_middle_3p" "Weapon_Predator_FireLoop_ShortRange_3P"
+ "burst_or_looping_fire_sound_end_3p" ""
+
+ "burst_or_looping_fire_sound_start_npc" ""
+ "burst_or_looping_fire_sound_middle_npc" "Weapon_Predator_FireLoop_ShortRange_3P"
+ "burst_or_looping_fire_sound_end_npc" ""
+
+ // Network
+ "net_optimize" "1"
+
+ // Damage - When Used by Players
+ "damage_type" "bullet"
+
+
+ // Damage - When Used by NPCs
+ "npc_damage_near_distance" "1200"
+ "npc_damage_far_distance" "1500"
+
+ "impulse_force" "5000"
+ "critical_hit_damage_scale" "1.5"
+
+ // Ammo
+ "ammo_stockpile_max" "6000"
+ "ammo_default_total" "6000"
+
+ // Behavior
+ "ads_move_speed_scale" "0.55"
+
+ "zoom_time_in" "1.5"
+ "zoom_time_out" "0.75"
+ "zoom_fov" "75"
+ "reload_time" "4.6"
+ "reload_time_late1" "3.66"
+ "reload_time_late2" "2.13"
+ "reloadempty_time" "4.6"
+ "reloadempty_time_late1" "3.66"
+ "reloadempty_time_late2" "2.13"
+ "holster_time" ".45"
+ "lower_time" ".1"
+ "raise_time" ".4"
+ "vortex_refire_behavior" "bullet"
+ "allow_empty_fire" "0"
+ "reload_enabled" "1"
+ "allow_empty_click" "1"
+ "empty_reload_only" "0"
+ "trigger_snipercam" "1"
+ "allow_headshots" "1"
+ "headshot_distance" "5000"
+ "damage_headshot_scale" "1.5"
+ "critical_hit" "1"
+
+
+ "attack_button_presses_ads" "1"
+
+ // Spread
+ "spread_stand_hip" "3.4"
+ "spread_stand_hip_run" "3.4"
+ "spread_stand_hip_sprint" "3.4"
+ "spread_crouch_hip" "3.4"
+ "spread_air_hip" "3.4"
+ "spread_stand_ads" "3.4"
+ "spread_crouch_ads" "3.4"
+ "spread_air_ads" "4.4"
+
+ "spread_kick_on_fire_stand_hip" "0.1"
+ "spread_kick_on_fire_stand_ads" "0.1"
+ "spread_kick_on_fire_crouch_hip" "0.1"
+ "spread_kick_on_fire_crouch_ads" "0.1"
+ "spread_kick_on_fire_air_hip" "0.1"
+ "spread_kick_on_fire_air_ads" "0.1"
+
+ "spread_max_kick_stand_hip" "1.0"
+ "spread_max_kick_stand_ads" "1.0"
+ "spread_max_kick_crouch_hip" "1.0"
+ "spread_max_kick_crouch_ads" "1.0"
+ "spread_max_kick_air_hip" "1.0"
+ "spread_max_kick_air_ads" "1.0"
+
+ "spread_decay_rate" "4.5"
+ "spread_decay_delay" "0.05"
+
+ "ammo_suck_behavior" "primary_weapons"
+
+ // View Kick
+ "viewkick_spring" "lmg"
+
+ "viewkick_pitch_base" "0"
+ "viewkick_pitch_random" "0.46"
+ "viewkick_pitch_softScale" "0.65"
+ "viewkick_pitch_hardScale" "2"
+
+ "viewkick_yaw_base" "0"
+ "viewkick_yaw_random" "1.0"
+ "viewkick_yaw_softScale" "1.1"
+ "viewkick_yaw_hardScale" "1.35"
+
+ "viewkick_roll_base" "0.0"
+ "viewkick_roll_randomMin" "0.3"
+ "viewkick_roll_randomMax" "0.25"
+ "viewkick_roll_softScale" "0.2"
+ "viewkick_roll_hardScale" "1.75"
+
+ "viewkick_hipfire_weaponFraction" "0.7"
+ "viewkick_hipfire_weaponFraction_vmScale" "0.3"
+ "viewkick_ads_weaponFraction" "0.6"
+ "viewkick_ads_weaponFraction_vmScale" "0.7"
+
+ //"viewkick_scale_min_hipfire" "1.5"//0.6
+ //"viewkick_scale_max_hipfire" "2.0"//1.0
+ //"viewkick_scale_min_ads" "0.6"//0.3
+ //"viewkick_scale_max_ads" "1.6"//0.8
+ //"viewkick_scale_valuePerShot" "1"
+ //"viewkick_scale_valueLerpStart" "50"//5
+ //"viewkick_scale_valueLerpEnd" "150"//50
+ //"viewkick_scale_valueDecayDelay" "0.20"
+ //"viewkick_scale_valueDecayRate" "30"
+
+ "viewpunch_multiplier" "1.1"
+
+ // Bob
+ "bob_cycle_time" ".715"
+ "bob_vert_dist" "2"
+ "bob_horz_dist" "2.25"
+ "bob_max_speed" "150"
+ "bob_pitch" "0.5"
+ "bob_yaw" "-0.75"
+ "bob_roll" "-1.35"
+
+ // Bob
+ "bob_cycle_time_zoomed" ".8"
+ "bob_vert_dist_zoomed" ".5"
+ "bob_horz_dist_zoomed" "0.75"
+ "bob_max_speed_zoomed" "150"
+ "bob_pitch_zoomed" "0.5"
+ "bob_yaw_zoomed" "-0.75"
+ "bob_roll_zoomed" "-1.35"
+
+
+ // Rumble
+ "fire_rumble" "rumble_titan_minigun"
+
+ // Sway
+ "sway_rotate_attach" "SWAY_ROTATE"
+ "sway_min_x" "-0.5"
+ "sway_min_y" "-2"
+ "sway_min_z" "-2.7"
+ "sway_max_x" "0.5"
+ "sway_max_y" "2"
+ "sway_max_z" "2.7"
+ "sway_min_pitch" "-3"
+ "sway_min_yaw" "-2.5"
+ "sway_min_roll" "-4"
+ "sway_max_pitch" "3"
+ "sway_max_yaw" "2.5"
+ "sway_max_roll" "4"
+ "sway_translate_gain" "4"
+ "sway_rotate_gain" "4"
+ "sway_move_forward_translate_x" "-0.1"
+ "sway_move_forward_translate_z" "-2.7"
+ "sway_move_back_translate_x" "0.2"
+ "sway_move_back_translate_z" "-0.2"
+ "sway_move_left_translate_y" "-1"
+ "sway_move_left_translate_z" "-0.5"
+ "sway_move_left_rotate_roll" "0.4"
+ "sway_move_right_translate_y" "1"
+ "sway_move_right_translate_z" "-0.5"
+ "sway_move_right_rotate_roll" "-0.4"
+ "sway_move_up_translate_z" "1"
+ "sway_move_down_translate_z" "-1"
+ "sway_turn_left_rotate_yaw" "0.5"
+ "sway_turn_right_rotate_yaw" "-0.5"
+ "sway_turn_up_rotate_pitch" "-1"
+ "sway_turn_down_rotate_pitch" "1"
+
+ "sway_turn_left_translate_y" "-1"
+ "sway_turn_right_translate_y" "1"
+ "sway_turn_left_translate_x" "-2"
+ "sway_turn_right_translate_x" "2"
+ "sway_turn_up_translate_z" "-1"
+ "sway_turn_down_translate_z" "1"
+ "sway_turn_up_translate_x" "0.0"
+ "sway_turn_down_translate_x" "0.0"
+
+ "sway_turn_left_rotate_roll" "1"
+ "sway_turn_right_rotate_roll" "-1"
+ "sway_turn_up_rotate_pitch" "-3"
+ "sway_turn_down_rotate_pitch" "3"
+ "sway_turn_up_rotate_roll" "0.8"
+ "sway_turn_down_rotate_roll" "-0.8"
+
+ // Sway
+ "sway_rotate_attach_zoomed" "SWAY_ROTATE"
+ "sway_min_x_zoomed" "-0.5"
+ "sway_min_y_zoomed" "-2"
+ "sway_min_z_zoomed" "-2.7"
+ "sway_max_x_zoomed" "0.5"
+ "sway_max_y_zoomed" "2"
+ "sway_max_z_zoomed" "2.7"
+ "sway_min_pitch_zoomed" "-3"
+ "sway_min_yaw_zoomed" "-2.5"
+ "sway_min_roll_zoomed" "-4"
+ "sway_max_pitch_zoomed" "3"
+ "sway_max_yaw_zoomed" "2.5"
+ "sway_max_roll_zoomed" "4"
+ "sway_translate_gain_zoomed" "4"
+ "sway_rotate_gain_zoomed" "4"
+ "sway_move_forward_translate_x_zoomed" "-0.1"
+ "sway_move_forward_translate_z_zoomed" "-2.7"
+ "sway_move_back_translate_x_zoomed" "0.2"
+ "sway_move_back_translate_z_zoomed" "-0.2"
+ "sway_move_left_translate_y_zoomed" "-1"
+ "sway_move_left_translate_z_zoomed" "-0.5"
+ "sway_move_left_rotate_roll_zoomed" "0.4"
+ "sway_move_right_translate_y_zoomed" "1"
+ "sway_move_right_translate_z_zoomed" "-0.5"
+ "sway_move_right_rotate_roll_zoomed" "-0.4"
+ "sway_move_up_translate_z_zoomed" "1"
+ "sway_move_down_translate_z_zoomed" "-1"
+ "sway_turn_left_rotate_yaw_zoomed" "0.25"
+ "sway_turn_right_rotate_yaw_zoomed" "-0.25"
+ "sway_turn_up_rotate_pitch_zoomed" "-1"
+ "sway_turn_down_rotate_pitch_zoomed" "1"
+
+ "sway_turn_left_translate_y_zoomed" "-1"
+ "sway_turn_right_translate_y_zoomed" "1"
+ "sway_turn_left_translate_x_zoomed" "-2"
+ "sway_turn_right_translate_x_zoomed" "2"
+ "sway_turn_up_translate_z_zoomed" "-1"
+ "sway_turn_down_translate_z_zoomed" "1"
+ "sway_turn_up_translate_x_zoomed" "0.0"
+ "sway_turn_down_translate_x_zoomed" "0.0"
+
+ "sway_turn_left_rotate_roll_zoomed" "0.5"
+ "sway_turn_right_rotate_roll_zoomed" "-0.5"
+ "sway_turn_up_rotate_pitch_zoomed" "-3"
+ "sway_turn_down_rotate_pitch_zoomed" "3"
+ "sway_turn_up_rotate_roll_zoomed" "0.8"
+ "sway_turn_down_rotate_roll_zoomed" "-0.8"
+
+ // NPC
+ "proficiency_poor_spreadscale" "4.0"
+ "proficiency_poor_bias" "0.0"
+ "proficiency_average_spreadscale" "4.0"
+ "proficiency_average_bias" "0.25"
+ "proficiency_good_spreadscale" "3.0"
+ "proficiency_good_bias" "0.25"
+ "proficiency_very_good_spreadscale" "2.0"
+ "proficiency_very_good_bias" "0.5"
+ "proficiency_perfect_spreadscale" "1.5"
+
+ "npc_rest_time_between_bursts_min" "0.2"
+ "npc_rest_time_between_bursts_max" "0.4"
+ "npc_pre_fire_delay" "1.00"
+ "npc_pre_fire_delay_interval" "5.0"
+ "npc_min_range" "0"
+ "npc_max_range" "8000"
+
+ "npc_min_engage_range" "100"
+ "npc_max_engage_range" "4000"
+ "npc_min_engage_range_heavy_armor" "1500"
+ "npc_max_engage_range_heavy_armor" "4000"
+
+ "npc_min_burst" "20"
+ "npc_max_burst" "30"
+ "npc_full_auto_vs_heavy_armor" "0"
+ "npc_fire_at_enemy_defense_time" "2.5"
+ "npc_use_strict_muzzle_dir" "1"
+
+ // Crosshair
+ "red_crosshair_range" "1200"
+
+ // Bodygroups:
+ "clip_bodygroup" "titan_predator_magazine"
+ "clip_bodygroup_index_shown" "0"
+ "clip_bodygroup_index_hidden" "1"
+ "clip_bodygroup_show_for_milestone_0" "1"
+ "clip_bodygroup_show_for_milestone_1" "0"
+ "clip_bodygroup_show_for_milestone_2" "1"
+ "clip_bodygroup_show_for_milestone_3" "1"
+
+ "aimassist_disable_hipfire_humansonly" "1"
+ "aimassist_disable_ads_humansonly" "1"
+
+ "burst_fire_delay" "0.0666"
+ "smart_ammo_search_angle" "60"
+ "smart_ammo_search_distance" "3000"
+ "smart_ammo_search_npcs" "1"
+ "smart_ammo_search_players" "1"
+ "smart_ammo_search_projectiles" "0"
+ "smart_ammo_titans_block_los" "1"
+ "smart_ammo_new_target_delay" "0"
+ "smart_ammo_max_targets" "6"
+ "smart_ammo_alt_lock_style" "0"
+ "smart_ammo_max_targeted_burst" "12"
+ "smart_ammo_always_do_burst" "0"
+ "smart_ammo_targeting_time_min" "0.5"
+ "smart_ammo_targeting_time_max" "0.5"
+ "smart_ammo_target_max_locks_heavy" "1"
+ "smart_ammo_hud_lock_style" "default"
+ "smart_ammo_hud_type" "predator_cannon"
+ "smart_ammo_target_confirmed_sound" "Titan_Legion_Smart_Core_Target_Acquired_1P"
+ "smart_ammo_target_confirming_sound" "Titan_Legion_Smart_Core_LockingOn_1P"
+ "smart_ammo_target_found_sound" "Titan_Legion_Smart_Core_LockingOn_1P"
+ "smart_ammo_target_lost_sound" "Titan_Legion_Smart_Core_Unlocked_1P"
+ "smart_ammo_lock_type" "any"
+ "smart_ammo_allow_ads_lock" "0"
+ "smart_ammo_allow_hip_fire_lock" "0"
+ "smart_ammo_draw_acquisition_lines" "0"
+ "smart_ammo_titan_lock_point0" "SMART_AMMO_TORSO_FRONT"
+ "smart_ammo_titan_lock_point1" "SMART_AMMO_TORSO_BACK"
+ "smart_ammo_titan_lock_point2" "SMART_AMMO_LEG_LEFT"
+ "smart_ammo_titan_lock_point3" "SMART_AMMO_LEG_RIGHT"
+ "smart_ammo_titan_lock_point4" "SMART_AMMO_TORSO_BASE"
+ "smart_ammo_titan_lock_point5" "SMART_AMMO_HEAD"
+ "smart_ammo_titan_lock_point6" "SMART_AMMO_ARM_LEFT"
+ "smart_ammo_titan_lock_point7" "SMART_AMMO_ARM_RIGHT"
+ "smart_ammo_points_search_tick_interval" "6"
+ "smart_ammo_bounds_search_tick_interval" "6"
+ "ammo_no_remove_from_clip" "0"
+ "pass_through_depth" "0"
+ "pass_through_damage_preserved_scale" "1.0"
+
+
+ Mods
+ {
+ LongRangeAmmo
+ {
+ "rui_crosshair_index" "3"
+
+ "tracer_effect" "P_weapon_tracers_predator_alt"
+ "tracer_effect_first_person" "P_weapon_tracers_predator_alt"
+ "impact_effect_table" "predator_bullet_ALT"
+
+ "fx_muzzle_flash_view" "P_muzzleflash_predator_alt_FP"
+ "fx_muzzle_flash_world" "P_muzzleflash_predator_alt"
+
+ "spread_stand_ads" "0.4"
+ "spread_crouch_ads" "0.4"
+ "spread_air_ads" "0.4"
+ "zoom_fov" "40"
+
+ "viewkick_pitch_random" "0.15"
+ "viewkick_pitch_hardScale" "1.5"
+ "viewkick_pitch_softScale" "1.5"
+
+ "viewkick_yaw_random" "0.2"
+ "viewkick_yaw_hardScale" "2.5"
+ "viewkick_yaw_softScale" "1.0"
+
+ "damage_near_distance" "3000"
+ "damage_far_distance" "3250"
+ "npc_damage_near_distance" "3000"
+ "npc_damage_far_distance" "3250"
+
+ "burst_or_looping_fire_sound_middle_1p" "Weapon_Predator_FireLoop_LongRange_1P"
+
+ "burst_or_looping_fire_sound_middle_3p" "Weapon_Predator_FireLoop_LongRange_3P"
+
+ "burst_or_looping_fire_sound_middle_npc" "Weapon_Predator_FireLoop_LongRange_3P"
+
+ "npc_accuracy_multiplier_heavy_armor" "1.5"
+ "npc_accuracy_multiplier_npc" "1.5"
+ }
+ Smart_Core
+ {
+ "smart_ammo_allow_ads_lock" "1"
+ "smart_ammo_allow_hip_fire_lock" "1"
+ "smart_ammo_allow_search_while_firing" "1"
+ "ammo_no_remove_from_clip" "1"
+ "vortex_drain" "0.033"
+
+ //"npc_accuracy_multiplier_heavy_armor" "*2"
+ //"npc_accuracy_multiplier_npc" "*2"
+ "aimassist_disable_hipfire" "1"
+ "aimassist_disable_ads" "1"
+ }
+ CloseRangePowerShot
+ {
+ "fire_rumble" "rumble_titan_leadwall"
+
+ "rui_crosshair_index" "2"
+ "impact_effect_table" "predator_bullet_PS"
+ "spread_stand_hip" "16.0"
+ "spread_stand_hip_run" "16.0"
+ "spread_stand_hip_sprint" "16.0"
+ "spread_crouch_hip" "16.0"
+ "spread_air_hip" "16.0"
+ "spread_stand_ads" "16.0"
+ "spread_crouch_ads" "16.0"
+ "spread_air_ads" "16.0"
+ "damage_near_value" "200"
+ "damage_far_value" "50"
+ "damage_near_value_titanarmor" "2000"
+ "damage_far_value_titanarmor" "2000"
+ "damage_near_distance" "800"
+ "damage_far_distance" "1600"
+ "anim_alt_idleAttack" "1"
+ "fire_rate" "1.0"
+ "reload_enabled" "0"
+ "fx_muzzle_flash_view" "P_muzzleflash_predator_PS_FP"
+ "fx_muzzle_flash_world" "P_muzzleflash_predator_PS"
+ "fire_sound_1_player_1p" "" /////
+ "fire_sound_1_player_3p" "" // Playing these in script instead.
+ "fire_sound_1_npc" "" /////
+ "charge_time" "0.75"
+ "charge_cooldown_time" "0.0"
+ "charge_cooldown_delay" "0.0"
+ "charge_end_forces_fire" "1"
+ "charge_sound_1p" "Weapon_Predator_Powershot_ChargeUp_1P"
+ "charge_sound_3p" "Weapon_Predator_Powershot_ChargeUp_3P"
+ "charge_require_input" "0"
+ "charge_effect_1p" "P_predator_barrel_blur_glow_FP"
+ "charge_effect_3p" "P_predator_barrel_blur_glow"
+ "charge_rumble_min" "20"
+ "charge_rumble_max" "30"
+ "charge_effect_attachment" "fx_barrel"
+ "zoomfrac_autoattack" "1.0"
+ "npc_min_burst" "1"
+ "npc_max_burst" "1"
+ "npc_pre_fire_delay" "0.0"
+ "npc_pre_fire_delay_interval" "0.0"
+ "npc_charge_time_min" "0.75"
+ "npc_charge_time_max" "0.75"
+ "net_bullet_fix" "0"
+
+ "npc_accuracy_multiplier_heavy_armor" "3"
+ "npc_accuracy_multiplier_npc" "3"
+ }
+ pas_CloseRangePowerShot
+ {
+ "damage_near_value_titanarmor" "*0.85"
+ "damage_far_value_titanarmor" "*0.85"
+ }
+ fd_closerange_helper
+ {
+
+ }
+ fd_CloseRangePowerShot
+ {
+ //crosshair update
+ }
+ LongRangePowerShot
+ {
+ "fire_rumble" "rumble_titan_40mm"
+
+ "impact_effect_table" "predator_bullet_ps_alt"
+ "projectile_trail_effect_0" "P_proj_predator_alt_pwr"
+ "fx_muzzle_flash_view" "P_muzzleflash_predator_PS_FP_ALT"
+ "fx_muzzle_flash_world" "P_muzzleflash_predator_PS_ALT"
+ "fire_sound_1_player_1p" "" /////
+ "fire_sound_1_player_3p" "" // Playing these in script instead.
+ "fire_sound_1_npc" "" /////
+ "damage_near_value" "200"
+ "damage_far_value" "200"
+ "damage_near_value_titanarmor" "2000"
+ "damage_far_value_titanarmor" "2000"
+ "explosion_damage" "200"
+ "explosion_damage_heavy_armor" "1800"
+ "explosion_damages_owner" "1"
+ "explosion_inner_radius" "50"
+ "explosionradius" "150"
+ "explosion_shake_radius" "200"
+ "explosion_shake_amplitude" "5"
+ "explosion_shake_frequency" "55"
+ "explosion_shake_duration" "0.25"
+ "anim_alt_idleAttack" "1"
+ "charge_time" "0.75"
+ "charge_cooldown_time" "0.0"
+ "charge_cooldown_delay" "0.0"
+ "charge_end_forces_fire" "1"
+ "charge_sound_1p" "Weapon_Predator_Powershot_ChargeUp_1P"
+ "charge_sound_3p" "Weapon_Predator_Powershot_ChargeUp_3P"
+ "charge_require_input" "0"
+ "charge_effect_1p" "P_predator_barrel_blur_glow_FP"
+ "charge_effect_3p" "P_predator_barrel_blur_glow"
+ "charge_effect_attachment" "fx_barrel"
+ "charge_rumble_min" "10"
+ "charge_rumble_max" "15"
+ "rui_crosshair_index" "1"
+ "reload_enabled" "0"
+ "fire_rate" "1.0"
+ "spread_stand_hip" "0.0"
+ "spread_stand_hip_run" "0.0"
+ "spread_stand_hip_sprint" "0.0"
+ "spread_crouch_hip" "0.0"
+ "spread_air_hip" "0.0"
+ "spread_stand_ads" "0.0"
+ "spread_crouch_ads" "0.0"
+ "spread_air_ads" "0.0"
+ "zoom_fov" "40"
+ "zoomfrac_autoattack" "1.0"
+ "pass_through_depth" "500"
+ "npc_min_burst" "1"
+ "npc_max_burst" "1"
+ "npc_pre_fire_delay" "0.0"
+ "npc_pre_fire_delay_interval" "0.0"
+ "npc_charge_time_min" "0.75"
+ "npc_charge_time_max" "0.75"
+ "net_bullet_fix" "0"
+
+ "npc_accuracy_multiplier_heavy_armor" "2"
+ "npc_accuracy_multiplier_npc" "2"
+ }
+ pas_LongRangePowerShot
+ {
+ "damage_near_value_titanarmor" "*0.85"
+ "damage_far_value_titanarmor" "*0.85"
+ }
+ fd_longrange_helper
+ {
+
+ }
+ fd_LongRangePowerShot
+ {
+ "pass_through_damage_preserved_scale" "1.5"
+ }
+ SiegeMode
+ {
+ "zoom_time_in" "*0.9"
+ }
+
+ pas_legion_weapon
+ {
+ "ammo_clip_size" "140"
+ }
+ pas_legion_spinup
+ {
+ "ads_move_speed_scale" "0.75"
+ }
+ fd_piercing_shots
+ {
+ "pass_through_depth" "++500"
+ }
+ fd_gun_shield_redirect
+ {
+
+ }
+ }
+
+ active_crosshair_count "1"
+ rui_crosshair_index "0"
+
+ RUI_CrosshairData
+ {
+ DefaultArgs
+ {
+ adjustedSpread weapon_spread
+ adsFrac player_zoomFrac
+ isSprinting player_is_sprinting
+ isReloading weapon_is_reloading
+ teamColor crosshair_team_color
+ isAmped weapon_is_amped
+ crosshairMovementX crosshair_movement_x
+ crosshairMovementY crosshair_movement_y
+ isActive weapon_is_active
+ }
+
+ Crosshair_1
+ {
+ "ui" "ui/crosshair_titan_predator_close_range"
+ "base_spread" "0.0"
+ Args
+ {
+ isFiring weapon_is_firing
+ }
+ }
+
+ Crosshair_2
+ {
+ "ui" "ui/crosshair_titan_predator_power_shot_long"
+ "base_spread" "0.0"
+ Args
+ {
+ isFiring weapon_is_firing
+ }
+ }
+
+ Crosshair_3
+ {
+ "ui" "ui/crosshair_titan_predator_power_shot_close"
+ "base_spread" "-4.0"
+ Args
+ {
+ isFiring weapon_is_firing
+ }
+ }
+ Crosshair_4
+ {
+ "ui" "ui/crosshair_titan_predator_long_range"
+ "base_spread" "-1.5"
+ Args
+ {
+ isFiring weapon_is_firing
+ }
+ }
+ }
+}
diff --git a/Northstar.Custom/mod/scripts/weapons/mp_weapon_peacekraber.txt b/Northstar.Custom/mod/scripts/weapons/mp_weapon_peacekraber.txt
index 59219cab1..464a94293 100644
--- a/Northstar.Custom/mod/scripts/weapons/mp_weapon_peacekraber.txt
+++ b/Northstar.Custom/mod/scripts/weapons/mp_weapon_peacekraber.txt
@@ -21,6 +21,7 @@ WeaponData
"OnWeaponActivate" "OnWeaponActivate_peacekraber"
"OnWeaponDeactivate" "OnWeaponDeactivate_peacekraber"
"OnWeaponPrimaryAttack" "OnWeaponPrimaryAttack_peacekraber"
+ "OnWeaponOwnerChanged" "OnWeaponOwnerChanged_weapon_peacekraber"
"OnWeaponChargeLevelIncreased" "OnWeaponChargeLevelIncreased_titanweapon_sniper"
"OnWeaponNpcPrimaryAttack" "OnWeaponNpcPrimaryAttack_peacekraber"
@@ -59,7 +60,8 @@ WeaponData
"charge_drain_sound_1p" "Weapon_Titan_Sniper_WindDown"
"charge_drain_sound_stop_when_empty" "1"
"charge_drain_sound_seek_to_charge_fraction" "1"
- // Spread
+ "charge_remain_full_when_fired" "0"
+ // Spread
"spread_stand_hip" "0"
"spread_stand_hip_run" "0"
"spread_stand_hip_sprint" "0"
@@ -73,27 +75,28 @@ WeaponData
"damage_type" "bullet"
"damage_near_distance" "500"
"damage_far_distance" "1000"
- "damage_near_value" "11"
- "damage_far_value" "11"
- "damage_near_value_titanarmor" "20"
- "damage_far_value_titanarmor" "15"
+ "damage_near_value" "15"
+ "damage_far_value" "15"
+ "damage_near_value_titanarmor" "40"
+ "damage_far_value_titanarmor" "30"
// Ammo
"ammo_stockpile_max" "20"
+ "ammo_no_remove_from_stockpile" "1"
"ammo_default_total" "25"
"ammo_clip_size" "5"
"ammo_size_segmented_reload" "5"
"ammo_display_as_clips" "0"
"reload_is_segmented" "0"
- "reload_time" "2.45"
- "reload_time_late1" "2.175"
+ "reload_time" "2.5"
+ "reload_time_late1" "2.2"
"reload_time_late2" "0"
- "reloadempty_time" "3.35"
+ "reloadempty_time" "3.5"
"reloadempty_time_late1" "2.5"
"reloadempty_time_late2" "1.7"
"reloadempty_time_late2" "1.1"
- "rechamber_time" "0.756"
+ "rechamber_time" "0.924"
"viewmodel_offset_ads" "0 0 0"
@@ -129,12 +132,13 @@ WeaponData
"bolt_hitsize_growfinal_lerptime" "0.18"
"bolt_hitsize_growfinal_size" "6.0"
"bolt_bounce_frac" "1.0"
-
+ "titanarmor_critical_hit_required" "1"
+ "critical_hit" "1"
"bolt_gravity_enabled" "1"
// Behavior
- "fire_rate" "1.33"
+ "fire_rate" "4.0"
"zoom_time_in" "0.2"
"zoom_time_out" "0.2"
"zoom_fov" "50"
@@ -340,4 +344,4 @@ WeaponData
"ui" "ui/crosshair_lstar"
"base_spread" "4"
}
-} \ No newline at end of file
+}
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
index abd189e82..a31963cf6 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut
@@ -267,15 +267,25 @@ void function TryGivePilotLoadoutForGracePeriod( entity player )
if ( ( ( Time() - respawnTimeReal <= CLASS_CHANGE_GRACE_PERIOD || GetGameState() < eGameState.Playing ) && file.loadoutGracePeriodEnabled ) || player.p.usingLoadoutCrate )
{
- // because the game sucks and stuff Loadouts_TryGivePilotLoadout doesn't work in intro so have to do this manually
- int loadoutIndex = GetPersistentSpawnLoadoutIndex( player, "pilot" )
- GivePilotLoadout( player, GetPilotLoadoutFromPersistentData( player, loadoutIndex ) )
- SetActivePilotLoadout( player )
- SetActivePilotLoadoutIndex( player, loadoutIndex )
+ 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 )
+ else
+ Loadouts_TryGivePilotLoadout( player )
player.p.usingLoadoutCrate = false
}
else
SendHudMessage( player, "#LOADOUT_CHANGE_NEXT_BOTH", -1, 0.4, 255, 255, 255, 255, 0.15, 3.0, 0.5 ) // like 90% sure this is innacurate lol
}
-} \ No newline at end of file
+}
+
+void function GiveLoadoutWhenIntroOver( entity player )
+{
+ player.EndSignal( "OnDestroy" )
+ player.EndSignal( "OnDeath" )
+
+ while ( player.GetParent() != null && ( HasCinematicFlag( player, CE_FLAG_INTRO ) || HasCinematicFlag( player, CE_FLAG_CLASSIC_MP_SPAWNING ) || HasCinematicFlag( player, CE_FLAG_WAVE_SPAWNING ) ) )
+ WaitFrame()
+
+ Loadouts_TryGivePilotLoadout( player )
+}
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
index 732773714..d1f4bd804 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut
@@ -293,6 +293,9 @@ void function PlayerUsesAmpedWeaponsBurncardThreaded( entity player )
//weapons.extend( player.GetOffhandWeapons() ) // idk? unsure of vanilla behaviour here
foreach ( entity weapon in weapons )
{
+ if( weapon.GetWeaponPrimaryClipCountMax() > 0 )
+ weapon.SetWeaponPrimaryClipCount( weapon.GetWeaponPrimaryClipCountMax() ) // kind of a fix to get ammo to full, cba to give new weapon
+
weapon.RemoveMod( "silencer" ) // both this and the burnmod will override firing fx, if a second one overrides this we crash
foreach ( string mod in GetWeaponBurnMods( weapon.GetWeaponClassName() ) )
{
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut
index 961816c7c..0fee4f2ce 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_battle_chatter.gnut
@@ -4,14 +4,16 @@ global function TryPlayWeaponBattleChatterLine
void function BattleChatter_Init()
{
- //ShBattleChatter_Init()
+ AddCallback_OnPlayerGetsNewPilotLoadout( UpdatePlayerVoiceIndex )
}
void function PlayBattleChatterLine( entity player, string conversationType )
{
+ int conversationIndex = GetConversationIndex( conversationType )
+
foreach( entity otherPlayer in GetPlayerArray() )
if ( ShouldPlayBattleChatter( conversationType, otherPlayer, player ) && player != otherPlayer )
- Remote_CallFunction_NonReplay( otherPlayer, "ServerCallback_PlayBattleChatter", GetConversationIndex( conversationType ), player.GetEncodedEHandle() )
+ Remote_CallFunction_Replay( otherPlayer, "ServerCallback_PlayBattleChatter", conversationIndex, player.GetEncodedEHandle() )
}
void function TryPlayWeaponBattleChatterLine( entity player, entity weapon )
@@ -22,4 +24,22 @@ void function TryPlayWeaponBattleChatterLine( entity player, entity weapon )
expect string( chatterEvent )
PlayBattleChatterLine( player, chatterEvent )
+}
+
+void function UpdatePlayerVoiceIndex( entity player, PilotLoadoutDef voiceIndex )
+{
+ if ( IsPlayerFemale( player ) )
+ {
+ if ( player.IsMechanical() )
+ player.SetPlayerNetInt( "battleChatterVoiceIndex", SelectRandomAndroidFemaleBattleChatterVoice() )
+ else
+ player.SetPlayerNetInt( "battleChatterVoiceIndex", SelectRandomFemaleBattleChatterVoice() )
+ }
+ else
+ {
+ if ( player.IsMechanical() )
+ player.SetPlayerNetInt( "battleChatterVoiceIndex", SelectRandomAndroidMaleBattleChatterVoice() )
+ else
+ player.SetPlayerNetInt( "battleChatterVoiceIndex", SelectRandomMaleBattleChatterVoice() )
+ }
} \ No newline at end of file
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_grunt_chatter_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_grunt_chatter_mp.gnut
index b638e92bb..1a70c2896 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_grunt_chatter_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_grunt_chatter_mp.gnut
@@ -14,5 +14,5 @@ void function PlayGruntChatterMPLine( entity grunt, string conversationType )
foreach ( entity player in GetPlayerArray() )
if ( ShouldPlayGruntChatterMPLine( conversationType, player, grunt ) )
- Remote_CallFunction_NonReplay( player, "ServerCallback_PlayGruntChatterMP", GetConversationIndex( conversationType ), grunt.GetEncodedEHandle() )
+ Remote_CallFunction_Replay( player, "ServerCallback_PlayGruntChatterMP", GetConversationIndex( conversationType ), grunt.GetEncodedEHandle() )
} \ No newline at end of file
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_spectre_chatter_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_spectre_chatter_mp.gnut
index 2f9e0f844..74ba53714 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/conversation/_spectre_chatter_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/conversation/_spectre_chatter_mp.gnut
@@ -14,5 +14,5 @@ void function PlaySpectreChatterMPLine( entity spectre, string conversationType
foreach ( entity player in GetPlayerArray() )
if ( ShouldPlaySpectreChatterMPLine( conversationType, player, spectre ) )
- Remote_CallFunction_NonReplay( player, "ServerCallback_PlaySpectreChatterMP", GetConversationIndex( conversationType ), spectre.GetEncodedEHandle() )
+ Remote_CallFunction_Replay( player, "ServerCallback_PlaySpectreChatterMP", GetConversationIndex( conversationType ), spectre.GetEncodedEHandle() )
} \ No newline at end of file
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter.gnut
index 691f07fb4..dda84976c 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter.gnut
@@ -39,8 +39,6 @@ global function SharedEarnMeter_AddEarnedAndOwned
global function PlayerEarnMeter_SetEnabled
global function PlayerEarnMeter_Enabled
-global function PlayerEarnMeter_SetBoostByRef
-
global struct EarnMeterThresholdEarnedStruct
{
float threshold
@@ -507,24 +505,4 @@ void function PlayerEarnMeter_SetEnabled( bool enabled )
bool function PlayerEarnMeter_Enabled()
{
return file.earnMeterEnabled
-}
-
-void function PlayerEarnMeter_SetBoostByRef( entity player, string boostRef ) {
- EarnObject earnobject = EarnObject_GetByRef( boostRef )
- BurnReward burncard = BurnReward_GetByRef( boostRef )
-
- if ( Riff_BoostAvailability() != eBoostAvailability.Disabled )
- {
- PlayerEarnMeter_SetReward( player, earnobject ) // pretty sure this works?
- PlayerEarnMeter_SetRewardFrac( player, burncard.cost )
- PlayerEarnMeter_EnableReward( player )
- }
-
- if ( EarnMeterMP_IsTitanEarnGametype() )
- {
- PlayerEarnMeter_SetGoal( player, EarnObject_GetByRef( GetTitanLoadoutForPlayer( player ).titanClass ) )
- PlayerEarnMeter_EnableGoal( player ) // prevents goalstate from being set incorrectly
- }
- else
- PlayerEarnMeter_SetGoal( player, earnobject )
} \ No newline at end of file
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut
index 1aa0f042d..4417168ac 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/earn_meter/sv_earn_meter_mp.gnut
@@ -2,6 +2,7 @@ untyped
global function Sv_EarnMeterMP_Init
global function EarnMeterMP_SetTitanLoadout
global function EarnMeterMP_SetPassiveMeterGainEnabled
+global function EarnMeterMP_SetBoostByRef
struct {
float playingStartTime
@@ -36,7 +37,7 @@ void function SetupPlayerEarnMeter( entity player )
PlayerEarnMeter_Reset( player )
string burncardRef = GetSelectedBurnCardRef( player )
- PlayerEarnMeter_SetBoostByRef( player, burncardRef )
+ EarnMeterMP_SetBoostByRef( player, burncardRef )
// catchup bonus for late joiners
// todo: maths on this is fine but for some reason it won't set correctly, could be getting reset somewhere?
@@ -176,4 +177,25 @@ void function EarnMeterMP_TitanEarned( entity player )
if ( PlayerEarnMeter_GetRewardFrac( player ) != 0 )
PlayerEarnMeter_EnableReward( player )
}
+}
+
+void function EarnMeterMP_SetBoostByRef( entity player, string boostRef )
+{
+ EarnObject earnobject = EarnObject_GetByRef( boostRef )
+ BurnReward burncard = BurnReward_GetByRef( boostRef )
+
+ if ( Riff_BoostAvailability() != eBoostAvailability.Disabled )
+ {
+ PlayerEarnMeter_SetReward( player, earnobject ) // pretty sure this works?
+ PlayerEarnMeter_SetRewardFrac( player, burncard.cost )
+ PlayerEarnMeter_EnableReward( player )
+ }
+
+ if ( EarnMeterMP_IsTitanEarnGametype() )
+ {
+ PlayerEarnMeter_SetGoal( player, EarnObject_GetByRef( GetTitanLoadoutForPlayer( player ).titanClass ) )
+ PlayerEarnMeter_EnableGoal( player ) // prevents goalstate from being set incorrectly
+ }
+ else
+ PlayerEarnMeter_SetGoal( player, earnobject )
} \ No newline at end of file
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut
index 8e5599a19..56e1d04f6 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_cp.nut
@@ -2,6 +2,7 @@ untyped
global function GamemodeCP_Init
global function RateSpawnpoints_CP
+global function DEV_PrintHardpointsInfo
// needed for sh_gamemode_cp_dialogue
global array<entity> HARDPOINTS
@@ -157,104 +158,210 @@ void function StartHardpointThink()
void function HardpointThink( HardpointStruct hardpoint )
{
entity hardpointEnt = hardpoint.hardpoint
-
+
float lastTime = Time()
float lastScoreTime = Time()
-
+
WaitFrame() // wait a frame so deltaTime is never zero
+
while ( GamePlayingOrSuddenDeath() )
{
- int imcCappers = hardpoint.imcCappers.len()
- int militiaCappers = hardpoint.militiaCappers.len()
-
- float deltaTime = Time() - lastTime
-
- int cappingTeam
- if ( imcCappers > militiaCappers )
- cappingTeam = TEAM_IMC
- else if ( militiaCappers > imcCappers )
- cappingTeam = TEAM_MILITIA
-
- if ( cappingTeam != TEAM_UNASSIGNED )
+ int imcPilotCappers = 0
+ int militiaPilotCappers = 0
+
+ int imcTitanCappers = 0
+ int militiaTitanCappers = 0
+
+ float currentTime = Time()
+ float deltaTime = currentTime - lastTime
+
+ foreach(entity p in hardpoint.imcCappers)
{
- // hardpoint is owned by controlling team
- if ( hardpointEnt.GetTeam() == cappingTeam )
+ if(p.IsPlayer())
{
- // hardpoint is being neutralised, reverse the neutralisation
- if ( GetHardpointCappingTeam( hardpoint ) != cappingTeam || GetHardpointCaptureProgress( hardpoint ) < 1.0 )
+ if(p.IsTitan())
{
- SetHardpointCappingTeam( hardpoint, cappingTeam )
- SetHardpointCaptureProgress( hardpoint, min( 1.0, GetHardpointCaptureProgress( hardpoint ) + ( deltaTime / CAPTURE_DURATION_CAPTURE ) ) )
+ imcTitanCappers = imcTitanCappers + 1
}
- // hardpoint is fully captured, start amping if amping is enabled
- else if ( file.ampingEnabled && GetHardpointState( hardpoint ) < CAPTURE_POINT_STATE_AMPING )
- SetHardpointState( hardpoint, CAPTURE_POINT_STATE_AMPING )
-
- // amp the hardpoint
- if ( GetHardpointState( hardpoint ) == CAPTURE_POINT_STATE_AMPING )
+ else
{
- SetHardpointCaptureProgress( hardpoint, min( 2.0, GetHardpointCaptureProgress( hardpoint ) + ( deltaTime / HARDPOINT_AMPED_DELAY ) ) )
- if ( GetHardpointCaptureProgress( hardpoint ) == 2.0 )
+ imcPilotCappers = imcPilotCappers + 1
+ }
+ }
+ }
+ foreach(entity p in hardpoint.militiaCappers)
+ {
+ if(p.IsPlayer())
+ {
+ if(p.IsTitan())
+ {
+ militiaTitanCappers = militiaTitanCappers + 1
+ }
+ else
+ {
+
+ militiaPilotCappers = militiaPilotCappers + 1
+ }
+ }
+ }
+ int imcCappers
+ int militiaCappers
+
+ bool hardpointBlocked = false
+ if((imcTitanCappers+militiaTitanCappers)>0)
+ {
+ imcCappers = imcTitanCappers
+ militiaCappers = militiaTitanCappers
+ }
+ else
+ {
+ imcCappers = imcPilotCappers
+ militiaCappers = militiaPilotCappers
+ }
+
+ int cappingTeam
+ int capperAmount = 0
+
+ if((imcCappers > 0) && (militiaCappers > 0)){
+ hardpointBlocked = true
+ }
+ else if ( imcCappers > 0 )
+ {
+ cappingTeam = TEAM_IMC
+ capperAmount = imcCappers
+ }
+ else if ( militiaCappers > 0 )
+ {
+ cappingTeam = TEAM_MILITIA
+ capperAmount = militiaCappers
+ }
+ capperAmount = int(min(capperAmount, 3))
+
+ if(hardpointBlocked)
+ {
+ SetHardpointState(hardpoint,CAPTURE_POINT_STATE_HALTED)
+ }
+ else if(cappingTeam==TEAM_UNASSIGNED)//nobody on point
+ {
+
+ switch(GetHardpointState(hardpoint))
+ {
+ case CAPTURE_POINT_STATE_UNASSIGNED:
+ SetHardpointCaptureProgress(hardpoint,max(0.0,GetHardpointCaptureProgress(hardpoint)-(deltaTime/CAPTURE_DURATION_CAPTURE)))
+ if(GetHardpointCaptureProgress(hardpoint)==0.0)
{
- SetHardpointState( hardpoint, CAPTURE_POINT_STATE_AMPED )
-
- // can't use the dialogue functions here because for some reason GamemodeCP_VO_Amped isn't global?
- PlayFactionDialogueToTeam( "amphp_youAmped" + hardpointEnt.kv.hardpointGroup, cappingTeam )
- PlayFactionDialogueToTeam( "amphp_enemyAmped" + hardpointEnt.kv.hardpointGroup, GetOtherTeam( cappingTeam ) )
+ SetHardpointState(hardpoint,CAPTURE_POINT_STATE_UNASSIGNED)
+ SetHardpointCappingTeam(hardpoint,TEAM_UNASSIGNED)
}
+ break
+ case CAPTURE_POINT_STATE_CAPTURED:
+ SetHardpointCappingTeam(hardpoint,hardpointEnt.GetTeam())
+ SetHardpointCaptureProgress(hardpoint,min(1.0,GetHardpointCaptureProgress(hardpoint)+(deltaTime/CAPTURE_DURATION_CAPTURE)))
+ break
+ case CAPTURE_POINT_STATE_AMPED:
+ case CAPTURE_POINT_STATE_AMPING:
+ SetHardpointCappingTeam(hardpoint,hardpointEnt.GetTeam())
+ SetHardpointCaptureProgress(hardpoint,max(1.0,GetHardpointCaptureProgress(hardpoint)-(deltaTime/HARDPOINT_AMPED_DELAY)))
+ if(GetHardpointCaptureProgress(hardpoint)<=1.001)
+ SetHardpointState(hardpoint,CAPTURE_POINT_STATE_CAPTURED)
+ break
+ }
+ }
+ else if(hardpointEnt.GetTeam()==TEAM_UNASSIGNED)
+ {
+ if(GetHardpointCappingTeam(hardpoint)==TEAM_UNASSIGNED)
+ {
+ SetHardpointCaptureProgress( hardpoint, min(1.0,GetHardpointCaptureProgress( hardpoint ) + ( deltaTime / CAPTURE_DURATION_CAPTURE * capperAmount) ) )
+ SetHardpointCappingTeam(hardpoint,cappingTeam)
+ if(GetHardpointCaptureProgress(hardpoint)>=1.0)
+ {
+ SetHardpointState(hardpoint,CAPTURE_POINT_STATE_CAPTURED)
+ SetTeam( hardpointEnt, cappingTeam )
+ SetTeam( hardpoint.prop, cappingTeam )
+ EmitSoundOnEntityToTeamExceptPlayer( hardpointEnt, "hardpoint_console_captured", cappingTeam, null )
+ GamemodeCP_VO_Captured( hardpointEnt )
}
}
- else // we don't own this hardpoint, cap it
+ else if(GetHardpointCappingTeam(hardpoint)==cappingTeam)
{
- SetHardpointCappingTeam( hardpoint, cappingTeam )
- GamemodeCP_VO_StartCapping( hardpointEnt ) // this doesn't consistently trigger for some reason
-
- SetHardpointCaptureProgress( hardpoint, min( 1.0, GetHardpointCaptureProgress( hardpoint ) + ( deltaTime / CAPTURE_DURATION_CAPTURE ) ) )
-
- if ( GetHardpointCaptureProgress( hardpoint ) >= 1.0 )
+ SetHardpointCaptureProgress( hardpoint,min(1.0, GetHardpointCaptureProgress( hardpoint ) + ( deltaTime / CAPTURE_DURATION_CAPTURE * capperAmount) ) )
+ if(GetHardpointCaptureProgress(hardpoint)>=1.0)
{
+ SetHardpointState(hardpoint,CAPTURE_POINT_STATE_CAPTURED)
SetTeam( hardpointEnt, cappingTeam )
SetTeam( hardpoint.prop, cappingTeam )
- SetHardpointState( hardpoint, CAPTURE_POINT_STATE_CAPTURED )
-
EmitSoundOnEntityToTeamExceptPlayer( hardpointEnt, "hardpoint_console_captured", cappingTeam, null )
GamemodeCP_VO_Captured( hardpointEnt )
}
}
+ else
+ {
+ SetHardpointCaptureProgress( hardpoint,max(0.0, GetHardpointCaptureProgress( hardpoint ) - ( deltaTime / CAPTURE_DURATION_CAPTURE * capperAmount) ) )
+ if(GetHardpointCaptureProgress(hardpoint)==0.0)
+ {
+ SetHardpointCappingTeam(hardpoint,cappingTeam)
+ if(GetHardpointCaptureProgress(hardpoint)>=1)
+ {
+ SetHardpointState(hardpoint,CAPTURE_POINT_STATE_CAPTURED)
+ SetTeam( hardpointEnt, cappingTeam )
+ SetTeam( hardpoint.prop, cappingTeam )
+ EmitSoundOnEntityToTeamExceptPlayer( hardpointEnt, "hardpoint_console_captured", cappingTeam, null )
+ GamemodeCP_VO_Captured( hardpointEnt )
+ }
+ }
+
+ }
}
- // capture halting
- else if ( imcCappers > 0 && imcCappers == militiaCappers )
- SetHardpointState( hardpoint, CAPTURE_POINT_STATE_HALTED )
- // amped decay
- else if ( imcCappers == 0 && militiaCappers == 0 && GetHardpointState( hardpoint ) >= CAPTURE_POINT_STATE_AMPING )
+ else if(hardpointEnt.GetTeam()!=cappingTeam)
{
- // it seems like network vars won't change if they're too similar? often we get situations here where it's tryna change from 1.00098 to 1 which doesn't work
- // so we need to check the "real" progress manually
- // have only gotten this issue here so far, but in theory i think this could be an issue in a good few places, worth looking out for
- // tho, idk might not be, we don't work with numbers at this small of a scale too often
- float realProgress = max( 1.0, GetHardpointCaptureProgress( hardpoint ) - ( deltaTime / HARDPOINT_AMPED_DELAY ) )
- SetHardpointCaptureProgress( hardpoint, realProgress )
-
- if ( realProgress == 1 )
- SetHardpointState( hardpoint, CAPTURE_POINT_STATE_CAPTURED )
- // dont use unamping atm
- //else
- // SetHardpointState( hardpoint, CAPTURE_POINT_STATE_SELF_UNAMPING )
+ SetHardpointCappingTeam(hardpoint,cappingTeam)
+ SetHardpointCaptureProgress( hardpoint,max(0.0, GetHardpointCaptureProgress( hardpoint ) - ( deltaTime / CAPTURE_DURATION_CAPTURE * capperAmount) ) )
+ if(GetHardpointCaptureProgress(hardpoint)<=1.0)
+ {
+ SetHardpointState(hardpoint,CAPTURE_POINT_STATE_CAPTURED)//unamp
+ }
+ if(GetHardpointCaptureProgress(hardpoint)<=0.0)
+ {
+ SetHardpointCaptureProgress(hardpoint,1.0)
+ SetTeam( hardpointEnt, cappingTeam )
+ SetTeam( hardpoint.prop, cappingTeam )
+ SetHardpointState(hardpoint,CAPTURE_POINT_STATE_CAPTURED)
+ EmitSoundOnEntityToTeamExceptPlayer( hardpointEnt, "hardpoint_console_captured", cappingTeam, null )
+ GamemodeCP_VO_Captured( hardpointEnt )
+ }
}
-
- // scoring
- if ( hardpointEnt.GetTeam() != TEAM_UNASSIGNED && GetHardpointState( hardpoint ) >= CAPTURE_POINT_STATE_CAPTURED && Time() - lastScoreTime >= TEAM_OWNED_SCORE_FREQ )
+ else if(hardpointEnt.GetTeam()==cappingTeam)
{
- lastScoreTime = Time()
-
- // 2x score if amped
+ SetHardpointCappingTeam(hardpoint,cappingTeam)
+ if(GetHardpointCaptureProgress(hardpoint)<1.0)
+ {
+ SetHardpointCaptureProgress(hardpoint,GetHardpointCaptureProgress(hardpoint)+(deltaTime/CAPTURE_DURATION_CAPTURE*capperAmount))
+ }
+ else if(file.ampingEnabled)//amping or reamping
+ {
+ if(GetHardpointState(hardpoint)<CAPTURE_POINT_STATE_AMPING)
+ SetHardpointState(hardpoint,CAPTURE_POINT_STATE_AMPING)
+ SetHardpointCaptureProgress( hardpoint, min( 2.0, GetHardpointCaptureProgress( hardpoint ) + ( deltaTime / HARDPOINT_AMPED_DELAY * capperAmount ) ) )
+ if(GetHardpointCaptureProgress(hardpoint)==2.0&&!(GetHardpointState(hardpoint)==CAPTURE_POINT_STATE_AMPED))
+ {
+ SetHardpointState( hardpoint, CAPTURE_POINT_STATE_AMPED )
+ // can't use the dialogue functions here because for some reason GamemodeCP_VO_Amped isn't global?
+ PlayFactionDialogueToTeam( "amphp_youAmped" + hardpointEnt.kv.hardpointGroup, cappingTeam )
+ PlayFactionDialogueToTeam( "amphp_enemyAmped" + hardpointEnt.kv.hardpointGroup, GetOtherTeam( cappingTeam ) )
+ }
+ }
+ }
+
+ if ( hardpointEnt.GetTeam() != TEAM_UNASSIGNED && GetHardpointState( hardpoint ) >= CAPTURE_POINT_STATE_CAPTURED && currentTime - lastScoreTime >= TEAM_OWNED_SCORE_FREQ && !hardpointBlocked&&!(cappingTeam==GetOtherTeam(hardpointEnt.GetTeam())))
+ {
+ lastScoreTime = currentTime
if ( GetHardpointState( hardpoint ) == CAPTURE_POINT_STATE_AMPED )
AddTeamScore( hardpointEnt.GetTeam(), 2 )
- else
+ else if( GetHardpointState( hardpoint) >= CAPTURE_POINT_STATE_CAPTURED)
AddTeamScore( hardpointEnt.GetTeam(), 1 )
}
-
- lastTime = Time()
+
+ lastTime = currentTime
WaitFrame()
}
}
@@ -264,33 +371,33 @@ void function HardpointThink( HardpointStruct hardpoint )
void function TrackChevronStates()
{
// you get 1 amped arrow for chevron / 4, 1 unamped arrow for every 1 the amped chevrons
-
+
while ( true )
{
int imcChevron
int militiaChevron
-
+
foreach ( HardpointStruct hardpoint in file.hardpoints )
{
if ( hardpoint.hardpoint.GetTeam() == TEAM_IMC )
{
if ( hardpoint.hardpoint.GetHardpointState() == CAPTURE_POINT_STATE_AMPED )
imcChevron += 4
- else if ( hardpoint.hardpoint.GetHardpointState() >= CAPTURE_POINT_STATE_CAPTURED )
+ else
imcChevron++
}
else if ( hardpoint.hardpoint.GetTeam() == TEAM_MILITIA )
{
if ( hardpoint.hardpoint.GetHardpointState() == CAPTURE_POINT_STATE_AMPED )
militiaChevron += 4
- else if ( hardpoint.hardpoint.GetHardpointState() >= CAPTURE_POINT_STATE_CAPTURED )
+ else
militiaChevron++
}
}
-
+
SetGlobalNetInt( "imcChevronState", imcChevron )
SetGlobalNetInt( "milChevronState", militiaChevron )
-
+
WaitFrame()
}
}
@@ -319,4 +426,35 @@ void function OnHardpointLeft( entity trigger, entity player )
hardpoint.imcCappers.remove( hardpoint.imcCappers.find( player ) )
else
hardpoint.militiaCappers.remove( hardpoint.militiaCappers.find( player ) )
-} \ No newline at end of file
+}
+
+string function CaptureStateToString( int state )
+{
+ switch ( state )
+ {
+ case CAPTURE_POINT_STATE_UNASSIGNED:
+ return "UNASSIGNED"
+ case CAPTURE_POINT_STATE_HALTED:
+ return "HALTED"
+ case CAPTURE_POINT_STATE_CAPTURED:
+ return "CAPTURED"
+ case CAPTURE_POINT_STATE_AMPING:
+ return "AMPING"
+ case CAPTURE_POINT_STATE_AMPED:
+ return "AMPED"
+ }
+ return "UNKNOWN"
+}
+
+void function DEV_PrintHardpointsInfo()
+{
+ foreach (entity hardpoint in HARDPOINTS)
+ {
+ printt(
+ "Hardpoint:", hardpoint.kv.hardpointGroup,
+ "|Team:", Dev_TeamIDToString(hardpoint.GetTeam()),
+ "|State:", CaptureStateToString(hardpoint.GetHardpointState()),
+ "|Progress:", GetGlobalNetFloat("objective" + hardpoint.kv.hardpointGroup + "Progress")
+ )
+ }
+}
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ps.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ps.nut
index 64a78d355..a02b9072e 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ps.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ps.nut
@@ -30,7 +30,7 @@ void function GamemodePs_Init()
void function GiveScoreForPlayerKill( entity victim, entity attacker, var damageInfo )
{
- if ( victim != attacker && victim.IsPlayer() && attacker.IsPlayer() || GetGameState() != eGameState.Playing )
+ if ( victim != attacker && victim.IsPlayer() && attacker.IsPlayer() && GetGameState() == eGameState.Playing )
AddTeamScore( attacker.GetTeam(), 1 )
table<int, bool> alreadyAssisted
@@ -230,4 +230,4 @@ void function RateSpawnpoints_SpawnZones( int checkClass, array<entity> spawnpoi
spawn.CalculateRating( checkClass, player.GetTeam(), rating, rating )
}
-} \ No newline at end of file
+}
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut
index 974481c18..207af721e 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_speedball.nut
@@ -23,6 +23,7 @@ void function GamemodeSpeedball_Init()
AddCallback_GameStateEnter( eGameState.Prematch, CreateFlagIfNoFlagSpawnpoint )
AddCallback_GameStateEnter( eGameState.Playing, ResetFlag )
+ AddCallback_GameStateEnter( eGameState.WinnerDetermined,GamemodeSpeedball_OnWinnerDetermined)
AddCallback_OnTouchHealthKit( "item_flag", OnFlagCollected )
AddCallback_OnPlayerKilled( OnPlayerKilled )
SetTimeoutWinnerDecisionFunc( TimeoutCheckFlagHolder )
@@ -147,3 +148,9 @@ int function TimeoutCheckFlagHolder()
return file.flagCarrier.GetTeam()
}
+
+void function GamemodeSpeedball_OnWinnerDetermined()
+{
+ if(IsValid(file.flagCarrier))
+ file.flagCarrier.AddToPlayerGameStat( PGS_ASSAULT_SCORE, 1 )
+} \ No newline at end of file
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut
index 8699375ad..a3ea51725 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_tdm.nut
@@ -10,7 +10,7 @@ void function GamemodeTdm_Init()
void function GiveScoreForPlayerKill( entity victim, entity attacker, var damageInfo )
{
- if ( victim != attacker && victim.IsPlayer() && attacker.IsPlayer() || GetGameState() != eGameState.Playing )
+ if ( victim != attacker && victim.IsPlayer() && attacker.IsPlayer() && GetGameState() == eGameState.Playing )
AddTeamScore( attacker.GetTeam(), 1 )
table<int, bool> alreadyAssisted
@@ -48,4 +48,4 @@ int function CheckScoreForDraw()
return TEAM_MILITIA
return TEAM_UNASSIGNED
-} \ No newline at end of file
+}
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut
index 417d0fbfd..3102326cd 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut
@@ -71,7 +71,7 @@ void function PlayerWatchesTTDMIntroIntermissionCam( entity player )
void function AddTeamScoreForPlayerKilled( entity victim, entity attacker, var damageInfo )
{
- if ( victim == attacker || !victim.IsPlayer() || !attacker.IsPlayer() || GetGameState() != eGameState.Playing )
+ if ( victim == attacker || !victim.IsPlayer() || !attacker.IsPlayer() && GetGameState() == eGameState.Playing )
return
AddTeamScore( GetOtherTeam( victim.GetTeam() ), 1 )
@@ -85,4 +85,4 @@ int function CheckScoreForDraw()
return TEAM_MILITIA
return TEAM_UNASSIGNED
-} \ No newline at end of file
+}
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
index 2d39cf2d8..e5c8799dd 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
@@ -848,5 +848,9 @@ void function GiveTitanToPlayer( entity player )
float function GetTimeLimit_ForGameMode()
{
- return 100.0
+ string mode = GameRules_GetGameMode()
+ string playlistString = "timelimit"
+
+ // default to 10 mins, because that seems reasonable
+ return GetCurrentPlaylistVarFloat( playlistString, 10 )
} \ No newline at end of file
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut
index 887e97cc9..b7fd4d520 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_score.nut
@@ -95,7 +95,7 @@ void function ScoreEvent_PlayerKilled( entity victim, entity attacker, var damag
// have to do this early before we reset victim's player killstreaks
// nemesis when you kill a player that is dominating you
- if ( attacker.IsPlayer() && attacker in victim.p.playerKillStreaks && victim.p.playerKillStreaks[ attacker ] == NEMESIS_KILL_REQUIREMENT )
+ if ( attacker.IsPlayer() && attacker in victim.p.playerKillStreaks && victim.p.playerKillStreaks[ attacker ] >= NEMESIS_KILL_REQUIREMENT )
AddPlayerScore( attacker, "Nemesis" )
// reset killstreaks on specific players
@@ -108,7 +108,7 @@ void function ScoreEvent_PlayerKilled( entity victim, entity attacker, var damag
if ( !attacker.IsPlayer() )
return
-
+ attacker.p.numberOfDeathsSinceLastKill = 0 // since they got a kill, remove the comeback trigger
// pilot kill
AddPlayerScore( attacker, "KillPilot", victim )
@@ -145,7 +145,7 @@ void function ScoreEvent_PlayerKilled( entity victim, entity attacker, var damag
attacker.p.playerKillStreaks[ victim ]++
// dominating
- if ( attacker.p.playerKillStreaks[ victim ] == DOMINATING_KILL_REQUIREMENT )
+ if ( attacker.p.playerKillStreaks[ victim ] >= DOMINATING_KILL_REQUIREMENT )
AddPlayerScore( attacker, "Dominating" )
if ( Time() - attacker.s.lastKillTime > CASCADINGKILL_REQUIREMENT_TIME )
@@ -163,7 +163,7 @@ void function ScoreEvent_PlayerKilled( entity victim, entity attacker, var damag
AddPlayerScore( attacker, "DoubleKill" )
else if ( attacker.s.currentTimedKillstreak == TRIPLEKILL_REQUIREMENT_KILLS )
AddPlayerScore( attacker, "TripleKill" )
- else if ( attacker.s.currentTimedKillstreak == MEGAKILL_REQUIREMENT_KILLS )
+ else if ( attacker.s.currentTimedKillstreak >= MEGAKILL_REQUIREMENT_KILLS )
AddPlayerScore( attacker, "MegaKill" )
}
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_angel_city.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_angel_city.nut
index 87c9ea985..e7cc82241 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_angel_city.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/levels/mp_angel_city.nut
@@ -13,6 +13,7 @@ void function CodeCallback_MapInit()
// there are some really busted titan startspawns that are on the fucking other side of the map from where they should be, so we remove them
AddSpawnCallback( "info_spawnpoint_titan_start", TrimBadTitanStartSpawns )
+ AddSpawnCallback( "sky_camera", FixSkycamFog )
}
void function TrimBadTitanStartSpawns( entity spawn )
@@ -24,4 +25,10 @@ void function TrimBadTitanStartSpawns( entity spawn )
if ( Distance2D( spawn.GetOrigin(), comparisonOrigin ) >= 2000.0 )
spawn.Destroy()
+}
+
+void function FixSkycamFog( entity skycam )
+{
+ if ( skycam.GetTargetName() == "skybox_cam_level" )
+ skycam.kv.useworldfog = 1
} \ No newline at end of file
diff --git a/README.md b/README.md
index 4e30a45be..5a180df9c 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,11 @@
# NorthstarMods
-Mods used for hosting Titanfall 2 custom servers, requires the northstar launcher to use
+
+[Squirrel](http://www.squirrel-lang.org/squirreldoc/reference/index.html) scripts used to recreate server-side gamelogic and add [custom content](https://r2northstar.gitbook.io/r2northstar-wiki/using-northstar/gamemodes) to the game.
+
+## Contents:
+
+Issues in this repository should be created if they are related to these domains:
+- `Northstar.Client` - Localisation files, UI and client-side scripts.
+- `Northstar.Coop` - Soon™.
+- `Northstar.Custom` - Northstar custom content.
+- `Northstar.CustomServer` - Server config files and scripts necessary for multiplayer.