Skip to content

Revamp Developer Changes

Developer changes in VJ Base Revamp, version 3.0.0.

Important Notes

This will continue to update as more changes are made. To follow the changes check Here or follow the commits channel in the Discord server.

  • Most VJ_ functions and enums have all been converted to the VJ library, I recommend updating them!
  • Most CustomOn* functions have been renamed & merged make sure to check the corresponding base file for the new names!
  • Many removed/renamed functions and variables have backwards compatibility though it's highly recommended to update them!

Warning

Dummy repository Official Addon Example

Plugin autoruns have been completely revamped, here is how to update them:

  1. Create the following directory in your addon's lua folder vj_base/plugins.
  2. Create a lua file inside it with a unique name, example: lua/vj_base/plugins/addon_name.lua.
  3. Navigate to your addon's existing autorun folder.
  4. Copy the actual content excluding VJ Base check, and codes that are included in the old dummy file.
  5. Paste it in lua/vj_base/plugins/addon_name.lua.
  6. At the top of the file add VJ.AddPlugin("", "") where the first string is the addon name and second is the type, example: VJ.AddPlugin("Zombie SNPCs", "NPC").
  7. Go back to the existing autorun file and delete it.
  8. Copy and paste the vj_base_check.lua file found in the dummy repository inside your addon's autorun file just like the dummy repository.

Globals & Misc

  • Added:
    • VJ.GetMoveVelocity(ent)
    • VJ.GetMoveDirection(ent, ignoreZ)
    • VJ.TraceDirections(ent, trType, maxDist, requireFullDist, returnAsDict, numDirections, excludeForward, excludeBack, excludeLeft, excludeRight)
    • VJ.GetNearestPositions(ent1, ent2, centerEnt1)
    • VJ.GetNearestDistance(ent1, ent2, centerEnt1)
    • VJ.AddKillIcon(class, name, texture, data)
  • Added AI tasks:
    • TASK_VJ_PLAY_ACTIVITY
    • TASK_VJ_PLAY_SEQUENCE
  • Added to entity meta table:
    • ENTITY:CanBeEngaged(otherEnt, distance),
    • ENTITY:HandlePerceivedRelationship(otherEnt, distance, isFriendly)
  • Added VJ.CalculateTrajectory() which is a newer version of ENTITY:CalculateProjectile()
  • Added global enum:
    • D_VJ_INTEREST
    • VJ.DMG_*
    • VJ.ALERT_STATE_*
    • VJ.DANGER_TYPE_*
    • VJ.WEP_ATTACK_STATE_*
    • VJ.MEM_*
    • VJ.ANIM_TYPE_*
    • VJ.BLOOD_COLOR_*
    • VJ.PROJ_TYPE_*
    • VJ.PROJ_COLLISION_*
    • VJ.KILLICON_*
    • VJ.COLOR_*
  • Added global objects:
    • VJ_RecipientFilter
    • VJ_Nodegraph
  • Added vj_ai_nodegraph module
  • Moved ENTITY:DecideAnimationLength() from entity meta table to VJ library → VJ.AnimDurationEx(ent, anim, override, decrease)
  • Default Half-Life 1 & 2 NPCs now respect self.AlliedWithPlayerAllies
  • Added version parameter to VJ.AddPlugin
  • Deprecated: ENTITY:CalculateProjectile()
  • Renamed module ai_vj_schedulevj_ai_schedule
  • Renamed module ai_vj_taskvj_ai_task
  • Renamed VJ.AddAddonPropertyVJ.AddPlugin
  • Removed unused module sound_vj_track
  • Removed self:CustomOnInitialize() from prop_vj_animatable
  • Removed VJ_CreateBoneFollower and the associated entity obj_vj_bonefollower
  • Removed global functions:
    • VJ_PICKRANDOMTABLE
    • VJ_GetSequenceName
    • VJ_FindInCone
    • VJ_RemoveAnimExtensions
    • GetTaskList

All Bases

  • Renamed self:CustomOnPreInitialize()self:PreInit()
  • Renamed self:CustomOnInitialize()self:Init()
  • Renamed self:CustomOnThink()self:OnThink()

