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

About the veterancy system

Scheduled Pinned Locked Moved Balance Discussion
88 Posts 35 Posters 9.0k 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.
  • B
    BlackYps
    last edited by 10 Jul 2021, 07:15

    You could tune down the mass cost of the commander to make that effect negligible

    1 Reply Last reply Reply Quote 0
    • J
      Jip @IceDreamer
      last edited by 10 Jul 2021, 08:57

      @icedreamer said in About the veterancy system:

      I designed the current system, and gotta say I like the sound of option 2. Wish I'd thought of that. It's not quite the same, as it means the distribution of damage from units which regen or get repaired shifts, but tbh that is so ridiculously uncommon I was wrong to take it into account. The cost of the table lookups probably isn't worth it.

      xp = (damageDealt / MaxHP) * massCost should do the trick. Probably doable in about 20 minutes by anyone familiar with unit.lua.

      I'm still running investigations into those table allocations. As indeed, the scenario you describe is rare and it introduces a lot of allocates in some situations.

      For now it is important to first finish up the profiler in a reasonable state, then we can start looking at what really makes the sim tick 🙂

      A work of art is never finished, merely abandoned

      I 1 Reply Last reply 11 Jul 2021, 21:09 Reply Quote 0
      • I
        IceDreamer Banned @Jip
        last edited by 11 Jul 2021, 21:09

        @jip Oh, that's easy - The vast lion's share of the compute time is taken up by function calls across the C++/lua boundary. It's about two orders of magnitude slower than anything else. Potential areas for improvement would be to look for areas where the lua makes repeated, unneccessary calls to engine. I worked with a couple of guys to eliminate all the points in the exe which make stupid calls the other way, so that's already done.

        Other than that, you can try using more local variables in hot code - Intel, collision detection, economy events.

        J 1 Reply Last reply 11 Jul 2021, 21:51 Reply Quote 0
        • J
          Jip @IceDreamer
          last edited by 11 Jul 2021, 21:51

          @icedreamer said in About the veterancy system:

          @jip Oh, that's easy - The vast lion's share of the compute time is taken up by function calls across the C++/lua boundary. It's about two orders of magnitude slower than anything else. Potential areas for improvement would be to look for areas where the lua makes repeated, unneccessary calls to engine. I worked with a couple of guys to eliminate all the points in the exe which make stupid calls the other way, so that's already done.

          Other than that, you can try using more local variables in hot code - Intel, collision detection, economy events.

          Yes - I've been looking into using locals. LOUD applies a similar pattern to optimize functions or to push them as an 'upvalue' which is still better than a global. A wikipedia entry that I've learned from quite a bit: https://springrts.com/wiki/Lua_Performance

          Do you happen to know about how the garbage collector works in Lua? I've been trying to find informative examples, but came out short.

          A work of art is never finished, merely abandoned

          1 Reply Last reply Reply Quote 0
          • J
            Jip
            last edited by 11 Jul 2021, 21:51

            Oh - and while I have you - how did you found out about the boundary passing being expensive?

            A work of art is never finished, merely abandoned

            1 Reply Last reply Reply Quote 0
            • I
              IceDreamer Banned
              last edited by 12 Jul 2021, 02:42

              I profiled the game while it was running and produced a statistical output of how much time was spend in each function, both in engine, in lua, and the time at which the function call was registered.

              1 Reply Last reply Reply Quote 0
              • J
                Jip
                last edited by 12 Jul 2021, 04:20

                Do you still have that profiler?

                A work of art is never finished, merely abandoned

                1 Reply Last reply Reply Quote 0
                • K
                  Khal
                  last edited by 12 Jul 2021, 14:49

                  option 2

                  1 Reply Last reply Reply Quote 0
                  • J
                    Jip
                    last edited by 12 Feb 2023, 13:46

                    A few months later, there was something wrong with the implementation of the veterancy system: it could hoard megabytes of worth of tables into memory! Read all about it here:

                    • https://github.com/FAForever/fa/pull/4686

                    A work of art is never finished, merely abandoned

                    T 1 Reply Last reply 18 Feb 2023, 11:41 Reply Quote 6
                    • E
                      Evildrew @Jip
                      last edited by 12 Feb 2023, 15:57

                      @jip said in About the veterancy system:

                      o back to the 'on-kill' notion, where the killer takes the mass value of the killee. This prevents

                      None of the 5 options are optimal.

                      Option 2 would lead to units vetting while fighting each other, a T1 arty hitting a T2 tank might lead to it vetting, a Sam hitting a Start would vet on 1 volley without killing it. Essentially dependent on the situation you get a restructuring of the balance as some units would by default get more HP during the fight while others wouldn't.
                      If you implement some kind of time delay to vet up maybe that would prevent this but i imagine it would cause us having to have allocation tables again.

                      Is it possible to spread 50% of the XP gained from killing a unit in an area defined by a certain size around the unit that got killed, i.e. spreading the XP to an army of units that likely were involved in the fight and giving 50% to the unit who got the kill? This would work for arties and nukes across the map if we really want those to vet and at the same time only give them half vet because if it is an arty war, no xp is received in the area where the unit/buildings are killed.
                      This should also prevent table allocations and is option 6.

                      1 Reply Last reply Reply Quote 0
                      • C
                        Chenbro101
                        last edited by 12 Feb 2023, 16:22

                        I actually like the idea of units vetting while fighting each other. Sounds chaotic. Imagine a monkeylord fighting a gc. Its gonna vet up way faster than the gc.

                        1 Reply Last reply Reply Quote 0
                        • M
                          MeowMure
                          last edited by 13 Feb 2023, 09:34

                          I see that most people are voting for option 2 here, but there are also downsides of giving veterancy to the unit that has not performed a kill yet. For example, you have tele sacu teleporting in your game ender, let's take mavor. They will get veterancy for every shot that they perform. In case of mavor 1 hp costs 28 mass (225K/8K HP). The damage of sera tele sacu is 400 with 400 dps. Which means tele sacu will get an instant veterancy after performing one shot in something very expensive, mavor, yolo, paragon, etc. In the case of the SMD, for example, if you repair it, you will buff the teleporting unit, cause it is gonna get a veterancy as long as you are repairing it. So the teleport is gonna be way to overpowered with an option 2. The same goes for every ACU teleporting into the game ender and not killing them. With an option 2 you are gonna extremely buff the teleport, because the teleporting unit (SACU or ACU) is gonna get a huge buff for every second damaging the target. Therefore I guess the options 3 is better or 4 is also ok. The veterancy should be given for kill, not for a damage delivered. That's my opinion, thanks!

                          1 Reply Last reply Reply Quote 0
                          • B
                            Blade_Walker
                            last edited by 13 Feb 2023, 10:27

                            we can do a combination here :

                            (2) We keep the system but we provide the veterancy when the damage is applied, instead of when the unit dies. This prevents table allocations.

                            veterancy is gained on damage, up to the amount needed for next level -1

                            (3) We go back to the 'on-kill' notion, where the killer takes the mass value of the killee. This prevents table allocations.

                            xp for the unit that gets the kill will allow it to pass the threshold to vet

                            could also do a version where the kill could vet units in a certain close radius

                            this would require some separation of the vet bar from the total mass kill/damaged amount (which we want to keep to see how much value the unit got)

                            i wonder if a small, visual battlefield indicator of units vetting would be worth adding? (yes ex-dota player here)

                            1 Reply Last reply Reply Quote 0
                            • JipJ
                              Jip
                              last edited by 13 Feb 2023, 11:00

                              Note that this is a topic from more than a year ago 🙂 , the original debate is no longer of concern. Just found it interesting to post that there was a few things off with the veterancy-based system after all.

                              i wonder if a small, visual battlefield indicator of units vetting would be worth adding? (yes ex-dota player here)

                              I'm open to this. Do you have a suggestion on an effect to use?

                              A work of art is never finished, merely abandoned

                              B Anachronism_A 2 Replies Last reply 13 Feb 2023, 11:39 Reply Quote 1
                              • B
                                Blade_Walker @Jip
                                last edited by 13 Feb 2023, 11:39

                                @jip said in About the veterancy system:

                                Note that this is a topic from more than a year ago 🙂 , the original debate is no longer of concern. Just found it interesting to post that there was a few things off with the veterancy-based system after all.

                                good to know, seems forum was starting to re-design it again 🙂

                                i wonder if a small, visual battlefield indicator of units vetting would be worth adding? (yes ex-dota player here)

                                I'm open to this. Do you have a suggestion on an effect to use?

                                well originally I was thinking of a brief glisten effect, similar to

                                https://forum.unity.com/threads/ui-text-shine-effect.467346/

                                but - this has been done a lot and would require new graphics

                                a much better faf option would be to use the visuals from units being built, so on vet cybran would display the semi-transparent frame, aeon the metallic form, uef the 3d blueprint, and sera the ghostly shape, for 1 in-game render (should need code only and no new graphics, beyond my skill though!)

                                1 Reply Last reply Reply Quote 0
                                • JipJ
                                  Jip
                                  last edited by 13 Feb 2023, 12:21

                                  I'm not so snappy on changing shaders (temporarily). I was more thinking in lines of an emitter / effect

                                  A work of art is never finished, merely abandoned

                                  1 Reply Last reply Reply Quote 0
                                  • Anachronism_A
                                    Anachronism_ @Jip
                                    last edited by Anachronism_ 13 Feb 2023, 16:53

                                    @jip said in About the veterancy system:

                                    Note that this is a topic from more than a year ago 🙂 , the original debate is no longer of concern. Just found it interesting to post that there was a few things off with the veterancy-based system after all.

                                    i wonder if a small, visual battlefield indicator of units vetting would be worth adding? (yes ex-dota player here)

                                    I'm open to this. Do you have a suggestion on an effect to use?

                                    How about having veternacy symbols appear next to units like some other games do? Maybe something similar to
                                    f105c829-cca3-4e6b-8bfe-26bfa98c586a-image.png
                                    0 vet: no marks
                                    1 vet: 1 gold mark
                                    2 vet: 2 stacked gold marks
                                    3 vet: 3 stacked gold marks
                                    4 vet: 4 stacked gold marks
                                    5 vet: gold star

                                    pfp credit to gieb

                                    ZeldafanboyZ 1 Reply Last reply 13 Feb 2023, 21:34 Reply Quote 0
                                    • ?
                                      A Former User
                                      last edited by 13 Feb 2023, 20:59

                                      There is another option: Remove veterancy.

                                      arma473A 1 Reply Last reply 13 Feb 2023, 21:47 Reply Quote 3
                                      • FtXCommandoF
                                        FtXCommando
                                        last edited by 13 Feb 2023, 21:22

                                        What we need is less incentive to micro anything in this game, it's too heavy on it as it is

                                        1 Reply Last reply Reply Quote 1
                                        • ZeldafanboyZ
                                          Zeldafanboy @Anachronism_
                                          last edited by 13 Feb 2023, 21:34

                                          @penguin_

                                          These look too contemporary, plus any symbols flashing in a big battle on top of projectiles, explosions, and other visual effects might make it too visually cluttered. Maybe at 5 vet a gold star would be ok since its a rare achievement.

                                          put the xbox units in the game pls u_u

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