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

    Is there a workaround or override ?

    Scheduled Pinned Locked Moved Modding & Tools
    11 Posts 5 Posters 801 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.
    • R Offline
      Resin_Smoker
      last edited by Resin_Smoker

      All of the units shown in the build menu provide a DPS and Burst damage values based upon the units BP weapon values. Which don't get me wrong is really great. That being said, I've encountered a problem with this system when using a large number of dummy weapons. Soon as i mouse over an Engineer build icon for the unit i get the following..

      WARNING: Error running HandleEvent script in CScriptObject at 1ddb6180: ...ever\gamedata\lua.nx2\lua\ui\game\unitviewdetail.lua(616): attempt to perform arithmetic on local `MuzzleCount' (a nil value)
               stack traceback:
               	...ever\gamedata\lua.nx2\lua\ui\game\unitviewdetail.lua(616): in function `WrapAndPlaceText'
               	...ever\gamedata\lua.nx2\lua\ui\game\unitviewdetail.lua(792): in function `Show'
               	...orever\gamedata\lua.nx2\lua\ui\game\construction.lua(1165): in function `OnRolloverEvent'
               	...mdata\faforever\gamedata\lua.nx2\lua\maui\button.lua(96): in function <...mdata\faforever\gamedata\lua.nx2\lua\maui\button.lua:77>
      

      The unit in question is the 4DFAF Death Tentacle. It uses 12 dummy weapons to simulate the movements of a tentacle. With the 13th weapon being the main muzzle for the entire assembly.

      Note will post a video with files shortly.

      Edit (files) XSB2306.zip

      Edit (video should be viewable soon'ish) https://youtu.be/P_Fb5vpBY74

      Resin

      Kykhu Oss https://youtu.be/JUgyGTgeZb8
      Unit Thrower https://youtu.be/iV8YBXVxxeI
      Beam Tentacle https://youtu.be/le5SNwHvC4c
      Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
      Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

      R 1 Reply Last reply Reply Quote 0
      • R Offline
        Resin_Smoker @Resin_Smoker
        last edited by Resin_Smoker

        Been doing some digging into this and have discovered that the issue is that the dummy weapons I'm using are missing:

        			MuzzleChargeDelay = 0,
        			MuzzleSalvoDelay = 0,
        			MuzzleSalvoSize = 1,
        

        Looks like the unitviewdetail.lua may not be seeing that this isn't a real weapon. Though I should be able to get the unit to work but the UI built menu will show all of the dummy weapons. See image below to confirm...

        f3e13dc1-70d4-4891-8a45-7b246a24a014-image.png

        Unfortunately I can't use the weapon blueprint "DummyWeapon = true," as this would prevent the weapons from moving.

        Kykhu Oss https://youtu.be/JUgyGTgeZb8
        Unit Thrower https://youtu.be/iV8YBXVxxeI
        Beam Tentacle https://youtu.be/le5SNwHvC4c
        Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
        Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          Resin_Smoker @Resin_Smoker
          last edited by

          Within unitviewdetail.lua i see there are exceptions like...

          Line 651

          -- Do not display Reload stats for Kamikaze weapons
          elseif info.WeaponCategory == 'Kamikaze' then
          

          Would it be possible to script in an exception for weapons that are being used as motion actors, such as is the case with the Beam Tentacle ?

          Kykhu Oss https://youtu.be/JUgyGTgeZb8
          Unit Thrower https://youtu.be/iV8YBXVxxeI
          Beam Tentacle https://youtu.be/le5SNwHvC4c
          Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
          Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

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

            Would it not be easier to just prohibit the UI from displaying Dummy Weapons in the rollover ?

            1 Reply Last reply Reply Quote 1
            • N Offline
              Nomander
              last edited by

              @Resin_Smoker
              If you remove the WeaponCategory field entirely, it won't show the weapons in unitviewdetail (see line 532 of that file). Does that solution work for you?

              @sprouto said in Is there a workaround or override ?:

              Would it not be easier to just prohibit the UI from displaying Dummy Weapons in the rollover ?

              He's using the weapons' AimManipulator functionality for animations, so they're not actually dummy weapons, they just have WeaponCategory = 'DummyWeapon', which is why they show up in the UI.

              R 1 Reply Last reply Reply Quote 1
              • R Offline
                Resin_Smoker @Nomander
                last edited by

                @nomander Shit man thats awesome ! Will give that a try.

                Kykhu Oss https://youtu.be/JUgyGTgeZb8
                Unit Thrower https://youtu.be/iV8YBXVxxeI
                Beam Tentacle https://youtu.be/le5SNwHvC4c
                Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
                Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

                R 1 Reply Last reply Reply Quote 0
                • R Offline
                  Resin_Smoker @Resin_Smoker
                  last edited by

                  Success !

                  5a2121f2-addb-4f43-b8d6-cbd136d5c2b1-image.png

                  Kykhu Oss https://youtu.be/JUgyGTgeZb8
                  Unit Thrower https://youtu.be/iV8YBXVxxeI
                  Beam Tentacle https://youtu.be/le5SNwHvC4c
                  Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
                  Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

                  1 Reply Last reply Reply Quote 2
                  • JipJ Online
                    Jip
                    last edited by

                    That unit does look great! I'm sure @CDRMV would love to see it too

                    A work of art is never finished, merely abandoned

                    R 1 Reply Last reply Reply Quote 1
                    • R Offline
                      Resin_Smoker @Jip
                      last edited by

                      @jip thanks!

                      Unfortunately it's still pretty buggy as getting all those turrets to work together consistently is like hurding cats.

                      Kykhu Oss https://youtu.be/JUgyGTgeZb8
                      Unit Thrower https://youtu.be/iV8YBXVxxeI
                      Beam Tentacle https://youtu.be/le5SNwHvC4c
                      Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
                      Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        CDRMV
                        last edited by CDRMV

                        @Resin_Smoker
                        Looks really similar like my Cybran Worms 😉
                        However there are able to Move below the Land Layer (Underground).
                        So there are Not an Stationary Defense compared to your Seraphim Tentacle.
                        Here are two Screenshots of them:
                        74e2e81c-650a-45c6-a3bd-cf445a8a65f2-image.png
                        e434c698-9144-4f1b-b2ab-314ad3dc6689-image.png
                        Both are already included in CSK Units on my GitHub Repository for Early Access.
                        So If you want feel free to Check them Out.

                        If you want I could Integrate your Seraphim Beam Tentacle as an Underground Unit into CSK Units. It needs a few Changes by myself but I think it would be more Interesting to be usable an full Underground Unit.

                        1 Reply Last reply Reply Quote 2
                        • R Offline
                          Resin_Smoker
                          last edited by

                          I've made progress and have gotten the turret to behave. I may post a video in the coming days.

                          Kykhu Oss https://youtu.be/JUgyGTgeZb8
                          Unit Thrower https://youtu.be/iV8YBXVxxeI
                          Beam Tentacle https://youtu.be/le5SNwHvC4c
                          Blackhole https://www.youtube.com/watch?v=D9NGQC5rr0c
                          Resurection https://www.youtube.com/watch?v=WdbIQ4vHkMs

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