NPC Bases

  • Added:
    • self:CheckRelationship(ent)
    • self:SetRelationshipMemory(ent, memoryName, memoryValue)
    • self:OnFollow(status, ent)
    • self:SetTurnTarget(target, faceTime, stopOnFace, visibleOnly)
    • self:GetAimPosition(target, aimOrigin, predictionRate, projectileSpeed)
    • self:GetAimSpread(target, goalPos, modifier)
    • self:SetPhysicsDamageScale(scale)
    • self:IsScheduleFinished(schedule)
    • self:UpdateAnimationTranslations(wepHoldType)
    • self:SetAnimationTranslations(wepHoldType)
    • self:ResolveAnimation(tbl)
    • self.JumpParams
    • self.AnimationTranslations
    • self.CurrentAttackAnimationTime
    • self.LastAnimationType
    • self.CanReceiveOrders
    • self.GibOnDeathFilter
    • self.DeathAllyResponse
    • self.DeathAllyResponse_MoveLimit
    • self.DamageResponse
  • Added (Humans):
    • self:OnDangerDetected(dangerType, data)
    • self:OnGrenadeAttack(status, overrideEnt, landDir)
    • self:OnGrenadeAttackExecute(status, grenade, overrideEnt, landDir, landingPos)
    • self.Weapon_AimTurnDiff
    • self.GrenadeAttackBone
    • self.NextAnyAttackTime_Grenade
    • self.WeaponAttackState
  • Added (Creatures):
    • self.EatCooldown
  • Added Client side functions:
    • self:CustomOnInitialize()
    • self:Controller_CalcView(ply, origin, angles, fov, camera, cameraMode)
  • Renamed self:VJ_ACT_PLAYACTIVITY()self:PlayAnim()
  • Changes to self:PlayAnim():
    • Added new returns (in order): anim, animDur, animType
    • Added "LetAttacks" option for stopActivities, makes the animation interruptible by attacks
    • Added "Visible" option for faceEnemy, only faces the enemy while it's visible
    • Added fail safe if wrong input is given for stopActivitiesTime
    • Will now translate the animation if there is one
    • Now correctly calculates the playback rate
    • Extra option PlayBackRate is now per-animation!
    • Removed extra parameters: SequenceInterruptible, SequenceDuration
    • Fixed returning nil in certain cases for the creature base
  • Added parameters moveType and sdFile to self:OnFootstepSound()
  • Grenade attack is now seeded and supports events similar to other attacks
  • self.RangeAttackProjectiles and self.GrenadeAttackEntity can now be a tables
  • self.MeleeAttackDistance and self.MeleeAttackDamageDistance can now be set to false to let the base auto calculate the distance based on the NPC's collision bounds
  • self:GetShootPos() is now defaulted to Vector(0, 0, 55) instead of the NPC's origin
  • self:Follow() now has a second return value
  • self:IsBusy() now has a parameter checkType which can be used to only check behaviors or activities
  • self.FootstepSoundTimerWalk and self.FootstepSoundTimerRun can now accept false, which will disable them
  • self.BecomeEnemyToPlayer now accepts a number, which determines the level to become enemy
  • self.NextGrenadeAttackTime now works the same way as other attacks
  • self.MeleeAttackStopOnHit and self.LeapAttackStopOnHit now work much better
  • All attack timer variables starting with Next can now accept VJ.SET to randomize them
  • Following animation variables can now be set to false to disable them:
    • self.AnimTbl_MeleeAttack
    • self.AnimTbl_RangeAttack
    • self.AnimTbl_LeapAttack
    • self.AnimTbl_GrenadeAttack
    • self.AnimTbl_WeaponAttackGesture
    • self.AnimTbl_CallForHelp
    • self.AnimTbl_Medic_GiveHealth
    • self.AnimTbl_DamageAllyResponse
  • self.CanFlinch now uses false, true, and "DamageTypes" instead of numbers
  • self.FlinchHitGroupMap can now accept a non-table value for the hitgroup name
  • Renamed self:CustomOnThink_AIEnabled()self:OnThinkActive()
  • Renamed self:CustomOnAcceptInput()self:OnInput()
  • Renamed self:CustomOnHandleAnimEvent()self:OnAnimEvent()
  • Renamed self:CustomOnTakeDamage_OnBleed()self:OnBleed()
  • Renamed self:CustomOnAlert()self:OnAlert()
  • Renamed self:CustomOnInvestigate()self:OnInvestigate()
  • Renamed self:CustomOnCallForHelp()self:OnCallForHelp()
  • Renamed self:CustomOnPlayerSight()self:OnPlayerSight()
  • Renamed self:CustomOn_PoseParameterLookingCode()self:OnUpdatePoseParamTracking()
  • Renamed self:CustomOnDeath_AfterCorpseSpawned()self:OnCreateDeathCorpse()
  • Renamed self:CustomOnDoKilledEnemy()self:OnKilledEnemy()
  • Renamed self:CustomOnTouch()self:OnTouch()
  • Renamed self:CustomOnWeaponReload()self:OnWeaponReload()
  • Renamed self:CustomOnWeaponAttack()self:OnWeaponAttack()
  • Renamed self:CustomOnMoveRandomlyWhenShooting()self:OnWeaponStrafe()
  • Renamed self:CustomOnDropWeapon()self:OnDeathWeaponDrop()
  • Renamed self:CustomOnFootStepSound()self:OnFootstepSound()
  • Renamed self:FootStepSoundCode()self:PlayFootstepSound()
  • Renamed self:VJ_DecideSoundPitch()self:GetSoundPitch()
  • Renamed self:VJ_DoSetEnemy()self:ForceSetEnemy()
  • Renamed self:DoChaseAnimation()self:MaintainAlertBehavior()
  • Renamed self:VJ_GetDifficultyValue()self:ScaleByDifficulty()
  • Renamed self:OnCreateSound(sdFile)self:OnPlaySound(sdFile)
  • Renamed self:RangeAttackCode_OverrideProjectilePos(projectile)self:RangeAttackProjPos(projectile)
  • Renamed self:RangeAttackCode_GetShootPos(projectile)self:RangeAttackProjVel(projectile)
  • Renamed self:GetMeleeAttackDamageOrigin()self:MeleeAttackTraceOrigin()
  • Renamed self:SetUpGibesOnDeath()self:HandleGibOnDeath()
  • Renamed self:MeleeAttackCode()self:ExecuteMeleeAttack()
  • Renamed self:RangeAttackCode()self:ExecuteRangeAttack()
  • Renamed self:LeapDamageCode()self:ExecuteLeapAttack()
  • Renamed self:CustomAttack()self:OnThinkAttack(isAttacking, enemy)
  • Renamed self.LatestEnemyDistanceself.EnemyData.Distance
  • Renamed self.NearestPointToEnemyDistanceself.EnemyData.DistanceNearest
  • Renamed self.SoundTbl_MoveOutOfPlayersWayself.SoundTbl_YieldToPlayer
  • Renamed self.CustomBlood_Decalself.BloodDecal
  • Renamed self.CustomBlood_Particleself.BloodParticle
  • Renamed self.CustomBlood_Poolself.BloodPool
  • Renamed self.HasShootWhileMovingself.Weapon_CanMoveFire
  • Renamed self.WeaponBackAway_Distanceself.Weapon_RetreatDistance
  • Renamed self.NextFlinchTimeself.FlinchCooldown
  • Renamed self.HitGroupFlinching_Valuesself.FlinchHitGroupMap
  • Renamed self.HitGroupFlinching_DefaultWhenNotHitself.FlinchHitGroupPlayDefault
  • Renamed self.NextCallForHelpTimeself.CallForHelpCooldown
  • Renamed self.CallForHelpAnimationFaceEnemyself.CallForHelpAnimFaceEnemy
  • Renamed self.NextCallForHelpAnimationTimeself.CallForHelpAnimCooldown
  • Renamed self.InvestigateSoundDistanceself.InvestigateSoundMultiplier
  • Renamed self.CanThrowBackDetectedGrenadesself.CanRedirectGrenades
  • Renamed self.AttackStatusself.AttackState
  • Renamed self.CombatFaceEnemyself.CanTurnWhileMoving
  • Renamed self.GrenadeAttackFussTimeself.GrenadeAttackFuseTime
  • Renamed self.ThrowGrenadeChanceself.GrenadeAttackChance
  • Renamed self.NoWeapon_UseScaredBehaviorself.Weapon_UnarmedBehavior
  • Renamed self.WeaponSpreadself.Weapon_Accuracy
  • Renamed self.AnimTbl_WeaponAttackFiringGestureself.AnimTbl_WeaponAttackGesture
  • Renamed self.CanUseSecondaryOnWeaponAttackself.Weapon_CanSecondaryFire
  • Renamed self.WeaponAttackSecondaryTimeUntilFireself.Weapon_SecondaryFireTime
  • Renamed self.AllowWeaponReloadingself.Weapon_CanReload
  • Renamed self.WeaponReload_FindCoverself.Weapon_FindCoverOnReload
  • Renamed self.MoveRandomlyWhenShootingself.Weapon_Strafe
  • Renamed self.WaitForEnemyToComeOutself.Weapon_OcclusionDelay
  • Renamed self.WaitForEnemyToComeOutTimeself.Weapon_OcclusionDelayTime
  • Renamed self.WaitForEnemyToComeOutDistanceself.Weapon_OcclusionDelayMinDist
  • Renamed self.CanCrouchOnWeaponAttackself.Weapon_CanCrouchAttack
  • Renamed self.CanCrouchOnWeaponAttackChanceself.Weapon_CrouchAttackChance
  • Renamed self.MoveOutOfFriendlyPlayersWayself.YieldToAlliedPlayers
  • Renamed self.UsePlayerModelMovementself.UsePoseParameterMovement
  • Renamed self.SoundTbl_OnKilledEnemyself.SoundTbl_KilledEnemy
  • Renamed self.HasOnKilledEnemySoundsself.HasKilledEnemySounds
  • Renamed self.OnKilledEnemySoundChanceself.OnKilledEnemySoundChance
  • Renamed self.NextSoundTime_OnKilledEnemyself.NextSoundTime_KilledEnemy
  • Renamed self.OnKilledEnemySoundLevelself.KilledEnemySoundLevel
  • Renamed self.OnKilledEnemySoundPitchself.KilledEnemySoundPitch
  • Renamed self.OnlyDoKillEnemyWhenClearself.KilledEnemySoundLast
  • Renamed self.HasOnReceiveOrderSoundsself.HasReceiveOrderSounds
  • Renamed self.SoundTbl_OnReceiveOrderself.SoundTbl_ReceiveOrder
  • Renamed self.OnReceiveOrderSoundChanceself.ReceiveOrderSoundChance
  • Renamed self.OnReceiveOrderSoundLevelself.ReceiveOrderSoundLevel
  • Renamed self.OnReceiveOrderSoundPitchself.ReceiveOrderSoundPitch
  • Renamed self.SoundTbl_OnDangerSightself.SoundTbl_DangerSight
  • Renamed self.SoundTbl_OnGrenadeSightself.SoundTbl_GrenadeSight
  • Renamed self.NoChaseAfterCertainRangeself.LimitChaseDistance
  • Renamed self.NoChaseAfterCertainRange_CloseDistanceself.LimitChaseDistance_Min
  • Renamed self.NoChaseAfterCertainRange_FarDistanceself.LimitChaseDistance_Max
  • Renamed self.AlertedToIdleTimeself.AlertTimeout
  • Renamed self.IsMedicSNPCself.IsMedic
  • Renamed self.Medic_HealthAmountself.Medic_HealAmount
  • Renamed self.Medic_CanBeHealedself.VJ_ID_Healable
  • Renamed self.SoundTbl_MedicAfterHealself.SoundTbl_MedicOnHeal
  • Renamed self.MedicAfterHealSoundChanceself.MedicOnHealSoundChance
  • Renamed self.BeforeHealSoundLevelself.MedicBeforeHealSoundLevel
  • Renamed self.AfterHealSoundLevelself.MedicOnHealSoundLevel
  • Renamed self.BeforeHealSoundPitchself.MedicBeforeHealSoundPitch
  • Renamed self.AfterHealSoundPitchself.MedicOnHealSoundPitch
  • Renamed self.HasDeathRagdollself.HasDeathCorpse
  • Renamed self.AllowedToGibself.CanGib
  • Renamed self.HasGibOnDeathself.CanGibOnDeath
  • Renamed self.HasGibDeathParticlesself.HasGibOnDeathEffects
  • Renamed self.HasItemDropsOnDeathself.DropDeathLoot
  • Renamed self.ItemDropsOnDeathChanceself.DeathLootChance
  • Renamed self.ItemDropsOnDeath_EntityListself.DeathLoot
  • Renamed self.WaitBeforeDeathTimeself.DeathDelayTime
  • Renamed self.GrenadeAttackThrowDistanceself.GrenadeAttackMaxDistance
  • Renamed self.GrenadeAttackThrowDistanceCloseself.GrenadeAttackMinDistance
  • Renamed self.NextThrowGrenadeTimeself.NextGrenadeAttackTime
  • Renamed self.TimeUntilGrenadeIsReleasedself.GrenadeAttackThrowTime
  • Renamed self.CallForBackUpOnDamageself.DamageAllyResponse
  • Renamed self.CallForBackUpOnDamageAnimationself.AnimTbl_DamageAllyResponse
  • Renamed self.NextCallForBackUpOnDamageTimeself.DamageAllyResponse_Cooldown
  • Renamed self.VJC_Dataself.ControllerParams
  • Renamed self.FriendsWithAllPlayerAlliesself.AlliedWithPlayerAllies
  • Renamed self.UseTheSameGeneralSoundPitchself.MainSoundPitchStatic
  • Renamed self.AllowMovementJumpingself.JumpParams.Enabled
  • Renamed self.MaxJumpLegalDistanceself.JumpParams.MaxRise
  • Renamed self.MoveOrHideOnDamageByEnemyself.CombatDamageResponse
  • Renamed self.MoveOrHideOnDamageByEnemy_HideTimeself.CombatDamageResponse_CoverTime
  • Renamed self.Immune_AcidPoisonRadiationself.Immune_Toxic
  • Renamed self.Immune_Blastself.Immune_Explosive
  • Renamed self.StopMeleeAttackAfterFirstHitself.MeleeAttackStopOnHit
  • Renamed self.MeleeAttackDSPSoundTypeself.MeleeAttackDSP
  • Renamed self.RangeAttackEntityToSpawnself.RangeAttackProjectiles
  • Renamed self.RangeDistanceself.RangeAttackMaxDistance
  • Renamed self.RangeToMeleeDistanceself.RangeAttackMinDistance
  • Renamed self.StopLeapAttackAfterFirstHitself.LeapAttackStopOnHit
  • Renamed self.LeapDistanceself.LeapAttackMaxDistance
  • Renamed self.LeapToMeleeDistanceself.LeapAttackMinDistance
  • Renamed self.DisableWeaponsself.Weapon_Disabled
  • Renamed self.Weapon_FiringDistanceCloseself.Weapon_MinDistance
  • Renamed self.Weapon_FiringDistanceFarself.Weapon_MaxDistance
  • Renamed self.DisableFindEnemyself.EnemyDetection
  • Renamed self.DisableTouchFindEnemyself.EnemyTouchDetection
  • Renamed self.FindEnemy_CanSeeThroughWallsself.EnemyXRayDetection
  • Renamed self.HasFootStepSoundself.HasFootstepSounds
  • Renamed self.FootStepPitchself.FootstepSoundPitch
  • Renamed self.FootStepSoundLevelself.FootstepSoundLevel
  • Renamed self.FootStepTimeWalkself.FootstepSoundTimerWalk
  • Renamed self.FootStepTimeRunself.FootstepSoundTimerRun
  • Renamed self.SlowPlayerOnMeleeAttackself.MeleeAttackPlayerSpeed
  • Renamed self.SlowPlayerOnMeleeAttack_WalkSpeedself.MeleeAttackPlayerSpeedWalk
  • Renamed self.SlowPlayerOnMeleeAttack_RunSpeedself.MeleeAttackPlayerSpeedRun
  • Renamed self.SlowPlayerOnMeleeAttackTimeself.MeleeAttackPlayerSpeedTime
  • Renamed self.HasMeleeAttackSlowPlayerSoundself.HasMeleeAttackPlayerSpeedSounds
  • Renamed self.SoundTbl_MeleeAttackSlowPlayerself.SoundTbl_MeleeAttackPlayerSpeed
  • Renamed self.MeleeAttackSlowPlayerSoundLevelself.MeleeAttackPlayerSpeedSoundLevel
  • Renamed self.PropAP_MaxSizeself.PropInteraction_MaxScale
  • Merged self.AttackProps and self.PushPropsself.PropInteraction
  • Merged self:CustomOnMeleeAttack_BeforeStartTimer(), and self:CustomOnMeleeAttack_AfterStartTimer()self:OnMeleeAttack(status, enemy)
  • Merged self:CustomAttackCheck_MeleeAttack(), self:CustomOnMeleeAttack_BeforeChecks(), self:CustomOnMeleeAttack_AfterChecks(), and self:CustomOnMeleeAttack_Miss()self:OnMeleeAttackExecute(status, ent, isProp)
  • Merged self:CustomAttackCheck_RangeAttack(), self:CustomOnRangeAttack_BeforeStartTimer(), and self:CustomOnRangeAttack_AfterStartTimer()self:OnRangeAttack(status, enemy)
  • Merged self:CustomRangeAttackCode(), self:CustomRangeAttackCode_BeforeProjectileSpawn(), and self:CustomRangeAttackCode_AfterProjectileSpawn()self:OnRangeAttackExecute(status, enemy, projectile)
  • Merged self:CustomAttackCheck_LeapAttack(), self:CustomOnLeapAttackVelocityCode(), self:CustomOnLeapAttack_BeforeStartTimer(), and self:CustomOnLeapAttack_AfterStartTimer()self:OnLeapAttack(status, enemy)
  • Merged self:CustomOnLeapAttack_BeforeChecks(), self:CustomOnLeapAttack_AfterChecks(), and self:CustomOnLeapAttack_Miss()self:OnLeapAttackExecute(status, ent)
  • Merged self:CustomOnMedic_BeforeHeal(), self:CustomOnMedic_OnHeal(), and self:CustomOnMedic_OnReset()self:OnMedicBehavior(status, statusData)
  • Merged self:CustomOnTakeDamage_BeforeImmuneChecks(), self:CustomOnTakeDamage_BeforeDamage(), and self:CustomOnTakeDamage_AfterDamage()self:OnDamaged(dmginfo, hitgroup, status)
  • Merged self:CustomOnFlinch_BeforeFlinch(), and self:CustomOnFlinch_AfterFlinch()self:OnFlinch(dmginfo, hitgroup, status)
  • Merged self:CustomOnInitialKilled(), self:CustomOnPriorToKilled(), self:CustomDeathAnimationCode(), self:CustomOnKilled(), and self:CustomOnDeath_BeforeCorpseSpawned()self:OnDeath(dmginfo, hitgroup, status)
  • Merged self.NextMoveRandomlyWhenShootingTime1 and self.NextMoveRandomlyWhenShootingTime2self.Weapon_StrafeCooldown
  • Merged self.NextMoveOrHideOnDamageByEnemy1 and self.NextMoveOrHideOnDamageByEnemy2self.CombatDamageResponse_Cooldown
  • Merged self.MeleeAttackDSPSoundUseDamage and self.MeleeAttackDSPSoundUseDamageAmountself.MeleeAttackDSPLimit
  • Merged self.HasBeforeRangeAttackSound, and self.HasRangeAttackSoundself.HasRangeAttackSounds
  • Merged self.HasMedicSounds_BeforeHeal, self.HasMedicSounds_AfterHeal and self.HasMedicSounds_ReceiveHealself.HasMedicSounds
  • Merged self.GuardingPosition, and self.GuardingDirectionself.GuardData
  • Merged self.GeneralSoundPitch1 and self.GeneralSoundPitch2self.MainSoundPitch
  • Merged self.HasOnDangerSightSounds and self.HasOnGrenadeSightSoundsself.HasDangerSightSounds
  • Merged self.OnDangerSightSoundChance and self.OnGrenadeSightSoundChanceself.DangerSightSoundChance
  • Merged self.OnDangerSightSoundLevel and self.OnGrenadeSightSoundLevelself.DangerSightSoundLevel
  • Merged self.OnDangerSightSoundPitch and self.OnGrenadeSightSoundPitchself.DangerSightSoundPitch
  • Merged self.HasHealthRegeneration, self.HealthRegenerationAmount, self.HealthRegenerationDelay, and self.HealthRegenerationResetOnDmgself.HealthRegenParams
  • Merged self.Medic_Status, self.Medic_Target, self.Medic_PropEnt, and self.Medic_NextHealTself.MedicData
  • Renamed all the existing timers
  • Removed ent parameter from self:OnFireBullet() as it was pointless since ent is self
  • Removed interruptible, useDuration, duration, playbackRate parameters from self:PlaySequence()
  • Deprecated:
    • self:VJ_GetNearestPointToEntity()
    • self:VJ_GetNearestPointToEntityDistance()
    • self:FaceCertainEntity()
    • self:FaceCertainPosition()
    • self:BusyWithActivity()
    • self:IsBusyWithBehavior()
    • self:DoRelationshipCheck()
    • self:VJ_CheckAllFourSides()
  • Removed:
    • self:MultipleLeapAttacks()
    • self:MultipleRangeAttacks()
    • self:MultipleMeleeAttacks()
    • self:CustomOnDamageByPlayer()
    • self:SetSightDistance()
    • self:CustomOnCondition()
    • self:CustomOnIsJumpLegal()
    • self:GetDynamicOrigin()
    • self:CustomOnFollowPlayer()
    • self:CustomOnUnFollowPlayer()
    • self:CustomOnChangeMovementType()
    • self:CustomOnWorldShakeOnMove()
    • self:CustomOnDropWeapon_AfterWeaponSpawned()
    • self:IdleDialogueAnswerSoundCode()
    • self:RunAIMoveJump()
    • self:VJ_SetSchedule(schedID)
    • self:VJ_Controller_InitialMessage()
    • self:CustomOnFootStepSound_Run()
    • self:CustomOnFootStepSound_Walk()
    • self:CustomOnChangeActivity(newAct)
    • self:ThrowGrenadeCode()
    • self:CustomOnGrenadeAttack_BeforeStartTimer()
    • self:CustomOnGrenadeAttack_SpawnPosition()
    • self:CustomOnWeaponReload_AfterRanToCover()
    • self:CustomOnGrenadeAttack_ThrowVelocity()
    • self:CustomOnGrenadeAttack_OnThrow()
    • self:StopAllCommonSpeechSounds()
    • self:VJ_GetNearestPointToVector()
    • self:DoRunCode_OnFinish()
    • self:DoRunCode_OnFail()
    • self:SetInitializeCapabilities()
    • self:WeaponAimPoseParameters()
    • self:CustomRareDropsOnDeathCode(dmginfo, hitgroup)
    • self:SetNearestPointToEntityPosition()
    • self:VJ_TASK_GOTO_PLAYER()
    • self:CustomOnDraw()
    • self:Controller_IntMsg()
    • self:SetMeleeAttackDamagePosition()
    • self:CustomOnSchedule()
    • self:SetIdleAnimation()
    • self:TranslateToWeaponAnim()
    • self:DoWeaponAttackMovementCode()
    • self:SetupWeaponHoldTypeAnims()
    • self:CustomOnSetupWeaponHoldTypeAnims()
    • self:IdleDialogueFindEnt()
    • self:PlayGibOnDeathSounds()
    • self:CustomGibOnDeathSounds()
    • self.AnimTbl_IdleStand
    • self.AnimTbl_Walk
    • self.AnimTbl_Run
    • self.WeaponAnimTranslations
    • self.AnimTbl_WeaponAim
    • self.CurrentIdleAnimation
    • self.PlayingAttackAnimation
    • self.DropWeaponOnDeathAttachment
    • self.TheDroppedWeapon
    • self.HasEntitiesToNoCollide
    • self.BloodPoolSize
    • self.GetNumberOfTasks
    • VJ_PlayingSequence
    • self.VJ_PlayingInterruptSequence
    • self.CallForHelpAnimationPlayBackRate
    • self.CallForHelpAnimationDelay
    • self.NextIdleStandTime
    • self.FlinchAnimationDecreaseLengthAmount
    • self.CurIdleStandMove
    • self.SoundTrackFadeOutTime
    • self.GrenadeAttackAnimationStopAttacks
    • self.GrenadeAttackAnimationStopAttacksTime
    • self.WeaponReloadAnimationDecreaseLengthAmount
    • self.FacingStatus
    • self.WeaponUseEnemyEyePos
    • self.HasLostWeaponSightAnimation
    • self.DisableSelectSchedule
    • self.Stationary_UseNoneMoveType
    • self.HasHull
    • self.DisableInitializeCapabilities
    • self.HullSizeNormal
    • self.WeaponReloadAnimationDelay
    • self.ThrowingGrenade
    • self.LeapAttacking
    • self.RangeAttacking
    • self.MeleeAttacking
    • self.AnimTbl_AlertFriendsOnDeath
    • self.WeaponInventory_AntiArmor
    • self.WeaponInventory_Melee
    • self.DeathCorpseSetBodyGroup
    • self.DeathCorpseBodyGroup
    • self.AnimTbl_ScaredBehaviorStand
    • self.AnimTbl_ScaredBehaviorMovement
    • self.MeleeAttackAnimationAllowOtherTasks
    • self.AnimTbl_ShootWhileMovingRun
    • self.AnimTbl_ShootWhileMovingWalk
    • self.WeaponReloadAnimationFaceEnemy
    • self.HasWeaponBackAway
    • self.AlertSounds_OnlyOnce
    • self.UnFollowPlayerPitch
    • self.UnFollowPlayerSoundChance
    • self.UnFollowPlayerSoundLevel
    • self.HasFollowPlayerSounds_Follow
    • self.HasFollowPlayerSounds_UnFollow
    • self.NextSoundTime_WeaponReload
    • self.BeforeMeleeAttackSounds_WaitTime
    • self.DisableMakingSelfEnemyToNPCs
    • self.FindEnemy_UseSphere
    • self.AnimationPlaybackRate
    • self.CallForHelpStopAnimations
    • self.CallForHelpStopAnimationsTime
    • self.AnimTbl_CallForBackUpOnDamageTime
    • self.DisableFootStepOnWalk
    • self.DisableFootStepOnRun
    • self.NextSoundTime_OnGrenadeSight
    • self.NextSoundTime_OnDangerSight
    • self.NextSoundTime_DamageByPlayer
    • self.Immune_Physics
    • self.DeathCorpseSkin
    • self.RangeUseAttachmentForPos
    • self.RangeUseAttachmentForPosID
    • self.RangeAttackPos_Up
    • self.RangeAttackPos_Forward
    • self.RangeAttackPos_Right
    • self.LeapAttackVelocityForward
    • self.LeapAttackVelocityUp
    • self.LeapAttackVelocityRight
    • self.HasWorldShakeOnMove
    • self.WorldShakeOnMoveAmplitude
    • self.WorldShakeOnMoveRadius
    • self.WorldShakeOnMoveDuration
    • self.WorldShakeOnMoveFrequency
    • self.ImmuneDamagesTable
    • self.GibOnDeathDamagesTable
    • self.DeathCorpseFadeTime
    • self.BecomeEnemyToPlayerLevel
    • self.FollowingPlayer
    • self.VJ_AddCertainEntityAsEnemy
    • self.VJ_AddCertainEntityAsFriendly
    • self.AngerLevelTowardsPlayer
    • self.NextFollowUpdateT
    • self.NextCallForHelpSoundT
    • self.NextSoundTime_Pain
    • self.Weapon_DoingCrouchAttackT
    • self.DoingWeaponAttack
    • self.DoingWeaponAttack_Standing
    • self.DoingWeaponOcclusionDelay
    • self.WeaponAttackAnimIsAim
    • self.NextNoWeaponT
    • self.NextWeaponReloadSoundT
    • self.PlayerFriendly
    • self.IdleDialogueAnswerSoundPitch
    • self.IdleDialogueAnswerSoundLevel
    • self.Passive_NextRunOnDamageTime
    • self.Passive_NextRunOnTouchTime
    • self.Passive_AlliesRunOnDamageDistance
    • self.HasSetSolid
    • self.HasCallForHelpAnimation
    • self.Medic_DisableAnimation
    • self.DisableAnimTbl_CallForBackUpOnDamage
    • self.NoChaseAfterCertainRange_Type
    • self.BringFriendsOnDeath
    • self.BringFriendsOnDeathDistance
    • self.BringFriendsOnDeathLimit
    • self.AlertFriendsOnDeath
    • self.AlertFriendsOnDeathDistance
    • self.AlertFriendsOnDeathLimit
    • self.NextMoveAfterFlinchTime
    • self.CallForBackUpOnDamageLimit
    • self.MoveOrHideOnDamageByEnemy_OnlyMove
    • self.HideOnUnknownDamage
    • self.DisableTakeDamageFindEnemy
    • self.Passive_RunOnDamage
    • self.CallForBackUpOnDamageDistance
    • self.FollowUpdateTime
    • self.DisableWeaponFiringGesture
    • self.DisableGrenadeAttackAnimation
    • self.DisableMeleeAttackAnimation
    • self.DisableRangeAttackAnimation
    • self.DisableLeapAttackAnimation
    • self.GrenadeAttackAnimationDelay
    • self.MeleeAttackAnimationDelay
    • self.LeapAttackAnimationDelay
    • self.NextAnyAttackTime_Melee_DoRand
    • self.NextMeleeAttackTime_DoRand
    • self.NextAnyAttackTime_Leap_DoRand
    • self.NextLeapAttackTime_DoRand
    • self.NextRangeAttackTime_DoRand
    • self.NextAnyAttackTime_Range_DoRand
    • self.MeleeAttackSlowPlayerSoundFadeOutTime
    • self.HasDamageByPlayer
    • self.DamageByPlayerTime
    • self.NextDamageByPlayerT
    • self.DisableDefaultRangeAttackCode
    • self.RangeAttackAnimationStopMovement
    • self.DisableDefaultMeleeAttackCode
  • Removed timers:
    • timer_act_playingattack
    • timer_act_seqreset

