• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Login
FAForever Forums
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Login

Creating new Hotkeys / Shortcuts error

Scheduled Pinned Locked Moved Game Issues and Gameplay questions
8 Posts 5 Posters 406 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W
    wolfred
    last edited by 10 Sept 2024, 05:07

    Hi everyone,

    I’m currently creating new shortcuts/hotkeys by modifying the Game.prefs file located at \AppData\Local\Gas Powered Games\Supreme Commander Forged Alliance. The changes work perfectly, but after pressing the shortcuts around the 7th or 8th time, the game crashes. Has anyone encountered this issue or know what might be causing it?

    UserKeyActions = {
        ['Select Nearest Air Scout'] = {
    	order = 1,
    	action = 'UI_SelectByCategory +nearest + AIR INTELLIGENCE',
    	category = 'Custom Keys'
       },
       ['Select Artillery Units On Screen'] = {
          order = 1,
          action = 'UI_SelectByCategory +inview + ARTILLERY',
          category = 'Custom Keys'
      },
      ['Select Direct Fire Units On Screen'] = {
          order = 1,
          action = 'UI_SelectByCategory +inview + DIRECTFIRE',
          category = 'Custom Keys'
      },
      ['Select Indirect Fire Units On Screen'] = {
          order = 1,
          action = 'UI_SelectByCategory +inview + INDIRECTFIRE',
          category = 'Custom Keys'
      },
      ['Select Antiair Fire Units On Screen'] = {
          order = 1,
          action = 'UI_SelectByCategory +inview + ANTIAIR',
          category = 'Custom Keys'
      },
      ['Select Defense Units On Screen'] = {
          order = 1,
          action = 'UI_SelectByCategory +inview + DEFENSE',
          category = 'Custom Keys'
      },
      ['Select Shield Units On Screen'] = {
          order = 1,
          action = 'UI_SelectByCategory +inview + SHIELD',
          category = 'Custom Keys'
      },
    }
    

    Thanks in advance!

    1 Reply Last reply Reply Quote 0
    • I
      IndexLibrorum Global Moderator
      last edited by 10 Sept 2024, 06:38

      I've not experienced this, but why adjust the hotkeys manually in the first place? There's the hotkey menu in game, which you can open by pressing F1 while in a game.

      Not sure why doing it manually would result in crashes, but give the menu a go perhaps?

      "Design is an iterative process. The required number of iterations is one more than the number you have currently done. This is true at any point in time."

      See all my projects:

      W 1 Reply Last reply 10 Sept 2024, 19:41 Reply Quote 0
      • W
        wolfred @IndexLibrorum
        last edited by wolfred 9 Oct 2024, 19:44 10 Sept 2024, 19:41

        @indexlibrorum Im creating new hotkeys that are not actually in the F1 menu.

        As you can see i created hotkeys to select my Shield mobile units on screen, antoher one to select AA land units on screen, etc. And they work fine but the the game crashes when i press my newly created hotkesy for the 8th or 7th time.

        1 Reply Last reply Reply Quote 1
        • R
          Reckless_Charger
          last edited by 10 Sept 2024, 23:50

          For mine i have different order numbers for those in the same category. Can't remember if this was because it caused problems or not but worth a try.

          1 Reply Last reply Reply Quote 0
          • S
            StormLantern Team Lead
            last edited by 11 Sept 2024, 10:06

            Perhaps the selection of these units is conflicting with a UI mod? Try disabling all ui mods and see whether the problem persists

            1 Reply Last reply Reply Quote 0
            • W
              wolfred
              last edited by 17 days ago

              This is the crashing log:

              EXCEPTION_ACCESS_VIOLATION (0xc0000005) at address 0x00a976d7
              attempted to read memory at 0x00002000

              Program : C:\ProgramData\FAForever\bin\ForgedAlliance.exe
              Cmd line arguments : /init init.lua /nobugreport /log C:\Users\fred_\AppData\Roaming\Forged Alliance Forever\logs\game_24729789.log /gpgnet 127.0.0.1:50896 /mean 1308.06005859375 /deviation 99.00479888916016 /savereplay gpgnet://127.0.0.1:50897/24729789/wolfred.SCFAreplay /country MX /numgames 521 /numgames 138

              Callstack:
              Unknown symbol (address 0x00a976d7)

              Last 100 lines of log...

              info: Active mods in session:
              debug: MEM: -5247026 bytes STIMap
              debug: MEM: -5247026 bytes LoadTexturing
              debug: MEM: -5247026 bytes WaterMask
              debug: MEM: -12252683 bytes TERRAIN
              info: Background task "Map loader /maps/8 - badlands_v4.v0001/8 - badlands_v4.scmap" finished.
              info: Saving replay to "gpgnet://127.0.0.1:50897/24729789/wolfred.SCFAreplay"
              debug: MEM: 0 bytes LUABP
              debug: Lua sim environment initialized with game version 3821, game type FAF and at commit hash 1c49154e84dd4829b84fb742a443ccd5c67e7d4d
              debug: MEM: 0 bytes OGRID
              info: Loading save file: /maps/8 - Badlands_v4.v0001/8 - Badlands_v4_save.lua
              info: Loading script file: /maps/8 - Badlands_v4.v0001/8 - Badlands_v4_script.lua
              warning: NUM PROPS = 5312
              info: Initialize Armies brain nickname is wolfred
              info: CreateArmy group ARMY_1
              warning: Shift modifier for Hotbuild action "build factories & quantum gateway + engineers & SCUs" (A) is already bound to action "Attack - SHIFT version" (Shift-A)
              warning: The Shift modifier of the Hotbuild action will not work!
              warning: Alt modifier for Hotbuild action "build factories & quantum gateway + engineers & SCUs" (A) is already bound to action "Select land units on screen" (Alt-A)
              warning: The Alt modifier of the Hotbuild action will not work!
              warning: Shift modifier for Hotbuild action "build static AA + air staging + mobile AA & flaks + air fighters + aircrafts carriers / cruisers / attack boat" (C) is already bound to action "Capture - SHIFT version" (Shift-C)
              warning: The Shift modifier of the Hotbuild action will not work!
              warning: Alt modifier for Hotbuild action "build static AA + air staging + mobile AA & flaks + air fighters + aircrafts carriers / cruisers / attack boat" (C) is already bound to action "Select all Battleships" (Alt-C)
              warning: The Alt modifier of the Hotbuild action will not work!
              warning: Alt modifier for Hotbuild action "build shields + mobiles Shields & shield disruptors + shield boat" (E) is already bound to action "Select all Air Fighters" (Alt-E)
              warning: The Alt modifier of the Hotbuild action will not work!
              warning: Shift modifier for Hotbuild action "build power generators / storage + snipers & Loyalist / titan & gattling / rocket bots & LABs + gunships" (D) is already bound to action "Dive - SHIFT version" (Shift-D)
              warning: The Shift modifier of the Hotbuild action will not work!
              warning: Alt modifier for Hotbuild action "build power generators / storage + snipers & Loyalist / titan & gattling / rocket bots & LABs + gunships" (D) is already bound to action "Select all Land Indirect-Fire units" (Alt-D)
              warning: The Alt modifier of the Hotbuild action will not work!
              warning: Alt modifier for Hotbuild action "cycle user templates & build T2 Hover Tanks + T2 Gunships + T2 Cruisers" (G) is already bound to action "Select Defense Units On Screen" (Alt-G)
              warning: The Alt modifier of the Hotbuild action will not work!
              warning: Alt modifier for Hotbuild action "build mass extractors / fabricators + tanks + bombers + frigates / destroyers / battlecruisers / battleships" (S) is already bound to action "Select all Land Direct-Fire units" (Alt-S)
              warning: The Alt modifier of the Hotbuild action will not work!
              warning: Shift modifier for Hotbuild action "build radars (+ perimeter & eye of Rhianne) + land scouts + air scouts" (R) is already bound to action "Repair - SHIFT version" (Shift-R)
              warning: The Shift modifier of the Hotbuild action will not work!
              warning: Alt modifier for Hotbuild action "build radars (+ perimeter & eye of Rhianne) + land scouts + air scouts" (R) is already bound to action "Select all Gunships" (Alt-R)
              warning: The Alt modifier of the Hotbuild action will not work!
              warning: Alt modifier for Hotbuild action "build tactical missiles defense & strategic missile defense" (V) is already bound to action "Cycle through unit types in selection (Land, Sea, Air)" (Alt-V)
              warning: The Alt modifier of the Hotbuild action will not work!
              warning: Shift modifier for Hotbuild action "build static artilleries + mobile artilleries" (F) is already bound to action "Ferry - SHIFT version" (Shift-F)
              warning: The Shift modifier of the Hotbuild action will not work!
              warning: Alt modifier for Hotbuild action "build point defenses & walls + structure upgrades" (X) is already bound to action "Select all anti-Navy Submarines" (Alt-X)
              warning: The Alt modifier of the Hotbuild action will not work!
              warning: Alt modifier for Hotbuild action "build TML & SML + mobile missile launchers + nuke subs / battleship & missile ship & sera / uef cruisers" (T) is already bound to action "Select only transports" (Alt-T)
              warning: The Alt modifier of the Hotbuild action will not work!
              debug: Preloading 1418 batch textures
              debug: Preloading 0 d3d textures
              debug: Preloading 0 models
              debug: Preloading 0 animations
              info: creating high fidelity terrain
              info: creating high fidelity water
              info: creating high fidelity terrain
              info: creating high fidelity water
              debug: Context based templates: Found template: AppendPowerGeneratorsToTML with name Power generators
              debug: Context based templates: Found template: AppendT3FabricatorWithStorages with name Storages
              debug: Context based templates: Found template: TorpedoDefense with name Torpedo defense
              debug: Context based templates: Found template: T3ExtractorWithStorages with name Extractor and storages
              debug: Context based templates: Found template: AppendPowerGeneratorsToSalvation with name Power generators
              debug: Context based templates: Found template: AppendWallsToPointDefense with name Walls
              debug: Context based templates: Found template: AppendOpticsWithPower with name Power generators
              debug: Context based templates: Found template: AppendAirGrid with name Air grid
              debug: Context based templates: Found template: AppendPowerGeneratorsToEnergyStorage with name Power generators
              debug: Context based templates: Found template: AppendExtractorWithFabs with name Storages and fabricators
              debug: Context based templates: Found template: AppendPowerGeneratorsToT3Artillery with name Power generators
              debug: Context based templates: Found template: AppendRadarWithPower with name Power generators
              debug: Context based templates: Found template: AppendPowerGeneratorsToT2Artillery with name Power generators
              debug: Context based templates: Found template: T1Hydrocarbon with name Hydrocarbon
              debug: Context based templates: Found template: T3ExtractorWithStoragesAndFabs with name Extractor, storages and fabricators
              debug: Context based templates: Found template: AppendT3ArtilleryWithPower with name Power generators
              debug: Context based templates: Found template: PointDefense with name Point defense
              debug: Context based templates: Found template: AppendT2ArtilleryWithPower with name Power generators
              debug: Context based templates: Found template: AirDefenseLand with name Anti-air defense
              debug: Context based templates: Found template: AppendExtractorWithStorages with name Storages
              debug: Context based templates: Found template: T3Extractor with name Extractor
              debug: Context based templates: Found template: AirDefenseWater with name Anti-air defense
              debug: Context based templates: Found template: AppendSalvationWithPower with name Power generators
              debug: Context based templates: Found 23 templates
              info: /savereplay
              warning: GetResource: Invalid name ""
              info: Can't find texture "" -- trying fallback.
              warning: GetResource: Invalid name ""
              info: Can't find texture "" -- trying fallback.
              warning: GetResource: Invalid name ""
              info: Can't find texture "" -- trying fallback.
              warning: GetResource: Invalid name ""
              info: Can't find texture "" -- trying fallback.
              warning: GetResource: Invalid name ""
              info: Can't find texture "" -- trying fallback.
              info: Exe GitSHA: 63718d16151cd7b2e3232ddc865879a4ecba292d
              debug: Session time: 00:00:17 Game time: 00:00:00 Heap: 256.0M / 222.4M
              info: Exe GitSHA: 63718d16151cd7b2e3232ddc865879a4ecba292d
              info: Exe GitSHA: 63718d16151cd7b2e3232ddc865879a4ecba292d
              info: Exe GitSHA: 63718d16151cd7b2e3232ddc865879a4ecba292d
              info: Exe GitSHA: 63718d16151cd7b2e3232ddc865879a4ecba292d
              info: Exe GitSHA: 63718d16151cd7b2e3232ddc865879a4ecba292d
              info: Exe GitSHA: 63718d16151cd7b2e3232ddc865879a4ecba292d
              info: Exe GitSHA: 63718d16151cd7b2e3232ddc865879a4ecba292d
              info: Exe GitSHA: 63718d16151cd7b2e3232ddc865879a4ecba292d
              debug: Session time: 00:00:28 Game time: 00:00:09 Heap: 256.0M / 230.8M
              debug: Time to process CheatSpawnUnit from 0: 1.000000

              1 Reply Last reply Reply Quote 0
              • N
                Nomander
                last edited by 17 days ago

                Your commands are written incorrectly because of the + with nothing after it, and the engine crashes with certain incorrect commands.

                Here's the definition when you input the command without any arguments:

                UI_SelectByCategory [+add] [+nearest] [+idle] [+goto] categoryExpression
                Select a set of units with the following parameters....
                +add : add to current selection
                +nearest : select only nearest unit matching category
                +idle : select only idle units
                +inview: select only units in the current view
                +goto: goto the unit if it's already selected
                categoryExpression uses the format CAT1 CAT2, CAT3 CAT4 where a space means intersection and a comma means union
                

                +excludeengineers is also a valid modifier

                Basically just remove the + that has nothing after it.

                UserKeyActions = {
                    ['Select Nearest Air Scout'] = {
                	order = 1,
                	action = 'UI_SelectByCategory +nearest AIR INTELLIGENCE',
                	category = 'Custom Keys'
                   },
                   ['Select Artillery Units On Screen'] = {
                      order = 1,
                      action = 'UI_SelectByCategory +inview ARTILLERY',
                      category = 'Custom Keys'
                  },
                  ['Select Direct Fire Units On Screen'] = {
                      order = 1,
                      action = 'UI_SelectByCategory +inview DIRECTFIRE',
                      category = 'Custom Keys'
                  },
                  ['Select Indirect Fire Units On Screen'] = {
                      order = 1,
                      action = 'UI_SelectByCategory +inview INDIRECTFIRE',
                      category = 'Custom Keys'
                  },
                  ['Select Antiair Fire Units On Screen'] = {
                      order = 1,
                      action = 'UI_SelectByCategory +inview ANTIAIR',
                      category = 'Custom Keys'
                  },
                  ['Select Defense Units On Screen'] = {
                      order = 1,
                      action = 'UI_SelectByCategory +inview DEFENSE',
                      category = 'Custom Keys'
                  },
                  ['Select Shield Units On Screen'] = {
                      order = 1,
                      action = 'UI_SelectByCategory +inview SHIELD',
                      category = 'Custom Keys'
                  },
                }
                
                1 Reply Last reply Reply Quote 1
                • W
                  wolfred
                  last edited by 16 days ago

                  Thanks Nomander! It is working now.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post