Resource icon

AddVSCond 1.5.3 bug squashing update

To prevent errors, please make sure to add your vsconds to the root table when using IncludeScript().
Example:
IncludeScript("addvscond/conditions/EXAMPLE_readme.nut", ROOT);

  • Compiler functions updated
    • VSCONDS_CLEANUP()
      • Removed a few checks to prevent rerunning on failed attempt,
      • Now runs before compiling anything, to prevent attachments staying on map,
      • Runs when a vsconds order is rearranged, for the same reason above.
    • VSCONDS_ADD_CONDITION()
      • For testing vsconds, any time the same vscond is reprocessed, it runs VSCONDS_CLEANUP() and rewrites vscond ID numbers.
  • Updated readme.txt and example_readme.nut
  • Fixed bug where VSconds weren't cleared when running VSCONDS_COMPILE()
    • Now runs VSCONDS_CLEANUP() first before reimplementing all vsconds
  • Updated VSCONDS_CLEANUP()
    • Added additional checks for VSCONDS_CLEANUP() to stop retrying to run itself after 3 attempts
    • Now prevents being able to rerun after cleanup happened until 1 second passed
  • Updated init.nut
    • Should just run VSCONDS_CLEANUP() only after first bootup, and not all code
    • VSCONDS_COMPILE() meant for debugging mostly
  • Updated Big Think entity
    • Now spawns as move_rope
    • No longer runs VSCONDS_CLEANUP() on round spawn, due to overlap with init.nut
    • No longer runs VSCONDS_CLEANUP() when spawned into the map
  • Removes some printl() debug messages
  • Updated readme.txt
  • Fixed bug with GetVSCondDuration() returning 0 if duration was infinite (or -1)
    • Now prints funny number 1e30
  • Updated "Big Think" Script
    • Now runs VSCONDS_CLEANUP() on I/O firing RoundSpawn, and same function when spawned in
    • Starts as classname filter_activator_tfteam, then changes to move_rope to preserve itself through map restarts,
    • Pauses itself thinking when VSCONDS_CLEANUP() running.
  • Updated VSCONDS_CLEANUP()
    • Added two checks before running cleanup,
    • Check one makes sure vsconds implementation queue not active, if so run delay
    • Check two is if cleanup is already running, don't run at all.
  • Overhauled VSCONDS_COMPILE() and boot process
    • Removed compiler.nut and simplified the whole thing,
    • Can only add conditions via this function:
    • VSCONDS_ADD_CONDITION( "MyVSCondEXAMPLE" );
    • ^ Requires it to be in string format and a class.
Kinda got annoyed that the new conditions I want to add in my map were being limited by the compiler, so I just remade it. I hope it's simpler for everybody.

Other stuff:
  • AddVSCond() default provider is now entity given the vscondition
    • if provider = null, then provider becomes worldspawn.
  • Added new setting addcondIgnoreDeathState
    • Allows entity to still receive AddVSCond(), even if "m_lifeState" > 0,
    • Useful for Engie buildings being ignored by bots when netprop "m_lifeState" = 1.
  • Example VSCond "VS_COND_TEAMSWAP" now switches teams based off provider's team.
  • Example VSCond "VS_COND_SHIELD" shield now matches scale and centers with entity bounding box.
  • Added function VSCONDS_ADD_CONDITION()
    • For adding your vsconds without having to go through the compiler
    • Use it like:
    • VSCONDS_ADD_CONDITION( "Bob" )
    • "Bob" is the condition name and class used by the condition. Needs to be a string
    • Use this function at the end of your vscond script.
    • (And, your conditions can be named anything now. No prefix required!)
  • Added condition_name to VSCond_Base class
    • Use it within the VSCond_Base class, like:
    • printl( condition_name )
  • Removed redundant parameters for VSCond_Base.AddCond() and VSCond_Base.RemoveCond()
  • Updated compiler steps, readme, tutorial...
Might remove removeByCommand cond because it seems redundant. Anyone else agree?

and TBD when I add the super-secret attribute feature for GetHiddenWearable()
  • Added settings for conditions, so you can prevent vsconds from clearing on resupply, changeclass, changeteam, death, and even the RemoveVSCond() itself!
  • These are the variables you can add in the VS_COND_BASE class
    • removedByDeath
      removedByResupply
      removedByTeamChange
      removedByClassChange
      removedByCommand
  • (They're all set to true by default)
  • And if you ever, ever need to override "removedByCommand" then set the second param of RemoveVSCond() to true
    • RemoveVSCond( condition, true )

  • Optimized amount of "folds" the game has to process in the think script, so better performance times may occur.
  • Updated some example conditions to include new settings
  • Updated tutorial
  • Reorganized some of the compile steps so it should be easier to follow the chain
  • Fixed compiler not refreshing conditions script
  • Added a compiler (with steps!)
    • Sequentially boots through various functions.
    • Quite nice to read.
    • Organized!
    • Please add your new conditions to compiler.nut boot step
    • Please utilize function VSCONDS_COMPILE() to test your conditions
  • Fixed VSCONDS_RemoveAttachmentEnt() not removing particles and other attachments
  • Fixed VSCONDS_CreatePowerupIconParticle() returning invalid variable
  • Added readme.txt
  • Added blank condition.nut
Sorry for all the updates in the short span of time
  • Fixed having to boot the script twice
    • Also made VSCONDS_CLEANUP() fully reset instead of partially
  • Fixed boot errors
    • const VSCond_MAX_Conditions wasn't being set on boot (oops)
  • Working on
  • Optimized some functions and main think script
    • Should check less often if entity IsValid()
    • VSCONDS_CLEANUP() optimized
  • Updated some example conds
    • VS_COND_AMPLIFIER_BEAMS is now VS_COND_PORTABLE_DISPENSER
    • VS_COND_MARKED now positions crossbones particle at top of model (no angles mishap)
  • Current list of functions
    • CBaseEntity.AddVSCond(condition,duration,provider)
    • CBaseEntity.RemoveVSCond(condition)
    • CBaseEntity.InVSCond(condition)
    • CBaseEntity.GetVSCondDuration(condition)

    • VSCONDS_IsEntDeadOrChanged(entity)
    • VSCONDS_IsEntValid(entity)
    • VSCONDS_IsCondNumInvalid(entity)

    • VSCONDS_AddAttachmentsEnt(ent,condition,attachment)
    • VSCONDS_RemoveAttachmentEnt(ent,condition)
    • VSCONDS_RemoveAttachmentEnt_ALL(ent)
    • VSCONDS_StopParticle(player)
    • VSCONDS_Distinguish_Team(ent,provider,team2,team3,team5)
    • VSCONDS_CreateTeamParticle(condition,provider,ent,particle_origin,team2,team3,team5)
    • VSCONDS_CreateTeamParticleDrip(condition,provider,ent,particle_origin,team2,team3,team5)
    • VSCONDS_CreateBeamParticle(condition,provider,ent,particle_origin,team2,team3,team5)
    • VSCONDS_CreateTeamProp(condition,provider,ent,particle_origin,team2,team3,team5)
    • VSCONDS_CreatePowerupIconParticle(condition,provider,ent,particle_origin,team2,team3,team5)

    • VSCONDS_CollectChildOnParent(parent, also_count_parent)
    • VSCONDS_Color(ent, r,g,b)
    • VSCONDS_SetParentAttachment(parent,child,attachment=null)
    • CBaseEntity.CreateConditionWearable(condition, modelpath)
    • CBaseEntity.GetHiddenWearable()