Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > Civ3-Strategy-Archive > Complete combat rules needed
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Brizey is offline Brizey
Warlord
The Republic of Texas
Apr 2002
time: 23:23
  Old Post 20-11-2002 21:10
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Complete combat rules needed Got spare money?

I am currently working on a combat calculator that will calculate the odds for each outcome of a given combat. To do so I need to know all the combat rules precisely.

Here is what I know:

The combat is divided into rounds. These round continue until one of the following outcomes happens:

-Attacker hp reduced to zero
-Defender hp reduced to zero
-Attacker retreats
-Defender retreats

For each round, the following results are possible:

-Attacker damages defender by one hp
-Defender damages attacker by one hp
-Attacker retreats (if possible)
-Defender reatreats (if possible)

Known: Attacker has a chance to retreat if it has a movement rating > 1 and the defender has a movement rating = 1. The chance of retreating is dependent only on the attackers rank.

Question: I am pretty sure that the attacker can never retreat on the opening round. Also, I am pretty sure that the attacker must have one hp left, and the defender must have more than one. Is this right?

Question: how does defender retreat work? I know that you have to have the defender movement >1 and attacker movement = 1. Does the defender have to have a movement point left? A full movement point? In other words, suppose the defender, a cavalry, had used 2 full movement points plus two road movements the previous turn. Can it retreat into mountains when attacked on the next turn?

Known: Assuming that a retreat did not occur, either the attacker or the defender takes one hp of damage. The chance of the attacker taking damage is:

D/(A+D)

where A=modified attacker attack rating, and D=modified defender defend rating.

Similarly, the chance of a defender taking damage is

A/(A+D).

Let chance of attacker retreat be AR, and chance of defender retreat be DR. If I am right about the rules of defender retreat, then only one of these is not zero. So the chance of retreat is AR+DR.

Now we have all the odds for each round:

Attacker damages defender: A/(A+D)*(1-(AR+DR))
Defender damages attacker: D/(A+D)*(1-(AR+DR))
Attacker retreats: AR
Defender retreats: DR

The modified attack and defense ratings are pretty straightforward. I am aware of that the bonuses are added linearly, not geometrically. I have included things like advantages vs. barbarians based on playing level.

Another question: how does rank effect the combat. Here is what I think I know:

-Higher rank = higher potential hp
-Higher rank = better chance of retreat

Anything else?

I know that this is a bit disjointed, so sorry in advance. Any clarifications and additions are welcome.

By the way, I am only doing it for land battles without armies. Armies seriously complicate things, and are not used as much anyway. I also am not taking into account the artillery shot at this time. I realize that is a shortcoming. Anyone know the rules for it?

alexman is offline alexman
Emperor
Hunt Valley, MD
Jan 1970
time: 00:23
  Old Post 20-11-2002 21:51 Visit alexman's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Inflate your Upload Space

I like your initiative, so I hate to inform you that most of that has already been done. At least without the retreat odds. As for Armies, I once wrote one, but it doesn't deal with armies versus armies.

I'm attaching both in a zip file.

Answers to your questions:
quote:

Question: I am pretty sure that the attacker can never retreat on the opening round. Also, I am pretty sure that the attacker must have one hp left, and the defender must have more than one. Is this right?

The mobile unit (which can be the attacker or the defender) cannot retreat if the other unit has 1HP left, or if the combat started with the mobile unit already at only 1 HP.

quote:

Question: how does defender retreat work?

Exactly like the attacker retreat. The MP left don't matter. The defender can't be fortified to retreat though.

quote:

Another question: how does rank effect the combat. Here is what I think I know:

-Higher rank = higher potential hp
-Higher rank = better chance of retreat

Anything else?

Nothing else, except that elites give leaders.

Attachment: calculators.zip
This has been downloaded 10 time(s).

Brizey is offline Brizey
Warlord
The Republic of Texas
Apr 2002
time: 23:23
  Old Post 20-11-2002 23:47
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Help yourself to an AD-FREE life

a-man:

Thanks!

I was quite sure it had been done before. I am doing it for my own edification. I'm doing an Excel VBA program, with all of the tables in worksheets so that the data can be easily modified for patches and mods, and so that all the source code can be viewed and modified. Also, Excel is ubiquitous and stable.

I will post it here when I am done for comments on, and ridicule of, my spaghetti code.

Haven't looked at your calculators yet, will do so now.

alexman is offline alexman
Emperor
Hunt Valley, MD
Jan 1970
time: 00:23
  Old Post 20-11-2002 23:51 Visit alexman's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