Weapon Base

  • Added:
    • self:SetDrawWorldModel(bool)
    • self:GetDrawWorldModel()
    • self.ReplacementWeapon
  • self.Primary.TakeAmmo now works for both NPCs and players
  • Removed network variable VJ_CurBulletPos, instead use self:GetBulletPos()
  • Removed network variable VJ_WorldModel_Invisible, instead use the new world model functions
  • Removed:
    • self:CustomOnNPC_ServerThink()
    • self:CustomOnIdle()
    • self:CustomOnPrimaryAttackEffects(owner)
    • self.NPC_SecondaryFirePerforming
    • self.WorldModel_NoShadow
    • self.WorldModel_Invisible

Spawner Base

  • Added a queue system
  • SpawnPosition in self.EntitiesToSpawn now takes a Vector instead of a table
  • Now sets the creator of the spawned entities to the player that created the spawner
  • Renamed self:CustomOnEntitySpawn()self:OnSpawnEntity()
  • Renamed self.VJBaseSpawnerDisabledself.PauseSpawning
  • Renamed self.TimedSpawn_Timeself.RespawnCooldown
  • Fixed position changing on spawn which sometimes caused respawned NPCs to be created stuck
  • Removed:
    • self:DoSingleSpawn()
    • self:CustomOnInitialize_AfterNPCSpawn()
    • self:CustomOnThink_AfterAliveChecks()
    • self:PlayIdleSound()
    • self:PlaySpawnEntitySound()
    • self.HasIdleSounds
    • self.HasSpawnEntitySound
    • self.OverrideDisableOnSpawn
    • self.TimedSpawn_OnlyOne

