FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login
    The current pre-release of the client ("pioneer" in the version) is only compatible to itself. So you can only play with other testers. Please be aware!

    Black Screen with mod v6 'Advanced Target Priorities EVO'

    Scheduled Pinned Locked Moved Game Issues and Gameplay questions
    40 Posts 3 Posters 762 Views 1 Watching
    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.
    • S Offline
      SealingSatyr511
      last edited by SealingSatyr511

      a hotfix should be available very soon.

      I found some side effects relative to gameprefs and the preset management.
      May occurs at startup when the prioSettings are unknown, nil error that cause crash.
      and an uppercase bug on the preset filename. Stogo1_1.lua => stogo1_1.lua.
      Also, a part of the safety code was missing.

      i checked from scratch, got errors with use cases, critical, but never a black screen.
      Actually the fix is ok. it solves the issues.
      the code is way more robust now but need another testing iteration.

      1 Reply Last reply Reply Quote 1
      • nomadsN Offline
        nomads
        last edited by nomads


          • ---Is the following content related to the capitalization issue you mentioned?
          • -- from init_faf.lua


          • --- Lowers the strings of a hash-based table, crashes when other type of keys are used (integers, for example)
          • local function LowerHashTable(t)
          • local o = { }
            
          • for k, v in t do 
            
          •     o[StringLower(k)] = v 
            
          • end
            
          • return o
            
          • end


          • -- mods that have been integrated, based on folder name
          • local integratedMods = { }
          • integratedMods = LowerHashTable(integratedMods)


          • -- convert all mod folder name keys to lower case to prevent typos
          • deprecatedMods = LowerHashTable(deprecatedMods)


          • -- typical FAF packages
          • local allowedAssetsNxy = { }
          • allowedAssetsNxy = LowerHashTable(allowedAssetsNxy)


          • -- typical FA packages
          • local allowedAssetsScd = { }
          • allowedAssetsScd = LowerHashTable(allowedAssetsScd)


        1 Reply Last reply Reply Quote 1
        • S Offline
          SealingSatyr511
          last edited by SealingSatyr511

          Hot fix is available

          https://forum.faforever.com/post/66448

          I tested from scratch, fresh mod and default GamePrefs. I don't have issue or error hidden behind a tree.
          I hope it solves the game to freeze at startup some player have encountered on fresh install.

          Sorry for the inconvenience

          1 Reply Last reply Reply Quote 1
          • nomadsN Offline
            nomads
            last edited by nomads

            PixPin_2025-05-02_23-28-54.jpg

            PixPin_2025-05-02_23-29-52.jpg

            PixPin_2025-05-02_23-11-24.jpg

            x.jpg

            εΊεˆ— 01_1 00_00_00-00_00_30.gif

            I just tried the latest version of version 7.

            1 Reply Last reply Reply Quote 0
            • S Offline
              SealingSatyr511
              last edited by SealingSatyr511

              how is your gamePrefs ?
              \AppData\Local\Gas Powered Games\Supreme Commander Forged Alliance

              the structure should be like :

              AdvancedPriotities = {
                              windowHeight = 140,
                              posY = 912,
                              AttackConstructionLeftValue = 495,
                              AttackOrdersLeftValue = 1357,
                              Preset = 'strogo1_1',
                              FactoryConstructionRightValue = 1540,
                              buttonLayoutSeparate = {
                                  {
                                      'false',
                                      'ACU',
                                      'false',
                                      'false',
                                      'Bships',
                                      'Cruiser'
                                  },
                                  {
                                      'false',
                                      'Destros',
                                      'ACU',
                                      'Factory',
                                      'false',
                                      'false'
                                  },
                                  {
                                      'Engies',
                                      'Arty',
                                      'EXP',
                                      'false',
                                      'ACU',
                                      'false'
                                  }
                              },
                              windowWidth = 220,
                              hideAbilities = false,
                              posX = 2276,
                              FactoryConstructionLeftValue = 254,
                              showSeparateWindow = true,
                              lockSeparateWindow = false,
                              FactoryOrdersLeftValue = 1542,
                              AttackConstructionRightValue = 1355
                          },
              
              1 Reply Last reply Reply Quote 0
              • nomadsN Offline
                nomads
                last edited by

                Preset = 'strogo1_1',

                This command doesn't seem to be automatically added

                1 Reply Last reply Reply Quote 0
                • S Offline
                  SealingSatyr511
                  last edited by

                  Can you add it and have a check ?
                  i tried multiple scenario where the entries in GamePrefs were missing, and the crud operation works on the preset filename.

                  nomadsN 1 Reply Last reply Reply Quote 0
                  • nomadsN Offline
                    nomads
                    last edited by

                    After the instruction is added, it's okay
                    thank you very much.

                    x.jpg

                    1 Reply Last reply Reply Quote 1
                    • S Offline
                      SealingSatyr511
                      last edited by SealingSatyr511

                      if it fix the prb by adding this entry, that mean i must verify the mod pref of the profile and if it is not compliant, delete and rebuilt it on the fly, to prevent any bad old data structure.

                      1 Reply Last reply Reply Quote 1
                      • nomadsN Offline
                        nomads @SealingSatyr511
                        last edited by

                        unable to add commands, related to Windows system permissions?

                        S 2 Replies Last reply Reply Quote 0
                        • S Offline
                          SealingSatyr511
                          last edited by SealingSatyr511

                          well, i will do a fix to check the gamePrefs as i described. It can occurs some structure corruption after installing wrong update etc...

                          1 Reply Last reply Reply Quote 1
                          • S Offline
                            SealingSatyr511 @nomads
                            last edited by SealingSatyr511

                            This post is deleted!
                            1 Reply Last reply Reply Quote 1
                            • nomadsN Offline
                              nomads
                              last edited by

                              Take care of yourself, good night

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                SealingSatyr511 @nomads
                                last edited by

                                @nomads not sure it was due to that. i prefer do a better control of any existing entries in gameprefs first.

                                The v7 contains several major fixes also.

                                1 Reply Last reply Reply Quote 0
                                • S Offline
                                  SealingSatyr511
                                  last edited by SealingSatyr511

                                  Thank you πŸ™‚

                                  1 Reply Last reply Reply Quote 0
                                  • S SealingSatyr511 referenced this topic on
                                  • S Offline
                                    SealingSatyr511
                                    last edited by

                                    1.0.4 - Fix
                                    -Added a test plan execution at startup to prevent GamePrefs issues
                                    (version 8 in the vault)

                                    1 Reply Last reply Reply Quote 0
                                    • maggeM Offline
                                      magge Moderator FAF Association Board
                                      last edited by

                                      With v8 I do not get any black screen anymore, but unfortunately, I do not get any bottom build panel when I select any unit. (no other mods active).

                                      warning: Error running '/lua/ui/game/gamemain.lua:OnSelectionChanged': ...\advanced target priorities evo\modules\settings.lua(802): perform arithmetic on expected but got nil
                                               stack traceback:
                                               	...\advanced target priorities evo\modules\settings.lua(802): in function `ApplyCoordinatesToPanels'
                                               	...\faforever\1\gamedata\lua.nx2\lua\ui\game\orders.lua(1881): in function <...\faforever\1\gamedata\lua.nx2\lua\ui\game\orders.lua:1875>
                                               	...\faforever\1\gamedata\lua.nx2\lua\ui\game\orders.lua(1675): in function `SetAvailableOrders'
                                               	...aforever\1\gamedata\lua.nx2\lua\ui\game\gamemain.lua(702): in function <...aforever\1\gamedata\lua.nx2\lua\ui\game\gamemain.lua:625>
                                      warning: Error running '/lua/ui/game/gamemain.lua:OnSelectionChanged': ...\advanced target priorities evo\modules\settings.lua(802): perform arithmetic on expected but got nil
                                               stack traceback:
                                               	...\advanced target priorities evo\modules\settings.lua(802): in function `ApplyCoordinatesToPanels'
                                               	...\faforever\1\gamedata\lua.nx2\lua\ui\game\orders.lua(1881): in function <...\faforever\1\gamedata\lua.nx2\lua\ui\game\orders.lua:1875>
                                               	...\faforever\1\gamedata\lua.nx2\lua\ui\game\orders.lua(1675): in function `SetAvailableOrders'
                                               	...aforever\1\gamedata\lua.nx2\lua\ui\game\gamemain.lua(702): in function <...aforever\1\gamedata\lua.nx2\lua\ui\game\gamemain.lua:625>
                                      

                                      Join a FAFtastic Team | Join the FAForever Association

                                      1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        SealingSatyr511
                                        last edited by SealingSatyr511

                                        Ok.
                                        can you share your GamePrefs "advancedpriotities" ?
                                        and what is your current adapter resolution ?
                                        Do you use a second monitor ? if yes, left or right display ?

                                        1 Reply Last reply Reply Quote 0
                                        • maggeM Offline
                                          magge Moderator FAF Association Board
                                          last edited by magge

                                          1. The 'advancedpriotities' entry in the Game.prefs:
                                                      AdvancedPriotities = {
                                                          windowHeight = 140,
                                                          posY = 500,
                                                          AttackConstructionLeftValue = 600,
                                                          AttackOrdersLeftValue = 50,
                                                          Preset = 'strogo1_1',
                                                          FactoryConstructionRightValue = 1400,
                                                          buttonLayoutSeparate = {
                                                              { },
                                                              { },
                                                              { }
                                                          },
                                                          windowWidth = 120,
                                                          FactoryOrdersLeftValue = 50,
                                                          posX = 50,
                                                          FactoryConstructionLeftValue = 600,
                                                          showSeparateWindow = false,
                                                          lockSeparateWindow = false,
                                                          hideAbilities = false,
                                                          AttackConstructionRightValue = 1400
                                                      },
                                          
                                          1. Primary monitor: 2560 x1440 I use only one monitor for gaming. SC runs only on the main screen.

                                          @SealingSatyr511 said in Black Screen with mod v6 'Advanced Target Priorities EVO':

                                          Do you use a second monitor ? if yes, left or right display ?

                                          1. Yes, bottom.
                                            1a188408-d449-42b2-a385-15f8a7f6a183-image.png

                                          Edit: BTW, there is a spelling mistake:

                                          For 'advancedpriotities' is the "r" missing; 'advancedpriorities'

                                          Join a FAFtastic Team | Join the FAForever Association

                                          1 Reply Last reply Reply Quote 0
                                          • S Offline
                                            SealingSatyr511
                                            last edited by SealingSatyr511

                                            The gamePrefs is ok, yes it's advancedpriotities (without the r). It's easier for the dev to find in the gameprefs. it's native code of the old 1.1.

                                            here is the code that fails :

                                            -- check the serapate targeting window position
                                            local separateWindow = import("/lua/ui/game/orders.lua").GetSeparateWindow()
                                            local tableRez = mysplit(Prefs.GetFromCurrentProfile('options').primary_adapter,',')
                                            if (prioritySettingsPrefs.posX > tonumber(tableRez[1])-207) or  
                                               (prioritySettingsPrefs.posY > tonumber(tableRez[2])-145) then    
                                                    separateWindow.Left:Set(DefaultPosX)
                                                    separateWindow.Top:Set(DefaultPosY)
                                                    prioritySettingsPrefs.posX = DefaultPosX
                                                    prioritySettingsPrefs.posY = DefaultPosY
                                                    Prefs.SetToCurrentProfile("AdvancedPriotities", prioritySettingsPrefs)
                                                    Prefs.SavePreferences()
                                                    resetPosition = true
                                            end
                                            

                                            the condition is line 802 where the bug occurs.

                                            but i m pretty sure it s due to resolution and coordinate retrieved from
                                            Prefs.GetFromCurrentProfile('options').primary_adapter

                                            it put the resolution 2560x1440 to a table, and i check the x and y position of the window.
                                            This code is designed to prevent out of range position.

                                            I don't reproduce this bug (i use a single monitor). the dual monitor may have an impact on how the resolution is retrieved by the game.
                                            Does it take the resolution of the game ? or the windows system ? that's the key i think.

                                            Be sure i m investigating this. I have a laptop with a dual screen (not the computer i run Faf), i m going to install faf on it and check how it works in debug. i must reproduce.

                                            1 Reply Last reply Reply Quote 2

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better πŸ’—

                                            Register Login
                                            • First post
                                              Last post