jooonior / tf2-loadouts-script

Loadout specific settings and a resup bind that knows which loadout you're on.
32 stars 2 forks source link

Resup command doesn't work #6

Closed Rixarlin closed 3 years ago

Rixarlin commented 3 years ago

I have done what the setup has told me to, placed the right commands in the right configs, I noticed the saved_loadouts.txt file wasn't made in the cfg folder so I created one manually. Other than that everything works great, except for the resupply bind. It seems that the resupply command doesn't work for loadout B. When you have loadout B active and hit the resupply key, instead of resupplying loadout B it will instead go to the last used loadout for that class and resupply that one instead. Loadouts A, C, and D works great with the resupply bind, it's only loadout B that I encountered issues with. Is there a mistake that I have made and how can I fix it.

jooonior commented 3 years ago

It works for me and everyone else so the issue has to be on your end. Possible causes that come to mind:

  1. The script cannot detect when you change loadouts using the loadout screen buttons, you need to use the binds.
  2. You might have mistyped the loadouts.B bind or something of that sort.
  3. Some other CFG you have is overriding this script's aliases.

Now the third one is unlikely, so make sure it's not 1 or 2 before doing this, but I can check for conflicts if you do this:

  1. Load up a map, join a class.
  2. Switch to loadout A using your bind.
  3. Run these commands: con_logfile loadouts_state_A.txt; alias; con_logfile ""
  4. Switch to loadout B using your bind.
  5. Run these commands: con_logfile loadouts_state_B.txt; alias; con_logfile ""
  6. loadouts_state_A.txt and loadouts_state_B.txt will be in your tf folder, post them here.
Rixarlin commented 3 years ago

loadouts_state_a.txt loadouts_state_b.txt

jooonior commented 3 years ago

The state is the same in both files, which means you somehow haven't actually executed loadouts.B.

This is to check if there's an issue with your bind

  1. Run these commands:
    con_logfile loadouts_test.txt; loadouts.spy; alias; loadouts.A; alias; loadouts.B; alias; con_logfile ""
  2. It will create tf/loadouts_test.txt, post it here.

This is to check if it's a conflict causing this

  1. Close TF2 if it's running.
  2. Download and extract this into your tf/custom folder (result should be tf/custom/__clean.vpk)
  3. Launch TF2.
  4. Run these commands:
    con_logfile loadouts_clean_test.txt; loadouts.spy; alias; loadouts.A; alias; loadouts.B; alias; con_logfile ""
  5. Load up a map and try if it works yourself.
  6. If it still doesn't work, post tf/loadouts_clean_test.txt here.

The __clean.vpk mod overrides all custom configs, so it will disable all scripts you have. It doesn't change any settings. Once you remove it everything will be the same as before.

Rixarlin commented 3 years ago

loadouts_test.txt still doesn't work loadouts_clean_test.txt

jooonior commented 3 years ago

The script state is correct in both files, that leaves your binds as the only possible cause left. What's the output of key_listboundkeys ?

Rixarlin commented 3 years ago

] key_listboundkeys "0" = "slot10" "1" = "slot1" "2" = "slot2" "3" = "slot3" "4" = "destroy 0 0; build 0 0" "5" = "destroy 1 0; build 1 0" "6" = "destroy 1 1; build 1 1" "7" = "slot7" "8" = "slot8" "9" = "+attack3" "a" = "+ml" "b" = "lastdisguise" "c" = "voice_menu_3" "d" = "+mr" "e" = "voicemenu 0 0" "f" = "+use_action_slot_item" "g" = "+taunt" "h" = "+inspect" "i" = "showmapinfo" "j" = "cl_trigger_first_notification" "k" = "cl_decline_first_notification" "l" = "dropitem" "m" = "open_charinfo_direct" "n" = "kill" "p" = "say_party" "q" = "slot2; slot1" "r" = "+reload" "s" = "+mb" "t" = "impulse 201" "u" = "say_team" "v" = "+voicerecord" "w" = "+mf" "x" = "voice_menu_2" "y" = "say" "z" = "voice_menu_1" "KP_END" = "join_class scout" "KP_DOWNARROW" = "join_class soldier" "KP_PGDN" = "join_class pyro" "KP_LEFTARROW" = "join_class demoman" "KP_5" = "join_class heavyweapons" "KP_RIGHTARROW" = "join_class engineer" "KP_HOME" = "join_class medic" "KP_UPARROW" = "join_class sniper" "KP_PGUP" = "join_class spy" "KP_SLASH" = "load_itempreset 1" "KP_MULTIPLY" = "loadouts.C" "KP_MINUS" = "loadouts.D" "KP_PLUS" = "loadouts.A" "]" = "noclip" "'" = "+moveup" "`" = "toggleconsole" "," = "changeclass" "." = "changeteam" "/" = "+movedown" "-" = "disguiseteam" "SPACE" = "+jump" "TAB" = "+showscores" "ESCAPE" = "cancelselect" "INS" = "+klook" "END" = "centerview" "PGUP" = "exec practice" "PGDN" = "mp_waitingforplayers_cancel 1; impulse 101; net_fakelag 16" "PAUSE" = "pause" "SHIFT" = "loadouts.resup" "RSHIFT" = "uberon" "ALT" = "exec loadouts/save" "CTRL" = "+duck" "RCTRL" = "critzon" "UPARROW" = "toggle volume 0 0.02 0.1" "LEFTARROW" = "toggle tf_use_min_viewmodels" "DOWNARROW" = "toggle viewmodel_fov 70 90" "RIGHTARROW" = "toggle r_drawviewmodel" "F1" = "+showroundinfo" "F2" = "show_quest_log" "F3" = "show_matchmaking" "F5" = "hud_reloadscheme; snd_restart; record fix; stop" "F6" = "save_replay" "F7" = "abuse_report_queue" "F9" = "vr_toggle" "F10" = "quit prompt" "F11" = "vr_reset_home_pos" "F12" = "replay_togglereplaytips" "MOUSE1" = "+attack" "MOUSE2" = "+attack2" "MOUSE3" = "destroy 2 0; build 2 0" "MWHEELUP" = "lastinv" "MWHEELDOWN" = "+jump"

Rixarlin commented 3 years ago

oh god, I am so dumb, I forgot to change my bind for loadout b, sorry for wasting your time

jooonior commented 3 years ago

Yeah, you were probably binding the same key somewhere else. At least we got it fixed.

Rixarlin commented 3 years ago

now here is another problem, when I look at my autoexec file, I did rebind my key to loadouts.B

Rixarlin commented 3 years ago

// B4nny Bind / Loadouts script exec loadouts/load // For loadouts script to function bind "SHIFT" "loadouts.resup" bind "KP_PLUS" "loadouts.A" bind "KP_SLASH "loadouts.B" bind "KP_MULTIPLY" "loadouts.C" bind "KP_MINUS" "loadouts.D" bind "ALT" "exec loadouts/save" This is what it looks like in my autoexec, and this is the only instance where I have used kp_slash in it

Rixarlin commented 3 years ago

Please forgive me for all this nonsense, it was a missing quotation mark, I shall now close this issue.

jooonior commented 3 years ago

bind "KP_SLASH "loadouts.B"

You're missing a quote after KP_SLASH, should be bind "KP_SLASH" "loadouts.B"