Projectile Base

  • Added:
    • self:InitPhys()
    • self:PlaySound(sdSet)
    • self:Destroy(data, phys)
    • self.CollisionDecal
    • self.CollisionBehavior
    • self.ProjectileType
    • self.CollisionFilter
  • Renamed self:CustomOnPhysicsCollide(data, phys)self:OnCollision(data, phys)
  • Renamed self:CustomOnCollideWithoutRemove(data, phys)self:OnCollisionPersist(data, phys)
  • Renamed self:CustomOnTakeDamage(dmginfo)self:OnDamaged(dmginfo)
  • Renamed self:DeathEffects(data, phys)self:OnDestroy(data, phys)
  • Renamed self.DelayedRemoveself.RemoveDelay
  • Merged self:CustomOnDoDamage(data, phys, hitEnts) and self:CustomOnDoDamage_Direct(data, phys, hitEnt)self:OnDealDamage(data, phys, hitEnts)
  • Deprecated:
    • self:OnCollideSoundCode()
    • self:SetDeathVariablesTrue(data, phys, runOnDestroy)
  • Removed:
    • self:CustomOnInitializeBeforePhys()
    • self:CustomPhysicsObjectOnInitialize(phys)
    • self:PlayIdleSound()
    • self:StartupSoundCode()
    • self:OnRemoveSoundCode()
    • self.PhysicsInitType
    • self.MoveType
    • self.CollideCodeWithoutRemoving
    • self.MoveCollideType
    • self.CollisionGroupType
    • self.RemoveOnHit
    • self.PaintDecalOnDeath
    • self.PaintDecalOnCollide
    • self.CollideCodeWithoutRemoving
    • self.NextCollideWithoutRemove
    • self.RemoveOnHit
    • self.SolidType
    • self.DecalTbl_DeathDecals
    • self.DecalTbl_OnCollideDecals

