Go to file
Paco Hope 5328f486fa Added debug flag 2022-06-19 20:01:58 -04:00
.vscode Added debug flag 2022-06-19 20:01:58 -04:00
.gitignore added a few of my own file 2022-06-14 18:05:23 -04:00
LICENSE Initial commit 2022-06-12 13:41:34 -04:00
README.md Added content and an example 2022-06-16 20:04:31 -04:00
cli.py Changed names to work with renamed files, added comments to clarify imports 2022-06-16 18:32:53 -04:00
menu.py added graphical TUI 2022-06-14 23:04:01 -04:00
pylintrc Added pylintrc file for pylint 2022-06-15 09:28:45 -04:00
requirements.txt added pylint 2022-06-15 09:28:59 -04:00
testScript.yaml Basic script to verify script is working 2022-06-14 18:06:10 -04:00
tfscript.py Now starts outputting to files 2022-06-17 18:35:37 -04:00
verify.py Better verification, works with new tfscript file 2022-06-17 18:36:31 -04:00


Hello and welcome to tfscript!

Basic overview

tfscript is meant to simplify the complexity of creating tf2 keybinds. While simple binds may be easy, more complex actions such as key combinations and toggles can be quite complex.

For example, this config will bind "e" to call for medic, unless mouse4 is held, in which case it will call for an ÜberCharge:

alias call_for_medic "voicemenu 0 0"
alias call_for_uber  "voicemenu 1 6"
alias e_bind call_for_medic
bind e e_bind
alias +toggle_state "alias e_bind call_for_uber"
alias -toggle_state "alias e_bind call_for_medic"
bind mouse4 "+toggle_state"

There are some issues with this:

  • It is quite verbose, and if several of these exist the file can become difficult to traverse
  • There is a lack of clarity in the voicemenu command, only the bind name explains what it does
  • If either "mouse4" or "e" had a prior function, it has now been overwritten
  • The scope is dictated by what .cfg file this is located within, which can cause problems


The tfscript way of doing this is

        impulse: voice "medic"
        impulse: voice "activate uber"
      condition: mouse4

There are several benefits to this:

  • The indentation allows for easier scanning of the file
  • The voicemenu commands have been replaced with the clearer "voice" impulse
  • Since this is within the default section, it is clear that there are is no "prior function" to overwrite and this will apply to all classes unless specifically overwritten.

Known issues, problems, etc.

none everything is perfect and there are no problems it is all amazing