You're welcome.

BTW, the HTML single-unit calculator is not mine (I got if from CivFanatics I think), just the Army one.

Brizey is offline Brizey
Warlord
The Republic of Texas
Apr 2002
time: 23:23
  Old Post 20-11-2002 23:58
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Lose 30 kilos (of popups)

The HTML one seems to be missing several things:

-Artillery shot (still need to dig up the rules for this one!)
-Retreat
-Sub-optimal hit points (previously damaged units)

One of the problems with artillery shot is that you might not know the artillery is there. Since the whole point is to predict the odds of the outcome BEFORE the battle...

It also needs to be updated for PTW.

alexman is offline alexman
Emperor
Hunt Valley, MD
Jan 1970
time: 00:23
  Old Post 21-11-2002 00:05 Visit alexman's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

For previously damaged units, you just use a lower rank unit. Since it doesn't deal with retreat anyway, it's the same.

That calculator doesn't attempt to deal with combined units, so of course there's nothing for artillery...

Also, check CFS to see if they have anything more recent.

Theseus is offline Theseus

Emperor
The warmonger formerly known as rpodos. Gathering Storm! Apolyton Spirit!!
Apr 2002
time: 00:23
  Old Post 22-11-2002 05:37
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Put an end to popups!

Brizey:

PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE....

include Mixed-Unit Armies!!

GhengisFarb is offline GhengisFarb
Deity
I want my HAMBURGERS!!
May 2002
time: 23:23
  Old Post 22-11-2002 06:53 Visit GhengisFarb's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton buy from Amazon

Yes, mixed unit armies. This will be so useful.

alexman is offline alexman
Emperor
Hunt Valley, MD
Jan 1970
time: 00:23
  Old Post 22-11-2002 19:40 Visit alexman's homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Support Apolyton buy from Amazon

quote:
Originally posted by GhengisFarb
Yes, mixed unit armies. This will be so useful.


ArmyCombat.exe in the zip file above.

Brizey is offline Brizey
Warlord
The Republic of Texas
Apr 2002
time: 23:23
  Old Post 26-11-2002 02:34
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Tired of ads?

I have attached my calculator. It is an Excel VBA, which hopefully makes it portable and easy to modify. I plan to clean it up a bit, but it should be functional in its current form. All of the data is stored in worksheets, so it can be modified when playing mods, or if a patch changes standard attributes.

The only tricky Excel stuff is adaptive named ranges using the OFFSET function. (If you are an Excel geek, check out how I did it. It's cool.) Everything else is simple Excel functions and VBA.

Please test this for accuracy. For example, the PTW editor had values for the barbarian bonuses that I thought looked too high.

And please, I am not a pro code slinger, so bear with my poor coding skills. It is not very well commented, but the "AddStatus" function calls tell you what is going on.

It does not yet include artillery shots or armies. Also, it is ground combat only. Give me some time, and I hope ot at least include artillery shots and armies.


EDIT: I HAVE DELETED THIS ATTACHMENT...LOOK DOWN A FEW POSTS FOR THE CORRECT FILE!

Last edited by Brizey on 26-11-2002 at 03:12

Brizey is offline Brizey
Warlord
The Republic of Texas
Apr 2002
time: 23:23
  Old Post 26-11-2002 02:39
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Some more comments:

The "Results by Round" tab shows every possible result of every possible round. Each column of results is every result that could have occured in that round. The "pred" field is the predecessor result to the result in question. In other words, it is a probability tree.

The "Results to Final" tab shows every possible path from the root to an end node through the probability tree.

The "Status" tab tells you what the code was doing as it went about its business. It is mostly for troubleshooting purposes.

This whole thing is intentionally open source. Have at it.

Brizey is offline Brizey
Warlord
The Republic of Texas
Apr 2002
time: 23:23
  Old Post 26-11-2002 03:05
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

Oops! I posted a bad version. Give me a few more hours. This is the one without a fortified bonus!

Last edited by Brizey on 26-11-2002 at 03:11

Brizey is offline Brizey
Warlord
The Republic of Texas
Apr 2002
time: 23:23
  Old Post 26-11-2002 03:09
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Browse Apolyton AD-FREE

...or a few minutes.

USE THIS ONE!

Attachment: brizey civptw ground combat calculator 25nov2002.zip
This has been downloaded 7 time(s).

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:23.
Apolyton Time is 00:23.
    top of page
Rate This Thread:
archivepost
Forum Jump:
Forum 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
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0453 seconds (88.44% PHP - 11.56% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net