View Issue Details

IDProjectCategoryView StatusLast Update
0004797The Dark ModFeature proposalpublic26.01.2024 01:48
ReporterAluminumHaste Assigned ToSTiFU  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
PlatformX64OSWindowsOS Version7 Ultimate
Product VersionSVN 
Target VersionTDM 2.08Fixed in VersionTDM 2.08 
Summary0004797: Put keybinds into it's own cfg file.
DescriptionAs Atomica brought up in his post (http://forums.thedarkmod.com/topic/19162-beta-testing-206/?p=421686), when TDM updates and there are major changes, the Darkmod.cfg is carried over from the previous version.

It's a good idea, especially in 2.06 with all the new graphics options, to start with a fresh cfg file, but then you lose all your keybinds, and I myself find that really annoying as I change almost all my keys.

Separating keybinds from all the cvars would avoid this issue.
Tagsconfig files, game controls, keyboard

Activities

stgatilov

stgatilov

01.06.2018 13:20

administrator   ~0010489

I think it is necessary to review all flags in cvarFlags_t. Perhaps some of them were originally intended to mark user-side settings like keybindings. If it is not so, then we can add a new flag.
Aside from that, it is necessary to add a third cfg-file being executed (alongside darkmod.cfg and autoexec.cfg) and ensure that the flagged cvars are saved to it.
AluminumHaste

AluminumHaste

01.06.2018 13:50

developer   ~0010490

Hmmm, seems more complicated than I thought it would be to have TDM write:

unbindall
bind "ESCAPE" "togglemenu"
bind "SPACE" "_moveup"
bind "," "inventory_cycle_maps"
bind "-" "_impulse50"
bind "0" "_impulse10"
bind "1" "_impulse2"
bind "2" "_impulse1"
bind "3" "_impulse3"
bind "4" "_impulse4"
bind "5" "_impulse5"
bind "6" "_impulse6"
bind "7" "_impulse7"
bind "8" "_impulse8"
bind "9" "_impulse9"
bind "=" "_impulse49"
bind "[" "_impulse47"
bind "\" "_mlook"
bind "]" "_impulse48"
bind "^" "_impulse0"
bind "`" "_impulse0"
bind "a" "_moveleft"
bind "b" "inventory_cycle_group '#str_02391'"
bind "c" "_impulse23"
bind "d" "_moveright"
bind "e" "_impulse46"
bind "f" "_impulse44"
bind "i" "_impulse30"
bind "j" "inventory_use '#str_02396'"
bind "k" "inventory_hotkey '#str_02397'"
bind "l" "inventory_use '#str_02395'"
bind "m" "inventory_cycle_group '#str_02389'"
bind "n" "inventory_cycle_group '#str_02392'"
bind "o" "_impulse19"
bind "q" "_impulse45"
bind "r" "_impulse52"
bind "s" "_back"
bind "v" "_impulse52"
bind "w" "_forward"
bind "x" "_impulse23"
bind "y" "clientMessageMode 1"
bind "BACKSPACE" "inventory_hotkey ''"
bind "PAUSE" "pause"
bind "UPARROW" "_forward"
bind "RIGHTARROW" "_right"
bind "ALT" "_impulse24"
bind "CTRL" "_button5"
bind "SHIFT" "_speed"
bind "DEL" "_lookdown"
bind "PGDN" "_lookup"
bind "END" "_impulse18"
bind "F3" "_impulse17"
bind "F4" "savegame quick"
bind "F5" "savegame quick"
bind "F6" "_impulse20"
bind "F7" "_impulse22"
bind "F9" "loadgame quick"
bind "F10" "dmap water_test.map map water_test.map"
bind "F11" "screenshot"
bind "F12" "screenshot 1280 720 12"
bind "MOUSE1" "_attack"
bind "MOUSE2" "_impulse41"
bind "MOUSE3" "_zoom"
bind "MOUSE4" "_impulse51"
bind "MOUSE5" "_zoom"
bind "MWHEELDOWN" "_impulse14"
bind "MWHEELUP" "_impulse15"


To Darkmod_keybinds.cfg
stgatilov

stgatilov

01.06.2018 14:03

administrator   ~0010491

Ok, I was wrong, because bindings are not cvars, the are special things =)

So we can simply go to idCommonLocal::WriteConfigToFile and pass a different file to idKeyInput::WriteBindings call. Then ensure that this different file is executed on start.
AluminumHaste

AluminumHaste

01.06.2018 14:16

developer   ~0010492

That's more along the lines of how I thought it worked.
STiFU

STiFU

17.01.2019 12:36

developer   ~0011390

Last edited: 17.01.2019 12:37

Implemented in rev. 7918. The "writeconfig" console command still writes both in the same config, but the automatic export splits it up into Darkmod.cfg and DarkmodKeybinds.cfg.

Issue History

Date Modified Username Field Change
18.05.2018 12:01 AluminumHaste New Issue
01.06.2018 13:20 stgatilov Note Added: 0010489
01.06.2018 13:50 AluminumHaste Note Added: 0010490
01.06.2018 14:03 stgatilov Note Added: 0010491
01.06.2018 14:16 AluminumHaste Note Added: 0010492
30.12.2018 10:17 STiFU Target Version TDM 2.07 => TDM 2.08
17.01.2019 12:36 STiFU Note Added: 0011390
17.01.2019 12:36 STiFU Assigned To => STiFU
17.01.2019 12:36 STiFU Status new => resolved
17.01.2019 12:36 STiFU Resolution open => fixed
17.01.2019 12:36 STiFU Fixed in Version => TDM 2.08
17.01.2019 12:37 STiFU Note Edited: 0011390
26.01.2024 01:46 Fiver Tag Attached: game controls
26.01.2024 01:46 Fiver Tag Attached: keyboard
26.01.2024 01:48 Fiver Tag Attached: config files