UGO
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION III > Civ3 - Creation & Customization > Utility Programs

Reply
 
Thread Tools
Old Nov 11, 2004, 05:24 PM   #1
Offa
Bretwalda
 
Offa's Avatar
 
Join Date: Feb 2002
Location: Mercia
Posts: 1,255
town capture simulator

For a long time now I have wanted to know the attacking force needed to capture a town. For example how likely are 6 horsemen to take a town defended by 3 spears on a hill. Individual combat calculators help you to get an idea about this but don't really give the answer. Sirp has written a programme which calculates this, but on my computer his utility crashes if asked to evaluate attacks involving many units.

This is a little Java program that simulates trying to take a town. It seems fiendishly tricky to me to calculate the true chance of taking a town but it is reasonably easy to simulate lots of attempts and work out the chances that way.

The program lets you specify the attackers and the defenders, and then simulates lots of attempts to take the town. It allows for retreats according to the formula by BomberEscort, and for those irritating defender promotions. I haven't attempted to allow for bombardment, armies or for units that can attack more than once in a turn. The current defender is selected according to the product of power and remaining hit points as I am not sure how the game does this.

Latest version:

28 dec 04 version

Last edited by Offa; Dec 28, 2004 at 02:37 AM.
Offa is offline   Reply With Quote
Old Nov 11, 2004, 08:45 PM   #2
Cyber Dreyk
Master of illusions
 
Cyber Dreyk's Avatar
 
Join Date: Oct 2003
Location: Russia
Posts: 241
It's a very interesting, thank you!
But how I can start your utility without installed java on my PC?
__________________
Cyber Dreyk

Last edited by Cyber Dreyk; Nov 11, 2004 at 08:49 PM.
Cyber Dreyk is offline   Reply With Quote
Old Nov 11, 2004, 10:24 PM   #3
ainwood
I am The Law.

 
ainwood's Avatar
 
Join Date: Oct 2001
Posts: 24,732
Sounds promising - but is a .jar file a java archive? Do we need to uncompress it first?
ainwood is offline   Reply With Quote
Old Nov 12, 2004, 01:29 AM   #4
Offa
Bretwalda
 
Offa's Avatar
 
Join Date: Feb 2002
Location: Mercia
Posts: 1,255
It is a zipped jar file. The server won't let me upload a jar file, so I had to zip it first. I don't think you need to do anyting special to run a jar file, just double click: at least that works on my machine.

Here is a screenshot. It is a tad garish, but I could tone it down:


Last edited by Offa; Nov 12, 2004 at 02:55 AM.
Offa is offline   Reply With Quote
Old Nov 12, 2004, 03:02 AM   #5
Gramphos
Emperor
 
Gramphos's Avatar
 
Join Date: Sep 2001
Location: Sweden
Posts: 1,116
You will have to install JRE (some version) to be able to run java files.

jar files are run with java -jar filename.jar normally an association is setup on install
__________________
Gramphos
Gramphos is offline   Reply With Quote
Old Nov 12, 2004, 05:25 PM   #6
Offa
Bretwalda
 
Offa's Avatar
 
Join Date: Feb 2002
Location: Mercia
Posts: 1,255
I guess I have installed lots of java stuff on my computer so that explains why I can run executable jars with a double click. I only now see that it opens with javaw, whatever that is. I had assumed executable jars would open on most computers: so much for portability. Anyway it runs just great on my machine .

Frankly I only tinker with programs as a bit of fun, it's just a game for me, like playing civ really. Therefore I am a bit ignorant . If I knew how to I would convert the program to an applet. I suspect that this is easy but I don't know how to do it .

Having said all that, I think this will run from windows Internet Explorer, or is that just my machine as well?

Last edited by Offa; Nov 12, 2004 at 05:33 PM.
Offa is offline   Reply With Quote
Old Nov 15, 2004, 04:44 AM   #7
socralynnek
Civ & Hattrick addict
 
socralynnek's Avatar
 
Join Date: Sep 2003
Location: Saarländer in Hannover (GER)
Posts: 1,295
Hey, interesting tool and good work.

2 proposals:
1.One button where only the results are cleared (so I can just add an attacker without having to enter them all again)
2. Adding a third and fourth row, one for attacking bombardment units, one for defending ones.
__________________
Star Trek and Football fan.(Thanks to Mistfit for the avatar)
socralynnek is offline   Reply With Quote
Old Nov 15, 2004, 11:46 AM   #8
Offa
Bretwalda
 
Offa's Avatar
 
Join Date: Feb 2002
Location: Mercia
Posts: 1,255
Quote:
Originally Posted by socralynnek
Hey, interesting tool and good work.

2 proposals:
1.One button where only the results are cleared (so I can just add an attacker without having to enter them all again)
2. Adding a third and fourth row, one for attacking bombardment units, one for defending ones.
Thanks:
Your first idea is easily done. I agree that re-entering all the units is a drag. It would be pretty easy to have buttons to remove the last unit entered too but might make the interface a bit cluttered. I am also going to increase the allowed limits on the number of simulations as it was running very fast on my machine, 100000 simulations takes a few seconds.

Re the second proposal, adding buttons for bombardment is of course pretty easy, but accurately simulating it not quite so easy. At the moment I don't know how bombardment works. It would complicate the simulation a fair bit but I might try it at some point.

Similarly attackers which can attack several times a turn (eg armies, tanks) would be interesting to simulate, if potentially a little complicated: eg how do you work out whether or not to use the second attack and at what point of the battle do you use it.

More stats about the results would also be possible, if wanted.
Offa is offline   Reply With Quote
Old Nov 15, 2004, 12:02 PM   #9
Offa
Bretwalda
 
Offa's Avatar
 
Join Date: Feb 2002
Location: Mercia
Posts: 1,255
Here it is with a clear results button:




revised combat simulator
Offa is offline   Reply With Quote
Old Dec 06, 2004, 04:20 PM   #10
Offa
Bretwalda
 
Offa's Avatar
 
Join Date: Feb 2002
Location: Mercia
Posts: 1,255
Ok I know that no one is reading but I find my calculator very useful so I have buffed it up more. I haven't added bombardment as I can't think of a sensible way in which to implement it that would really simulate what a player does, ie in a real game a player would potentially bombard for several turns to kill more population etc. I haven't added blitz either as it plays little or no role in games I play.

here is an example simulating an attack with vet horsemen on a hill town defended by 2 fortified spears.



new calculator

I think all that needs to be done is unzip the programme which is an executable jar. If there is no java on the computer I think it can be run from IE, but if there is a double click will work. Anyone who wants can have the source.
Offa is offline   Reply With Quote
Old Dec 19, 2004, 02:37 PM   #11
Ambiorix
Prince
 
Join Date: Jan 2003
Location: Belgium
Posts: 365
Installing Java worked best for me.
Offa, this tool looks really useful, and I'll sure use it in the next COTM, but I'd be very very grateful if you could tone down the colors a bit.
Ambiorix is offline   Reply With Quote
Old Dec 20, 2004, 03:24 AM   #12
Offa
Bretwalda
 
Offa's Avatar
 
Join Date: Feb 2002
Location: Mercia
Posts: 1,255
Yes it is pretty garish isn't it. I put colours in so I could see what was going on easily, and really should have some subtle shades instaed of these rather violent default colours.

I will tone it down or just make it all grey.
Offa is offline   Reply With Quote
Old Dec 20, 2004, 12:10 PM   #13
MSTK
216
 
MSTK's Avatar
 
Join Date: Dec 2003
Location: LUE
Posts: 2,140
This is a great an useful tool

However, I always have a 50-100 stack of artillery on hand...
How about adding the option, "Fully Bombarded"? So, it sets all of teh defender's HP to 1.
__________________
Official Cartographer of the Fifth Demogame
Out of the Rubble I - The Byzantine Empire | Out of the Rubble III - The Chinese Empire
Bab a Yetu Lyrics
Proud LUEser 402
MSTK is offline   Reply With Quote
Old Dec 20, 2004, 01:09 PM   #14
Offa
Bretwalda
 
Offa's Avatar
 
Join Date: Feb 2002
Location: Mercia
Posts: 1,255
I did think about putting in bombardment but it would be hard to model what you would do in practice. For example if your first go at bombardment reduced city size to 7, you probably wouldn't attack but would try to bombard again next turn to reduce city size to 6. In addition, I hardly ever use bombardment myself. I guess armies would be nice too but are actually slightly tricky to implement for much the same reason: eg when down to 2hp should it attack? I guess I could make them attack if they figured their chance of winning was say >80%, but it is quite cumbersome to do.

You can just put the defenders down as having 1HP. You can prevent them from promoting by making them elite, otherwise promotions will potentially make life much harder for your attackers. Another effect of bombardment is reduction in population, which can of course also be calculated.
Offa is offline   Reply With Quote
Old Dec 20, 2004, 02:53 PM   #15
Dom Pedro II
Modder For Life
 
Dom Pedro II's Avatar
 
Join Date: Apr 2002
Location: Exit 16, New Jersey
Posts: 6,797
50 to 100 artillery???!! I usually have 50 to 100 units!

Anyway, this is really cool since military commanders have access to this kind of information in real life. So it's not like cheating... I don't think so anyway.
__________________
Dynamic Unique Units Modcomp : Announcing Dom Pedro II's Civilization 4: Test of Time : Dom Pedro II's Mod Helper for Python Modders and those who would like to be

One night I dreamt of wondrous things. When I awoke, I made a mod.
Dom Pedro II is offline   Reply With Quote
Old Dec 20, 2004, 03:30 PM   #16
MSTK
216
 
MSTK's Avatar
 
Join Date: Dec 2003
Location: LUE
Posts: 2,140
Quote:
Originally Posted by Dom Pedro II
50 to 100 artillery???!! I usually have 50 to 100 units!

Anyway, this is really cool since military commanders have access to this kind of information in real life. So it's not like cheating... I don't think so anyway.
No, it is never considered cheating to know your odds
__________________
Official Cartographer of the Fifth Demogame
Out of the Rubble I - The Byzantine Empire | Out of the Rubble III - The Chinese Empire
Bab a Yetu Lyrics
Proud LUEser 402
MSTK is offline   Reply With Quote
Old Dec 21, 2004, 02:09 PM   #17
Offa
Bretwalda
 
Offa's Avatar
 
Join Date: Feb 2002
Location: Mercia
Posts: 1,255
OK, here it is in pastels. Actually I think it looks anaemic and my wife says it looks military.

I added a fully bombarded button as well: this sets all the defenders to 1HP elite units (I made them elite to stop them promoting).

I fixed an error as well, which was nice of no-one to mention. Retreat chances now work properly.



pastel combat sim
Offa is offline   Reply With Quote
Old Dec 21, 2004, 02:13 PM   #18
Mistfit
Don't Forget the "t"
 
Mistfit's Avatar
 
Join Date: Apr 2004
Location: Northern Michigan
Posts: 3,788
IMHO the colors are much nicer now. Neat utility BTW.

Quote:
which was nice of no-one to mention
My problem was the fact that I'm not intelligent enough to notice the problem
__________________
Mistfit is offline   Reply With Quote
Old Dec 21, 2004, 02:38 PM   #19
Ambiorix
Prince
 
Join Date: Jan 2003
Location: Belgium
Posts: 365
Thanks Offa !
This is the best anaemic military tool I've ever seen !
Ambiorix is offline   Reply With Quote
Old Dec 23, 2004, 05:41 PM   #20
Spart
Ohhhh Shiny
 
Spart's Avatar
 
Join Date: Jul 2004
Location: Where ever I want.
Posts: 88
Great little tool, hopefully you will fill it full of options!
__________________
Spart and Mr. Will Creations -
Artic Tank
Upcoming from Mr. Will and Spart -
Sorry MPDV was lost in harddrive crash!
Spart is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION III > Civ3 - Creation & Customization > Utility Programs > town capture simulator

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Historical Simulator 0302FUN World History 16 Mar 10, 2008 11:45 PM
Flight Simulator? d.highland All Other Games 4 Feb 02, 2007 05:07 PM
Why can't I raze or capture size 1 town? mikezang Civ3 - General Discussions 8 Mar 14, 2005 10:00 AM
Internet Simulator napoleon526 Humor & Jokes 40 Nov 13, 2003 03:30 PM
Flight Simulator lincon All Other Games 3 Oct 28, 2002 10:58 AM



All times are GMT -6. The time now is 02:08 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
This site is copyright © 2000 - 2009, Civilization Fanatics' Center.
Support CFC: Amazon.com | EB Games | Amazon UK | Amazon DE | Amazon CA | Amazon FR