Announcement

Collapse
No announcement yet.

How are defensive units picked

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How are defensive units picked

    I'm having trouble with my mod because the wrong units keep getting picked for defense. Some background, vets are 6HP, regs are 4HP, and archers have bombard 1b/0r. I have a vet archer (4a/3d) and a reg spearman(2a/4d) both fortified in a city behind a river being attacked by an elephant(6a/3d). The archer keeps being chosen as the prime defender. With the archer getting a free shot, the spearman is a far better logical choice. Does anyone know the equation used to determine which defender will be first? This knowledge will help me balance A/D values for the mod i'm working on with Harlan.

  • #2
    From my experience, the HP value is always tops. That always forces me to pump out a defender unit from a city with a barracks for my attacks since I don't want one of my veteran attackers to lose to one of the enemy's units.

    Comment


    • #3
      Originally posted by Trip
      From my experience, the HP value is always tops. That always forces me to pump out a defender unit from a city with a barracks for my attacks since I don't want one of my veteran attackers to lose to one of the enemy's units.
      I dont think HP alone does it. My elite warriors take backseats to my vet spearmen.

      Comment


      • #4
        As far as I know the first defender will be whatever unit has the best chance of winning the battle. This often leads to illogical choices when you have several units on the same square. If you have one good defender and several weak ones, it would be better to let the attacker waste his most powerful units to kill off your junk. Ideally the defender should be able to choose which unit gets attacked. Like in Axis and Allies.

        Comment


        • #5
          there should be a "selected defender" option. you should be able to tell a unit to be at the top of the stack defending.

          first off, this would allow you to throw warriors on top of a stack just to serve as suicide troops.

          secondly, i always HATE it when an infantry is weakened, and a calvary or knight steps up to defend. i wish i could classify them as "offensive" and "defensive" units, and the "defensive" units completely DIED before the "offensive" units have to defend.

          note, i dont want it to be hard coded classification. i want to do it
          "I've lived too long with pain. I won't know who I am without it. We have to leave this place, I am almost happy here."
          - Ender, from Ender's Game by Orson Scott Card

          Comment


          • #6
            Originally posted by UberKruX
            there should be a "selected defender" option. you should be able to tell a unit to be at the top of the stack defending.

            first off, this would allow you to throw warriors on top of a stack just to serve as suicide troops.

            secondly, i always HATE it when an infantry is weakened, and a calvary or knight steps up to defend. i wish i could classify them as "offensive" and "defensive" units, and the "defensive" units completely DIED before the "offensive" units have to defend.

            note, i dont want it to be hard coded classification. i want to do it
            Very good idea. Hopefully Firaxis sees this and can impliment it, since it won't be too hard. I can name too, too many times when I've had my elite knight destroyed by an enemy Longbowman, or whatnot, when there was a conscript Pikeman just sitting there.

            Comment


            • #7
              This is a logic flaw (or if you want to call it "a bug") in the defender algorithm that has been implemented by Firaxis.

              The code uses the the D value of the unit AND the number of hit points to determine a defensive strength.

              In the current code, an army of three elite cavalry units at defense value of 3 is rated as a better defender than regular or veteran riflemen that may be stacked with the cavalry but have a D value of 6.

              The current code does not consider whether the unit has been classified as "Defensive" or "Offensive" under the AI strategy rules, and that discrepency should be fixed.

              The current code also does not consider the bombardment strengths of a unit as an added value in the defensive value calculations. As an example if you define two types of archers, one with a/d/m values of 2/2/1 (sorta like the bowman) and the other archer with a/d/m values of 2/1/1 but with bombardment strength of 20, range of 3, and rate of fire of 8, If the costs are the same and the only strategy that is checked in the editor is offense, then the AI player will chose the 2/2/1 archer as the build unit of choice instead of picking the unit with the killer bombardment juice.

              Hopefully both of these issues will get balance in an upcoming patch to the AI even though multiple human players will give these features value even if the AI cannot respond. The reason these strategy updates keep being important is that even in the multi-player games there will stille be the opportunity to have AI players in the games and it would be nice if they were more than just glorified barbarian camps with culture garnish.

              Comment


              • #8
                You could designate defenders in SMAC. They could easily implement it and I have asked for it repeatedly.

                I am sure they could come up with some reason for not implementing it. What I don't understand is why they don't respond to these things. They could easily say, well, its on our list of things to consider, or, we have looked at it and it isn't going to be done for reason .

                Instead they ignore and up goes the frustration level here. Typical Firaxis pr.

                Now some choirboy can post "they are under no obligation to read this forum jt, much less tell you squat". But in truth, they do read, they do keep a list of things requested, they just don't communicate with us.

                Comment


                • #9
                  jt, maybe they just don't have time to follow every thread, because they are busy designing / programming or follow their normal lifes outside work.

                  And maybe they just don't want to answer some posts, because they get annoyed by the poster

                  Comment


                  • #10
                    JT,
                    Unless you've seen the code, you are TOTALLY ill-equiped to say what is or isnt an easy code change. After the chat with the firaxis guys the other night, I realized that alot of the "easy" fixes arent so easy because of the way the code was designed. I've been designing code for 24 years and the arrogance of users never ceases to amaze me.
                    As far as no one from Firaxis answering this.....its the WEEKEND and maybe THEY have lives! Get a clue....geeeez!!!

                    Comment


                    • #11
                      Originally posted by UberKruX
                      there should be a "selected defender" option. you should be able to tell a unit to be at the top of the stack defending.
                      The probable reason it was not included is due to the impact on gameplay. Every combat would require an additional decision, plus point and click. Being a strategy game, the suggested tactical option would not necessarily advance the storyline. As it stands, those decisions are made by field commanders.

                      (Not that I would be averse to any changes that may be introduced. )

                      Comment


                      • #12
                        Hey, nobody said you had to read this. Wait-

                        Comment


                        • #13
                          Originally posted by Zachriel
                          The probable reason it was not included is due to the impact on gameplay. Every combat would require an additional decision, plus point and click.
                          It wouldn't have to be done at the point of combat. We should be able to designate units as primary defender(s), and when combat occurs they would be used first. If a designated unit is not present, the game would fall back on the current logic.

                          I'm not saying this would be easy to code, but it definitely would be nice to have.
                          "Stuie has the right idea" - Japher
                          "I trust Stuie and all involved." - SlowwHand
                          "Stuie is right...." - Guynemer

                          Comment


                          • #14
                            Originally posted by Stuie

                            It wouldn't have to be done at the point of combat. We should be able to designate units as primary defender(s), and when combat occurs they would be used first. If a designated unit is not present, the game would fall back on the current logic.

                            I'm not saying this would be easy to code, but it definitely would be nice to have.
                            Ugh, if I have to do this with all my units, I'm going to come punch you people in the nose.

                            Comment


                            • #15
                              Originally posted by cracker

                              The code uses the the D value of the unit AND the number of hit points to determine a defensive strength.

                              In the current code, an army of three elite cavalry units at defense value of 3 is rated as a better defender than regular or veteran riflemen that may be stacked with the cavalry but have a D value of 6.
                              Interesting post. I wonder what other logic flaws are incorporated in the combat? I've given up playing the game for now mostly because of the bizarre combat results i.e. my two elite cav attack a conscript riflemen in open ground and lose. Sure its statistically possible, but it ruins the game for me.
                              We need seperate human-only games for MP/PBEM that dont include the over-simplifications required to have a good AI
                              If any man be thirsty, let him come unto me and drink. Vampire 7:37
                              Just one old soldiers opinion. E Tenebris Lux. Pax quaeritur bello.

                              Comment

                              Working...
                              X