r/tf2scripthelp • • Feb 04 '15

Resolved Scripting noob here, need help

2 Upvotes

bind q "r_drawviewmodels 1; slot2; +attack2; say_team sandvich deployed; slot1; r_drawviewmodels 0;"

Is what I have so far. It works fine (pressing q throws sandvich), but I get stuck in +attack2. I tried adding ;-attack2 at the end, but that seems to nullify the +attack2 in the beginning. What can I do to fix this?


r/tf2scripthelp • • Feb 02 '15

Resolved New to Scripting; wrote an engie script that kinda works, but need help with ending +attack

2 Upvotes

S So, I'll copy and paste what I have below. Essentially it (kinda) does what I want it to, which is to either drop a building, destroy and drop, or just destroy, but after dropping I want the +attack to stop (I just keep punching or whacking) and switch to my shotty. I know I am missing something, but am not sure how to go about fixing. any help would be appreciated.

~Darth Pops

alias dbsentry "destroy 2; build 2; +attack" alias dbdispenser "destroy 0; build 0; +attack" alias dbentrance "destroy 1; build 1; +attack" alias dbexit "destroy 3; build 3; +attack" alias bsentry "build 2; +attack" alias bdispenser "build 0; +attack" alias bentrance "build 1; +attack" alias bexit "build 3; +attack" alias dsentry "destroy 2" alias ddispenser "destroy 0" alias dentrance "destroy 1" alias dexit "destroy 3" bind leftarrow dbsentry bind rightarrow dbdispenser bind uparrow dbentrance bind downarrow dbexit bind 4 bsentry bind 5 bdispenser bind 6 bentrance bind 9 bexit bind 0 dsentry bind - ddispenser bind = dentrance bind 8 dexit


r/tf2scripthelp • • Jan 17 '15

Answered Command that allows TF2 to run at full speed while not the main focused program.

2 Upvotes

By "main focused program", I mean the program currently being clicked on. When you're in windowed mode and you click to say, Chrome, TF2 begins running at lower performance with low FPS. What console command can stop this?


r/tf2scripthelp • • Jan 04 '15

Question Medic Auto-heal

2 Upvotes

So I messed up with my cfg with this new account, so...

I want an auto-heal script to work with just my medic, I know a reset.cfg and a medic.cfg is needed but I forgot how to put that in my folders. Help would be nice


r/tf2scripthelp • • Dec 01 '14

Question The FPS question ( not sure if good subreddit)

2 Upvotes

Hi! I am a competetive scout player! And i have a weird question about fps. I have Eizo Forris2333 and should i use 121 fps cap? Well i dont the 121 ( i have like 80-90) while having the chris cfg for beasty computers ( to make tf2 look good) and with forced ragdolls.

If ill change to other 1 and cap it somewhere will it change my hitscan aim??


r/tf2scripthelp • • Nov 30 '14

Answered Understanding TimePath's m_cpi Script

2 Upvotes

I came across TimePath's m_cpi script yesterday looking into QL's m_cpi command itself (I frequently change and test mice and I play QL too!). I must say the idea is impressive. I have two questions. One, how well does it mimic the real deal? I've not put it into testing yet because of question #2 - which is I get lost in understanding how the things works. It's wizardry to me. I'm not really a scripting kind of guy but the math bit caught my interest. I believe the gist of it is emulating the m_cpi formula through multvar and aliasing the different values. I just am not understanding how it all comes together and why so many values are inverse. (1/*)

 

TL;DR Better breakdown of the m_cpi script?

 

EDIT: I think I get it now having poked around the script. Those inverse values are there because you need to multiply them by the result of 360 divided by CM per 360. The Quake Live m_cpi formula is done via multvar's factor multiplication. Values are inversed because multvar only multiplies. Multiplying the inverse basically giving you the same effect as divisibility in this case.

 

Finding out the "new sensitivity" is done via

new_sens = old_sens * (old_yaw * m_cpi / 2.54)

