Upvote Upvoted 0 Downvote Downvoted
Selve's Crosshair Switcher and Slot Customizer
posted in Customization
1
#1
0 Frags +

Hey everyone! I'm Selve and as many you guys are aware, there are a ton of TF2 crosshair switchers out there but I made this one because I really didn't feel comfortable with those. So here it is. In the following text, I'm just basically going to go over customization instructions and some basic guidelines.

1. The Basic Text
So here is the switcher in its most basic form:

alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2""

alias m_slot2 "slot2; bind MWHEELUP "m_slot1"; bind MWHEELDOWN "m_slot3""

alias m_slot3 "slot3; bind MWHEELUP "m_slot2"; bind MWHEELDOWN "m_slot1""

bind 1 "m_slot1"

bind 2 "m_slot2"

bind 3 "m_slot3"

As of now, all it does is just switch from slot to slot. Nothing special. The more observant individuals will notice that it doesn't even work for Spy and Engineer. So below are the basic switchers for those to classes, presented respectively

//SPY
alias m_slot1 "slot1; bind MWHEELUP "m_slot4"; bind MWHEELDOWN "m_slot2""

alias m_slot2 "slot2; bind MWHEELUP "m_slot1"; bind MWHEELDOWN "m_slot3""

alias m_slot3 "slot3; bind MWHEELUP "m_slot2"; bind MWHEELDOWN "m_slot4""

alias m_slot4 "slot4; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot1""

bind 1 "m_slot1"

bind 2 "m_slot2"

bind 3 "m_slot3"

bind 4 "m_slot4"
//ENGINEER
alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2""

alias m_slot2 "slot2; bind MWHEELUP "m_slot1"; bind MWHEELDOWN "m_slot3""

alias m_slot3 "slot3; bind MWHEELUP "m_slot2"; bind MWHEELDOWN "m_slot1""

alias m_slot4 "slot4; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot5""

alias m_slot5 "slot5; bind MWHEELUP "m_slot4"; bind MWHEELDOWN "m_slot1""

bind 1 "m_slot1"

bind 2 "m_slot2"

bind 3 "m_slot3"

bind 4 "m_slot4"

bind 5 "m_slot5"

So, like previously mentioned, the scripts in their current stages literally do nothing special. But all that is about to change (also, in the below examples, I will be using the generic 3-slot cfg for demonstrative purposes. However, the same principles will apply for the Spy and Engineer cfgs)

2. Installation and Basic Customization
2a. Installation
So to get these things to work, first, make sure your current cfg is free of any other crosshair switcher. If it's not, dispose of it as necessary. Then, just put the generic switcher (from here on out, I will refer to the 3-slot switcher as "the generic switcher) into all of the 3-slot class .cfgs (scout.cfg, soldier.cfg, pyro.cfg, etc.) and put the Spy and Engineer switchers into their respective .cfg's and you're set for installation!

but wait, Selves! I don't have [CLASS].cfg items! Where can I get them?

So this was a problem that I ran into when I originally was looking through scripts. So if you don't find your [CLASS].cfg's simply go into Local Disk>Program Files (x86)>Steam>SteamApps>Common>Team Fortress 2> tf> cfg.
In here, there will be a bunch of .cfg's. So find any random one, copy it into the cfg folder (the one you're currently in), right-click on it, hit "Open with Notepad", delete all of the stuff in it, rename it to [CLASS].cfg, and repeat 8 more times (one for each class)

but wait, Shells! I have a MacBook!

Sell it and get a Windows computer. Mac sucks for gaming. End of discussion.

2b. Basic Customization
So to customize is very simple. Say for example, for the Scout primary, you want a green, default xhair (definitely not my cfg). So go into your newly made scout.cfg with the generic switcher in it and add

cl_crosshair_file default;  cl_crosshair_red 0; cl_crosshair_green 255; cl_crosshair_blue 0;

in the location indicated below

alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2"; //PUT IT HERE"

alias m_slot2 "slot2; bind MWHEELUP "m_slot1"; bind MWHEELDOWN "m_slot3""

alias m_slot3 "slot3; bind MWHEELUP "m_slot2"; bind MWHEELDOWN "m_slot1""

bind 1 "m_slot1"

bind 2 "m_slot2"

bind 3 "m_slot3"

to get this

alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2"; cl_crosshair_file default;  cl_crosshair_red 0; cl_crosshair_green 255; cl_crosshair_blue 0"

