aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Custom/mod')
-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
17 files changed, 1473 insertions, 93 deletions
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 00000000..b4a41931
--- /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 00000000..cdc14fff
--- /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 bbd669cd..5768dcfa 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 405ef16e..f6c0968c 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 608fd869..5943b804 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 00000000..f3b7d2ee
--- /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 de8a3449..6f4e015e 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 00000000..f91c4255
--- /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 00000000..1d4e73b7
--- /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 00000000..d6369b0c
--- /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 00000000..0428ecfa
--- /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 c4021a3c..42d264d9 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 00000000..b3d2c2da
--- /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 a9da541f..b910cff3 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 e8b7c181..2faff2e2 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 00000000..81919e43
--- /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 59219cab..464a9429 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
+}