The script has your new_sens ready to be plugged. Now, we need to revert to an old_sens style value. You would simply do the reverse

old_sens = new_sens / old_yaw / m_cpi * 2.54

But since multvar can only multiply, you'll need the inverse of those vlaues. You now make the script do this

old_sens = new_sens * (1 / old_yaw) * (1 / m_cpi) * 2.54

Giving you the same output.

 

The last two lines of the script do just that. It creates the alias command @sens.todegcm. That uses your new sensitivity through $sens.degcm and multiplies it by calling @sens.div_pitchyaw. That alias sets multvar to factor the sensitivity by 45.454545455 (yaw's inverse). Then @sens.todegcm calls for @sens.mult_inches which multiplies the previous product (sensitivity) by 2.54 (converting into cm). That value is then multiplied (by the inverse of your DPI) through calling @sens.div_cpi. The end result is an old_sens sensitivity value that fits the same cm per 360 depending on what DPI value you have set as m_cpi.

 

*puts pencil down*


r/tf2scripthelp • • Nov 29 '14

Answered -heapsize in launch options?

2 Upvotes

In my quest to get as many frames as possible out of my laptop I've tried just about everything, but I just came across a launch option I haven't heard of before.

A guide recommends changing heapsize to allocate specific amounts of RAM to the game. Problem is, the guide was last modified two years ago and I can't find any more recent info about whether this works or not.

Any idea if maxing heapsize will increase performance, or will it break everything?


r/tf2scripthelp • • Nov 13 '14

Answered Interesting issue with a spy disguise script.

2 Upvotes

Tagged as answered and not resolved because the issue isn't resolved but I'm still satisfied with the response.

I've got an interesting issue with my spy script. Autoexec, spy and relevant config files at the end. It doesn't much affect my ability to use the script, it's simply an... oddity, if you will.

I'm running a modified disguise script I found on the TF2 wiki. When I press Mouse4 or Mouse5 to disguise the first time, the echo call on lines 25/26 will show up normally. (Top left corner) However, on subsequent presses, it starts deforming the menu text to the point of it just being silly. - note that both the abort warning AND the preliminary disguise menu is affected.

I was wondering if there was something interfering in the script (the apostrophe maybe? Or the comments?) which might cause this.


spy.cfg

viewmodel_fov 75
exec spydisguise

autoexec.cfg

//medic call script
exec mediccall

//tr_walkway thing
exec botmaxconfig

//on-the-fly mouse sensitivity adjuster
exec mousesense

//quick disguise
exec spydisguise

//mouse4 -> z>2
exec thanksmate

//ford warning tones
tf_hud_num_building_alert_beeps 5

//increased decals
mp_decals 4096

//anti-virus thing
exec antivirus

Other scripts do not appear relevant to the issue, but are available upon request.


r/tf2scripthelp • • Nov 10 '14

Issue TF2 mistakes fov_desired for viewmodel_fov

2 Upvotes

I just wrote myself a little script that lets me 'zoom' with the amby:

alias amby_zoom "incrementvar fov_desired 75 90 15"
bind mouse3 amby_zoom

It is put in a larger crosshair and viewmodel changing script, but this is basically it. Now everything just works as i want it to, when i press mouse3 the fov gets set to 75 and when i press it again back to 90. The only problem is, that after playing for a few minutes the game mistakes 'fov_desired' for 'viewmodel_fov' and changes that from 75 to 90 when i press mouse3. Does anyone have an idea why this might be happening and how to fix it?

EDIT: Respawning temporarily fixes it, but not executing my reset file and then the spy one again.

EDIT 2: github with my autoexec, reset and spy files


r/tf2scripthelp • • Oct 23 '14

Issue Trying to make a 6v6 bot script, getting unexpected results

2 Upvotes

So, I decided to make a 6v6 bot cfg that when executed, adds bots in the cookie-cutter format with custom names and everything. Here it is.

tf_bot_keep_class_after_death 1
// I gave the bots names, too!
tf_bot_add 1 scout red expert 4G.b4nny|froyotech.tv
tf_bot_add 1 scout red expert 4G.clockwork
tf_bot_add 1 scout blue expert mix^ squid
tf_bot_add 1 scout blue expert mix^ enigma
tf_bot_add 1 soldier red expert 4G.lansky
tf_bot_add 1 soldier red expert 4G.blaze
tf_bot_add 1 soldier blue expert mix^ Platinum
tf_bot_add 1 soldier blue expert mix^ TLR
tf_bot_add 1 demoman red expert 4G.duwatna
tf_bot_add 1 demoman blue expert mix^ xalox
tf_bot_add 1 medic red expert 4G.shade
tf_bot_add 1 medic blue expert mix^ indust // Adds the bots w/ names.
tf_weapon_criticals 0
tf_damage_disablespread 1

However, upon executing I instead get these results:

  • I get 22 random bots.

  • None of the bots are named correctly - only Squid, Enigma, TLR and Plat even show up, and they're missing the mix^ tag somehow. Indust and Xalox return "couldn't create bot" errors, and the Froyo bots aren't even acknowledged.

Is this an issue with the names? I'd easily be able to change them to things like 20b and eLv, but I'd love to know what's happening. Thanks!


r/tf2scripthelp • • Oct 11 '14

Issue Spy disguise is automatically switching to my held weapon. I did not even know this was possible?

2 Upvotes

Pretty much what the title says. I assume this is happening because of a script because I changed around some of my spy scripts and the merc I'm disguised as is automatically changing the weapon I hold. Here is the script that changed.

//weapons switcher//

bind mouse5 +sapper
bind mwheelup +pistol
bind mwheeldown +knife
bind mouse2 +attack2

alias +knife "slot3; -attack; bind mouse1 +attackdisguise; +draw"
alias -knife "slot3; -attack; bind mouse1 +attackdisguise; +draw"
	alias +attackdisguise "+attack"
	alias -attackdisguise "-attack; lastdisguise"

alias +pistol "slot1; -attack; unbind mouse1; bind mouse1 +attackdisguise; +amby"
alias -pistol "slot1; -attack; unbind mouse1; bind mouse1 +attackdisguise; +amby"
	alias +amby "fov_desired 25; r_drawviewmodel 0"
	alias -amby "fov_desired 25; r_drawviewmodel 0"
	

alias +sapper "slot2; +attack; +draw"
	alias +draw "fov_desired 90; r_drawviewmodel 1"
	alias -draw "fov_desired 90; r_drawviewmodel 1"

Other than that, earlier today I tried to use one of Stabby's scripts (the viewmodel one for the amby). Is there a chance that this script has anything left over to affect whats happening?

// Equip item, turn vm on/off, set vm toggle for attack
     
    alias +equip_knife "slot3;r_drawviewmodel 1"             // Equips knife, turns viewmodels on
    alias -equip_knife "knife_vm_mode;r_drawviewmodel 1"    // Sets viewmodels to turn ON when stabbing (makes sure it stays on)
     
    alias +equip_amby "slot1"                               // Equips amby
    alias -equip_amby "amby_vm_mode"                        // Sets viewmodels to turn OFF when shooting
     
    alias +equip_sap "slot2;r_drawviewmodel 1"             // Equips sapper, turns viewmodels on
    alias -equip_sap "sap_vm_mode"                        // Sets viewmodels to turn on while firing, and off when not
     
    alias +watch "+attack2;r_drawviewmodel 1"              // watch up/cloak on/secondary attack + viewmodels on
    alias -watch "-attack2;r_drawviewmodel 1"             // viewmodels on again as safeguard

I wound up not using this scripts (wrote my own) but is there a chance this is holding over somehow?

Thanks in advance.


r/tf2scripthelp • • Oct 05 '14

Answered I need help with my medic .cfg

2 Upvotes

I'm not new to scripting or anything, but I do need some help. I'd like to be able to make a bind to change between loadouts A,B,C,D as seen HERE. If this is possible, it'd make my life so much better, and I'd love you forever.


r/tf2scripthelp • • Sep 13 '14

Question Force auto-director to first person

2 Upvotes

Hey guys, quick question. I was wondering if anyone knew if there was a way to force auto director to only use the first person camera.

Thanks :)


