Announcement

Collapse
No announcement yet.

Unit Abilities

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

  • #46
    Sure.. you use simple conditions to check for a limited number of situations which provide advantage or penalty, based on the very specific unit bonuses per terrain, in the game file, as shipped.

    If you want the engine to adapt to a flexible bonus, which a player changes, then you need to calculate it dynamically... which is costly.

    You could save a tiny bit by using a flat modifier instead of a coefficient, in the final weighting, but you'd need to assume X units, for that approach, and if there are more or less in a particular defense or attack, that will lead to poor technique by the AI.

    Comment


    • #47
      [QUOTE] Originally posted by wrylachlan
      My point was that given two 2-Move units, 1 with the wheeled flag, one without, the pathing algorithm needs to be run twice, since rivers, mountains, etc. may make their potential ranges different. Therefore there is already code in the system that says "hey, does this unit have any special movement flags that would cause me to have to redo the pathing algorithm, or can I reuse the results from the other unit with the same movement points."[/q]

      No, it runs the pathing algorithm once, for the slowest MP in the stack and whether or not there's a wheeled unit in the stack (if it runs it once for each unit in the stack, it's poorly designed).

      Any terrain specific movement bonus would simply include a similar flag.


      No, because you can't just say "worst unit" like you can "worst move".

      Comment


      • #48
        Originally posted by skywalker No, it runs the pathing algorithm once, for the slowest MP in the stack and whether or not there's a wheeled unit in the stack (if it runs it once for each unit in the stack, it's poorly designed).
        Any terrain specific movement bonus would simply include a similar flag.
        No, because you can't just say "worst unit" like you can "worst move".
        We have no way to know whether you're right or not without looking at the code, but the mechanism you're suggesting doesn't make sense. If it looks at the worst MP in a stack, what happens in a mixed stack with cannon and cavalry? If it used the same algorithm for cavalry as it used for cannons, then you would be safe from that stack by simply staying 2 tiles, which isn't the case. I've often seen the AI split its stacks, advancing cavalry in front of cannons to take advantage of a target of oportunity.

        Thus obviously, at the very least, it runs the pathing algorithm once for each MP value in the stack. Which doesn't mean for each unit, since all 1 MP units can reuse the same pathing, as can all the 2MP units, etc. The exception to this is wheeled units. Given 2 units of the same MP one wheeled, the other not, it has to run the pathing algorithm twice.

        But this doesn't mean a drastically larger amount of runs. Since there are no 1 MP wheeled units, and the Max MP in the epic game is 3, you have at most 5 runs per stack for a stack of unlimited size.

        Comment


        • #49
          Originally posted by wrylachlan
          We have no way to know whether you're right or not without looking at the code, but the mechanism you're suggesting doesn't make sense. If it looks at the worst MP in a stack, what happens in a mixed stack with cannon and cavalry? If it used the same algorithm for cavalry as it used for cannons, then you would be safe from that stack by simply staying 2 tiles, which isn't the case. I've often seen the AI split its stacks, advancing cavalry in front of cannons to take advantage of a target of oportunity.
          Different groupings of units with different movement rates/types would each use an independent search. The threat matching system might choose to split a group of units off, which then becomes an independent group.

          Thus obviously, at the very least, it runs the pathing algorithm once for each MP value in the stack. Which doesn't mean for each unit, since all 1 MP units can reuse the same pathing, as can all the 2MP units, etc. The exception to this is wheeled units. Given 2 units of the same MP one wheeled, the other not, it has to run the pathing algorithm twice.

          But this doesn't mean a drastically larger amount of runs. Since there are no 1 MP wheeled units, and the Max MP in the epic game is 3, you have at most 5 runs per stack for a stack of unlimited size.
          You're forgetting roads, and railroads. A value rather than flags would be necessary to deal with these. Also pathfinding algorithms use recursion, and the only parameter that makes sense of this would be a value, rather than a flag.

          Comment


          • #50
            Originally posted by MrBaggins You're forgetting roads, and railroads. A value rather than flags would be necessary to deal with these. Also pathfinding algorithms use recursion, and the only parameter that makes sense of this would be a value, rather than a flag.
            I think you're missing what I'm saying. The flag is merely to tell the AI whether it needs to re-run the algorithm. Correct me if I'm wrong, but I imagine the AI checks the units in a stack in order. Say the first one is a 2 MP unit. It runs the pathing algorithm for 2MP. It gets to the second unit. If the second unit is also 2MP, it knows that unless this is a wheeled unit, it doesn't have to re-run the algorithm. So it checks the wheeled flag. If the unit is not wheeled, it reuses the 1st unit's run of the algorithm. If the second unit is wheeled, it does a seperate run. From that point on, if it finds another 2MP non-wheeled unit, it reuses the first run. If it finds a 2MP wheeled unit, it reuses the second run.

            Comment


            • #51
              Kind of.

              The identifiable data for units is listed here

              Some info we'd be interested in would be

              4 long movement

              and a number of the unit abilities... for example

              4 long unit abilities (binary):
              00000000
              wheeled .......1
              cruise missile ....1...
              all terrain as roads ...1....

              and
              4 long class 0=land, 1=sea, 2=air



              It would group by movement categories FIRST, then by move rate. It wouldn't assume that a unit with a wheeled flag necessarily had a certain number of move points, its a limitation on movement.

              If the AI decides that it wishes to keep the grouping together, for defensive purposes, then it may limit a longer range subgroups move to the slowest movement.
              Last edited by MrBaggins; February 11, 2004, 13:15.

              Comment


              • #52
                On perpetual flight, no need-and besides, that is not how planes work. If you want to set up a type of satellite, just make an air unit with unlimited range (like an ICBM) with the ability to recon: that way, you can recon any part of the map at all.

                Probalby very usefull.
                If you don't like reality, change it! me
                "Oh no! I am bested!" Drake
                "it is dangerous to be right when the government is wrong" Voltaire
                "Patriotism is a pernecious, psychopathic form of idiocy" George Bernard Shaw

                Comment


                • #53
                  Speaking of air, does anyone have a detailed explanation of the air model as used in civ3? I must admit that I haven't played it enough to successfully reach that era.
                  The sons of the prophet were valiant and bold,
                  And quite unaccustomed to fear,
                  But the bravest of all is the one that I'm told,
                  Is named Abdul Abulbul Amir

                  Comment


                  • #54
                    Re: Unit Abilities

                    Originally posted by Seeker
                    6. Transport Helicopter/ Cargo Plane: can carry trade units, 2 paratroops.
                    My first reaction was: just make a paratroop unit that can drop.

                    Then I thought: why? What so special about paradropping?
                    (\__/) 07/07/1937 - Never forget
                    (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
                    (")_(") "Starting the fire from within."

                    Comment


                    • #55
                      Originally posted by GhengisFarb
                      If the AI can handle the fact that units have a defensive bonus on a Mountain tile they should be able to handle the terrain specific bonuses also.
                      A lot of people are still forgetting that a turn is at least a year in Civ. We are not talking about days or weeks. Any sort of terrain movement bonus is meaningless on this scale.
                      (\__/) 07/07/1937 - Never forget
                      (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
                      (")_(") "Starting the fire from within."

                      Comment


                      • #56
                        Originally posted by Urban Ranger A lot of people are still forgetting that a turn is at least a year in Civ. We are not talking about days or weeks. Any sort of terrain movement bonus is meaningless on this scale.
                        When you play civ you have to accept that the time scale is not going to be realistic. A unit that used to take 5 years to move 1 tile, then next turn takes just 1 year to make the same move. What is more important is the relative movement. If we accept that for game play reasons a tank moves 2 tiles per turn on grassland, what should be its relative movement on hills? Mountains? And if we accept that a regular infantry unit moves 1 tile in mountains, is it outrageous to think that there might be a special forces type unit that might move faster in the mountains?

                        Seriously. People who get their underwear in a bunch over "a tile is x km wide" or "that unit could move many more km in a year" need to just get over it.

                        Comment


                        • #57
                          True, civ is abstracted, I really don't see the problem with that and with movement. Why must we dither over too many details of that sort

                          If Civ wasn't abstracted, it wouldn't be civ- it would be a wargame
                          -->Visit CGN!
                          -->"Production! More Production! Production creates Wealth! Production creates more Jobs!"-Wendell Willkie -1944

                          Comment


                          • #58
                            Originally posted by wrylachlan
                            Seriously. People who get their underwear in a bunch over "a tile is x km wide" or "that unit could move many more km in a year" need to just get over it.
                            What's your point? Are you arguing that more anomalies should be added?
                            (\__/) 07/07/1937 - Never forget
                            (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
                            (")_(") "Starting the fire from within."

                            Comment


                            • #59
                              Originally posted by Urban Ranger


                              What's your point? Are you arguing that more anomalies should be added?
                              If they help gameplay? Sure. Absolutely. No contest. F*ck reality.

                              [ok]
                              [ok]

                              "I used to eat a lot of natural foods until I learned that most people die of natural causes. "

                              Comment


                              • #60
                                Originally posted by Urban Ranger What's your point? Are you arguing that more anomalies should be added?
                                No. I'm saying that what's important is cutting down on the relative anomalies. We've already accepted the anomaly that it takes an infantry unit a full year to walk 55km in the mountains. But to say that a special forces unit is incapable of covering more ground in the same amount of time is itself an anomaly.

                                What's important for game play is not the absolute realism, but the gameplay realism of each unit in relation to each other.

                                And over and above that, realism makes the game fun to play. But interesting strategic game mechanics also make games fun to play. So if the amount of strategic fun an anomaly adds, outweighs the loss of realism, by all means I'll argue that more anomalies should be added.

                                Comment

                                Working...
                                X