Skip to content

v2.15.0

Compare
Choose a tag to compare
@DrVrej DrVrej released this 12 Jul 16:39
· 371 commits to master since this release

New

  • Added move frame velocity, object velocity, and sequence velocity to the NPC's corpse based on the NPC's current status, including death animations (Damage force is still added onto this velocity!)
  • Added localized bone velocity to NPC's corpses if it is a bullet damage!
  • Added more Source Hammer input support for the NPCs such changing health or starting an scripted scene
  • Added Source hammer output support to the NPCs (OnDamage, OnDeath, NPCKilled)
  • Added level transition support to the SNPC Bases (Including Half-Life 1 & 2 campaign!)
  • Added multi-damage type support for gib and flinch systems for NPCs!
    • DMG_ALWAYSGIB is now detected, causing the NPC to forcibly gib if possible (Disabled for bullets)
    • Base will now check for DMG_NEVERGIB, if detected, default types will be overridden and the NPC will NOT gib!
    • Removed DMG_AIRBOAT and DMG_DIRECT from the default gib list as it made no sense to have these gib NPCs
  • New AI Updates:
    • Added new AI: Player allied NPCs will now eventually become enemy if they witness the player killing x amount of allies (Default 3)
    • Added animation linking system, allowing a developer to smoothly link unlimited number of animations together
    • Added new behavior system for Tank NPCs --> If enemy is close then run over, if enemy is close but high up then move away to allow the gunner to fire, if enemy is very far then move towards it
    • Added weapon aiming animations for human NPCs (Def: ACT_IDLE_ANGRY), this helps lessen the issue of playing firing animations without firing
    • Added shell preparation system for Tank NPCs, allowing them to fire instantly if the shell is fully loaded, EX: If enemy hides and shell is reloaded & ready to fire, it will fire it as soon as it can
    • Aerial & Aquatic NPCs can now be follow players, be medics, respond to call-for-help, be used by the NPC Mover Tool, Move to an investigation sound, etc!
    • Aerial & Aquatic NPCs now accelerate and decelerate as they move to their destinations
    • Completely redid the AI for Aerial & Aquatic NPCs!
    • When a player collides with an NPC while ignore players is on, it no longer turns to look at the player's direction
    • Creature NPCs no longer attack props that had their collision disabled through the context menu
    • Sequences and idle animations now have walk frames!
    • Tanks are now drive much faster by default
    • Increased the default tank firing distance from 5,000 to 6,500
    • A human NPC that's being controlled with its weapon holstered, it will not play the firing animation
    • Human NPCs who were scared because they didn't have a weapon no longer go to the last enemy position after resetting their enemy
    • Animations are now seeded, which are accessed through self.CurAnimationSeed
    • All NPCs now ignore "monster_furniture" (Appears in HL1) and "npc_furniture" (Appears in HL2)
    • If a human NPC is set to a stationary, it will not attempt to look for a hidden spot
    • Fixed animation walk frames not applying if the previous animation was the same!
    • Fixed animations with delays still playing when cut-off before their play time executes (Fixed by using the new seeded system)
    • Fixed movement animations continue playing after aerial or aquatic NPC has stopped moving
    • Fixed aquatic NPCs that are outside of water trying to chance enemies that are in water
    • Fixed tank NPCs sometimes firing the shell in the opposite direction
    • Fixed if ignored entities were spawned before the NPC, the NPC would detect it!
    • Fixed humans creating the grenade entity at the wrong position, resulting in hitting itself, was very visible when throwing back an enemy grenade
    • Fixed humans that don't have a scared behavior nor a weapon freeze when they seen an enemy, they now at least play idle stand animation
    • Fixed humans not playing their scared idle stand animation
    • Fixed if NPC is following a player that left the game, it would create errors
    • Fixed medic/healing NPCs will often break their current animation or attack just to heal an ally
    • Fixed after allied NPCs become enemy to the player, they print "x no longer likes you" every time the player damages them after loosing sight
    • Fixed Aerial/Aquatic NPCs not properly playing their idle and attack animations
    • Potential fix for a rare AI-related error
  • New Idle Stand System:
    • When the idle stand table is changed and the current idle animation isn't in it, the base will now instantly change the idle animation!
    • Fixed when a custom animation plays while it's unable to reach the enemy, the animation would repeat 2-3 times before idle animation actually plays!
  • Added a box at the bottom left corner of the spawn menu:
    • Has a checkbox to disable AI, turn on ignore players, turn on collidable/keep corpses and spawn NPCs as guards
    • Weapon override option that includes ONLY VJ NPC weapons including the options "none" and "default weapon"
  • New Menu Changes:
    • Dev Settings:
      • Added Print Weapon-Related Information (vj_npc_dev_printwepinfo)
      • Removed print weapon, print accuracy, print ammo
    • Organized and reworded some of the settings & options
    • Removed "Show HUD Display on SNPC killed" option as it can potentially cause issues
  • Added Super Physcannon Support for NPCs:
    • Death animations no longer player
    • Weapons no longer spawn for humans
    • Fixed duplicate corpse spawning, now only the engine-created corpse will spawn