r/tf2scripthelp • • Sep 12 '14

Question Hitsound too quiet?

2 Upvotes

Hey guys, I'm trying to get my hitsound to be louder but it won't work. I've amplified it in audacity to the point where it sounds choppy but I still can't hear it. Is it due to the source video that I took it from? I need help.


r/tf2scripthelp • • Sep 09 '14

Issue Stuttering caused by "var" (netcode?)

2 Upvotes

I've had terrible stuttering spikes for months now, sometimes it's so distracting and annoying it makes me play worse. For example: I am just about to click a head with sniper, the game drops anywhere from 10 to 100 frames and doesn't register key presses. Note that this also happens in offline mode.

I did some research and troubleshooting and I found out that in net_graph 4 "var" spikes from the usual 2-3msec to 8msec or more depending on the length of the stutter. So I googled it and here https://developer.valvesoftware.com/wiki/TF2_Network_Graph is said this

The "var" shows the standard deviation of the server's frametime (where server fps = 1.0 / frametime) over the last 50 frames recorded by the server.

I have seen other people complaining about this as well, but no one has ever mentioned "var"


r/tf2scripthelp • • Sep 07 '14

Answered TF2 bindings for Logitech G9

2 Upvotes

Hey Hey, I just found this http://facepunch.com/showthread.php?t=1046055 to use my G-keys for TF2 commands instead of bind a command to (for example) "O" and bind G5 to "O". It works perfectly for me and it's easy to use but the only problem is that the script has not enough Keys listed. I have 30 G-Keys but the script only 18. So my question is how I can expand the script to bind more keys?