alias m_slot2 "slot2; bind MWHEELUP "m_slot1"; bind MWHEELDOWN "m_slot3""

alias m_slot3 "slot3; bind MWHEELUP "m_slot2"; bind MWHEELDOWN "m_slot1""

bind 1 "m_slot1"

bind 2 "m_slot2"

bind 3 "m_slot3"

And that is basically the gist of it. You find the xhair settings you like and you put it in the slot you like it in for the given [CLASS].cfg

And this works for more than just crosshairs. Let's say you don't want to die from cancer so naturally, you turn off your viewmodels. But since melee weapons have different swing times, you like to keep melee vm's on. So what you will do is put

r_drawviewmodel 0

in the m_slot1 and m_slot2 of your class xhair switcher but for the m_slot3, you will put

r_drawviewmodel 1

The resulting cfg will look something like this:

alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2"; r_drawviewmodel 0"

alias m_slot2 "slot2; bind MWHEELUP "m_slot1"; bind MWHEELDOWN "m_slot3"; r_drawviewmodel 0"

alias m_slot3 "slot3; bind MWHEELUP "m_slot2"; bind MWHEELDOWN "m_slot1"; r_drawviewmodel 1"

bind 1 "m_slot1"

bind 2 "m_slot2"

bind 3 "m_slot3"

The same principle applies for just about anything else, like viewmodel_fov (viewmodel_fov [VALUE]) and disabling tracers (viewmodel_fov [VALUE]).
!!!MUY IMPORTANTE!!!
(yes, I know Spanish. Como esta usted?)
Whenever you add new stuff to the cfg, remember to make sure there are semicolons seperating each individual "segment".
The following stuff is bad badcode.

alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2" r_drawviewmodel 0"

Notice that between the bind MWHEELDOWN "m_slot2" and the r_drawviewmodel 0 segments, there was no semicolon. If there is not semicolon, Gaben will not be happy (the console won't recognize it as 2 separate segments) and your cfg will not work.
The following is the goodified version of the code

alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2"; r_drawviewmodel 0"

Notice the semicolon between bind MWHEELDOWN and r_drawviewmodel. Now Gaben is happy (the console recognizes it as 2 separate segments). However, you don't need semicolons for the last segment on a line.

So for the purposes of generosity and good karma, below, I have organized a table of good commands to know for customization and their correct syntaxes.

//XHAIR ICON
cl_crosshair_file [crosshair(1-7)/default]
//XHAIR SIZE
cl_crosshair_scale [number]
//XHAIR RED (how much red is in the xhair
cl_crosshair_red [number 0-255]
//XHAIR GREEN
cl_crosshair_green [number 0-255]
//XHAIR BLUE
cl_crosshair_blue [number 0-255]
//VIEWMODEL SIZE
viewmodel_fov [number]
//VIEWMODEL ON/OFF
r_drawviewmodel [0 (off) or 1 (on)]

Also, for crosshair colors, TF2 uses rgb additive light to generate its colors so you can look on wikipedia or something if you need a specific color. But yeah thanks for reading! If you have any questions or customization help/issues or if you wanna leave me feedback or a +rep or something like that :3 drop a comment on my Steam Profile. Also, I may or may not also put my personal cfgs online, but other than that, Thanks for reading!!! ☺☺☺☻☻☻

Hey everyone! I'm Selve and as many you guys are aware, there are a ton of TF2 crosshair switchers out there but I made this one because I really didn't feel comfortable with those. So here it is. In the following text, I'm just basically going to go over customization instructions and some basic guidelines.

[b]1. The Basic Text[/b]
So here is the switcher in its most basic form:
[code]alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2""

alias m_slot2 "slot2; bind MWHEELUP "m_slot1"; bind MWHEELDOWN "m_slot3""

alias m_slot3 "slot3; bind MWHEELUP "m_slot2"; bind MWHEELDOWN "m_slot1""

bind 1 "m_slot1"

bind 2 "m_slot2"

bind 3 "m_slot3"[/code]

As of now, all it does is just switch from slot to slot. Nothing special. The more observant individuals will notice that it doesn't even work for Spy and Engineer. So below are the basic switchers for those to classes, presented respectively

[code]//SPY
alias m_slot1 "slot1; bind MWHEELUP "m_slot4"; bind MWHEELDOWN "m_slot2""

alias m_slot2 "slot2; bind MWHEELUP "m_slot1"; bind MWHEELDOWN "m_slot3""

alias m_slot3 "slot3; bind MWHEELUP "m_slot2"; bind MWHEELDOWN "m_slot4""

alias m_slot4 "slot4; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot1""

bind 1 "m_slot1"

bind 2 "m_slot2"

bind 3 "m_slot3"

bind 4 "m_slot4"[/code]

[code]//ENGINEER
alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2""

alias m_slot2 "slot2; bind MWHEELUP "m_slot1"; bind MWHEELDOWN "m_slot3""

alias m_slot3 "slot3; bind MWHEELUP "m_slot2"; bind MWHEELDOWN "m_slot1""

alias m_slot4 "slot4; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot5""

alias m_slot5 "slot5; bind MWHEELUP "m_slot4"; bind MWHEELDOWN "m_slot1""

bind 1 "m_slot1"

bind 2 "m_slot2"

bind 3 "m_slot3"

bind 4 "m_slot4"

bind 5 "m_slot5"[/code]

So, like previously mentioned, the scripts in their current stages literally do nothing special. But all that is about to change (also, in the below examples, I will be using the generic 3-slot cfg for demonstrative purposes. However, the same principles will apply for the Spy and Engineer cfgs)

[b]2. Installation and Basic Customization[/b]
[b]2a. Installation[/b]
So to get these things to work, first, make sure your current cfg is free of any other crosshair switcher. If it's not, dispose of it as necessary. Then, just put the generic switcher (from here on out, I will refer to the 3-slot switcher as "the generic switcher) into all of the 3-slot class .cfgs (scout.cfg, soldier.cfg, pyro.cfg, etc.) and put the Spy and Engineer switchers into their respective .cfg's and you're set for installation!

[i]but wait, Selves! I don't have [CLASS].cfg items! Where can I get them?[/i]

So this was a problem that I ran into when I originally was looking through scripts. So if you don't find your [CLASS].cfg's simply go into Local Disk>Program Files (x86)>Steam>SteamApps>Common>Team Fortress 2> tf> cfg.
In here, there will be a bunch of .cfg's. So find any random one, copy it into the cfg folder (the one you're currently in), right-click on it, hit "Open with Notepad", delete all of the stuff in it, rename it to [CLASS].cfg, and repeat 8 more times (one for each class)

