Исходный код day of defeat source

Обновлено: 02.07.2024

Open the config.cfg file with Notepad

In Notepad's menu Edit > Find: toggleconsole
(to see if it exists or not)

bind "`" "toggleconsole" can you bind it to another key?

In source games yes.
See the above and change the key in the quotes after 'bind' to what you want the console to be. Keep in mind you have to choose a key that's not already used in the game. If you choose a key that's already used it's either going to do both at the same time or nothing at all or it might even crash the game.

The above is how to hard code your keybinds. There isn't going to be a warning like in game options when you're changing the keys that pops up to let you know "That key is already used for ****"."

bind "K" "toggleconsole" This will change the console key to K. Отредактировано Jack Schitt; 2 окт. 2018 в 18:41 2 окт. 2018 в 18:50 alittle late haha but thanks anyways :D
Yeah. that's what putting it in launch options does. Someone else just posted this a few hours ago and I answered with how to make sure there's a key bind for it in the config file:
steamapps\common\Day of Defeat Source\dod\cfg

Open the config.cfg file with Notepad

In Notepad's menu Edit > Find: toggleconsole
(to see if it exists or not)

bind "`" "toggleconsole"

There isn't an option in the keyboard menu to set the console key so you can't change it either. Another way to change your keybinds is through the console but if you can't launch the console to do it. your only other option to set the console key is through the config file.

can you bind it to another key?

In source games yes.
See the above and change the key in the quotes after 'bind' to what you want the console to be. Keep in mind you have to choose a key that's not already used in the game. If you choose a key that's already used it's either going to do both at the same time or nothing at all or it might even crash the game.

The above is how to hard code your keybinds in the config file. There's actually a whole boat load of things you can do with keybinds such as you can set automated voice commands and phrases the characters in the game yell like "Bazooka!" or "Flank Right", "Get over here!", "Go, Go, Go!" etc to a single key stroke. There isn't going to be a warning like in game options when you're changing the keys that pops up to let you know "That key is already used for ****"."

bind "K" "toggleconsole"

This will change the console key to K.
In dod:s I have my keys set up that certain keyboard keys do multiple things toward team play like if I hit K it throws my location on the map into team text chat as well as "Come get the flag!", and my character yells "I need help over here!"

If interested I would be glad to share my config file with all my binds and explain them. Easier to read than this.

Add this topic to your repo

To associate your repository with the day-of-defeat-source topic, visit your repo's landing page and select "manage topics."


Day of Defeat: Source Scripting От 76561197967476916

Hi all, this guide helps you to understand how create and manage dod:s scripts.
For editing or create cfg files I recommend Notepad for example.
To use your own cfg files, you must put files in next location:
. \steam\steamapps\%youraccountname%\Day of Defeat Source\dod\cfg
%youraccountname% is your Steam login.

To save your config as a cfg file when you are saving file pick from file type dropdown All files (*.*), but when you are using this method you need to type

file name and extension. For exapmle myconfig.cfg

Then to execute cfg only you have to do is type in game console exec configname.cfg.

Binding is assigning commands to keys.
Code:
bind "key" "command"

If you want assing more than one command use ;
Code:
bind "key" "command; command; command"

Example
Bind a key for jumping:
bind "key" "jump"

Bind a key for sprinting:
bind "key" "+jump"

Incrementvar

That command allows you cycle between specified values on chosen range.
Code:
bind "key" "incrementvar command 1 12 3"
(where 1 and 12 is range and 3 is jump between values).

Example: changeing sensitivy from 1 to 20 by 2.
bind "key" "incrementvar sensitivity 1 20 2"

Alias command allows you to shorten very long commands into one short alias. It could be difficult at the beginning.
Code:
alias nameofyourscript "firstalias"
alias firstalias "command; command; alias nameofyourscript secondalias"
alias secondalias "command; command; alias nameofyourscript thirdalias"
alias thirdalias "command; alias nameofyourscript firstalias" //last alias should point to first one

Example: Duck script. Second example will be a duck script that will allow you to duck without holding a key.
Code:

alias duck "duckON"
alias duckON "+duck; alias duck duckOFF"
alias duckOFF "-duck; alias duck duckON"
bind "key" "duck"

+ and - commands

lus and Minus commands are commands that have 2 states.
Plus part is executed when you press a key and it's execute until key is released. When key is released it goes into minus state.
Example:
Code:

You aren't limited to commands that developers created. You can create your own using alias command.
Code:

alias +minigun "+duck; +attack"
alias -minigun "-attack; -duck"
bind "key" "+minigun"

As you probably noticed, there is no need to bind minus command, it's executed automatically after you stop holding key that you bound it to.

Usefull commans:

"wait" Stop command parsing until next frame.(if you put a value ex: wait 30 it will wait 30 frames)
"exec" Executes user config
"bind" Binds command to key (bind "F1" "kill")
"unbind" Unbinds command (unbind "F1")

