Little Java Wesnoth attack calculator

General feedback and discussion of the game.

Moderator: Forum Moderators

Post Reply
Cherub
Posts: 1
Joined: March 29th, 2009, 6:59 pm

Little Java Wesnoth attack calculator

Post by Cherub »

Hi,

Since i've been playing Wesnoth I have noticed, that many players really have a lot of problems judging the chance of killing an enemy unit with an all out attack. In my experience one can observe this most commonly when there is a perfectly nice defensive line, but one unit can be reached by up to three attacking units. A lot of players now attack this unit without thinking much about it and often find themselves inable to kill the unit, left stranded without any cover for the enemies turn.

Now I found myself with a bit of spare time on my hands, so I thought I could just program a little Java app that illustrates this problem and raises awareness a bit. The application is still not finished but it already works fine, so here it is and I would really apreciate feedback and other ideas.

How it works: You have to enter at least the number of attacks, strength and life for the unit on the left side and the defender. You can drag around the units to swap them in position. The attackers always attack in order from left to right. Every unit that is supposed to be considered for calculation has to have lifepoints attacks and strength greater than 0.

Have fun with it!
Cherub

Edit: New version in attachment where ranged calculation works better and i moved the defender results to the right and made it larger.
Still ugly though :)
Attachments
WesnothCalc.rar
Version 0.7a of the calculator!
(9.84 KiB) Downloaded 212 times
User avatar
ParadiseCity
Posts: 119
Joined: May 24th, 2009, 3:51 pm
Location: I'm not sure yet...

Re: Little Java Wesnoth attack calculator

Post by ParadiseCity »

It seems like a great idea, though my computer is having trouble with the .rar file for some reason. I'll be sure to check out the next version if you make it available otherwise :wink:.
"The harder I work, the more luck I seem to have." -Thomas Jefferson
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Little Java Wesnoth attack calculator

Post by Anonymissimus »

use zip
it is an open format as opposed to rar and thus better supported on Linux systems
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Yoyobuae
Posts: 408
Joined: July 24th, 2009, 8:38 pm

Re: Little Java Wesnoth attack calculator

Post by Yoyobuae »

Anonymissimus wrote:use zip
it is an open format as opposed to rar and thus better supported on Linux systems
Yep, I can't open it even with the unrar program I do have. :annoyed:
Anonymissimus
Inactive Developer
Posts: 2461
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: Little Java Wesnoth attack calculator

Post by Anonymissimus »

I need that non-free unrar package to open rars on Debian...
You'll probably also need Sun's jre to run .jar executables.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
brserek
Posts: 1
Joined: July 14th, 2010, 8:22 pm

Re: Little Java Wesnoth attack calculator

Post by brserek »

This file is a zip!. Just change the extension and unpack it. Then start it with:

Code: Select all

java -jar WesnothCalc.jar
It works. I mean I didn't try it for real, but it starts and does some calculations.
But... the results are a little bit confusing. I have problem interpreting them.
Post Reply