NPC Controller

  • Added:
    • self.VJC_Bullseye_RefreshPos
    • self.VJC_NPC_CanTurn
    • self.VJC_Player_CanChatMessage
  • Added keyPressed parameter to self:OnStopControlling()
  • Renamed self:CustomOnKeyPressed(key)self:CustomOnKeyPressed(key)
  • Renamed self:CustomOnKeyBindPressed(key)self:OnKeyBindPressed(key)
  • Renamed self:CustomOnStopControlling(keyPressed)self:OnStopControlling(keyPressed)
  • Renamed player tag self.IsControlingNPCself.VJ_IsControllingNPC
  • Removed:
    • self:CustomOnSetControlledNPC()
    • self:CustomOnRemove()

Entity Tags

  • Replaced global enums with entity variables:
    • VJ_TAG_HEALINGself.VJ_ST_Healing
    • VJ_TAG_EATINGself.VJ_ST_Eating
    • VJ_TAG_BEING_EATENself.VJ_ST_BeingEaten
    • VJ_TAG_SD_PLAYING_MUSICself.VJ_SD_PlayingMusic
    • VJ_TAG_HEADCRABself.VJ_ID_Headcrab
    • VJ_TAG_POLICEself.VJ_ID_Police
    • VJ_TAG_CIVILIANself.VJ_ST_Healing
    • VJ_TAG_TURRETself.VJ_ID_Turret
    • VJ_TAG_VEHICLEself.VJ_ID_Vehicle
    • VJ_TAG_AIRCRAFTself.VJ_ID_Aircraft
  • Added:
    • self.IsVJBaseBullseye
    • self.IsVJBaseProjectile
    • self.VJ_ID_Living
    • self.VJ_ID_Destructible
    • self.VJ_ID_Healable
  • Renamed self.IsVJBase_Gibself.IsVJBaseCorpse_Gib
  • Renamed self.VJ_IsHugeMonsterself.VJ_ID_Boss
  • Renamed self.VJ_IsDetectableDangerself.VJ_ID_Danger
  • Renamed self.VJ_IsDetectableGrenadeself.VJ_ID_Grenade
  • Renamed self.VJ_IsPickupableDangerself.VJ_ID_Grabbable
  • Renamed self.VJ_IsPickedUpDangerself.VJ_ST_Grabbed
  • Renamed self.VJ_AddEntityToSNPCAttackListself.VJ_ID_Attackable
  • Renamed self.VJ_LastInvestigateSdself.VJ_SD_InvestTime
  • Renamed self.VJ_LastInvestigateSdLevelself.VJ_SD_InvestLevel
  • Removed:
    • self:VJTags_Add()
    • self.VJTags
    • VJ_TAG_VJ_FRIENDLY