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

    February 25th Patch breaks AI Wave Survival mod

    Scheduled Pinned Locked Moved Modding & Tools
    7 Posts 3 Posters 533 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
      Rama
      last edited by

      I noticed a few days ago, the nuke strike script in AI Wave Survival mod was not working. I tested previous versions that I knew worked, with all other mods off, and the script still doesn't run. This seems to coincide around the same time as the latest FAF Patch on February 25th.

      Not sure what changes to the game could cause this issue or how to go about fixing it.

      1 Reply Last reply Reply Quote 0
      • RoweyR Offline
        Rowey
        last edited by

        Could you provide a game.log form a game and post it to technical help quoting this post 🙂

        "The needs of the many outweigh the needs of the few" - Spock

        1 Reply Last reply Reply Quote 1
        • JipJ Offline
          Jip
          last edited by

          @Rama

          f51e57f0-8d5e-43df-bf88-b39ca33b179e-image.png

          The game works in general, how do I trigger that nuke script?

          There are some errors in the logs:

          WARNING: Error running lua script: get as UserData expected but got nil
                   stack traceback:
                   	[C]: in function `GetNumUnitsAroundPoint'
                   	...data\lua.nx2\lua\editor\unitcountbuildconditions.lua(1645): in function <...data\lua.nx2\lua\editor\unitcountbuildconditions.lua:1637>
                   	(tail call): ?
                   	...\gamedata\lua.nx2\lua\sim\brainconditionsmonitor.lua(397): in function <...\gamedata\lua.nx2\lua\sim\brainconditionsmonitor.lua:395>
                   	(tail call): ?
                   	...mdata\faforever\gamedata\lua.nx2\lua\sim\builder.lua(214): in function `BuilderConditionTest'
                   	...mdata\faforever\gamedata\lua.nx2\lua\sim\builder.lua(256): in function `CheckBuilderConditions'
                   	...mdata\faforever\gamedata\lua.nx2\lua\sim\builder.lua(152): in function `GetBuilderStatus'
                   	...ever\gamedata\lua.nx2\lua\sim\platoonformmanager.lua(142): in function <...ever\gamedata\lua.nx2\lua\sim\platoonformmanager.lua:123>
                   	(tail call): ?
                   	...aforever\gamedata\lua.nx2\lua\sim\buildermanager.lua(370): in function <...aforever\gamedata\lua.nx2\lua\sim\buildermanager.lua:352>
          

          These could be related

          A work of art is never finished, merely abandoned

          1 Reply Last reply Reply Quote 1
          • R Offline
            Rama
            last edited by Rama

            If the nuke script is set to "All On", or "Offensive" nukes will launch automatically at 85% of Hold Time. "Defensive" nukes will target any land/navy units that are too close to HQ (about the distance of the blast radius of a Yolo). You can change Nuke Launch time to 50% in Map Options and set Hold Time to 10 minutes, then nukes will launch 5 minutes after Build Time ends, which speeds up testing. Also, using cheats to spawn a Paragon should usually trigger nuke strikes (there is a random factor there) any time after Build Time is over.

            Because all the other attack scripts are working (well, I need to test a few hidden scripts, like counter artillery triggered by building too much T3/TRY artillery), I wonder if it could be caused by the Custom Nuke Launcher used by the script?

            Heh, the errors have always been there. The mod is a mismash of others work (AI Wave Survival is a branch off from Swarm Survival) and while I've been able to fix some bugs, my programming abilities are limited.

            And I do really appreciate the help! Thanks!

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

              So, error has been isolated. The following code would break any scripts using it:
              AIMessageTo('Message in Chat from AI to Players')

              Which called this script:
              function AIMessageTo(message, brain)
              local tmpMessage = message
              if brain then
              tmpMessage = message .. brain.Nickname
              end
              table.insert(Sync.AIChat, { group = 'all', text = tmpMessage, sender = aiBrain.Nickname })
              end

              1 Reply Last reply Reply Quote 0
              • JipJ Offline
                Jip
                last edited by

                You can fix that by rewriting it to:

                function AIMessageTo(message, brain)
                    local tmpMessage = message
                    if brain then
                        tmpMessage = message .. brain.Nickname
                    end
                
                    Sync.AIChat = Sync.AIChat or { }
                    table.insert(Sync.AIChat, { group = 'all', text = tmpMessage, sender = aiBrain.Nickname })
                end
                

                A work of art is never finished, merely abandoned

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

                  I appreciate that fix. I've issued a temporary fix, but will implement the fix in the next release!

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