r/Tf2Scripts • • Jul 11 '26

Question how do i remove the timer and objective status for huds

Post image
117 Upvotes

r/tf2 didnt help at all so im asking here sorry if this doesnt belong here


r/Tf2Scripts • • Oct 01 '19

Script Finally, it's here - the calculator

62 Upvotes

How to use it? It couldn't be less simple. First, convert your numbers into binary. Then, paste each digit separately into your console, entering "+" to add (and "*" to multiply) the next number and "=" to get the sum.

Example: We want to find 23 * 58 + 762

  1. convert into binary: 23 -> 1011, 58 -> 111010, 762 -> 1011111010

  2. input into your console (each "." represents pressing enter): 1.0.1.1.*.1.1.1.0.1.0.+.1.0.1.1.1.1.1.0.1.0.=.

  3. profit

Just put this into one of your .cfg files (for example autoexec.cfg) and ascend your gameplay to another level:

// Calculator \\
alias "1_inp_0_ali" "start_0"
alias "2_inp_0_ali" "alias 1 3_inp_1_ali; alias 0 3_inp_0_ali; 2_dig_num"
alias "3_inp_0_ali" "alias 1 4_inp_1_ali; alias 0 4_inp_0_ali; 3_dig_num"
alias "4_inp_0_ali" "alias 1 5_inp_1_ali; alias 0 5_inp_0_ali; 4_dig_num"
alias "5_inp_0_ali" "alias 1 6_inp_1_ali; alias 0 6_inp_0_ali; 5_dig_num"
alias "6_inp_0_ali" "alias 1 7_inp_1_ali; alias 0 7_inp_0_ali; 6_dig_num"
alias "7_inp_0_ali" "alias 1 8_inp_1_ali; alias 0 8_inp_0_ali; 7_dig_num"
alias "8_inp_0_ali" "alias 1 9_inp_1_ali; alias 0 9_inp_0_ali; 8_dig_num"
alias "9_inp_0_ali" "alias 1 10_inp_1_ali; alias 0 10_inp_0_ali; 9_dig_num"
alias "10_inp_0_ali" "alias 1 error_inptoolarge; alias 0 error_inptoolarge; 10_dig_num"
alias "1_inp_1_ali" "operator_res; alias 1_inp 1_inp_1; alias 1 2_inp_1_ali; alias 0 2_inp_0_ali; 1_dig_num"
alias "2_inp_1_ali" "alias 2_inp 2_inp_1; alias 1 3_inp_1_ali; alias 0 3_inp_0_ali; 2_dig_num"
alias "3_inp_1_ali" "alias 3_inp 3_inp_1; alias 1 4_inp_1_ali; alias 0 4_inp_0_ali; 3_dig_num"
alias "4_inp_1_ali" "alias 4_inp 4_inp_1; alias 1 5_inp_1_ali; alias 0 5_inp_0_ali; 4_dig_num"
alias "5_inp_1_ali" "alias 5_inp 5_inp_1; alias 1 6_inp_1_ali; alias 0 6_inp_0_ali; 5_dig_num"
alias "6_inp_1_ali" "alias 6_inp 6_inp_1; alias 1 7_inp_1_ali; alias 0 7_inp_0_ali; 6_dig_num"
alias "7_inp_1_ali" "alias 7_inp 7_inp_1; alias 1 8_inp_1_ali; alias 0 8_inp_0_ali; 7_dig_num"
alias "8_inp_1_ali" "alias 8_inp 8_inp_1; alias 1 9_inp_1_ali; alias 0 9_inp_0_ali; 8_dig_num"
alias "9_inp_1_ali" "alias 9_inp 9_inp_1; alias 1 10_inp_1_ali; alias 0 10_inp_0_ali; 9_dig_num"
alias "10_inp_1_ali" "alias 10_inp 10_inp_1; alias 1 error_inptoolarge; alias 0 error_inptoolarge; 10_dig_num"
alias "1_dig_num" "alias 1_inp_1 1_prop"
alias "2_dig_num" "alias 1_inp_1 2_prop; alias 2_inp_1 1_prop"
alias "3_dig_num" "alias 1_inp_1 3_prop; alias 2_inp_1 2_prop; alias 3_inp_1 1_prop"
alias "4_dig_num" "alias 1_inp_1 4_prop; alias 2_inp_1 3_prop; alias 3_inp_1 2_prop; alias 4_inp_1 1_prop"
alias "5_dig_num" "alias 1_inp_1 5_prop; alias 2_inp_1 4_prop; alias 3_inp_1 3_prop; alias 4_inp_1 2_prop; alias 5_inp_1 1_prop"
alias "6_dig_num" "alias 1_inp_1 6_prop; alias 2_inp_1 5_prop; alias 3_inp_1 4_prop; alias 4_inp_1 3_prop; alias 5_inp_1 2_prop; alias 6_inp_1 1_prop"
alias "7_dig_num" "alias 1_inp_1 7_prop; alias 2_inp_1 6_prop; alias 3_inp_1 5_prop; alias 4_inp_1 4_prop; alias 5_inp_1 3_prop; alias 6_inp_1 2_prop; alias 7_inp_1 1_prop"
alias "8_dig_num" "alias 1_inp_1 8_prop; alias 2_inp_1 7_prop; alias 3_inp_1 6_prop; alias 4_inp_1 5_prop; alias 5_inp_1 4_prop; alias 6_inp_1 3_prop; alias 7_inp_1 2_prop; alias 8_inp_1 1_prop"
alias "9_dig_num" "alias 1_inp_1 9_prop; alias 2_inp_1 8_prop; alias 3_inp_1 7_prop; alias 4_inp_1 6_prop; alias 5_inp_1 5_prop; alias 6_inp_1 4_prop; alias 7_inp_1 3_prop; alias 8_inp_1 2_prop; alias 9_inp_1 1_prop"
alias "10_dig_num" "alias 1_inp_1 10_prop; alias 2_inp_1 9_prop; alias 3_inp_1 8_prop; alias 4_inp_1 7_prop; alias 5_inp_1 6_prop; alias 6_inp_1 5_prop; alias 7_inp_1 4_prop; alias 8_inp_1 3_prop; alias 9_inp_1 2_prop; alias 10_inp_1 1_prop"
alias "inp_res" "alias 1 1_inp_1_ali; alias 0 1_inp_0_ali; alias 1_inp none; alias 2_inp none; alias 3_inp none; alias 4_inp none; alias 5_inp none; alias 6_inp none; alias 7_inp none; alias 8_inp none; alias 9_inp none; alias 10_inp none"
alias "1_dig_0" "alias 1_dig 1_dig_1; alias p_1_dig echo 1; alias mult_fold_1 mult_fold_1_ali"
alias "1_dig_1" "alias 1_dig 1_dig_0; 2_dig; alias p_1_dig echo 0; alias mult_fold_1 none"
alias "2_dig_0" "alias 2_dig 2_dig_1; alias p_2_dig echo 1; alias mult_fold_2 mult_fold_2_ali"
alias "2_dig_1" "alias 2_dig 2_dig_0; 3_dig; alias p_2_dig echo 0; alias mult_fold_2 none"
alias "3_dig_0" "alias 3_dig 3_dig_1; alias p_3_dig echo 1; alias mult_fold_3 mult_fold_3_ali"
alias "3_dig_1" "alias 3_dig 3_dig_0; 4_dig; alias p_3_dig echo 0; alias mult_fold_3 none"
alias "4_dig_0" "alias 4_dig 4_dig_1; alias p_4_dig echo 1; alias mult_fold_4 mult_fold_4_ali"
alias "4_dig_1" "alias 4_dig 4_dig_0; 5_dig; alias p_4_dig echo 0; alias mult_fold_4 none"
alias "5_dig_0" "alias 5_dig 5_dig_1; alias p_5_dig echo 1; alias mult_fold_5 mult_fold_5_ali"
alias "5_dig_1" "alias 5_dig 5_dig_0; 6_dig; alias p_5_dig echo 0; alias mult_fold_5 none"
alias "6_dig_0" "alias 6_dig 6_dig_1; alias p_6_dig echo 1; alias mult_fold_6 mult_fold_6_ali"
alias "6_dig_1" "alias 6_dig 6_dig_0; 7_dig; alias p_6_dig echo 0; alias mult_fold_6 none"
alias "7_dig_0" "alias 7_dig 7_dig_1; alias p_7_dig echo 1; alias mult_fold_7 mult_fold_7_ali"
alias "7_dig_1" "alias 7_dig 7_dig_0; 8_dig; alias p_7_dig echo 0; alias mult_fold_7 none"
alias "8_dig_0" "alias 8_dig 8_dig_1; alias p_8_dig echo 1; alias mult_fold_8 mult_fold_8_ali"
alias "8_dig_1" "alias 8_dig 8_dig_0; 9_dig; alias p_8_dig echo 0; alias mult_fold_8 none"
alias "9_dig_0" "alias 9_dig 9_dig_1; alias p_9_dig echo 1; alias mult_fold_9 mult_fold_9_ali"
alias "9_dig_1" "alias 9_dig 9_dig_0; 10_dig; alias p_9_dig echo 0; alias mult_fold_9 none"
alias "10_dig_0" "alias 10_dig 10_dig_1; alias p_10_dig echo 1; alias mult_fold_10 mult_fold_10_ali"
alias "10_dig_1" "alias 10_dig 10_dig_0; 11_dig; alias p_10_dig echo 0; alias mult_fold_10 none"
alias "11_dig_0" "alias 11_dig 11_dig_1; alias p_11_dig echo 1"
alias "11_dig_1" "alias 11_dig 11_dig_0; alias p_11_dig echo 0; error_outputtoolarge"
alias "mult_fold_1_ali" "alias mult_dig_1 1_dig"
alias "mult_fold_2_ali" "alias mult_dig_2 2_dig"
alias "mult_fold_3_ali" "alias mult_dig_3 3_dig"
alias "mult_fold_4_ali" "alias mult_dig_4 4_dig"
alias "mult_fold_5_ali" "alias mult_dig_5 5_dig"
alias "mult_fold_6_ali" "alias mult_dig_6 6_dig"
alias "mult_fold_7_ali" "alias mult_dig_7 7_dig"
alias "mult_fold_8_ali" "alias mult_dig_8 8_dig"
alias "mult_fold_9_ali" "alias mult_dig_9 9_dig"
alias "mult_fold_10_ali" "alias mult_dig_10 10_dig"
alias "mult_1" "mult_1_ali"
alias "mult_1_ali" "alias mult_1 add_all_mult"
alias "add_all_mult" "mult_dig_1; mult_dig_2; mult_dig_3; mult_dig_4; mult_dig_5; mult_dig_6; mult_dig_7; mult_dig_8; mult_dig_9; mult_dig_10"
alias "mult_2" "mult_1; mult_1"
alias "mult_3" "mult_2; mult_2"
alias "mult_4" "mult_3; mult_3"
alias "mult_5" "mult_4; mult_4"
alias "mult_6" "mult_5; mult_5"
alias "mult_7" "mult_6; mult_6"
alias "mult_8" "mult_7; mult_7"
alias "mult_9" "mult_8; mult_8"
alias "mult_10" "mult_9; mult_9"
alias "mult_save" "mult_fold_1; mult_fold_2; mult_fold_3; mult_fold_4; mult_fold_5; mult_fold_6; mult_fold_7; mult_fold_8; mult_fold_9; mult_fold_10"
alias "mult_dig_res" "alias mult_dig_1 none; alias mult_dig_2 none; alias mult_dig_3 none; alias mult_dig_4 none; alias mult_dig_5 none; alias mult_dig_6 none; alias mult_dig_7 none; alias mult_dig_8 none; alias mult_dig_9 none; alias mult_dig_10 none"
alias "mult_fold_res" "alias mult_fold_1 none; alias mult_fold_2 none; alias mult_fold_3 none; alias mult_fold_4 none; alias mult_fold_5 none; alias mult_fold_6 none; alias mult_fold_7 none; alias mult_fold_8 none; alias mult_fold_9 none; alias mult_fold_10 none"
alias "dig_count_res" "alias 1_dig 1_dig_0; alias 2_dig 2_dig_0; alias 3_dig 3_dig_0; alias 4_dig 4_dig_0; alias 5_dig 5_dig_0; alias 6_dig 6_dig_0; alias 7_dig 7_dig_0; alias 8_dig 8_dig_0; alias 9_dig 9_dig_0; alias 10_dig 10_dig_0; alias 11_dig 11_dig_0"
alias "print_res" "alias p_1_dig echo 0; alias p_2_dig echo 0; alias p_3_dig echo 0; alias p_4_dig echo 0; alias p_5_dig echo 0; alias p_6_dig echo 0; alias p_7_dig echo 0; alias p_8_dig echo 0; alias p_9_dig echo 0; alias p_10_dig echo 0; alias p_11_dig echo 0"
alias "num_system_res" "dig_count_res; print_res; mult_fold_res; mult_dig_res"
alias "+" "plus_ali"
alias "*" "mult_ali"
alias "plus_ali" "mult_dig_res; mult_save; inp_shove; inp_res; add_mode"
alias "mult_ali" "mult_dig_res; mult_save; inp_shove; inp_res; mult_mode"
alias "add_mode" "alias start_0 none; alias 1_prop 1_dig; alias 2_prop 2_dig; alias 3_prop 3_dig; alias 4_prop 4_dig; alias 5_prop 5_dig; alias 6_prop 6_dig; alias 7_prop 7_dig; alias 8_prop 8_dig; alias 9_prop 9_dig; alias 10_prop 10_dig"
alias "mult_mode" "alias start_0 start_0_mult; alias 1_prop mult_1; alias 2_prop mult_2; alias 3_prop mult_3; alias 4_prop mult_4; alias 5_prop mult_5; alias 6_prop mult_6; alias 7_prop mult_7; alias 8_prop mult_8; alias 9_prop mult_9; alias 10_prop mult_10"
alias "inp_shove" "alias mult_1 mult_1_ali; 1_inp; 2_inp; 3_inp; 4_inp; 5_inp; 6_inp; 7_inp; 8_inp; 9_inp; 10_inp"
alias "start_0_mult" "alias * mult_0_res; alias + add_0_res; alias = equ_0_res"
alias "add_0_res" "operator_res; calculator_res"
alias "mult_0_res" "operator_res; calculator_res; mult_mode"
alias "equ_0_res" "operator_res; calculator_res; equ_ali"
alias "operator_res" "alias * mult_ali; alias + plus_ali; alias = equ_ali"
alias "=" "equ_ali"
alias "equ_ali" "mult_dig_res; mult_save; inp_shove; print; calculator_res"
alias "print" "p_11_dig; p_10_dig; p_9_dig; p_8_dig; p_7_dig; p_6_dig; p_5_dig; p_4_dig; p_3_dig; p_2_dig; p_1_dig"
alias "calculator_res" "inp_res; num_system_res; add_mode; alias error_outputtoolarge error_outputtoolarge_ali"
alias "none" ""
alias "error_inptoolarge" "echo ERROR: This input number is too large! Maximum input value: 1023 (up to 10 digits in binary). You can keep going, but only the last 11 didits of the solution will be printed."
alias "error_decimal" "echo ERROR: This calculator only works with binary numbers!"
alias "error_outputtoolarge_ali" "alias error_outputtoolarge none; echo ERROR: The output has more than 11 digits. Only the last 11 digits of the solution will be printed."
alias "calculator_init" "operator_res; calculator_res; alias 2 error_decimal; alias 3 error_decimal; alias 4 error_decimal; alias 5 error_decimal; alias 6 error_decimal; alias 7 error_decimal; alias 8 error_decimal; alias 9 error_decimal"
calculator_init
// Calculator - END \\

