Sarexicus' Custom Spells VScript Library

72hr Jam 2023 Sarexicus' Custom Spells VScript Library the "oops patch"

  • Hey you! Yes, you! Add images to your downloads, it's free! Use the orange "Manage Download Image" button in the top right.

72hr Jam 2023 Sarexicus' Custom Spells VScript Library the "oops patch"

Take control of the normally-hardcoded spell system!

A library for custom spell functionality, alongside custom spell pools.

FEATURES

  • Completely modular 'custom spell' system, allowing you to create your own custom spells without any overhead from existing spell effects.
  • Custom spell pickups, allowing for custom spell pickup models and pickup sounds.
    • Modular "spell tier" system - do you want more spell pickup tiers? have as many as you want!
  • Custom weighted spell pools!
    • Choose what spells are in each pool for each tier, and how commonly they will be rolled.
    • Want Helltower's Teleport spell on all maps? Go for it!
    • Want to make the Fireball spell 5x more likely to roll? Fair enough!
    • Want to only roll the Monoculus spell? I hate you, but you can do that!

INSTALLATION

  1. Copy the folder sarex_spell_lib to tf/scripts/vscripts (or an equivalent folder in tf/custom/)
  2. Make a copy of map_settings.nutfor your own map, naming it whatever you want, and edit the variables inside to your own benefit.
    • If adding or implementing custom spells, make sure to include them in the file.
    • Edit or add spell tiers and pools within here. Check constants.nut for existing spells if you just want to modify spell pools.
  3. Add a logic_script into your map, with the keyvalues:
    • Entity Scripts: (the path to your copy of map_settings.nut. make sure not to include tf/scripts/vscripts in the path!)
    • Script think function: Think
  4. The script will replace any tf_spell_pickup entities in your own map with custom versions that can support custom spell pools and custom spells. It will preserve the settings for auto-materialize and spell tier (and higher tiers if entered with SmartEdit off). Keep in mind this will not replace any tf_spell_pickups created mid-game.

KNOWN ISSUES

  • It's not simple right now to disable a spell pickup entity. Will come in a future release. Targetnames of spell pickups are also not preserved.
  • You can pick up two spells at once and it'll give you the second one a moment after the first. Not game-breaking, but a little weird.
  • The included "become sentry buster" spell is partially broken and vulnerable to exploits right now.

FUTURE FEATURES

  • Spell pools per-team and per-class
  • Spell pools for specifically players in bumper karts (in case anyone cares about that)
  • Base "projectile" spell class to override for custom spell projectiles
  • Include custom material overrides for spells as examples
  • Spell cast ring particles around players for custom spells

Example​

License
Credit is required. Permission to modify optional.
  • 20230919001216_1.jpg
    20230919001216_1.jpg
    161.7 KB · Views: 48
Author
Sarexicus
Downloads
225
Views
522
First release
Last update
Category
VScript

Latest updates

  1. 1.0.1

    (made it actually compile properly by using correct Squirrel syntax. oops)