Arena VScript 1.0
As close to the "real thing" as possible
This is a VScript recreation of Arena
This is a faithful and jank-free recreation of Stock Arena with only 1 change:It uses the mini-round system as seen on arena_perks and (formerly) arena_lumberyard_event.
This simplifies adding arena maps to server rotation, as a single "full round" lasts for around 10 minutes.
It'd also simplify adding your map to Casual, should Valve choose to accept it.
The purpose of this script is to avoid using Arena's special back-end logic that causes
many compatibility issues both on Community Servers and (presumably) Casual.
How to add Arena-VScript to your map
- Unzip the archive into your TF2 folder. You'll end up with something like
Team Fortress 2 > tf > custom > arena_vscript > scripts > vscripts > arena.nut
- Delete the old Arena-related gamemode logic entities if you have any.
- Create a
logic_script
withEntity Script
set toarena.nut
. - A compiled map must include files
scripts/vscripts/arena.nut
andresource/ui/hudarenavscript.res
.- CompilePal will auto-include both files if PACK is enabled.
- If you don't see the Arena HUD, chances are the res file is not packed into the map.
Notes for the mappers
- Players are no longer frozen in place during Setup. It has proven to be difficult to achieve. Please have setup doors.
- Please also include func_respawnroom`s, otherwise people will have issues changing class during Setup.
- The script handles point ownership, point state and victory conditions automatically.
- Multi-point Arena (e.g. Byre) is fully supported.
Entity I/O information
All doors namedarena_door*
open when the fight starts, and close when the game state resets for a new mini-round.The script also sends the
Trigger
input to the following logic_relay
s:
Code:
arena_setup_start* - when setup (and a new min-round) starts
arena_setup_finish* - when setup ends and the fight starts
arena_win_any* - when any team wins a mini-round
arena_win_red* - when RED win a mini-round
arena_win_blu* - when BLU win a mini-round
arena_stalemate* - when both teams lose a mini-round
- To detect when the point opens, use team_control_point's
OnUnlocked
output. tf_gamerules
OnWonByTeam
events will still trigger at the end of a "full" round. This could be useful if you want an ending cutscene.
Future plans:
Optional features such as Last Mann Standing and On-Capture RespawnChanging config values
While the script file begins with the config section, it's recommended to modify the values using Entity I/O, rather than changing the script file itself.You can do so by creating a
logic_relay
entity and using its OnMapSpawn
output.- Do NOT use
logic_auto
- apparently its execution has a noticeable delay that might prevent the changes from taking place during the first "full" round.
| OnMapSpawn | logic_script | RunScriptCode | ARENA_UNLOCK_TIME = 30 |
And this one will unlock the points immediately, as seen on Byre:
| OnMapSpawn | logic_script | RunScriptCode | ARENA_UNLOCK_TIME = 0 |
Server-side addon capabilities
The script attempts to include 2 files which are absent by design:arena_addons/preload.nut
and arena_addons/postload.nut
.This is NOT for CUSTOM MAPS to include additional scripts - this is for community server "plugins".
If you as a mapper want to expand on the script, simply add the second script to the logic_script's "Entity Script" field.
- Steam Workshop Link
- https://steamcommunity.com/sharedfiles/filedetails/?id=3349294006
- License
- Credit is required. Permission to modify optional.