Note: each summand/factor needs to be smaller that 1024 and the sum needs to be smaller than 2048. Also, the output is in binary as well. If anyone has done this before, I am sorry — I couldn't find anything.


r/Tf2Scripts • • Apr 07 '13

Script [Script] Perfect charge turning with mouse

54 Upvotes

UPDATE: As of 2014/04/24, this no longer works.

UPDATE: 2014/6/18 The circle is complete

This scripts allows you to turn as much you want while using your mouse.

Download

Installation guide by o0Brilliance0o

In my last charge turning script thread, there was some discussion about making a charge turning script with a virtual joystick that used a mouse. I said it was theoretically possible, but I had my doubts that it would work very well.

How wrong I was.

This script has surpassed my wildest expectations. You could probably play scout or sniper entirely with this mouse to joystick mapping and barely even notice the difference. Now apply this to charge turning, where mouse movements are crippled but joystick movements are completely unlocked. Dodging a charge becomes completely impossible, you can only try to run or kill the demoknight first. It's borderline broken. But as long as charge turning continues to be possible with a controller, I don't see why I shouldn't make it work with a mouse.

Installation and usage instructions are included in the .zip. I have included both Windows and Linux versions. The Windows version comes with a Visual Studio solution if you want to compile it yourself, or just see how it works. The Linux version is just a python script.

