diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-12-31 18:58:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-31 18:58:50 +0100 |
commit | a1502e9ad3ed44b2a0a8ab5f17d4d2bf5238d9cf (patch) | |
tree | 0f171ab768fa6f8dd8d68fc4f0675baffbfd5e5d /Northstar.Custom | |
parent | ad70253601a77844347d8aa1989ae5ab4fb4217c (diff) | |
parent | 00a4bb6fb5e107788ea77cad51c8c8004a9537f1 (diff) | |
download | NorthstarMods-a1502e9ad3ed44b2a0a8ab5f17d4d2bf5238d9cf.tar.gz NorthstarMods-a1502e9ad3ed44b2a0a8ab5f17d4d2bf5238d9cf.zip |
Merge pull request #777 from R2Northstar/main
Update FD branch
Diffstat (limited to 'Northstar.Custom')
21 files changed, 95 insertions, 52 deletions
diff --git a/Northstar.Custom/keyvalues/playlists_v2.txt b/Northstar.Custom/keyvalues/playlists_v2.txt index 21934b31..c22e2174 100644 --- a/Northstar.Custom/keyvalues/playlists_v2.txt +++ b/Northstar.Custom/keyvalues/playlists_v2.txt @@ -47,8 +47,6 @@ playlists max_teams 12 classic_mp 1 - scorelimit 21 // temp until we have a way of dynamically setting non-default scorelimit in code - gamemode_score_hint #GAMEMODE_SCORE_HINT_FFA gamemode_bullet_001 #GAMEMODE_BULLET_FFA_001 gamemode_bullet_002 #GAMEMODE_BULLET_FFA_002 diff --git a/Northstar.Custom/mod.json b/Northstar.Custom/mod.json index 93f371bd..399311e4 100644 --- a/Northstar.Custom/mod.json +++ b/Northstar.Custom/mod.json @@ -24,6 +24,11 @@ { "Name": "ns_force_melee", "DefaultValue": "" + }, + { + "Name": "ns_show_event_models", + "DefaultValue": "1", + "Flags": "ARCHIVE_PLAYERPROFILE" } ], "Scripts": [ @@ -434,6 +439,20 @@ { "Path": "sh_northstar_safe_io.gnut", "RunOn": "CLIENT || SERVER || UI" + }, + { + "Path": "_event_models.gnut", + "RunOn": "SERVER && LOBBY", + "ServerCallback": { + "Before": "EventModelsInit" + } + }, + { + "Path": "ui/ns_custom_mod_settings.gnut", + "RunOn": "UI", + "UICallback":{ + "Before": "NSCustomModSettings" + } } ], diff --git a/Northstar.Custom/mod/materials/models/northstartree/lightsflicker.vmt b/Northstar.Custom/mod/materials/models/northstartree/lightsflicker.vmt new file mode 100644 index 00000000..22b81e9a --- /dev/null +++ b/Northstar.Custom/mod/materials/models/northstartree/lightsflicker.vmt @@ -0,0 +1,18 @@ +"UnlitTexture" +{ + $basetexture "models/northstartree/lightsflicker" + $color "[1.5 1.5 1.5]" + + Proxies + { + + TextureScroll + { + texturescrollvar $basetexturetransform + texturescrollrate 0.33 + texturescrollangle 45 + } + + } + +} diff --git a/Northstar.Custom/mod/materials/models/northstartree/lightsflicker.vtf b/Northstar.Custom/mod/materials/models/northstartree/lightsflicker.vtf Binary files differnew file mode 100644 index 00000000..227756be --- /dev/null +++ b/Northstar.Custom/mod/materials/models/northstartree/lightsflicker.vtf diff --git a/Northstar.Custom/mod/models/northstartree/winter_holiday_floor.mdl b/Northstar.Custom/mod/models/northstartree/winter_holiday_floor.mdl Binary files differnew file mode 100644 index 00000000..aaf70363 --- /dev/null +++ b/Northstar.Custom/mod/models/northstartree/winter_holiday_floor.mdl diff --git a/Northstar.Custom/mod/models/northstartree/winter_holiday_tree.mdl b/Northstar.Custom/mod/models/northstartree/winter_holiday_tree.mdl Binary files differnew file mode 100644 index 00000000..4690475f --- /dev/null +++ b/Northstar.Custom/mod/models/northstartree/winter_holiday_tree.mdl diff --git a/Northstar.Custom/mod/scripts/vscripts/_event_models.gnut b/Northstar.Custom/mod/scripts/vscripts/_event_models.gnut new file mode 100644 index 00000000..0802d769 --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/_event_models.gnut @@ -0,0 +1,21 @@ +global function EventModelsInit + +void function EventModelsInit() +{ + if( !GetConVarBool( "ns_show_event_models" ) ) + return + + table timeParts = GetUnixTimeParts() + int month = expect int( timeParts[ "month" ] ) + int day = expect int( timeParts[ "day" ] ) + + // 18th December to 6th January + if( ( ( month == 12 ) && ( day >= 18 ) ) || ( ( month == 1 ) && ( day <= 6 ) ) ) + { + PrecacheModel( $"models/northstartee/winter_holiday_tree.mdl" ) + PrecacheModel( $"models/northstartree/winter_holiday_floor.mdl" ) + + CreatePropDynamic( $"models/northstartree/winter_holiday_tree.mdl", < -60, 740, 30 >, < 0, 0, 0 >, SOLID_VPHYSICS, 1000 ) + CreatePropDynamic( $"models/northstartree/winter_holiday_floor.mdl", < -60, 740, 30 >, < 0, 0, 0 >, SOLID_VPHYSICS, 1000 ) + } +} diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut index 8f34541b..ad46b42e 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_gg.gnut @@ -18,14 +18,6 @@ void function GamemodeGG_Init() 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 - { - if ( GetCurrentPlaylistVarInt( "scorelimit", GetGunGameWeapons().len() ) != GetGunGameWeapons().len() ) - SetPlaylistVarOverride( "scorelimit", GetGunGameWeapons().len().tostring() ) - } - catch ( ex ) {} } void function OnPlayerDisconnected(entity player) diff --git a/Northstar.Custom/mod/scripts/vscripts/ui/ns_custom_mod_settings.gnut b/Northstar.Custom/mod/scripts/vscripts/ui/ns_custom_mod_settings.gnut new file mode 100644 index 00000000..5a7d80b7 --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/ui/ns_custom_mod_settings.gnut @@ -0,0 +1,8 @@ +global function NSCustomModSettings + +void function NSCustomModSettings() +{ + ModSettings_AddModTitle( "Northstar Custom" , 2 ) + ModSettings_AddModCategory( "Event Models" ) + ModSettings_AddEnumSetting( "ns_show_event_models", "Show Event Models", [ "#SETTING_OFF", "#SETTING_ON" ], 2 ) +} diff --git a/Northstar.Custom/mod/scripts/vscripts/weapons/_arc_cannon.nut b/Northstar.Custom/mod/scripts/vscripts/weapons/_arc_cannon.nut index 01138967..defb1a56 100644 --- a/Northstar.Custom/mod/scripts/vscripts/weapons/_arc_cannon.nut +++ b/Northstar.Custom/mod/scripts/vscripts/weapons/_arc_cannon.nut @@ -536,12 +536,6 @@ function ZapTarget( zapInfo, target, beamStartPos, beamEndPos, chainNum = 1 ) thread CreateArcCannonBeam( zapInfo.weapon, target, beamStartPos, beamEndPos, zapInfo.player, ARC_CANNON_BEAM_LIFETIME, zapInfo.radius, boltWidth, 5, true, firstBeam ) #if SERVER - local isMissile = ( target.GetClassName() == "rpg_missile" ) - if ( !isMissile ) - wait ARC_CANNON_FORK_DELAY - else - wait 0.05 - local deathPackage = damageTypes.arcCannon float damageAmount @@ -569,40 +563,20 @@ function ZapTarget( zapInfo, target, beamStartPos, beamEndPos, chainNum = 1 ) bool hasFastPacitor = false bool noArcing = false - if ( IsValid( zapInfo.weapon ) ) - { - entity weap = expect entity( zapInfo.weapon ) - hasFastPacitor = weap.GetWeaponInfoFileKeyField( "push_apart" ) != null && weap.GetWeaponInfoFileKeyField( "push_apart" ) == 1 - noArcing = weap.GetWeaponInfoFileKeyField( "no_arcing" ) != null && weap.GetWeaponInfoFileKeyField( "no_arcing" ) == 1 - } + entity weapon = expect entity( zapInfo.weapon ) + hasFastPacitor = weapon.GetWeaponInfoFileKeyField( "push_apart" ) != null && weapon.GetWeaponInfoFileKeyField( "push_apart" ) == 1 + noArcing = weapon.GetWeaponInfoFileKeyField( "no_arcing" ) != null && weapon.GetWeaponInfoFileKeyField( "no_arcing" ) == 1 + float critScale = weapon.GetWeaponSettingFloat( eWeaponVar.critical_hit_damage_scale ) if ( target.GetArmorType() == ARMOR_TYPE_HEAVY ) { - if ( IsValid( zapInfo.weapon ) ) - { - entity weapon = expect entity( zapInfo.weapon ) - damageMin = weapon.GetWeaponSettingInt( damageFarValueTitanArmor ) - damageMax = weapon.GetWeaponSettingInt( damageNearValueTitanArmor ) - } - else - { - damageMin = 100 - damageMax = zapInfo.player.IsNPC() ? 1200 : 800 - } + damageMin = weapon.GetWeaponSettingInt( damageFarValueTitanArmor ) + damageMax = weapon.GetWeaponSettingInt( damageNearValueTitanArmor ) } else { - if ( IsValid( zapInfo.weapon ) ) - { - entity weapon = expect entity( zapInfo.weapon ) - damageMin = weapon.GetWeaponSettingInt( damageFarValue ) - damageMax = weapon.GetWeaponSettingInt( damageNearValue ) - } - else - { - damageMin = 120 - damageMax = zapInfo.player.IsNPC() ? 140 : 275 - } + damageMin = weapon.GetWeaponSettingInt( damageFarValue ) + damageMax = weapon.GetWeaponSettingInt( damageNearValue ) if ( target.IsNPC() ) { @@ -612,11 +586,10 @@ function ZapTarget( zapInfo, target, beamStartPos, beamEndPos, chainNum = 1 ) } - local chargeRatio = GetArcCannonChargeFraction( zapInfo.weapon ) - if ( IsValid( zapInfo.weapon ) && !zapInfo.weapon.GetWeaponSettingBool( eWeaponVar.charge_require_input ) ) + local chargeRatio = GetArcCannonChargeFraction( weapon ) + if ( !weapon.GetWeaponSettingBool( eWeaponVar.charge_require_input ) ) { // use distance for damage if the weapon auto-fires - entity weapon = expect entity( zapInfo.weapon ) float nearDist = weapon.GetWeaponSettingFloat( damageNearDistance ) float farDist = weapon.GetWeaponSettingFloat( damageFarDistance ) @@ -629,10 +602,19 @@ function ZapTarget( zapInfo, target, beamStartPos, beamEndPos, chainNum = 1 ) damageAmount = GraphCapped( zapInfo.chargeFrac, 0, chargeRatio, damageMin, damageMax ) } local damageFalloff = ARC_CANNON_DAMAGE_FALLOFF_SCALER - if ( IsValid( zapInfo.weapon ) && zapInfo.weapon.HasMod( "splitter" ) ) + if ( weapon.HasMod( "splitter" ) ) damageFalloff = SPLITTER_DAMAGE_FALLOFF_SCALER damageAmount *= pow( damageFalloff, chainNum - 1 ) + local isMissile = ( target.GetClassName() == "rpg_missile" ) + if ( !isMissile ) + wait ARC_CANNON_FORK_DELAY + else + wait 0.05 + + if ( !IsValid( target ) || !IsValid( zapInfo.player ) ) + return + local dmgSourceID = zapInfo.dmgSourceID // Update Later - This shouldn't be done here, this is not where we determine if damage actually happened to the target @@ -660,13 +642,13 @@ function ZapTarget( zapInfo, target, beamStartPos, beamEndPos, chainNum = 1 ) // Do 3rd person effect on the body asset effect string tag - target.TakeDamage( damageAmount, zapInfo.player, zapInfo.player, { origin = beamEndPos, force = Vector(0,0,0), scriptType = deathPackage, weapon = zapInfo.weapon, damageSourceId = dmgSourceID,criticalHitScale = zapInfo.weapon.GetWeaponSettingFloat( eWeaponVar.critical_hit_damage_scale ) } ) + target.TakeDamage( damageAmount, zapInfo.player, zapInfo.player, { origin = beamEndPos, force = Vector(0,0,0), scriptType = deathPackage, weapon = zapInfo.weapon, damageSourceId = dmgSourceID,criticalHitScale = critScale } ) //vector dir = Normalize( beamEndPos - beamStartPos ) //vector velocity = dir * 600 //PushPlayerAway( target, velocity ) //PushPlayerAway( expect entity( zapInfo.player ), -velocity ) - if ( IsValid( zapInfo.weapon ) && hasFastPacitor ) + if ( IsValid( weapon ) && hasFastPacitor ) { if ( IsAlive( target ) && IsAlive( expect entity( zapInfo.player ) ) && target.IsTitan() ) { diff --git a/Northstar.Custom/paks/bt.rpak b/Northstar.Custom/paks/bt.rpak Binary files differnew file mode 100644 index 00000000..7a4b9e31 --- /dev/null +++ b/Northstar.Custom/paks/bt.rpak diff --git a/Northstar.Custom/paks/bt.starpak b/Northstar.Custom/paks/bt.starpak Binary files differnew file mode 100644 index 00000000..70549d51 --- /dev/null +++ b/Northstar.Custom/paks/bt.starpak diff --git a/Northstar.Custom/paks/giftwrap.rpak b/Northstar.Custom/paks/giftwrap.rpak Binary files differnew file mode 100644 index 00000000..7b9200b3 --- /dev/null +++ b/Northstar.Custom/paks/giftwrap.rpak diff --git a/Northstar.Custom/paks/giftwrap.starpak b/Northstar.Custom/paks/giftwrap.starpak Binary files differnew file mode 100644 index 00000000..46ea6d8d --- /dev/null +++ b/Northstar.Custom/paks/giftwrap.starpak diff --git a/Northstar.Custom/paks/leaves.rpak b/Northstar.Custom/paks/leaves.rpak Binary files differnew file mode 100644 index 00000000..b17346dd --- /dev/null +++ b/Northstar.Custom/paks/leaves.rpak diff --git a/Northstar.Custom/paks/leaves.starpak b/Northstar.Custom/paks/leaves.starpak Binary files differnew file mode 100644 index 00000000..b37aa523 --- /dev/null +++ b/Northstar.Custom/paks/leaves.starpak diff --git a/Northstar.Custom/paks/rpak.json b/Northstar.Custom/paks/rpak.json index 743468b4..522c558b 100644 --- a/Northstar.Custom/paks/rpak.json +++ b/Northstar.Custom/paks/rpak.json @@ -1,5 +1,10 @@ {
"Postload": {
- "mp_weapon_shotgun_doublebarrel.rpak": "common.rpak"
+ "mp_weapon_shotgun_doublebarrel.rpak": "common.rpak",
+ "leaves.rpak": "common.rpak",
+ "tree_stump.rpak": "common.rpak",
+ "bt.rpak": "common.rpak",
+ "giftwrap.rpak": "common.rpak",
+ "snow.rpak": "common.rpak"
}
-}
\ No newline at end of file +}
diff --git a/Northstar.Custom/paks/snow.rpak b/Northstar.Custom/paks/snow.rpak Binary files differnew file mode 100644 index 00000000..4756b6c7 --- /dev/null +++ b/Northstar.Custom/paks/snow.rpak diff --git a/Northstar.Custom/paks/snow.starpak b/Northstar.Custom/paks/snow.starpak Binary files differnew file mode 100644 index 00000000..7f3dbf19 --- /dev/null +++ b/Northstar.Custom/paks/snow.starpak diff --git a/Northstar.Custom/paks/tree_stump.rpak b/Northstar.Custom/paks/tree_stump.rpak Binary files differnew file mode 100644 index 00000000..3cdf1866 --- /dev/null +++ b/Northstar.Custom/paks/tree_stump.rpak diff --git a/Northstar.Custom/paks/tree_stump.starpak b/Northstar.Custom/paks/tree_stump.starpak Binary files differnew file mode 100644 index 00000000..b233176e --- /dev/null +++ b/Northstar.Custom/paks/tree_stump.starpak |