[i]but wait, Shells! I have a MacBook![/i]

Sell it and get a Windows computer. Mac sucks for gaming. End of discussion.

[b]2b. Basic Customization[/b]
So to customize is very simple. Say for example, for the Scout primary, you want a green, default xhair (definitely not my cfg). So go into your newly made scout.cfg with the generic switcher in it and add
[code]cl_crosshair_file default; cl_crosshair_red 0; cl_crosshair_green 255; cl_crosshair_blue 0;[/code]
in the location indicated below

[code]alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2"; //PUT IT HERE"

alias m_slot2 "slot2; bind MWHEELUP "m_slot1"; bind MWHEELDOWN "m_slot3""

alias m_slot3 "slot3; bind MWHEELUP "m_slot2"; bind MWHEELDOWN "m_slot1""

bind 1 "m_slot1"

bind 2 "m_slot2"

bind 3 "m_slot3"[/code]

to get this

[code]alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2"; cl_crosshair_file default; cl_crosshair_red 0; cl_crosshair_green 255; cl_crosshair_blue 0"

alias m_slot2 "slot2; bind MWHEELUP "m_slot1"; bind MWHEELDOWN "m_slot3""

alias m_slot3 "slot3; bind MWHEELUP "m_slot2"; bind MWHEELDOWN "m_slot1""

bind 1 "m_slot1"

bind 2 "m_slot2"

bind 3 "m_slot3"[/code]


And that is basically the gist of it. You find the xhair settings you like and you put it in the slot you like it in for the given [CLASS].cfg

And this works for more than just crosshairs. Let's say you don't want to die from cancer so naturally, you turn off your viewmodels. But since melee weapons have different swing times, you like to keep melee vm's on. So what you will do is put
[code]r_drawviewmodel 0[/code]
in the m_slot1 and m_slot2 of your class xhair switcher but for the m_slot3, you will put
[code]r_drawviewmodel 1[/code]
The resulting cfg will look something like this:
[code]
alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2"; r_drawviewmodel 0"

alias m_slot2 "slot2; bind MWHEELUP "m_slot1"; bind MWHEELDOWN "m_slot3"; r_drawviewmodel 0"

alias m_slot3 "slot3; bind MWHEELUP "m_slot2"; bind MWHEELDOWN "m_slot1"; r_drawviewmodel 1"