Console commands

Basic gameplay

"+forward" Move forward
"+back" Move back
"+moveleft" Move left
"+moveright" Move right
"+jump" Jump
"+duck" Duck
"+moveup" Swim up
"+movedown" Swim down
"+attack" Primary attack
"+attack2" Secondary attack
"+reload" Reload weapon
"slot1" Weapon category 1
"slot2" Weapon category 2
"slot3" Weapon category 3
"slot4" Weapon category 4
"slot5" Weapon category 5
"invprev" Previous weapon
"invnext" Next Weapon
"lastinv" Last used weapon
"drop" Drop
"dropammo" Drop muntion
"+alt1" Go prone
"changeteam" Change team menu
"changeclass" Change class menu
"+speed" Sprint

Voice commands

Area clear! - voice_areaclear
Cease fire! - voice_ceasefire
Displace - voice_displace
Drop your weapons! - voice_dropweapons
Enemy behind us! - voice_enemybehind
Fire in the Hole - voice_fireinhole
Flank left! - voice_left
Flank right! - voice_right
Get a grenade in there! - voice_usegrens
Go, go, go! - voice_gogogo
Grenade, take cover! - voice_grenade
Hold this position! - voice_hold
I need ammo! - voice_needammo
I need backup! - voice_backup
Incoming fire, left flank! - voice_fireleft
Incoming fire, right flank! - voice_fireright
MG position ahead! - voice_mghead
Negative! - voice_negative
Nice shot! - voice_niceshot
Panzerschreck(Bazooka)! - voice_bazookaspotted
Prepare for assault! - voice_attack
Smoke 'em! - voice_usesmoke
Sniper! - voice_sniper
Squad, covering fire! - voice_cover
Stick together! - voice_sticktogether
Thanks - voice_thanks
Use the Bazooka(Panzerschreck)! - voice_usebazooka
We need an MG up here! - voice_moveupmg
Yes Sir! - voice_yessir

Demo commands

Note: Shift+F2 brings demoui
Code:

"cl_demoviewoverride" Override player view when you are playing a demo
"demoui" Show hide demo controlling interface
"demoui2" Show hide demo controlling interface(diffrent look than normal one)
"demolist" Show list of demos
"record demoname" Records a demo (replace demoname with name of your demo)
"stop" Stops demo recording

Misc useful commands

"exit" hmm. Closes game?
"kill" Kills yourself
"explode" Kills yourself(you explode)
"hud_fastswitch" Turns fastswitch (0 disables 1 enables 2 disables [consoles style])
"showmapinfo" Shows info about map
"+showscores" Shows scroreboard
"impulse 201" Sprays your logo
"toggleconsole" Opens console
"screenshot" Makes a screenshot (TGA)
"jpeg" Makes a screenshot (JPEG)
"fps_max" Limits your FPS
"mat_bumpmap" Enables/Disables bumpmapping
"mat_compressedtextures" Enables/Disables textures compression
"mat_dxlevel" Sets DirectX level
"mat_specular" Enables/Disables spectacular lighting
"cl_showfps" Shows fps, but not netgraph statistics (upper left)
"mat_picmip" (-10 min., 4 max) - Changes texture quality, -1 = Very High.
"cl_drawhud" Disalbes the hud, useful for taking screenshots.
"hidepanel all" Hides the panels, useful for taking screenshots.
"jpeg_quality" (0-100) - Changes the qualtiy of jpeg screenshots, 90 = default.

Here are 8 public repositories matching this topic.

Language: All

Filter by language

KyleSanderson / SteamWorks

Exposing SteamWorks functions to SourcePawn.

  • Updated Aug 16, 2021
  • C++

startersclan / docker-sourceservers

Source / Goldsource dedicated server images built through use of steamcmd. 🐳

  • Updated Oct 3, 2021
  • Dockerfile

LacledesLAN / gamesvr-dods

Day of Defeat Source Server in Docker

  • Updated Jul 21, 2019
  • Shell

evandrosouza89 / dods-match-stats

A HL Log Standard parser and competitive match stats generator for Day of Defeat Source game.

  • Updated Jan 10, 2021
  • Python

LacledesLAN / gamesvr-dods-freeplay

LL Day of Defat Source Server in Docker

  • Updated Jun 27, 2020
  • Shell

dronelektron / server-rules

Localized server rules for players

  • Updated Aug 25, 2020
  • SourcePawn

dronelektron / anti-fast-respawn

Prevents the player from fast respawn after death when the player has changed his class

  • Updated Oct 28, 2020
  • SourcePawn

dronelektron / files-downloader

Allows to download and cache files for players

  • Updated Dec 11, 2020
  • SourcePawn

Improve this page

Add a description, image, and links to the day-of-defeat-source topic page so that developers can more easily learn about it.

Читайте также: