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 > Scenario League / Civ2-Creation -Archive > The wheel reinvented: a combat probability calculator
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
Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:14
  Old Post 19-07-2001 09:06 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
The wheel reinvented: a combat probability calculator Support Apolyton, buy Civilization 2

I've written an Excel spreadsheet that calculates the probability of an attacker winning a battle. I know it's been done before (at least one program was written by Mark Wagner), but I needed to brush up on my VBA for work, and this was my idea of fun.

Hopefully, a screenshot accompanies this post. If not, could someone explain how to upload c:\games\mps\oddscalc\scrndump.gif (76k) from my hard disk?

The algorithm is a direct unmodified transposition from Marquis de Sodaq's writeup in the Apolyton GL found here: http://www.apolyton.net/forums/Foru...L/001944.html?6 .

From the posts, the algorithm seemed fairly sophisticated and did pretty well in predicting combat results with a variety of units.

The interface for the Excel 2000 workbook is a dialog asking for pertinent information. Besides the standard input for Af, Df, Hp, Fp, and terrain modifiers, it also has toggles for things such as vet status, entrenchment, coastal fortresses, pikeman special, fighter scramble, sneak attack, etc.

If you're interested, here's where I could use some help.

1) Where and how can I post this xls file? I could use some testing/feedback.

2) Is the algorithm by Buenos, Eggman, & Marquis de Sodaq, et al. generally accepted as accurate? I know it doesn't handle 0 Df situations, but it seems pretty good otherwise.

3) If I've overlooked a more thorough program written by someone else that does the same thing, let me know (gently).

Thanks

Attachment: scrndump.gif
This has been downloaded 219 time(s).

master on high is offline master on high
King
San Francisco
Apr 1999
time: 05:14
  Old Post 19-07-2001 19:07
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Increase the size of your Attachments

that looks like an interesting little program...I'm not sure if people have made that before...but it would certainly come in handy for certain situations in scenario design. Testing unit statistics before implementing them into the game would be a nice little addition.

Zip the xls file and attatch it to your post.

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:14
  Old Post 19-07-2001 21:13 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

MoH, thanks for the tip. The zip should be attached.

As for my lack of reading the fine print about attached file extensions -- well I do have an appointment with an eye doctor today.

Attachment: oddscalc.zip
This has been downloaded 30 time(s).

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:14
  Old Post 19-07-2001 21:20 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Another screen shot Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Here's a closer view of the main dialog. Let me know if you see errors in the modifiers. It's far from ideal -- e.g. doesn't check attacker fp/hp before enabling/disabling the checkbox for the pikeman special.

Attachment: dlgdump.gif
This has been downloaded 195 time(s).

Marquis de Sodaq is offline Marquis de Sodaq
King
... no, a Marquis.
Jul 2000
time: 23:14
  Old Post 19-07-2001 22:06 Visit Marquis de Sodaq's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Woo Hoo! Enter the AD-FREE zone

I'm not sure you've reinvented the wheel - mine is still in parts, yet to roll. I, too, started to make a VB combat calculator, but have just not had the time to finish it. The old Mark Wagner program uses math that has not held up to testing. Freshman recently posted in the CivII Strategy forum his work compiling tables of the results using the math you use.

I will download it from home later and have a look. Two suggestion I can make from the screenshots:

1) Verify the multipliers. I see you have 2x next to city walls, but this is actually 3x. Some differ from what the manual tells you. See my loooong thread for all that has been discussed!

2) Maybe provide a way for the user to enter hit points manually. Scenario designers might want to use damaged units. For example, a half-dead unit with 5 hp instead of the full 10 used in calculation (1hp unit). Entering a value would allow odds for these situations.

Some modifiers change firepower, others work only in certain situations. It will take much number validation to include all variables. If you feel ambitious, you'd need to include unit domain, type, and others. In VB, I've taken the approach to have pull down unit selection, the hp/fp/domain values were entered automatically (I hadn't planned to account for damaged units, either ). Terrain, barbarian status, etc, are check boxes that modify the unit's values.

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:14
  Old Post 20-07-2001 02:35 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Tired of ads?

Marquis, I was hoping that you would see this! Couldn't email you prior to posting -- you've disabled that option. Any chance you could email your reaction to the address in the file? Particularly your thoughts on the cells that implement Euclid's equation.

If you've a program close to release, just let me know. I'll stop public development and posting of this one -- you know much more of the combat details that I do.

1) I'll review the modifiers later tonight. Most were done from memory during a moment of programming frenzy.

