PDA

View Full Version : [Swat 4] [How to] SWAT 4 Keybinds


Nicoleise
02-02-18, 12:57 PM
I see this is causing a bit confusion, so thought I'd be my usual, helpful self. :D


Files to edit
SWAT 4 - [...]\Swat 4\Content\System\User.ini
SWAT 4 TSS - [...]\Swat 4\ContentExpansion\System\User.ini
OTHER MODS - SWAT 4 - [...]\Modfolder\[Content|ContentExpansion]\System\User.ini

You can edit the file in notepad, or any plain text editor. It must be a plain text editor though, don't open it in Word or Wordpad or anything else that adds formatting, etc.


Other useful changes

Your Name
At the first line of the file, change your name. That way, it stays correct, rather than having to be set every time.

Example:
Name=Nicoleise


Don't shout by accident
By default, the game binds the actions "Interact" and "Issue Compliance" (shout) to the same key. That means, that if you're trying to interact with an object, but you miss the "hitbox" for that action, you'll shout instead. The suspects will be grateful for the warning of course. If you'd prefer not to give them the upper edge though, change the lines like so:
MiddleMouse=IssueComplianceOrInteract

to (example)

MiddleMouse=Interact
F=IssueCompliance

(Note, that you do not add the line with the other key (F in this case). Instead, you find that keys line in the file, and edit it there.)


Building simple macros to do more things at once
You can string commands together using the | character. You can use this to execute more commands on the same key, essentially generating a small macro. Keep in mind, that you can't use that character for the SOG tags in a chat message since the game will interpret that as a command switch. Instead, you can use a lower case L.
MiddleMouse=Interact
F=IssueCompliance | teamsay [b][c=FF0000]SUSPECT!!

Which would output in game as your character shouting at the suspect, while the chat would display:
Nicoleise: SUSPECT!!


Getting more keys on your keyboard
Okay, so I can't actually give you more keys on your keyboard. But if you need more keys for keybinds and actions, consider removing duplicate functions in the game. For example, the F1-F10 and the 1-0 keys all are duplicated. If your keyboard has both; you could use either set for something else.

Also consider your mouse. Most modern mice have atleast two extra buttons (usually used for back and forward in browsers, etc.). These are also in the ini file as Mouse4 and Mouse5. You may have to experiment to find the right order of them, so start by adding a bind that just states the name of the key in chat. Then open the game, note which keys respon to which key names and then get to editing.


Keybinds
Syntax
To enqueue commands, as mentioned before you'd use the pipe-character with a space on either side. If you don't know how to type the character, google it for your keyboard layout or simply copy/paste it from here:
F=Command 1 | Command 2

Bold text is done with the tag prefixed to the text. It's ended by or an in-game chat line break. That means, that to make a longer, bolded keybind, you'll have to experiment with which words to prefix with to keep the bolded formatting, alternatively prefix every word with .

[B]Colours are achieved by prefixing the [c=000000] tag. To change colour, prefix a new tag. The 000000 refers to the hex code of the color.

The code is an RGB code, which means that it contains the "brightness" values for the red, green and blue colour respectively.

The first two characters are the red, the two middle the green and the last two the blue. The code is based on hexadecimal values, commonly called hex.

Hex is a 16 base number system, which means that where a ten base goes from 0-9 and then rolls over to 10, hex goes from 0-15 and then rolls over to 16. Since 15 doesn't fit in one character, hex uses letters for the values above 9. From zero it would count as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.

The maximum value of two hex characters (as is the case for each colour here) is FF = 255 decimal.

The above combined means, that you can easily create a few basic colours without consulting with tables or colour pickers; FF0000 is red, for example. 00FF00 is green, 0000FF is blue. FFFF00 is red mixed with green; yellow. AA0000 is a darker red than FF0000 because the brightness value is less.


[B]Frequently used colours

White - [c=FFFFFF]
Grey - [c=999999]
Red - [c=FF0000]
Yellow - [c=FFFF00]
Green - [c=00FF00]
Blue - [c=0000FF]
Black - [c=000000]



OnRelease - Some keybindings might be relevant to fire on the release of a key rather than when pressing it down. To achieve this, use the OnRelease modifier. Like so:
R=teamsay [c=BBBBBB]Reloading, gun down! | OnRelease teamsay [c=CCCCCC]Ready, gun up!


Examples that you can steal or be inspired by
In these examples, I'll try to incorporate a bit of everything. I'll make a few "macros" and I'll also try to adhere to what you could call best practice in terms of making the colour of the text somewhat match the urgency of the message. :) Italic text is a comment, you shouldn't include that.

MiddleMouse=Interact
F=IssueCompliance | teamsay [b][c=FF0000]SUSPECT!!
Space= Removing "GiveDefaultCommand" means you don't give orders accidentally
PageDown=ScrollChatDown Default on arrow-keys, but I have different ideas for those
PageUp=ScrollChatUp | ShowViewport Sniper
End=HideViewport
Left=teamsay [c=FFFFFF]Left
Up=teamsay [c=FFFFFF]Ahead
Right=teamsay [c=FFFFFF]Right
Down=teamsay [c=FF0000][b]Behind!
H=EquipSlot 11 | [c=BBBBBB]Arresting, please cover me.
R=teamsay [c=BBBBBB]Reloading, gun down! | OnRelease teamsay [c=CCCCCC]Ready, gun up!


Note, that these are not in any specific order. As before; you should not be inserting new lines into the file, but rather find the line that begins with the key you want, and then edit everything after the = sign.


I hope this helps you somewhat. When we start being back in the servers, I'm sure someone (or myself) can build up a good standard set of keybinds and upload to here. :)

Biodome
02-02-18, 01:34 PM
Thanks for the information! For fancier keybinds, I found this website (https://www.w3schools.com/colors/colors_picker.asp) very useful for quickly making any color gradients you want - it lists the values, and all you have to do is copy-and-paste them. I think there was an .exe that did all that work for you, but I can't find it anymore.

Here's an example of how it looks like in my .ini file:
Ctrl=TEAMSAY [C=0000FF]C[C=0011FF]i[C=0021FF]v[C=0033FF]i[C=0043FF]l[C=0055FF]i[C=0065FF]a[C=0077FF]n
Alt=TEAMSAY [C=FF0000]S[C=FF1100]u[C=FF2200]s[C=FF3300]p[C=FF4400]e[C=FF5500]c[C=FF6600]t


And this is how it looks like in-game:
Civilian
Suspect

Orion
02-02-18, 04:08 PM
Want to ask a question not related to keybinds tho

Does anyeone remember what TOC sound file need to remove to skip the 'bla bla bla' at the beginning of each mission?

Biodome
02-02-18, 04:20 PM
Want to ask a question not related to keybinds tho

Does anyeone remember what TOC sound file need to remove to skip the 'bla bla bla' at the beginning of each mission?

Googling a bit I found these instructions (http://induktio.net/wiki/Disable_initial_dispatches). I can't remember if those files are the ones I deleted, but it looks likely. Just move them to another folder, in case it doesn't work, so you can bring them back.

Orion
02-02-18, 04:54 PM
Yes thats working, thank you

TimC
03-02-18, 04:17 PM
I knew you could do it Nico! I'll modify mine later! :)

Googling a bit I found these instructions (http://induktio.net/wiki/Disable_initial_dispatches). I can't remember if those files are the ones I deleted, but it looks likely. Just move them to another folder, in case it doesn't work, so you can bring them back.

This is useful, thank you Biodome!

Recon
04-02-18, 08:14 AM
Never had my keybind done with 100 % satisfaction... mb now i will be able to do it ^^

Thank you for a good explanation, Nico :)