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!

    Tac missile defense help.

    Scheduled Pinned Locked Moved Modding & Tools
    12 Posts 4 Posters 226 Views 2 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.
    • T Offline
      TankenAbard
      last edited by

      Header: I'm trying to fix some of the Nomads code, and I'm confused on how Tac defense works.

      I've noticed that with the Zapper, Buzzkill and Ythisatha, if the enemy missiles fly in at the same pattern every time, they are shot down at the same time in the same order. So if the missile order coming in is 1,3,2,5,4, then they are shot down in that same order every time. If this makes sense.

      So, with the Nomads, I've noticed that the defense systems seem to shoot the enemy missiles down fast, but after 3-4 tac defenses, some of the defenses will stop tracking properly and let a missile go. So if there's 5 enemy missiles, and 5 defenses, ofen what happens is that 4 defenses fire off and the 5th just kinda sits there and doesn't do anything.

      Is there any kind of commandcaps, category, some kind of logic that needs to be hooked to make the defenses work with eachother better?

      1 Reply Last reply Reply Quote 1
      • DeribusD Offline
        Deribus Global Moderator
        last edited by Deribus

        Might have something to do with one of these changes?
        https://github.com/FAForever/fa/pull/5528
        https://github.com/FAForever/fa/pull/5518

        More specifically that these changes may not have been extended to Nomads.

        1 Reply Last reply Reply Quote 1
        • T Offline
          TankenAbard
          last edited by

          I think this tells me exactly what I need to do. The issue being, the weapon fire and disable times are done in the .lua of the projectiles.lua and not the .bp of the unit. I think I can fix this by putting a line like unit:SetWeaponEnabled(false), though I'm unsure if that's correct.

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

            Try using DisableWhileReloading = true in the weapon blueprint, this is what we do with FAF gun TMD. The issue you describe seems to be that 4 TMD fire, the 5th missile gets locked on to by a reloading TMD out of the first 4, and missiles can only have a number of shooters equal to their HP, so that lockon makes the 5th TMD ignore the missile as its shooter cap is filled.

            1 Reply Last reply Reply Quote 0
            • T Offline
              TankenAbard
              last edited by TankenAbard

              I appreciate the response. The way the Nomads TMD works is absolutely bonkers, so much happens in the script alone, utilizing a beam to do the work. I tried disabling the weapon in the script, because the recycle time in the blueprint is 10/1, and if it is adjusted then the lock-on time would increase. I have since abandoned the original code/method in favor of a traditional projectile, using the UEF Tac defense for now. I want to change the projectile graphic, but I'm not sure how to make a new projectile and have it work correctly, or make a new one that piggybacks off of an existing projectiles logic with minor edits. Big dreams, small brain.

              IF I have anyones attention, I don't know how projectiles work. It looks like projectile/weapon info exists in 3-4 places. Anyone have a guide that explains this? Any time I think I understand, comes to find, I don't. ChatGPT superbrain can only help so much, even then it gives ideas more than it actually makes solutions.

              SaverS 1 Reply Last reply Reply Quote 1
              • SaverS Offline
                Saver @TankenAbard
                last edited by

                @TankenAbard I can empathize with it. ^^

                auch mal fünf gerade sein lassen

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

                  @TankenAbard

                  I think you should try to fix the TMD weapon script to be able to have the weapon to be disabled while reloading. I was assuming Nomads was using a normal weapon but it actually has its own code. The fix might just be to disable the weapon while it is idle here:
                  https://github.com/FAForever/nomads/blob/129f009fcd39a2bab068983e2f1ee20dd3bb1570/lua/nomadsweapons.lua#L258 by adding self:SetEnabled(false) and self:SetEnabled(true) around it.

                  I'd wish to fix it to make it use the blueprint RackSalvo fields, but apparently the salvo size they want and the actual rack count are different so the default projectile weapon doesn't support it.

                  I don't know how projectiles work

                  Here is an example the Cybran ACU's gun (this class style design is used for everything in the game btw).

                  1. Weapon looks into its blueprint for a projectile blueprint (Engine behavior)
                  2. it creates the projectile when it fires. After this function the weapon usually doesn't do anything with the projectile.
                  3. the projectile properties are determined by the blueprint (physics stuff, sounds, special categories, HP) and the script file (damage effects and visual effects)
                  4. The script uses a class hierarchy which:
                    • 1 at the very top connects the projectile created by the engine to the class hierarchy, and allows for very specific changes if you want to change a projectile only for a single unit (since projectile bps are typically not shared, but duplicated for different units).
                    • 1 at the top determines the effect blueprints used for various effects. Fyi effect templates are just tables of effect blueprint filenames stored in EffectTemplates.lua.
                    • 2 in the middle is the effect scripting that uses those assigned effects
                    • 3 and at the bottom is the projectile collision behavior and logic.

                  You can duplicating the blueprint and script for the UEF TMD, assigning the weapon the new projectile, and then in the script editing the correct effect field to use a new effect blueprint table.

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    TankenAbard
                    last edited by

                    I still haven't managed to make a new projectile, even based on an old one, yet. Anyone have a guide on this, written or video? This should be easy, but something isn't clicking in my brain, I'm waiting for that "ah-ha!" moment.

                    Relate but unrelated, because of recent changes. A tac missiles hitbox, where is that decided? I'm looking at Blueprints and scripts, but I'm not entirely sure. Is this a model thing? I know that's its own can of worms, importing and exporting to SupCom.

                    SaverS 1 Reply Last reply Reply Quote 0
                    • SaverS Offline
                      Saver @TankenAbard
                      last edited by

                      @TankenAbard 6b87e3cd-ed68-4c73-b0d2-c2c134d8f09a-image.png Hi, I just wanted to check your question and didn't know that the mesh forms a circle around the rocket.

                      auch mal fünf gerade sein lassen

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        TankenAbard
                        last edited by

                        Wow, is that the hitbox, the new one as of late? it's huge! Way bigger than I thought it would be. I still do wonder where this size is decided or modified. Very interesting.

                        N 1 Reply Last reply Reply Quote 0
                        • N Offline
                          Nomander Balance Team @TankenAbard
                          last edited by

                          @TankenAbard Each patch note has a pull request number that links to the PR that implemented the change (#6738), and you can click on "Files Changed" on the PR's webpage to see the exact changes to the files.

                          SaverS 1 Reply Last reply Reply Quote 1
                          • SaverS Offline
                            Saver @Nomander
                            last edited by

                            @Nomander https://github.com/FAForever/fa/pull/6738/commits/f06a490d72ca0f75921b79ca44d4f80b16f16e79 Thank you for your message, I wasn't fully aware of that before.

                            auch mal fünf gerade sein lassen

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