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!

    Remove black soot

    Scheduled Pinned Locked Moved Modding & Tools
    6 Posts 4 Posters 525 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.
    • E Offline
      Enigma_01
      last edited by

      After a nuke or shells impact the ground they leave a black spot.
      These stack over time and reduce performance.

      Is there a mod which prevents these spots from forming at all or, alterntively, removes them after a set time?

      If not, can anyone point me in the right direction to make such a mod?
      I'd be looking for a file and/of function that handles these impacts effects.

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

        I think what you mean are the Decal Textures of an Weapon Impact.
        Such as the Impact Crater Texture of an Nuke in this Case.
        Decals have an Duration Variable which can be set inside of the CreateDecal Function.
        If the Duration is set to 0 the Decal Texture doesn't Show Up.

        --- Creates a decal with supplied parameters. The decal is visible only to armies allied to `army`.
        ---@param position Vector
        ---@param heading number
        ---@param textureName1 FileName
        ---@param textureName2 FileName
        ---@param type DecalType
        ---@param sizeX number size on x axis in game units
        ---@param sizeZ number size on y axis in game units
        ---@param lodParam number distance in game units before the decals disappear
        ---@param duration number lifetime of the decal in seconds, 0 for infinite
        ---@param army Army
        ---@param fidelity? number
        ---@return moho.CDecalHandle
        
        function CreateDecal(position, heading, textureName1, textureName2, type, sizeX, sizeZ, lodParam, duration, army, fidelity)
        end
        

        Alternative the CreateDecal Function of each Weapon Code could be Out commented, which deactivate them fully Ingame. However a Mod which deactivate all Weapon Impact Decals in the Game doesn't exists as far as I know. It is possible in General but complex.

        1 Reply Last reply Reply Quote 2
        • CaliberC Offline
          Caliber
          last edited by Caliber

          I too would like to desable decals, some of them are very ugly.

          @CDRMV where is this createdecal function folder located?

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

            @caliber
            Its an Lua Function Not an Folder.
            The CreateDecal Function is Declared here:
            https://github.com/FAForever/fa/blob/develop/engine/Sim.lua

            Look at Line 217

            For Nukes the Function usually appears inside the script.lua File of the Explosion Entity.
            Here is an Example at Line 50 to 52 for the UEF Nuke
            https://github.com/FAForever/fa/blob/develop/effects/Entities/UEFNukeEffectController01/UEFNukeEffectController01_script.lua

            To deactivate the Decal on regular Explosions for Artillery or Missile Impacts.
            This Lua File could be Interesting for you:
            https://github.com/FAForever/fa/blob/develop/lua/defaultexplosions.lua

            There are several appearences of the CreateDecal and CreateSplat Function here where their Duration should be setted to 0.

            If you have Change them to 0 or out commend these two Functions directly by using an --Functionname all Non Nuke Explosions should Not Spawn an Decal Texture anymore. I think this is probably the best Way to do it.

            Hope it helps you.
            Best regards
            CDRMV

            CaliberC IndexLibrorumI 2 Replies Last reply Reply Quote 3
            • CaliberC Offline
              Caliber @CDRMV
              last edited by

              @cdrmv thats awsome, very helpful, thank you.

              1 Reply Last reply Reply Quote 0
              • IndexLibrorumI Offline
                IndexLibrorum Global Moderator @CDRMV
                last edited by

                @cdrmv Perhaps someone can make a mod for this, as making this change is likely to be beyond what most people can do.

                "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:

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