June 9, 2002, 02:13
|
#1
|
Prince
Local Time: 20:13
Local Date: October 31, 2010
Join Date: Mar 2002
Location: Illinois USA
Posts: 303
|
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.
|
|
|
|
June 9, 2002, 10:42
|
#2
|
Firaxis Games Programmer/Designer
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Apr 2002
Location: Maryland
Posts: 9,567
|
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.
|
|
|
|
June 9, 2002, 11:27
|
#3
|
Prince
Local Time: 20:13
Local Date: October 31, 2010
Join Date: Mar 2002
Location: Illinois USA
Posts: 303
|
Quote:
|
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.
|
|
|
|
June 9, 2002, 11:31
|
#4
|
Warlord
Local Time: 19:13
Local Date: October 31, 2010
Join Date: Nov 2001
Posts: 236
|
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.
|
|
|
|
June 9, 2002, 13:31
|
#5
|
Emperor
Local Time: 21:13
Local Date: October 31, 2010
Join Date: May 2001
Location: flying too low to the ground
Posts: 4,625
|
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
|
|
|
|
June 9, 2002, 13:56
|
#6
|
Firaxis Games Programmer/Designer
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Apr 2002
Location: Maryland
Posts: 9,567
|
Quote:
|
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.
|
|
|
|
June 9, 2002, 15:22
|
#7
|
Warlord
Local Time: 19:13
Local Date: October 31, 2010
Join Date: May 2002
Location: Colorado, USA
Posts: 115
|
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.
|
|
|
|
June 9, 2002, 15:27
|
#8
|
King
Local Time: 21:13
Local Date: October 31, 2010
Join Date: Sep 1999
Posts: 1,657
|
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.
|
|
|
|
June 9, 2002, 16:12
|
#9
|
Princess
Local Time: 03:13
Local Date: November 1, 2010
Join Date: Apr 2002
Location: Edinburgh, Scotland
Posts: 541
|
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
|
|
|
|
June 9, 2002, 21:13
|
#10
|
Prince
Local Time: 20:13
Local Date: October 31, 2010
Join Date: Mar 2002
Location: Illinois USA
Posts: 303
|
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!!!
|
|
|
|
June 9, 2002, 22:42
|
#11
|
King
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Dec 2001
Location: U.S.A.
Posts: 1,194
|
Quote:
|
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.  )
|
|
|
|
June 10, 2002, 00:11
|
#12
|
Settler
Local Time: 18:13
Local Date: October 31, 2010
Join Date: May 2002
Location: Secret Empire of N.O.D.
Posts: 5
|
Hey, nobody said you had to read this. Wait-
|
|
|
|
June 10, 2002, 08:36
|
#13
|
King
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Philly
Posts: 2,961
|
Quote:
|
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
|
|
|
|
June 10, 2002, 08:51
|
#14
|
Prince
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Mar 2002
Location: Philadelphia, PA
Posts: 978
|
Quote:
|
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.
|
|
|
|
June 10, 2002, 08:53
|
#15
|
Emperor
Local Time: 21:13
Local Date: October 31, 2010
Join Date: Feb 2002
Location: Back in BAMA full time.
Posts: 4,502
|
Quote:
|
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.
|
|
|
|
June 10, 2002, 11:12
|
#16
|
King
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Dec 2001
Location: U.S.A.
Posts: 1,194
|
Quote:
|
Originally posted by SpencerH
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.
|
Unlike the tank v. spearman debate, the situation you described is a very possible outcome. Indeed, by the age of rifle, cavalry were relegated to supporting roles only.
In any case, you can mod the combat values.
|
|
|
|
June 10, 2002, 11:29
|
#17
|
Prince
Local Time: 20:13
Local Date: October 31, 2010
Join Date: Mar 2002
Location: Illinois USA
Posts: 303
|
Quote:
|
Originally posted by SpencerH
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.
|
My money is on the rifleman too. Now had you lost 2 cav to a spearman, that would be bad. Was the rifleman fortified? what terrain? behind a river?
|
|
|
|
June 10, 2002, 11:59
|
#18
|
King
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Sep 2001
Location: Philly
Posts: 2,961
|
Quote:
|
Originally posted by dunk999
Ugh, if I have to do this with all my units, I'm going to come punch you people in the nose.
|
Uh oh. And you live close enough to me to do that.
Seriously though, I just wanted the option to select primary defenders (or maybe a class of unit(s) that can be flagged in-game as primary defenders for your civ). If you make no choice, let the current rules prevail.
__________________
"Stuie has the right idea" - Japher
"I trust Stuie and all involved." - SlowwHand
"Stuie is right...." - Guynemer
|
|
|
|
June 10, 2002, 12:54
|
#19
|
Emperor
Local Time: 21:13
Local Date: October 31, 2010
Join Date: Feb 2002
Location: Back in BAMA full time.
Posts: 4,502
|
Quote:
|
Originally posted by Zachriel
Unlike the tank v. spearman debate, the situation you described is a very possible outcome.
|
The only way that outcome occurs is if the conscript riflemen wins 10 rounds of combat in a row (which it did)
Quote:
|
Indeed, by the age of rifle, cavalry were relegated to supporting roles only.
|
Gotta disagree there. The civ3 rifleman represents something from the 17 to late 1800's. Prior to the use of modern cartridge ammunition that allows a more rapid rate of fire, calvary remained highly effective as shock troops especially against unfortified units on open ground.
Quote:
|
In any case, you can mod the combat values.
|
I know I can mod the values, but it tends to skew the results so that the outcome becomes guaranteed. IMO there is something faulty with the combat calculation system (I just dont know what) and I'm tired of fiddling with it.
|
|
|
|
June 10, 2002, 12:54
|
#20
|
Emperor
Local Time: 21:13
Local Date: October 31, 2010
Join Date: Mar 2001
Location: mmmm sweet
Posts: 3,041
|
It would be a nice option, but the unit with the highest hit points gets selected... just another little bell and whistle that Firaxis didn't bother to think about.
|
|
|
|
June 10, 2002, 13:15
|
#21
|
Prince
Local Time: 20:13
Local Date: October 31, 2010
Join Date: Mar 2002
Location: Illinois USA
Posts: 303
|
Quote:
|
Originally posted by SpencerH
The only way that outcome occurs is if the conscript riflemen wins 10 rounds of combat in a row (which it did)
|
Thats one thing that irks me about the randon number generator is that it seems to frequently cluster numbers. Its seems to me that the defender or attacker will win rounds in succession. I lost an elite swordsman (6a/8hp) to an unfortified on grass vet archer (2d/6hp) after the archer was down to its last HP and the swordsman had all its left. So the swordsman won 5 rounds in a row, then lost 8 in a row. If the random generator was truly random, there's very little chance the swordsman could lose that many in a row considering the odds. I dont mind losing the unit but its seems fishy to me how often combat follows that trend with one unit winning many in a row, then losing many in a row. BTW, I've also been the benefactor in some cases so i doubt its an AI advantage.
|
|
|
|
June 10, 2002, 13:33
|
#22
|
Emperor
Local Time: 21:13
Local Date: October 31, 2010
Join Date: Feb 2002
Location: Back in BAMA full time.
Posts: 4,502
|
Quote:
|
Originally posted by ALPHA WOLF 64
Thats one thing that irks me about the randon number generator is that it seems to frequently cluster numbers. Its seems to me that the defender or attacker will win rounds in succession. I lost an elite swordsman (6a/8hp) to an unfortified on grass vet archer (2d/6hp) after the archer was down to its last HP and the swordsman had all its left. So the swordsman won 5 rounds in a row, then lost 8 in a row. If the random generator was truly random, there's very little chance the swordsman could lose that many in a row considering the odds. I dont mind losing the unit but its seems fishy to me how often combat follows that trend with one unit winning many in a row, then losing many in a row. BTW, I've also been the benefactor in some cases so i doubt its an AI advantage.
|
Thats really what I'm talking about and I agree it works both ways. My point isnt the spearman-tank debate per se, but about the algorithim used to select the "random" numbers
|
|
|
|
June 10, 2002, 13:50
|
#23
|
King
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Dec 2001
Location: U.S.A.
Posts: 1,194
|
Quote:
|
Originally posted by SpencerH
The only way that outcome occurs is if the conscript riflemen wins 10 rounds of combat in a row (which it did)
|
A quick check of the civulator reveals that the chance of losing with two elite cavalry v. one conscript rifleman is 1/7, fortified 1/5, fortified behind a river, 1/4. A good chance of success, but far from certain.
http://www.columbia.edu/~sdc2002/civulator.html
Quote:
|
Gotta disagree there. The civ3 rifleman represents something from the 17 to late 1800's. Prior to the use of modern cartridge ammunition that allows a more rapid rate of fire, calvary remained highly effective as shock troops especially against unfortified units on open ground.
|
Undoubtedly, there are many interpretations of what constitutes a "rifleman" in the context of the game. But for an example, the American Civil War was fought primarily with smooth-bore muskets. During the war, cavalry was used primarily for recon and disruption. They were rarely effective in direct fighting against infantry.
|
|
|
|
June 10, 2002, 14:13
|
#24
|
Emperor
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Apr 2002
Location: The warmonger formerly known as rpodos. Gathering Storm!
Posts: 8,907
|
1. Thanks Zachriel, you beat me to the punch. Gotta love those guys at Columbia. I dunno about the RNG being flawed... I get streaks at blackjack too.
2. Can we say Waterloo? Cav charges on infantry, of any kind, must've been awesome to watch, but they've been checked since Crecy.
__________________
The greatest delight for man is to inflict defeat on his enemies, to drive them before him, to see those dear to them with their faces bathed in tears, to bestride their horses, to crush in his arms their daughters and wives.
Duas uncias in puncta mortalis est.
|
|
|
|
June 10, 2002, 14:27
|
#25
|
Emperor
Local Time: 21:13
Local Date: October 31, 2010
Join Date: Feb 2002
Location: Back in BAMA full time.
Posts: 4,502
|
Quote:
|
Originally posted by Zachriel
A quick check of the civulator reveals that the chance of losing with two elite cavalry v. one conscript rifleman is 1/7, fortified 1/5, fortified behind a river, 1/4. A good chance of success, but far from certain.
http://www.columbia.edu/~sdc2002/civulator.html
|
Each cav has only a 14% chance of losing. The chance for two elites in a row would be .14x.14 = pretty darn small, but not if the "random numbers" are not random.
Quote:
|
Undoubtedly, there are many interpretations of what constitutes a "rifleman" in the context of the game. But for an example, the American Civil War was fought primarily with smooth-bore muskets. During the war, cavalry was used primarily for recon and disruption. They were rarely effective in direct fighting against infantry.
|
I tend to think of the American civil war as the first "modern" war where cavalry were not used as shock troops. Calvary were used effectively as shock troops during the Napoleonic era and in India until at least the mutiny (1857).
|
|
|
|
June 10, 2002, 14:29
|
#26
|
Emperor
Local Time: 21:13
Local Date: October 31, 2010
Join Date: Feb 2002
Location: Back in BAMA full time.
Posts: 4,502
|
Quote:
|
Originally posted by Theseus
2. Can we say Waterloo? Cav charges on infantry, of any kind, must've been awesome to watch, but they've been checked since Crecy.
|
At Waterloo the British Heavy Cav routed a French Division during its charge.
|
|
|
|
June 10, 2002, 15:06
|
#27
|
King
Local Time: 18:13
Local Date: October 31, 2010
Join Date: Mar 2000
Location: & Anarchist
Posts: 1,689
|
1.7% chance of that rifleman winning in the open on grasslands, assuming it was fully healthy and not promoted after the first combat (or lost one hp then promoted to get it back).
3.8% if fortified or river.
6.6% if fortified and river.
If it was undamaged after the first and promoted the numbers become: 3.6%, 7.2%, and 11.7% respectively.
Not to much of a stretch if you are not paying attention to the details on the second sitch.
__________________
Fitz. (n.) Old English
1. Child born out of wedlock.
2. Bastard.
|
|
|
|
June 10, 2002, 15:38
|
#28
|
King
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Dec 2001
Location: U.S.A.
Posts: 1,194
|
Quote:
|
Originally posted by SpencerH
Each cav has only a 14% chance of losing. The chance for two elites in a row would be .14x.14 = pretty darn small, but not if the "random numbers" are not random.
|
(Yes, that is per each elite cavalry. Thanks for the clarification.)
So each roll is much like the roll of a six-sided die. So losing two would be similar to rolling "craps," i.e. two ones. So to eliminate complaints about ridiculous results, should we eliminate "craps" from "craps" and filling inside straights from poker?
|
|
|
|
June 10, 2002, 16:07
|
#29
|
King
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Dec 2001
Location: U.S.A.
Posts: 1,194
|
Quote:
|
Originally posted by SpencerH
At Waterloo the British Heavy Cav routed a French Division during its charge.
|
In the Civ3 paradigm, cavalry generally defeats muskets, but are usually stopped by riflemen.
|
|
|
|
June 10, 2002, 16:10
|
#30
|
Prince
Local Time: 22:13
Local Date: October 31, 2010
Join Date: Mar 2002
Location: Philadelphia, PA
Posts: 978
|
Quote:
|
Originally posted by Stuie
Uh oh. And you live close enough to me to do that.
Seriously though, I just wanted the option to select primary defenders (or maybe a class of unit(s) that can be flagged in-game as primary defenders for your civ). If you make no choice, let the current rules prevail.
|
I understand your point, but I don't want to have any more micromanagement of units. This will make the late-game even more tedious.
I'll just ride right up that R5 and punch you.
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
All times are GMT -4. The time now is 22:13.
|
|