General Changes & Improvements

  • Weapons, items, and extra corpse pieces spawned by NPCs now have identical velocity as the NPC's corpse
  • When using the NPC mover tool, at least 1 NPC will now play "OnReceiveOrder" sound (If available)
  • Default HL1 & HL2 NPCs can now know when they killed a VJ NPC and will react to it
  • New activated/deactivated sounds for the bullseye entity
  • When a human NPC is killed by a combine ball, their weapon now acts properly by applying no gravity and proper velocity
  • Performance optimizations were applied in parts of the base, especially tank and weapon bases
  • NPCs now respect the damage type DMG_REMOVENORAGDOLL
  • Base will now check to make sure April 2021 or newer GMod update is installed as it uses many new features from it
  • Updated Russian translations
  • More parts of the base are now translatable
  • Removed convars: vj_npc_showhudonkilled, vj_npc_printammo, vj_npc_printweapon, vj_npc_printaccuracy

General Fixes

  • Fixed NPC Relationship tool not turning off self.PlayerFriendly when CLASS_PLAYER_ALLY is not set!
  • Fixed NPC bullseye taking damage after the new GMod update
  • Fixed NPC Spawner creating errors when spawning a non-NPC entity with a weapon table
  • Fixed bone-cracking sound not playing when a tank runs over an enemy
  • Fixed when players using VJ weapons that utilize the projectile base, they were unable to damage themselves if ignore players is on!
  • Fixed when using NPC controller on non-VJ NPCs, it spams a console error
  • Fixed a console notice on map spawn (Game trying to find a non-existent file)
  • Fixed a console error appearing when dev mode is enabled for the creature base