2) Partial Hp's is a great idea. I'll try to incorporate it.

As far as approaches, I originally intended this as a development tool. Designer's could plug in 'what-if' values. As you have no doubt concluded, hard-coded unit and terrain values aren't very useful for a scenario designer.

Your solution may be to write some code to open and read a user-selected rules.txt. That's a possible future step for me, but my initial aim is more modest: get the main engine debugged first. Same applies for domain, type, and specials checking.

Thanks for the suggestions

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:14
  Old Post 21-07-2001 06:36 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Improved Version Suffering from ads?

This version has many of Marquis' suggestions incorporated (thanks!). These include:

(1) Hit point effects (e.g. fighter vs. helo, ship vs land)

(2) More modifiers. These have been doublechecked to be in agreement with the GL thread.

(3) Results match those posted in the GL thread.

The zipped attachment is 55k.

Screenshot will be shown in next post

Attachment: oddscalc.zip
This has been downloaded 22 time(s).

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:14
  Old Post 21-07-2001 06:40 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Screenshot of improved version Full PM-box? Change here!

btw Will this work on a Mac? MS documentation seems to imply that it should.

Attachment: scrndump.gif
This has been downloaded 160 time(s).

Marquis de Sodaq is offline Marquis de Sodaq
King
... no, a Marquis.
Jul 2000
time: 23:14
  Old Post 22-07-2001 02:31 Visit Marquis de Sodaq's homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Browse Apolyton AD-FREE

For anybody interested in learning everything there is to know about CivII combat, my summary thread has moved. It is now in the CivII Strategy forum at

Info: Combat (GL)

The text has been updated for the first time in two months.

Henrik is offline Henrik
Emperor
The European Union, Sweden, Lund
Dec 2000
time: 06:14
  Old Post 22-07-2001 11:44 Visit Henrik's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton buy from Amazon

quote:

btw Will this work on a Mac? MS documentation seems to imply that it should.

Maybe I am doing something wrong, but all I get when I press the "Calculate" buttons is a small window whit two buttons which will seemingly calculate the odds, I press the one titled odds and suddenly I have two error messages instead

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:14
  Old Post 22-07-2001 18:26 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Support Apolyton

Henrik, thanks for the feedback.

You should get the small window. Since I've used this when Civ2 is running, I didn't want it to take up screen real estate except when inputting data. The two error messages are a obviously a bug. A larger dialog like the one posted should appear.

Quote the error messages, and I'll try to solve it.

Which version of Excel are you using?

SlowThinker is offline SlowThinker
King
homeless, Praha, Czech Republic
Jan 2000
time: 06:14
  Old Post 11-06-2002 02:55 Visit SlowThinker's homepage!
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Boco, where is the new version (the version that came from our debate)?

In the thread Everything you want to know about CivII combat ?

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:14
  Old Post 11-06-2002 07:29 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Full PM-box? Change here!

ST, our 'debate' (more like the education of Boco ) had many stages, but I think the attached version contained much that you suggested. I've since modified it for use with a scenario I'm working on, but I don't think I wrote much more code.

It is missing a few of the discoveries made since last September, such as the lack of a firepower criterion for the Pikemen bonus.

Attachment: ccpcalc.zip
This has been downloaded 21 time(s).

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:14
  Old Post 11-06-2002 14:08 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton buy from Amazon

spelt "Sodaq" wrong.

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:14
  Old Post 11-06-2002 16:27 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton buy from Amazon

quote:
spelt "Sodaq" wrong


In which cell or button is the mispelling? MdS has been very supportive.

germanos is offline germanos
Prince
behind a firm ****, Rotterdam, NL
Apr 2002
time: 06:14
  Old Post 11-06-2002 16:45
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Enter the AD-FREE zone


What a wonderfull utility !!! Excellent !!

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:14
  Old Post 12-06-2002 05:16 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

In the last screenshot, next to the "Calculate" button, you've got a "Soldaq"

Its a great utility

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:14
  Old Post 12-06-2002 08:13 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Help yourself to an AD-FREE life

Fortunately IW, those screenshots are out of date. Here's the "About Box". The rest is to big to post, but it does fit on a single screen.

Thanx for the kudos, but in truth they were earned by the guys listed in the credits. This program wouldn't exist without the GL combat thread. That collective knowledge was just begging to be put in a spreadsheet.

Attachment: aboutbox.png
This has been downloaded 82 time(s).

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:14.
Apolyton Time is 00:14.
    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.0446 seconds (89.85% PHP - 10.15% 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