bind 1 "m_slot1"

bind 2 "m_slot2"

bind 3 "m_slot3"[/code]
The same principle applies for just about anything else, like viewmodel_fov (viewmodel_fov [VALUE]) and disabling tracers (viewmodel_fov [VALUE]).
[b]!!!MUY IMPORTANTE!!![/b]
(yes, I know Spanish. Como esta usted?)
Whenever you add new stuff to the cfg, remember to make sure there are semicolons seperating each individual "segment".
The following stuff is [i]bad bad[/i]code.
[code]alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2" r_drawviewmodel 0"
[/code]
Notice that between the bind MWHEELDOWN "m_slot2" and the r_drawviewmodel 0 segments, there was no semicolon. If there is not semicolon, Gaben will not be happy (the console won't recognize it as 2 separate segments) and your cfg will not work.
The following is the goodified version of the code
[code]alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2"; r_drawviewmodel 0"
[/code]
Notice the semicolon between bind MWHEELDOWN and r_drawviewmodel. Now Gaben is happy (the console recognizes it as 2 separate segments). However, you don't need semicolons for the last segment on a line.

So for the purposes of generosity and good karma, below, I have organized a table of good commands to know for customization and their correct syntaxes.

[code]
//XHAIR ICON
cl_crosshair_file [crosshair(1-7)/default]
//XHAIR SIZE
cl_crosshair_scale [number]
//XHAIR RED (how much red is in the xhair
cl_crosshair_red [number 0-255]
//XHAIR GREEN
cl_crosshair_green [number 0-255]
//XHAIR BLUE
cl_crosshair_blue [number 0-255]
//VIEWMODEL SIZE
viewmodel_fov [number]
//VIEWMODEL ON/OFF
r_drawviewmodel [0 (off) or 1 (on)]
[/code]
Also, for crosshair colors, TF2 uses rgb additive light to generate its colors so you can look on wikipedia or something if you need a specific color. But yeah thanks for reading! If you have any questions or customization help/issues or if you wanna leave me feedback or a +rep or something like that :3 drop a comment on my [url=http://steamcommunity.com/id/Selve_tf2/]Steam Profile[/url]. Also, I may or may not also put my personal cfgs online, but other than that, Thanks for reading!!! ☺☺☺☻☻☻
2
#2
-1 Frags +

Woah thanks for this I'm going to try it when I get home

Woah thanks for this I'm going to try it when I get home
3
#3
-6 Frags +

Wow man, you put a lot of effort into making this! Thx for making it!

Wow man, you put a lot of effort into making this! Thx for making it!
4
#4
2 Frags +

pls make a file called defaultxhair.cfg and put cl_crosshair_file "" in it so you can bind exec defaultxhair to some button.

pls make a file called defaultxhair.cfg and put cl_crosshair_file "" in it so you can bind exec defaultxhair to some button.
5
#5
0 Frags +




6
#6
7 Frags +

That's a long post for such a small script :B

Anyway, some things I noticed are that you bind directly to mwheelup and mwheeldown.

alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2""

Basically this just means that it's more annoying to rebind and needs a change to the full script to change.

alias m_slot1 "slot1; alias m_invnext m_slot3; alias m_invprev m_slot2"
bind mwheelup m_invnext
bind mwheeldown m_invprev

The above works identically, but lets users customize more if they don't want the mousewheel to work that way.

And continuing from there, you never actually bind mwheelup or mwheeldown outside of within those aliases. If someone only uses mousewheel, then the script wouldn't work the first time they run it, and it'd only work after they press 1-3 for the first time. And if they use the 4-and-5-slot versions for spy and engie, if it's bound to go to slot4 or slot5 it'll stay that way when they change classes or restart tf2, which has its problems.

I probably wouldn't use nested quotes because they just end up looking confusing (I was surprised the script worked to be honest), but that's just nitpicking.

Though I still don't understand "there are a ton of TF2 crosshair switchers out there but I made this one because I really didn't feel comfortable with those." Yours and scripts like http://tf2.gamebanana.com/scripts/8541 really have the same things to offer, except that script's also got lastwep and more readability. Nonetheless gj on the script though.

That's a long post for such a small script :B

Anyway, some things I noticed are that you bind directly to mwheelup and mwheeldown.[code]alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2""[/code]Basically this just means that it's more annoying to rebind and needs a change to the full script to change.[code]alias m_slot1 "slot1; alias m_invnext m_slot3; alias m_invprev m_slot2"
bind mwheelup m_invnext
bind mwheeldown m_invprev[/code]The above works identically, but lets users customize more if they don't want the mousewheel to work that way.

And continuing from there, you never actually bind mwheelup or mwheeldown outside of within those aliases. If someone only uses mousewheel, then the script wouldn't work the first time they run it, and it'd only work after they press 1-3 for the first time. And if they use the 4-and-5-slot versions for spy and engie, if it's bound to go to slot4 or slot5 it'll stay that way when they change classes or restart tf2, which has its problems.

I probably wouldn't use nested quotes because they just end up looking confusing (I was surprised the script worked to be honest), but that's just nitpicking.

Though I still don't understand "there are a ton of TF2 crosshair switchers out there but I made this one because I really didn't feel comfortable with those." Yours and scripts like http://tf2.gamebanana.com/scripts/8541 really have the same things to offer, except that script's also got lastwep and more readability. Nonetheless gj on the script though.
7
#7
-1 Frags +
JarateKingThat's a long post for such a small script :B

Anyway, some things I noticed are that you bind directly to mwheelup and mwheeldown.
alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2""
Basically this just means that it's more annoying to rebind and needs a change to the full script to change.
alias m_slot1 "slot1; alias m_invnext m_slot3; alias m_invprev m_slot2"
bind mwheelup m_invnext
bind mwheeldown m_invprev
The above works identically, but lets users customize more if they don't want the mousewheel to work that way.

And continuing from there, you never actually bind mwheelup or mwheeldown outside of within those aliases. If someone only uses mousewheel, then the script wouldn't work the first time they run it, and it'd only work after they press 1-3 for the first time. And if they use the 4-and-5-slot versions for spy and engie, if it's bound to go to slot4 or slot5 it'll stay that way when they change classes or restart tf2, which has its problems.

I probably wouldn't use nested quotes because they just end up looking confusing (I was surprised the script worked to be honest), but that's just nitpicking.

Though I still don't understand "there are a ton of TF2 crosshair switchers out there but I made this one because I really didn't feel comfortable with those." Yours and scripts like http://tf2.gamebanana.com/scripts/8541 really have the same things to offer, except that script's also got lastwep and more readability. Nonetheless gj on the script though.

Lol thanks for all the feedback! :-)
About the length of the post, I just wanted to make everything as clear as possible because I remember when I was a config noob, I would find all these amazing scripts but I didn't know how to install them and so I just wanted to make sure that didn't happen to anyone reading this.
But I'll definitely optimize the script to the thing that you mentioned with m_invnext and stuff.
Huge thanx :-)