r/tf2scripthelp • • Sep 02 '14

Question Not sure if this is the correct place to ask but I can't find my items_game.txt file?

2 Upvotes

I want to acssess it to mess around with weapon stats but it's not located in my tf/scripts file. Is it no longer located there or did they remove the ability to see/edit it?


r/tf2scripthelp • • Aug 18 '14

Answered Randomization?

2 Upvotes

Is there any possible way to make a script choose a random command, for example, randomly choosing to say "Thanks!" or "Nice Shot!"? If so, how? If not, would you have to make a completely overly complicated script to make it seem randomized? If it's not possible, it should probably be added to the "Limitations of Scripts" section of the Wiki.


r/tf2scripthelp • • Aug 12 '14

Resolved Simple voice script not working? Help please

2 Upvotes

so, in my heavy.cfg I've written 1 line of script for requesting ubercharge to my left shift key. It goes as follows:

bind shift "voicemenu 1 6"

It doesn't seem to be working and I'm not sure why. I've tried "lshift" "leftshift" "SHIFT" and nothing seems to work. Any ideas as to why? Thanks in advance


r/tf2scripthelp • • Jul 29 '14

Question What is the sensitivity ratio of "zoom_sensitivity_ratio"

2 Upvotes

My point is that I want to have the same sens with my spy zoom script when sniper rifle is when scoped in.


r/tf2scripthelp • • Jul 20 '14

Resolved +attack bind not working?

2 Upvotes

I have several different scripts set up to use mouse one and mouse two in different ways. For that reason, I have set up my reset.cfg folder to reset those two "keys" back to their original state. This looks like:

bind "mouse1" "+attack"
bind "mouse2" "+attack2"
bind "r"      "+attack3"

Those binds do not work however and every class is unable to attack1 or attack2 or attack3 (if applicable). I do have the command,

exec reset

in every class folder.

I'm not sure what I'm doing wrong, any help would be greatly appreciated.


r/tf2scripthelp • • Jul 20 '14

