![]() |
| General | Hosted Sites | CivRev | Colonization | Civilization IV | Civilization III | Civilization II | Civilization | Misc | Marketplace |
![]() |
|
|
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. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Bretwalda
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. |
|
|
|
|
|
#2 |
|
Master of illusions
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. |
|
|
|
|
|
#3 |
|
I am The Law.
![]() ![]() Join Date: Oct 2001
Posts: 24,732
|
Sounds promising - but is a .jar file a java archive? Do we need to uncompress it first?
|
|
|
|
|
|
#4 |
|
Bretwalda
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. |
|
|
|
|
|
#5 |
|
Emperor
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 |
|
|
|
|
|
#6 |
|
Bretwalda
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. |
|
|
|
|
|
#7 |
|
Civ & Hattrick addict
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) |
|
|
|
|
|
#8 | |
|
Bretwalda
Join Date: Feb 2002
Location: Mercia
Posts: 1,255
|
Quote:
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. |
|
|
|
|
|
|
#9 |
|
Bretwalda
Join Date: Feb 2002
Location: Mercia
Posts: 1,255
|
|
|
|
|
|
|
#10 |
|
Bretwalda
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. |
|
|
|
|
|
#11 |
|
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.
|
|
|
|
|
|
#12 |
|
Bretwalda
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. |
|
|
|
|
|
#13 |
|
216
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 |
|
|
|
|
|
#14 |
|
Bretwalda
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. |
|
|
|
|
|
#15 |
|
Modder For Life
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 beOne night I dreamt of wondrous things. When I awoke, I made a mod. |
|
|
|
|
|
#16 | |
|
216
Join Date: Dec 2003
Location: LUE
Posts: 2,140
|
Quote:
__________________
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 |
|
|
|
|
|
|
#17 |
|
Bretwalda
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 |
|
|
|
|
|
#18 | |
|
Don't Forget the "t"
Join Date: Apr 2004
Location: Northern Michigan
Posts: 3,788
|
IMHO the colors are much nicer now. Neat utility BTW.
Quote:
__________________
|
|
|
|
|
|
|
#19 |
|
Prince
Join Date: Jan 2003
Location: Belgium
Posts: 365
|
Thanks Offa !
This is the best anaemic military tool I've ever seen !
|
|
|
|
|
|
#20 |
|
Ohhhh Shiny
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! |
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
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 |