[quote=JarateKing]That's a long post for such a small script :B

Anyway, some things I noticed are that you bind directly to mwheelup and mwheeldown.[code]alias m_slot1 "slot1; bind MWHEELUP "m_slot3"; bind MWHEELDOWN "m_slot2""[/code]Basically this just means that it's more annoying to rebind and needs a change to the full script to change.[code]alias m_slot1 "slot1; alias m_invnext m_slot3; alias m_invprev m_slot2"
bind mwheelup m_invnext
bind mwheeldown m_invprev[/code]The above works identically, but lets users customize more if they don't want the mousewheel to work that way.

And continuing from there, you never actually bind mwheelup or mwheeldown outside of within those aliases. If someone only uses mousewheel, then the script wouldn't work the first time they run it, and it'd only work after they press 1-3 for the first time. And if they use the 4-and-5-slot versions for spy and engie, if it's bound to go to slot4 or slot5 it'll stay that way when they change classes or restart tf2, which has its problems.

I probably wouldn't use nested quotes because they just end up looking confusing (I was surprised the script worked to be honest), but that's just nitpicking.

Though I still don't understand "there are a ton of TF2 crosshair switchers out there but I made this one because I really didn't feel comfortable with those." Yours and scripts like http://tf2.gamebanana.com/scripts/8541 really have the same things to offer, except that script's also got lastwep and more readability. Nonetheless gj on the script though.[/quote]

Lol thanks for all the feedback! :-)
About the length of the post, I just wanted to make everything as clear as possible because I remember when I was a config noob, I would find all these amazing scripts but I didn't know how to install them and so I just wanted to make sure that didn't happen to anyone reading this.
But I'll definitely optimize the script to the thing that you mentioned with m_invnext and stuff.
Huge thanx :-)
Please sign in through STEAM to post a comment.