Answered Key Combos and Voice Lines: How can I bind a key to do two separate things

2 Upvotes

Hi guys and gals,

This may seem like a noob question (because it is) and it may be in the wiki (I couldn't find it) but I need to know about binding one key to two different actions.

My goal is to be able to bind the keys 1-9 to different voice commands ("spy", "Medic", "Sentry ahead" for example), while maintaining those keys functionality for other classes (engie build scripts, and spy disguise scripts).

I read somewhere that I can do this by creating a script where pressing one button while another is held down will change the action of the first button. I researched this and found some info but I am really struggling to understand how to do this. If anyone could help me, I would greatly appreciate it.


r/tf2scripthelp • • Jul 12 '14

Answered Attempt at sentry-only build+destroy with PDA produces teleporter entrances instead

2 Upvotes

I'm working on a script intended for Gunslinger loadouts that, rather than using a separate key to destroy+quickbuild, will use the build menu as normal but destroy any preexisting sentry upon selecting the sentry in the build menu. I want to continue using the build menu because I'm running out of comfortably reachable keys, and I want it to be sentry-only because I don't like running the risk of slipping and accidentally destroying a level three dispenser or teleporter.

bind 4 "slot4;bind 1 quickbuild"  
alias quickbuild "build 2 0;destroy 2 0;bind 1 slot1"

The problem I'm encountering is that for some reason, if the build menu is brought up at all, any build command defaults to building a teleporter entrance -- I tested it with 0 0 and 2 1, and those produced entrances as well.

I also tried a + alias version, which produced the same results, with the additional complication of opening the build menu after I place the building and not closing it, even if I added lastinv or slot3 to the - alias:

bind 4 "+quickbuildmenu;slot4"
alias +quickbuildmenu "bind 1 quickbuild"  
alias -quickbuildmenu "bind 1 slot1;slot3"  
// alias -quickbuildmenu "bind 1 slot1;lastinv"  
alias quickbuild "build 2 0;destroy 2 0"

Taking ;slot4 out of the 4 bind is fine, but leaves me without a build menu for everything else; in any case, that's how I figured it was the presence of the build menu that was screwing things up. Why is this? Can it be worked around?


Edit: Right, I've figured out the teleporter entrance bit -- I was actually using a different set of binds in which 3 was the slot1, and although this works for selecting the sentry in normal build menu use, apparently it doesn't work in scripting, even if I add a ";slot1" into an appropriate location. Furthermore, even if I use vanilla binds, the destroy does not work, and it simply functions as if I am using the build menu normally. It seems like bringing up the build menu overrides a lot of scripting things -- though, for some reason, it still allows me to select 1/2/3 using non-vanilla numerical slot binds. Is there any way to override the override?


r/tf2scripthelp • • Jul 10 '14

Issue Can't get class specific configs to work!

2 Upvotes

I've tried multiple websites for help and I can't get it to work. The only things I really care about is:

when playing as engie, I want mouse4 to build a sentry and mouse5 to destroy it when playing as spy, I want mouse4 to lastdisguise and mouse5 to place a sapper

I can't figure out how to make separate configs though.

I have made a custom folder for configs: SteamApps/Common/Team Fortress 2/tf/custom/CustomFolder/cfg

I have autoexec.cfg in there (my default keybinds), reset.cfg in there (my default keybinds again, executed at the beginning of a class switch so as to keep custom keybinds to their specific classes), engineer.cfg, and spy.cfg.

My engineer.cfg is as follows:

exec reset

bind "mouse5" "destroy 2 0"

bind "mouse4" "build 2 0"

My spy.cfg is as follows:

exec reset

bind "mouse4" "lastdisguise"

bind "mouse5" "build 3 0"

I can't get it to work. When I spawn in, it does some weird thing where it constantly tries to reload a full gun/no reload gun (widowmaker), scopes in despite not having a sniper out, and generally freaks out. Then to top it off none of my keybinds work. Help?