If you have been using the keyboard charge turning script, note that this one uses a slightly different demoknight.cfg (also included in the .zip), so you will want to update that. The TF2 script uses the same principle of holding mouse2 to activate the joystick.

UPDATE: Since the Steampipe update, all scripts need to go in "tf\custom\<any folder name>\cfg". Everything else remains the same.

UPDATE 2013/8/27: The 8/27 patch has changed the way controllers work in TF2. This introduces a new step in installation, and requires a small change in demoknight.cfg. Some of you probably noticed that the script stopped working, this will get it working again. I have updated the download with a new cfg and instructions, but if you already have the script just follow the instructions below:

  1. Configure VJoy in Steam Big Picture:

  • Run VJoy. Map Buttons 1-4 to some keys, as well as Up, Left, and Slider+. Do this for both VJoy controllers, and make sure they are both enabled. (Screenshot)

  • Run Big Picture. Go to Settings > Controller, it should say "Controller Detected: VJoy Virtual Joystick" (if not, then Big Picture is reading the wrong controller). Click "Edit Controls". Map the first four buttons to buttons 1-4 in VJoy. Then scroll down to Left Stick X and Left Stick Y, map these to Left and Up. Finally, map Right Stick X to Slider+. Save this configuration (if you don't see a save button, press Esc). (Screenshot, screenshot)

  • You can now close Big Picture and VJoy. You don't need to run them again.

  1. In your demoknight config, add the line "joy_axis_deadzone 0".

Now TF2 should detect VJoy and the script should work exactly like before.

One last important note: Sometimes TF2 will execute 360controller.cfg automatically when it detects a new controller, and this messes up several joystick parameters. If the script is working, but doesn't feel right (turns too slowly, feels like it has acceleration) then run your demoknight.cfg again to correct these parameters. 360controller.cfg may also change some HUD parameters, which you'll have to fix. I haven't been able to find a solution to completely stop this from happening. (EDIT: I'm pretty sure this can be solved by creating an empty 360controller.cfg, put it in the same folder as your other scripts).