Notable Developer Changes

  • New global functions: VJ_ApplySpeedEffect(ent, speed, setTime)
  • Added list VJBASE_SPAWNABLE_NPC_WEAPON which holds VJ-only NPC weapons
  • Added client side convar, vj_npc_spawn_guard
  • Added tags: self.VJ_IsDetectableDanger, self.VJ_IsPickupableDanger
  • util.VJ_SphereDamage has been completely revamped with ton of fixes & optimizations!
  • Projectile Base:
    • Added self:CustomOnPreInitialize(), self:CustomOnDoDamage_Direct(data, phys, hitEnt)
    • Fixed self.HasStartupSounds not working
    • Removed: self.GetOwnerIndex, self.ShouldSetOwner
  • Spawner Base:
    • Added a chance system:
      • Adding : at the end of the entity name applies the chance system
      • System starts at 1, so :1 means that it always spawns, recommended to just not add :1 for entities that spawn very commonly, just leave the class name only
      • If no entity is left empty or set to :1, during randomization, the base will spawn the last NPC it checks!
      • Added self.HasSpawnEntitySound and self.EntitiesToSpawn.SpawnAngle
    • If a model is set through self.Model, it will now draw the model
    • Fixed when a table of weapons is used for a non-removing spawner, the NPC would constantly respawn with the same weapon
    • Fixed single spawners attempting to undo multiple times
    • self.EntitiesToSpawn.SpawnPosition is now optional
    • Changed self:CustomOnEntitySpawn(EntityName, SpawnPosition, Entities, TheEntity) to self:CustomOnEntitySpawn(ent, spawnKey, spawnTbl, initSpawn)
    • Cleaned up & optimized the code + Added comments for readability
    • Renamed self:CustomOnInitialize_BeforeNPCSpawn() to self:CustomOnInitialize()
    • Renamed self:CustomOnThink_BeforeAliveChecks() to self:CustomOnThink()
    • Removed EntityName from self.EntitiesToSpawn as it's no longer needed!
    • Removed self.NumberOfEntitiesToSpawn, self.AlreadyDoneVJBaseSpawnerDisabled, self.NextTimedSpawnT
  • SNPC Bases:
    • New: self.CurAnimationSeed, self.SavedDmgInfo, self:IsDefaultGibDamageType(dmgType), self:IsBusyWithBehavior(), self:IsBusy(), self:GetLastPosition(), self:GetLastDamageHitGroup(), self:GetLastDamageTime(), self:GetTotalDamageCount()
    • New AA: self.AA_GroundLimit, self.AA_MoveAccelerate, self.AA_MoveDecelerate, self.AA_CurrentMoveTime, self.AA_CurrentMoveType, self.AA_CurrentMovePos
    • New (Humans): self.AnimTbl_WeaponAim
    • Added parameter extraOptions.OnFinish() to the VJ_ACT_PLAYACTIVITY
    • Added parameter controlEnt to self:Controller_Initialize() and self:Controller_IntMsg()
    • Added parameters returnPos, and sides to self:VJ_CheckAllFourSides()
    • Added self:CustomOnKeyBindPressed(key) to the NPC Controller
    • self.GrenadeAttackModel is now a table and empty by default
    • self:CustomOnMedic_OnHeal() now has a parameter ent, which is the entity it's healing and can be returned false to override actual healing code
    • Renamed self:DoPropVisibiltyCheckForPushAttackProps() to self:DoPropVisibility()
    • Renamed self.HasSeenGrenade to self.NextGrenadeDetectionT, and is now a CurTime() based variable
    • Merged self.PainSoundPitch1 and self.PainSoundPitch2 to self.PainSoundPitch
    • Merged self.DeathSoundPitch1 and self.DeathSoundPitch2 to self.DeathSoundPitch
    • Removed: self.HasHitGroupFlinching, self.MeleeAttackSetEnemyOnFire, self.MeleeAttackSetEnemyOnFireTime, self.SetCorpseOnFire, self.HasDeathNotice, self.DeathNoticePosition, self.DeathNoticeWriting, self.DisableWorldShakeOnMoveWhileWalking, self.DisableWorldShakeOnMoveWhileRunning, self.LatestDmgInfo, self.JumpLegalLandingTime, self.Passive_NextRunOnTouchT, self.Passive_NextRunOnDamageT, self.VJ_ScaleHitGroupDamage, self.FollowPlayerChat, self.FollowPlayerKey, self.AnimTbl_LostWeaponSight, self.AA_MoveLength_Chase, self.AA_MoveLength_Wander, self.AA_CanPlayMoveAnimation, self.AA_CurrentTurnAng, self.AA_ConstantlyMove
  • Tank Base:
    • Now you only need to change self.Tank_AngleDiffuseNumber to make any type of rotated model to work!
    • New: self:Tank_ShellFireEffects(), self:Tank_ShellFireVelocity(shell, spawnPos, calculatedVel, phys), self:Tank_CustomOnShellFire_BeforeShellSpawn(shell, spawnPos), self:Tank_CustomOnReloadShell(), self.Tank_DistRanOver, self.Tank_Shell_NextFireTime, self.Tank_Shell_Status
    • Added sound level & pitch variables for some of the sound tables
    • Added self.Tank_TurningSpeed for the gunner base
    • self.Tank_SeeFar now defaults to 6000
    • Can now create a chassis tank without a turret, this can allow the development of armored vehicles without guns (EX: Transport vehicles)
    • Renamed self.Tank_MoveAwaySpeed to self.Tank_DrivingSpeed
    • Renamed self.Tank_AngleDiffuseGeneralNumber to self.Tank_AngleDiffuseFiringLimit
    • Removed: self.Tank_UseNegativeAngleDiffuseNumber, self.Tank_ForwardSpead, self.Tank_UseGetRightForSpeed, self.Tank_UsesRightAngles, self.Tank_SeeLimit, self.Tank_SpawningAngle, self.Tank_ShellReady, self.FiringShell, self.Tank_ResetedEnemy