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

    Auto Mass Fab Feedback/Discussion

    Scheduled Pinned Locked Moved General Discussion
    49 Posts 22 Posters 3.8k 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.
    • JipJ Offline
      Jip
      last edited by Jip

      This is the main functionality behind the automation:

      // number between 0 and 1, where 0 is no storage and 1 is full storage
      local energyStoredRatio = self:GetEconomyStoredRatio('ENERGY')
      
      // current energy income - energy expense
      local energyTrend = 10 * self:GetEconomyTrend('ENERGY')
      
      if energyStoredRatio < 0.9 then 
      
          // find a fabricator to disable
      
      elseif energyStoredRatio >= 1.0 and energyTrend > 100 then 
      
          // find a fabricator to enable
      
      end
      

      It is made to be:

      • Simple. It should be intuitive to reason about the system.
      • Prefer full storage. It should not prevent you to use overcharge.
      • Efficient. It should have no impact on the simulation speed, at any point in time.

      Because of that it is:

      • Unintelligent. It may make sub optimal choices at times.

      And because it is new, it can be:

      • Frustrating. It may not do what you think it should be doing.

      In general, if you want your fabricators enabled then you should have more power production ๐Ÿ™‚ . Not micro-manage them.

      Personally, if someone can figure out how to make this elegant in the UI, I'd like a three-position toggle - Off/Auto/On, with the default behavior being Auto.

      I'm not a huge fan of giving people more control over the system - there's no real need for it either. If you want to prevent it from deactivating suddenly, have more storage. If you want to always have your fabs turned on, build more power (or less fabricators). You already have control over the system by adjusting how you approach the game.

      I would be interested in the creation of an UI that can help you identify the number of excess power that your economy can take. Something that informs you how many fabricators are enabled at once. The tweaking of the parameters (when to enable / disable) are open for discussion too.

      A work of art is never finished, merely abandoned

      1 Reply Last reply Reply Quote 3
      • S Offline
        SkyHawk
        last edited by SkyHawk

        How often does this run to adjust fabber activation?

        I'd like to see more intelligent behavior, but I have to respect the simple attribute, which prevents implementing more complex logic.

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

          One fabricator is turned on or off each tick, if applicable.

          A work of art is never finished, merely abandoned

          1 Reply Last reply Reply Quote 0
          • A Offline
            Aulex
            last edited by

            There are 10 ticks in a second right?

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

              Yes.

              A work of art is never finished, merely abandoned

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

                Yeah, I think I'm going to argue in favor of at least one slight change to the logic:

                If power < 90% [and trend is +2000 or less], turn off a fabber
                If power > 98% [and trend is 0 or higher], turn on a fabber

                There should never be a situation where a player is overflowing power while having idle fabbers.

                Trend threshold for turning off a fabber is open to debate. Perhaps compute it per tick as a fraction of total generation?

                1 Reply Last reply Reply Quote 0
                • BlackYpsB Offline
                  BlackYps
                  last edited by

                  I can understand the change from 100% to 98%, but why do you want to change the trend vaiues?

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

                    Right now the trend must be +100 or better to turn a fabber on.

                    You can be sitting at full energy, steady +99, with a t2 fabber that will refuse to turn on, even though you're throwing energy away.

                    I really, really want to suggest more complex logic for getting a better, more useful result, but Jip is entirely correct in wanting to keep it simple.

                    As far as the trend for turning a fabber off, let's assume you just Overcharged something and you're down to 60% storage, but you're at +5000/second. Turning off fabbers makes no sense in that situation.

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

                      @skyhawk said in Tuning the new Auto-fabber behavior:

                      really want to suggest more complex logic for getting a better

                      We can always discuss it - I put it out there so people do not get their hopes up.

                      A work of art is never finished, merely abandoned

                      1 Reply Last reply Reply Quote 0
                      • maudlin27M Offline
                        maudlin27
                        last edited by

                        What about for the second condition (slightly more complex but not massively so):
                        elseif energyTrend >= 99 and (energyStoredRatio >= 0.99 or (energyStoredRatio >= 0.91 and energyTrend >= 2000)) then

                        i.e. by having it at 99 even if dealing with a T2 mass fab you should be getting a very tiny energy shortfall as it turns off and on (helping to highlight to the player there might be an issue with their power)
                        By having it kick in at 91% when you have significant net energy (that's more than a T3 fab) it means your power should recover quickly from an overcharge, while allowing significantly longer to turn on mass fabs to avoid significantly overflowing energy.

                        M27AI and M28AI developer; Devlogs and more general AI development guide:
                        https://forum.faforever.com/topic/2373/ai-development-guide-and-m27ai-v71-devlog
                        https://forum.faforever.com/topic/5331/m28ai-devlog-v130

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

                          Fun fact: at the moment the system fails sometimes.

                          A work of art is never finished, merely abandoned

                          Ctrl-KC J 2 Replies Last reply Reply Quote 0
                          • Ctrl-KC Offline
                            Ctrl-K @Jip
                            last edited by

                            @jip we noticed already

                            โ€œBe a yardstick of quality. Some people arenโ€™t used to an environment where excellence is expected.โ€
                            โ€” Steve Jobs.
                            My UI Mods
                            Support me

                            1 Reply Last reply Reply Quote 0
                            • ArranA Offline
                              Arran
                              last edited by Arran

                              Repost from elsewhere:
                              Seems nice for those few niche eco situations where you want to build fabricators.
                              However, it would be nice if there was a visual indication your fabricator was not producing. It currently does not even have the red dashed circle to indicate its off.

                              It would be nice to be able to turn this feature on/off depending on player preference.

                              1 Reply Last reply Reply Quote 1
                              • Z Offline
                                ZooDoo4U
                                last edited by

                                I'm wondering if this is what has started causing a lot of lag in the games that i'm seeing. I know i have a low end machine 64Gb of some slow 3600Mhz memory and a low end 5950x with only 32 threads, but seriously, nothing should be making this machine lagg, but something has started stuff to lagg pretty bad.

                                Also not sure if there is much discussion about other places where game play is getting worse and worse. Meaning i had a GC standing in a place i forgot about on the map, and about 10 T3 fighting bots hit it and they were standing right next to it, well withing the GC's range, but the GC never fired once and lost it with it only firing well too late...

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

                                  I'd need to see replays @ZooDoo4U .

                                  A work of art is never finished, merely abandoned

                                  1 Reply Last reply Reply Quote 0
                                  • J Offline
                                    jcvjcvjcvjcv @Jip
                                    last edited by jcvjcvjcvjcv

                                    @jip said in Tuning the new Auto-fabber behavior:

                                    Fun fact: at the moment the system fails sometimes.

                                    Then why is it still in?
                                    I just had a game... had six T3 massfabs, all doing nothing at all while 265k energy stored and overflowing 10k per sec.

                                    @jip said in Tuning the new Auto-fabber behavior:

                                    I'd need to see replays @ZooDoo4U .

                                    Well, the online replay vault doesn't work for me either anymore, nor my rating graph... but ok, the local vault gives replay ID too, so; #17032129

                                    EDIT: fixed my replay and viewing of rating graph by FAF reinstall.

                                    @zoodoo4u said in Tuning the new Auto-fabber behavior:

                                    Also not sure if there is much discussion about other places where game play is getting worse and worse. Meaning i had a GC standing in a place i forgot about on the map, and about 10 T3 fighting bots hit it and they were standing right next to it, well withing the GC's range, but the GC never fired once and lost it with it only firing well too late...

                                    I've seen the same a lot with sera T2 pd simply not firing on anything while there is a shitton of enemy stuff in range.

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

                                      @jcvjcvjcvjcv said in Tuning the new Auto-fabber behavior:

                                      Then why is it still in?

                                      Fair question - usually we'd hotfix it as soon as we find out about it. This time however an engine patch quickly followed (live on FAF Develop), along with a few desync reports. And only then we found out that there was an issue.

                                      The fix is available on FAF Develop - the system works fine there. We'll release it to the FAF gametype somewhere next week. You can select the game type upon launch:

                                      7d693f5f-0170-4e84-9c1d-f9a3fbf0dc2c-image.png

                                      A work of art is never finished, merely abandoned

                                      1 Reply Last reply Reply Quote 0
                                      • F Offline
                                        FunkOff
                                        last edited by

                                        Neat function. I hope it works well in the future. Two downsides I can think of are it can take a long time to turn off all your fabs if you have a lot of them (or turn them back on) and it probably wont prioritize fabs which have higher mass production to energy use costs (due to mass storage or pgen askacency)

                                        1 Reply Last reply Reply Quote 0
                                        • ThomasHiattT Offline
                                          ThomasHiatt
                                          last edited by ThomasHiatt

                                          Can mass fabs just be a global state thing that converts overflowed energy into mass? Each mass fab gives X "fab power" to convert a total of Y overflowed energy into Z mass. Then it is maximum simplicity both gameplay and sim wise.

                                          arma473A 1 Reply Last reply Reply Quote 0
                                          • arma473A Offline
                                            arma473 @ThomasHiatt
                                            last edited by

                                            @thomashiatt said in Tuning the new Auto-fabber behavior:

                                            Can mass fabs just be a global state thing that converts overflowed energy into mass? Each mass fab gives X "fab power" to convert a total of Y overflowed energy into Z mass. Then it is maximum simplicity both gameplay and sim wise.

                                            Then every time you overcharge, your mass fabs would stop running for at least 1 tick. Maybe that's not important.

                                            We would also have to look into how that affects adjacency bonuses. Maybe fix it so that all buildings with mass fab adjacency have the adjacency bonus turn on and off. (Otherwise it would interfere with using mass fab adjacency for a nuke launcher)

                                            I do like the idea of keeping things simple for the players.

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