r/Tf2Scripts • • Aug 20 '20

Meta PSA: Tell People You're Using Mastercomfig

53 Upvotes

Hey all,

Recently, we've received a lot of questions regarding Mastercomfig issues. This is great, and we love seeing the new faces here! However, Mastercomfig completely overhauls the scripting system in TF2, and the troubleshooting tips we give for vanilla TF2 scripting don't really apply. If we know you're using Mastercomfig, the issues are usually very easy to resolve, but it's very frustrating to try to figure that out when it isn't explained right off the bat.

So, to make it easier for everyone, please make sure to include whether or not you are using Mastercomfig in your posts. That way, everyone knows the situation we're working with, and it'll save a lot of time and hassle in trying to diagnose your problem.

Thanks!


r/Tf2Scripts • • Apr 19 '12

Script Little tweaks and scripts by Nobody

47 Upvotes

Hello.

In this post I'd like to include all scripts I'm using. Feel free to make a suggestions how to change or add something.


All class:

  • Holding Shift for melee

  • Holding Home for FPS counter

  • Toggling FPS counter with Page Up

  • Holding End for net graph

  • Toggling net graph with Page Down

Engineer:

  • Quick-building with F1-F4

  • Quick sentry building with Alt (revengineer / combat engie style)

Spy:

  • Quick disguising with F1-F9

  • Auto sapping with Alt

Sniper:

  • Hold breath with Alt


First of all you need to know that I don't like making my game ugly or making some sort of auto attacks which fight for you. There is no weapon models hiding and wait command in those scripts.

If you like anything in particular, you can use only this 1 thing. All scripts are independent.


If you want to bind scripts to different keys then me, you can find key names here:

http://wiki.teamfortress.com/wiki/Scripting#List_of_key_names


  • ALL CLASSES These scripts go to clear.cfg

Cleaning after other scripts

unbind alt
unbind [

"[" is set as my mouse side button, so I recommend changing it for MOUSE4 if your mouse has it.

On some classes I use those keys to do some class specific things. I don't want to carry it over to other classes, so I unbind those keys.

Holding shift brings your melee weapon. Releasing shift changes back to your main weapon. Very useful for axtinguishing

// Shift = melee
alias +melee slot3
alias -melee slot1 // <- change slot1 to lastinv if you prefer using last weapon instead of primary weapon
bind shift +melee

Pressing Page Up will toggle between different ways of showing FPS in game.

// cl_showfps toggle
alias fpstoggle fps1
alias fps0 "cl_showfps 0; alias fpstoggle fps1"
alias fps1 "cl_showfps 1; alias fpstoggle fps2"
alias fps2 "cl_showfps 2; alias fpstoggle fps0"
bind PGUP fpstoggle

Shorter version of above script. Does the same thing.

// cl_showfps toggle
bind PGUP "incrementvar cl_showfps 0 2 1"

Holding Home will show your FPS in game. Releasing Home will hide it.

// HOME = cl_showFPS 2
alias +fpsshow "cl_showfps 2"
alias -fpsshow "cl_showfps 0"
bind HOME +fpsshow

Pressing Page Down will toggle between different network and performance statistics in game.

// Net_graph toggle
alias graphtoggle graph1
alias graph0 "net_graph 0; alias graphtoggle graph1"
alias graph1 "net_graph 1; alias graphtoggle graph2"
alias graph2 "net_graph 2; alias graphtoggle graph3"
alias graph3 "net_graph 3; alias graphtoggle graph4"
alias graph4 "net_graph 4; alias graphtoggle graph0"
bind PGDN graphtoggle

Shorter version of above script. Does the same thing.

// Net_graph toggle
bind PGDN "incrementvar net_graph 0 4 1"

Holding End will show your net graph in game. Releasing End will hide it.

// HOME = net_graph 4
alias +graphshow "net_graph 4"
alias -graphshow "cl_showfps 0"
bind END +graphshow

I'm also using those standard binds in clear.cfg

bind ] "voicemenu 0 1" // thank you
bind r "voicemenu 1 1" // spy
bind MWHEELUP slot1
bind MWHEELDOWN slot2
bind 1 slot1
bind 2 slot2
bind 3 slot3
bind MOUSE3 lastinv
bind q lastinv

  • ENGINEER This goes to engineer.cfg

    exec clear

Quick-building. It skips engineer's PDA. Pressing F1 will bring sentry blueprint (you need to use M1 to place it). Old sentry gets destroyed if you had one. The same with all buildings. If you want only destroy a building without placing a new one, hold "]" while pressing F1-F4.

// Destroying
alias dsentry "destroy 2"
alias ddispenser "destroy 0"
alias dentrance "destroy 1"
alias dexit "destroy 3"
// Destroying and building
alias dbsentry "destroy 2; build 2"
alias dbdispenser "destroy 0; build 0"
alias dbentrance "destroy 1; build 1"
alias dbexit "destroy 3; build 3"

bind f1 dbsentry
bind f2 dbdispenser
bind f3 dbentrance
bind f4 dbexit

