// . , ,. ;-. ,---. ,--. ,-. ,---. ,-. ,--. ,-.
// |\ /| / \ | ) | | ( ` | / | /
// | V | |--| |-' | |- `-. | | |- | -.
// | | | | | | | . ) | \ | \ |
// ' ' ' ' ' ' `--' `-' ' o `-' ' `-'
// v.1.1 (11.9.15) by j / trash / ikillspacies
//
// this script is to be used when testing maps,
//in a variety of ways. whether you're QAing as a
//map developer/tester, you need to try out a new
//precise trick, or you just want to mess around
//on your own map, this does all of that.
//
// NOTE: you need to create your own offline
//server for any of this to work! don't be silly.
//
//~~INSTRUCTIONS:~~
//
//- right click on TF2 in your steam client, go to
//"properties", click on the "local files" tab,
//and then "browse local files..."
//
//- go into the "tf" folder. if there isn't a custom
//folder already made here, add a folder named
//"custom" and go to it
//
//- make your own folder, name it whatever you want,
//and then make a "cfg" folder inside of that one
//
//- copy and paste this ENTIRE TEXT into notepad,
//and save it in that cfg folder as "maptest.cfg"
//
//- open a map, and in your console in steam
//(enable this in settings, keyboard, advanced,
//if you havent) and type in:
//
//> exec maptest
//
//- if you did everything correctly, it should be
//all good to go! you'll see the console clear
//itself, and you'll only see "MAPTEST.CFG LOADED!"
//
//- OPTIONAL BUT ALSO IMPORTANT:
//if you use anything on the keys that this cfg
//uses, you'll probably need to re-set them once
//you're done here. as an example:
//
//> bind 4 slot4
//
// that will bind 4 to what 4 normally does
//by default, switching to your 4th slot.
//
//~~HOTKEYS:~~
//
//* "4" turns on and off "buddha mode", which just
//guarantees you always live at 1HP minimum.
//HOLD DOWN THE KEY AND CHECK THE CONSOLE THAT
//POPS UP, you might be turning it off
//accidentally!
//
//* "5" resets you back to your original spawning
//point! this is incrediby useful for practicing
//on 5CP maps, as high-level mobility on those
//maps are quite precise. Also, it works on all
//main spawns, but still keeps on mp_tournament's
//pregame with no round timer!
//
//* "6" gives you the same effect as being in
//front of the resupply cabinet.
//sounds useless with regenToggle? this is
//actually for if you change loadouts on the fly.
//
//* "7" gives noclip, which does exactly what you
//think it might do.
//
//* "8" effectively gives you 99999 health. this is
//for if you want to mess around on death-pit areas,
//while still being able to do explosive-jumps,
//which breaks at 1HP in buddha mode.
//
//* "9" is a basic loop, that heals your HP back so
//quickly that you have to take your entire HP's
//worth of damage, all at once, to die (assuming
//nothing else toggled on), as well as refilling
//your ammo/clip
//
//* "0" will turn on and off what you normally see,
//which is more importantly used with...
//
//* "-", which activates the clip toggle! this
//changes a whole bunch of bounding boxes at the
//same time, which will let you see what is actually
//collidable!
//toggle once for solid-color bounding boxes (you'll
//use this 99% of the time), toggle again for
//wireframe boxes, and toggle once more to turn it
//all off.
//
//* "=" is the toggle for host_timescale, which is a
//really fancy way of saying "how fast the game
//goes". hit once for 3x speed, twice for .5x speed,
//and once more resets to normal.
//=== === === === === === === === === === === ===
//DOWN HERE BE RELATIVELY EASY CODE COMPARED TO
//OTHER FORMS OF CODE BUT STILL POSSIBLY COMPLEX
//AND FRAGILE CODE TO YOU, OOOOOOOOO
//
//(BUT SERIOUSLY, DON'T YELL AT ME IF YOU CHANGE
//STUFF HERE AND IT BREAKS, ASK FOR GENERAL
//SCRIPTING HELP @ /R/TF2SCRIPTS)
//sets up the basics. sv_cheats is REQUIRED for
//anything else here to work, mp_tournament turns
//on "pre-game" tournament mode, which basically
//just means round time limit is turned off.
//DO NOT TOUCH SV_ALLOW_WAIT_COMMAND!
//setting it to 0 WILL crash your game when using
//loops like regenLoop!
sv_cheats 1
mp_tournament 1
mp_tournament_restart
sv_allow_wait_command 1
//the buddha toggle. could just use "buddha" on
//its own, but there's no way to have a toggle for
//just buddha on or off, so this makes it clear
//which one will happen.
alias +buddhaToggle "clear; developer 1; buddha"
alias -buddhaToggle "developer 0"
//rollout! mp_restartgame resets the mp_tournament
//value, so we have to turn it back on.
alias rollout "mp_restartgame 1; wait 1000; mp_tournament_restart"
//resupply! do you need that first line for it to
//work? I have absolutely no idea, I just took it
//from jump scripts.
ent_fire func_regenerate addoutput "classname func_regenerate_temp"
alias resupply "give func_regenerate"
//regen loop! AFAIK, the number after "wait" just
//refers to # of frames, so "1" is the shortest I can
//assume it to be.
alias regenLoop "impulse 101; wait 1; regenRestart"
alias regenY "alias regenToggle "regenN"; alias regenRestart regenLoop; regenLoop"
alias regenN "alias regenToggle "regenY"; alias regenRestart """
alias regenToggle "regenY"
//clip toggle! for reference: r_drawclipbrushes is the
//main collision boxes, vcollide_wireframe is the prop's
//collision boxes, showtriggers_toggle shows trigger boxes
//for things like spawns, resupplies, and objectives
//(this one is SUPER FINICKY, showtriggers 1/0 won't work
//in-game for me), and r_DispBuildable shows buildable
//areas on the ground with a cyan tint.
alias clipToggle "clip1"
alias clip1 "r_drawclipbrushes 2; vcollide_wireframe 1; showtriggers_toggle; r_DispBuildable 1; alias cliptoggle clip2"
alias clip2 "r_drawclipbrushes 1; vcollide_wireframe 1; showtriggers_toggle; r_DispBuildable 0; alias cliptoggle clip3"
alias clip3 "r_drawclipbrushes 0; vcollide_wireframe 0; alias cliptoggle clip1"
//superSpeed toggle! nothing too fancy, just switches
//the main alias between the three speeds.
alias superSpeed "spe1"
alias spe1 "host_timescale 3; alias superspeed spe2"
alias spe2 "host_timescale 0.5; alias superspeed spe3"
alias spe3 "host_timescale 1; alias superspeed spe1"
//and, of course, all the binds. a toggle that didn't
//need a special alias was r_drawworld, which only heals
//two states anyways, on or off.
bind 4 "+buddhaToggle"
bind 5 "rollout"
bind 6 "resupply"
bind 7 "noclip"
bind 8 "hurtme -99999"
bind 9 "regenToggle"
bindtoggle 0 "r_drawworld"
bind - "clipToggle"
bind = "superSpeed"
//this resets to default, in case you still had some of
//these settings on while changing maps.
//(this DOESN'T set showtriggers_toggle off, you will have
//to do that manually if you mess up!)
regenN; spe3; clip3
clear
echo MAPTEST.CFG LOADED!