// Fx = destroy and build && [ + Fx = destroy
alias +destruction "bind f1 dsentry; bind f2 ddispenser; bind f3 dentrance; bind f4 dexit"
alias -destruction "bind f1 dbsentry; bind f2 dbdispenser; bind f3 dbentrance; bind f4 dbexit"
bind [ +destruction

Quick sentry building. It's very useful if you play revengineer. Holding alt will bring your blueprint. Pressing M1 will place it on the ground like usual. Releasing alt will switch back to previous weapon. If you want to destroy the sentry (to get your crits if you use frontier justice) just press alt (no holding).

// ALT+M1 = new sentry
alias +quicksentry "destroy 2; build 2"
alias -quicksentry lastinv
bind alt +quicksentry

  • SPY This goes to spy.cfg

    exec clear

Quick disguising. Pressing F1-F9 will disguise you without bringing up your kit. Holding "[" while pressing F1-F9 will disguise you as your teammate.

// Enemy disguises
alias escout "disguise 1 -1" //scout
alias esoldier "disguise 3 -1" //soldier
alias epyro "disguise 7 -1" //pyro
alias edemo "disguise 4 -1" //demo
alias eheavy "disguise 6 -1" //heavy
alias eengineer "disguise 9 -1" //engineer
alias emedic "disguise 5 -1" //medic
alias esniper "disguise 2 -1" //sniper
alias espy "disguise 8 -1" //spy

// Friendly disguises
alias fscout "disguise 1 -2" //scout
alias fsoldier "disguise 3 -2" //soldier
alias fpyro "disguise 7 -2" //pyro
alias fdemo "disguise 4 -2" //demo
alias fheavy "disguise 6 -2" //heavy
alias fengineer "disguise 9 -2" //engineer
alias fmedic "disguise 5 -2" //medic
alias fsniper "disguise 2 -2" //sniper
alias fspy "disguise 8 -2" //spy

bind f1 escout
bind f2 esoldier
bind f3 epyro
bind f4 edemo
bind f5 eheavy
bind f6 eengineer
bind f7 emedic
bind f8 esniper
bind f9 espy

// Fx = disquise as enemy && [ + Fx = disguise as my team
alias +myteam "bind f1 fscout; bind f2 fsoldier; bind f3 fpyro; bind f4 fdemoman; bind f5 fheavy; bind f6 fengineer; bind f7 fmedic; bind f8 fsniper; bind f9 fspy"
alias -myteam "bind f1 escout; bind f2 esoldier; bind f3 epyro; bind f4 edemoman; bind f5 eheavy; bind f6 eengineer; bind f7 emedic; bind f8 esniper; bind f9 espy"
bind "[" "+myteam"

Auto sapping. Hold alt to start sapping. Release alt to stop sapping and switch to your previous weapon

// alt = sap
alias +autosap "slot2; +attack"
alias -autosap "-attack; lastinv"
bind alt +autosap

  • SNIPER This goes to sniper.cfg

    exec clear

"Hold breath" feature. It lowers your mouse sensitivity by half when you hold alt. Changes it back when you release alt. It's useful when you're twitching and need more precision than usual. Check in console (type sensitivity) what is your current sensitivity and change values accordingly.

alias +sens "sensitivity 1" // <- change 1 for 0.5*your normal sensitivity or even lower, for example 1.7
alias -sens "sensitivity 2" // <- change 2 for your normal sensitivity, for example 3.4
bind alt +sens

If you find any bug or have any suggestion or idea for a script, please let me know.

Leave a comment if you like something!


r/Tf2Scripts • • Apr 08 '21

Script ascii videos in tf2 console

Thumbnail
youtube.com
44 Upvotes

r/Tf2Scripts • • Feb 13 '21

Script Krate VM: A script for native higher level programming in Source

43 Upvotes

Hey everyone! I've been working on scalu, a programming language for writing configs in Source/Quake engines. After implementing a playable hangman game with scalu, I wanted to start a project that would improve the scripting experience for scripters without the high overhead of having to learn scalu and the stack that powers it (Python, Git, etc etc)

Krate VM is my attempt at doing that. Krate is a lean 5 bit virtual machine implemented using scalu and encoded in a single config file; "installing" it is as easy as loading the config file in-game. Once loaded, you gain access to a simple, highly performant assembly language that will let you reason about configs with variables and numbers that you can add/subtract/compare/print, rather than depend on building pseudo-state machines with large chains of aliases for doing "logic" natively.

The basics of using Krate can be found here:

https://github.com/ArgosOfIthica/scalu/wiki/Krate-Tutorial

The newest build of Krate itself is here:

https://github.com/ArgosOfIthica/scalu/blob/5b36348e177a566cf9ea52ab402f6668d3d25948/examples/krate/scalu.cfg


r/Tf2Scripts • • Aug 01 '21

Question How does this spray work? The guns appear when you get closer to it.

35 Upvotes

r/Tf2Scripts • • Nov 02 '20

Script Play Hangman in your console

33 Upvotes

https://pastebin.com/2J0E5NEX

I've created a script with which to play Hangman in your console. Download the script, execute it, and follow the instructions. All of the words are official maps in TF2. You choose a word with $word and then a number; $word7 for example. To guess the letter 'T', you'd type $t. All aliases use % and $ for prefixing, so you should be able to throw my script in with your own without affecting anything existing.

I made this while developing scalu, a programming language for Source configs, and I needed a small test project for benchmarking/dogfooding a simple macro system. The actual source code for hangman will be released later; right now its a unusable mess of Python code and dev-branch scalu code.


r/Tf2Scripts • • Apr 13 '21

Question what specific commands do i need to get a smooth spy sleeve?

Post image
31 Upvotes

r/Tf2Scripts • • Apr 14 '21

Not Scripting | External App TF2 Bot Detector - External App, Trusted

Thumbnail
github.com
29 Upvotes

r/Tf2Scripts • • Oct 13 '20

Resource There's a new "button" setting type in advanced settings.

Post image
27 Upvotes

r/Tf2Scripts • • May 08 '20

Meta Update: We Have Rules Now!

27 Upvotes

Hey all,

Over the past few years, we've had a lot of unspoken rules that govern what should and shouldn't be done on the subreddits. For the most part, those just consisted of "help if you can" and "be nice", and since you guys are awesome, there was never an immediate need to transcribe an official set of rules.

However, I know that the few people who have come into contact with those unspoken rules weren't pleased to find out about them, and obviously we didn't want to enforce them with anything more than a polite conversation about behavior, since the rules were never stated in any official capacity.

That all has changed. After many months of discussion with the original mod team for our community, we've finally decided on a set of rules that should hopefully be as non-intrusive as possible, while also guiding each subreddit towards the vision we had for them when they were started.

In terms of how the subs will be managed, not much has changed. The main goal of each set of rules was to codify the distinction between /r/TF2Scripts and /r/TF2ScriptHelp (as places for requests and teaching respectively) that had always been known, but had admittedly been forgotten over the years. The rules that have been put in place aren't anything different than you're used to; now they're just written down on the sidebar instead of sitting in a few pinned threads.

However, since these are official rules, there may be slightly more enforcement than you might have seen here before. Above all else, these are guidelines, so the most anyone should ever see is a stern DM from the mod team with some friendly advice. However, I ask that you take it to heart if you see it, because I personally really don't want to go beyond "friendly advice".

Additionally, we mods will be stepping up our efforts to curate the subreddit, making sure that everything stays nice and organized so you can easily know what threads are open. As well, we'd like everyone to get in the habit of flairing their posts when submitting, since we'll soon be adding an AutoMod function to enforce it.

And that's it! What do you think of the new rules? Do you have any questions, or anything you'd like to be better explained or clarified? Leave a comment down below!

Stay awesome!


r/Tf2Scripts • • Feb 06 '19

is there a variable that can disable pop-ups like this?

Post image
27 Upvotes

r/Tf2Scripts • • Nov 15 '20

Resource I made a voicemenu generator for those who want custom voicemenus.

Thumbnail
github.com
25 Upvotes

r/Tf2Scripts • • Apr 27 '20

Answered How do I get solid coloured stock uber kinda like this?

Post image
23 Upvotes

r/Tf2Scripts • • Jul 04 '19

I'm implementing arithmetic into scripts

21 Upvotes

https://github.com/ArgosOfIthica/scalu

https://github.com/ArgosOfIthica/scalu/wiki

As the title states, I've spent the past few weeks working on implementing a kind of basic assembly language into Source scripts. Initially, it was going to be a joke project due since I had low expectations for its performance, but after hammering it out, it's actually far more practical than I had anticipated. I thought I'd post it here to get feedback.

It's basically an interface that allows you to add, subtract, or, and, xor, and compare a set of 8 bit registers, and its abstracted pretty well, all things considered. This is the entire implementation of subtraction:

//vars

alias sub_ptr1 r1
alias sub_ptr2 r2


//logic

alias sub "alias copy_ptr1 ry; alias copy_ptr2 sub_ptr2; copy; alias aneg_ptr ry; aneg; alias add_ptr1 sub_ptr1; alias add_ptr2 ry; add"

This might look familiar to anyone with an understanding of how low-level 2's complement subtraction works. Not all instructions look this nice, but subtraction is one of the few instructions implemented just how a user-created function would be.

The example on the Github page computes and displays the first 10 Fibonacci numbers in hexadecimal, alongside being well documented, so anyone interested in how this works should check that out and try it for themselves in-game. The end-goal with this project is to potentially allow script writers to move away from self-rewriting chains of aliases and allow them to think in more traditional programming paradigms. Documentation, outside of explicit examples, is still being generated, so I welcome any questions, feedback, or suggestions.


r/Tf2Scripts • • Dec 22 '12

Resource TF2ConfigGenerator version 1.0 (release candidate)

21 Upvotes

I had some spare time lately, so I decided to rewrite my tf2 config generator. It's a program you can use you customize your tf2, it will create tf2 scripts for you. Download here. This is the release candidate. As far as I can see, there are no significant bugs. If there any encountered, I'll fix them before making a final 1.0 release. I am rather interested if this works well for mac and linux users.

Features

  • Ability to specify for each class/weapon to specify the:

    • Crosshair (color, type, scale)

    • Mouse Sensitivity

    • Showing/Hiding behaviour of the weapon when you shoot/move/switch weapons/reload/etc..

    • Dingalings (damage sounds)

    • Interp-ratio

    • Batch damage numbers

  • Weapon switching has integrated next weapon, previous weapon, last weapon, toggle primary/secondary, toggle current/melee binds

  • Null-movement canceling: if you press two opposite strafe keys, you will no longer stand still

  • Ability to zoom in (up to factor 1.2)

  • Crouch jump (default off, can be enabled on a by-class basis)

  • Spawn switch binds

  • Engineer: quickbuild binds

  • Spy: disguise cycle

  • Medic: radar, communicate through chat when ubering, fake charge

  • Hide/Show gibs/sprays/ragdolls

  • Chris' configs can be optionally included

  • Scoreboard can be integrated with the network graphs

  • Integrate your own scripts easily from within the program itself

  • Binds for reload the hud, fixing graphical glitches and suicide

  • Team only voice option

  • Option to hide hitscan tracers/flames from the flamethrower/healbeam

  • Also includes all the advanced options tf2 has

Screenshots

Main options screen

Spy binds

Medic options

Weapon and crosshair configuration

Installation

  • Download the program here

  • Unzip the program and double click on the jar file to start (make sure you have a recent version of java installed)

  • Set everything up the way you want to, make sure you copy most of your essential settings in tf2, like your mouse sensitivity (very annoying when that gets changed). Use the profile menu to load some default settings

  • Select your steam directory and username and save the configuration files to tf2

Uninstallation

  • Delete all the .cfg files inside the tf/cfg directory

  • Run tf2 once with the -autoconfig flag (inside the launch options) to reset tf2 to default

  • Place any backed-up cfg files back

FAQ

I am having issues, it crashes. How can I fix this?

Try the following things:

  • Make sure you unzip your program before running it, otherwise it won't be able to find any of the files it needs

  • Upgrade java to its latest version, earlier java version don't work very well with this program

  • Try to generate the scripts locally, and copying them manually the the tf/cfg directory in the team fortress installation directory

  • Post an explanation + screenshot (if applicable) with the crash/issue on my github page: github.com/logophobia/YetAnotherTF2ConfigGenerator or add me at steamcommunity.com/id/logophobia

What is viewmodel switch mode?

It indicates when the viewmodel is turned off if that is set for the weapon slot:

  • Immediately after switching weapons

  • After firing a weapon

  • After switching strafe directions

  • After either firing or strafing

I have a feature request, where can I post it?

Post any suggestions on the github page or in the thread where you found the program

What does medic radar do precisely?

It toggles medic autocall to 150%, so each of your teammates has a medic symbol above their heads, which you can see through walls. As soon as you let go of the button, it will go back to its original autocall level

How can I customize this even more?

You could try editing the original templates, in the template directory. First, delete the cache directory. Then edit the templates, the language used is ssp: http://scalate.fusesource.org/documentation/ssp-reference.html. After that, the program will use your editted version of the templates.

What other ways to customize tf2 are there?

You can install custom huds, skins, hitsounds or customize/make your own scripts

My ambassador crosshair disappeared, how can I fix this?

For some reason, the crosshair after shooting is about half the default size. Increasing the size of the spy primary crosshair should fix this.

Changing settings inside tf2 doesn't work, it just gets changed back. How can I change my settings?

The scripts that were installed now regulate most of your settings inside tf2. Change stuff through the program, and then reinstall the scripts, or uninstall the scripts and be free to change things inside tf2 again.

Can I use my settings from a version of your program before 1.0

Yes. Drag the settings.xml file from your old program into the profile folder of the new program. Now you should be able to load your settings from the profile menu.


r/Tf2Scripts • • May 29 '12

Resource TF2 Config/Script generator

21 Upvotes

Yet Another TF2 Config Generator This program generates configuration files for Team Fortress 2

Features

  • Ability to specify for each class/weapon to specify the:

    • Crosshair (color, type, scale)

    • Mouse Sensitivity

    • Showing/Hiding behaviour of the weapon when you shoot/move/switch weapons/reload/etc..

    • Dingalings (damage sounds)

    • Interp-ratio

    • Batch damage numbers

  • Weapon switching has integrated next weapon, previous weapon, last weapon, toggle primary/secondary, toggle current/melee binds

  • Null-movement canceling: if you press two opposite strafe keys, you will no longer stand still

  • Ability to zoom in (up to factor 1.2)

  • Crouch jump (default off, can be enabled on a by-class basis)

  • Spawn switch binds

  • Engineer: quickbuild binds

  • Spy: disguise cycle

  • Medic: radar, communicate through chat when ubering, fake charge

  • Hide/Show gibs/sprays/ragdolls

  • Chris' configs can be optionally included

  • Scoreboard can be integrated with the network graphs

  • Integrate your own scripts easily from within the program itself

  • Binds for reload the hud, fixing graphical glitches and suicide

  • Team only voice option

  • Option to hide hitscan tracers/flames from the flamethrower/healbeam

  • Also includes all the advanced options tf2 has

Installation

  • Download the program here

  • Unzip the program and double click on the jar file to start (make sure you have a recent version of java installed)

  • Set everything up the way you want to, make sure you copy most of your essential settings in tf2, like your mouse sensitivity (very annoying when that gets changed). Use the profile menu to load some default settings

  • Select your steam directory and username and save the configuration files to tf2

Uninstallation

  • Delete all the .cfg files inside the tf/cfg directory

  • Run tf2 once with the -autoconfig flag (inside the launch options) to reset tf2 to default

  • Place any backed-up cfg files back

FAQ

I am having issues, it crashes. How can I fix this?

Try the following things:

  • Make sure you unzip your program before running it, otherwise it won't be able to find any of the files it needs

  • Upgrade java to its latest version, earlier java version don't work very well with this program

  • Try to generate the scripts locally, and copying them manually the the tf/cfg directory in the team fortress installation directory

  • Post an explanation + screenshot (if applicable) with the crash/issue on my github page: github.com/logophobia/YetAnotherTF2ConfigGenerator or add me at steamcommunity.com/id/logophobia

What is viewmodel switch mode?

It indicates when the viewmodel is turned off if that is set for the weapon slot:

  • Immediately after switching weapons

  • After firing a weapon

  • After switching strafe directions

  • After either firing or strafing

I have a feature request, where can I post it?

Post any suggestions on the github page or in the thread where you found the program

What does medic radar do precisely?

It toggles medic autocall to 150%, so each of your teammates has a medic symbol above their heads, which you can see through walls. As soon as you let go of the button, it will go back to its original autocall level

How can I customize this even more?

You could try editing the original templates, in the template directory. First, delete the cache directory. Then edit the templates, the language used is ssp: http://scalate.fusesource.org/documentation/ssp-reference.html. After that, the program will use your editted version of the templates.

What other ways to customize tf2 are there?

You can install custom huds, skins, hitsounds or customize/make your own scripts

My ambassador crosshair disappeared, how can I fix this?

For some reason, the crosshair after shooting is about half the default size. Increasing the size of the spy primary crosshair should fix this.

Changing settings inside tf2 doesn't work, it just gets changed back. How can I change my settings?

The scripts that were installed now regulate most of your settings inside tf2. Change stuff through the program, and then reinstall the scripts, or uninstall the scripts and be free to change things inside tf2 again.

Can I use my settings from a version of your program before 1.0

Yes. Drag the settings.xml file from your old program into the profile folder of the new program. Now you should be able to load your settings from the profile menu.


r/Tf2Scripts • • Apr 12 '21

Not Scripting Anti Name-Change Bot Mod

Thumbnail
self.truetf2
20 Upvotes

r/Tf2Scripts • • Feb 25 '21

Script Vaccinator - Quick-Swap Resistances (wait-enabled)

20 Upvotes

Apparently people thought this was impossible. Clearly I should've posted this earlier then, lol.

What this does:

  • When you hold CTRL (or whatever key you want to rebind it to), the 1, 2, and 3 keys will always* switch you to Bullet resistance, Explosive resistance, and Fire resistance respectively.

  • When CTRL isn't held, 1, 2, and 3 act normally.

  • Also, you can still press R to cycle resistances while still keeping the quick-swap functionality.

  • ALT, when held, will allow you to correct the script on the fly by pressing 1, 2, or 3 for whatever resistance you're currently on.

    • *Sometimes (for example, on respawn, when the game automatically sets you to Bullet) the buttons will think you're on a different resistance than you actually are. To fix that, hold ALT and press the button for the resistance you're actually on to correct the script's assumption.

    • Basically, you gotta press ALT+1 every time you respawn. It sounds annoying, but it becomes muscle memory after a while.

The script itself:

alias bulletResist "alias toExpRes fromBulToExp; alias toFireRes fromBulToFire; alias toBulRes; alias reloadBind toExpRes"
alias explosiveResist "alias toFireRes fromExpToFire; alias toBulRes fromExpToBul; alias toExpRes; alias reloadBind toFireRes"
alias fireResist "alias toBulRes fromFireToBul; alias toExpRes fromFireToExp; alias toFireRes; alias reloadBind toBulRes"

alias fromBulToExp "+reload; wait 5; -reload; explosiveResist"
alias fromBulToFire "+reload; wait 5; -reload; wait 5; +reload; wait 5; -reload; fireResist"

alias fromExpToFire "+reload; wait 5; -reload; fireResist"
alias fromExpToBul "+reload; wait 5; -reload; wait 5; +reload; wait 5; -reload; bulletResist"

alias fromFireToBul "+reload; wait 5; -reload; bulletResist"
alias fromFireToExp "+reload; wait 5; -reload; wait 5; +reload; wait 5; -reload; explosiveResist"

alias numbers2vacc "alias 1Bind bulletKey; alias 2Bind expKey; alias 3Bind fireKey"
alias numbers2weapons "alias 1Bind medWeapon1; alias 2Bind medWeapon2; alias 3Bind medWeapon3"

alias vacc_active "numbers2weapons; alias +resetResistKey +assertCurrentResistance; alias -resetResistKey -assertCurrentResistance; alias +switchNumbersToVacc numbers2vacc; alias -switchNumbersToVacc numbers2weapons"
alias vacc_inactive "numbers2weapons; alias +resetResistKey; alias -resetResistKey; alias +switchNumbersToVacc; alias -switchNumbersToVacc"

alias +assertCurrentResistance "numbers2vacc; alias bulletKey bulletResist; alias expKey explosiveResist; alias fireKey fireResist"
alias -assertCurrentResistance "numbers2weapons; alias bulletKey toBulRes; alias expKey toExpRes; alias fireKey toFireRes"

alias medWeapon1 "slot1; vacc_inactive"
alias medWeapon2 "slot2; vacc_active"
alias medWeapon3 "slot3; vacc_inactive"

alias bulletKey "toBulRes"
alias expKey "toExpRes"
alias fireKey "toFireRes"

// Binds.  Change the keybinds by replacing the key name with another. (e.g. C or Z, etc.)
bind CTRL "+switchNumbersToVacc"
bind ALT "+resetResistKey"
bind R "reloadBind"
bind 1 "1Bind"
bind 2 "2Bind"
bind 3 "3Bind"

vacc_inactive
bulletResist

Key names can be found here.

How to install:

  • EZ Install: download this VPK and put it in the \Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\custom folder.

    • Note that this will make it impossible to edit the binds, and will overwrite any other scripts that affect 1, 2, 3, R, ALT, or CTRL. Only do this if you know you don't have any other scripts that affect those, and just really don't want to have to figure out the file structure for modding.

  • Intermediate Install:

    • If this is your first custom config, read this tutorial to set up your folders correctly.

      • (It sounds complicated, but at its simplest you could just make a folder called "New Folder", make a folder called "cfg" inside of that, then put New Folder into your \tf\custom folder. Then make a bunch of text files in there named for each of the classes, except instead of ".txt" they need to be ".cfg".)

    • Go to \tf\cfg, then copy config.cfg to your \tf\custom\<whatever>\cfg folder and rename it to "resetbinds.cfg".

    • Put the line exec resetbinds at the top of every class config.

    • If you only play on non-competitive servers, you can just paste the script into your medic.cfg. Not complicated, but not "best practice" either.

  • Proper Install:

    • Follow the Intermediate steps, but instead of pasting it into medic.cfg, make a new file called "medicVaccScript.cfg" and paste it into that.

    • Paste the following into your medic.cfg, and then you're done!

alias wait? "alias $wait +wait; wait_1; $wait"
alias wait_1 "wait; alias $wait -wait"
alias +wait "alias execVaccinatorScript? execVaccinatorScript" 
alias -wait "alias execVaccinatorScript?"
alias execVaccinatorScript "exec medicVaccScript"

wait?
execVaccinatorScript?

(Credit to u/TimePath for this wait tester variant!)

You can customize the binds as you wish, but if you want to change the keys away from 1, 2, and 3, you need to replace the text in quotes after medWeapon1/2/3 with whatever command the new key normally executes, and then put the following after the script so you can't "switch resistances" when you aren't on your medigun:

bind 1 "slot1; vacc_inactive"
bind 2 "slot2; vacc_active"
bind 3 "slot3; vacc_inactive"

Any questions? Comments? Concerns? Comment below!

Thanks, and I hope you enjoy!

EDIT: Fixed Reddit interpreting "@wait" in the wait tester as "u/wait".


r/Tf2Scripts • • Dec 10 '20

Resource [Source Code Leak] List of launch options.

20 Upvotes

Gotten from the TF2 source leak. Note that some launch options may have been disabled.

Syntax:
<path to file>:<linenumber>:<launchoption>
"||" means or.

(EDIT 12/11/2020) Removed duplicates and added missing launch options.
(EDIT 12/11/2020 5:16PM) Readded missing launch options.
(EDIT Fri Dec 11 2020 19:20:46 GMT-0600 (Central Standard Time)) Moved list to github.


r/Tf2Scripts • • Oct 18 '20

None of my cfg files are working, and yes I use mastercomfig.

Thumbnail
gallery
20 Upvotes

r/Tf2Scripts • • Mar 02 '19

Request Parental Guidance config

20 Upvotes

My nephews (~10 y/o) have started playing this game. I made this config to make their experience more PG-friendly. It turns off their voice and chat text primarily, but I also included some default settings that are useful (max FOV, minviewmodels, and more).

There's a full explanation in the README: https://github.com/rufio-tf2/pg-config

Let me know if you think of other things that would be helpful for the kiddos.