PDA

View Full Version : Calculator



The Legend
05-31-2008, 03:55
I think that I have implemented the current land grab formula. If it is off, please provide your land before the attack, target land before the attack, target SAs against, and land gained.

This application requires you to have .NET 2.0 (http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en) or higher installed.

There are several improvements over my original version.

General
Slightly less screen space is required for most tabs.
The calculator can now be made semi-transparent, so you can overlay it on the NW game.
The Land Grab tab is no longer required to be visible.
Reminder: You can, and have always been able to, select your entire Overview page (Ctrl+A), put it in the clipboard (Ctrl+C), and the calculator will parse it, filling in all the fields.
Fields will now select all text on focus (either through tabbing or mouse click).
If you enter a value that would crash the program, it will be replaced with the largest accepted value (this value will be ~2.1 billion). On the Management tab, you are limited to 13 characters (9 trillion dollars).
Battle Simulator
Attack success is no longer a green or red circle, but the attacks which will succeed or fail are listed at the bottom in their common acronyms in green or red.
Spy ops are also listed here, but is currently inactive, as I've not put any time into trying to get the random factor for it (just remember it being really huge).
As you can now enter spies, the calculator will now properly determine if you have GB protection or not; in addition, your opponents GB protection will also be determined by the calculator (though this does not currently translate into a modified Land Grab prediction). As before, Military Strength is still listed as your attack strength in SAs, and the defender's defense strength to SAs.
War mode check box has been removed, as this information is displayed at all times.
Casher Build
This tab will now tell you how many of each building to build (as opposed to just the correct number). It does not currently optimize for your BPT, as such you may waste at most one turn each time you balance your buildings.

To Do
Confirm that my interpretation of the land grab formula is correct. If it's off, I will also need test data (to confirm that it is correct after trying to fix it), so please send me the pre-attack values for both yours and your target's land, as well as attacks against them. If your state is in hiding, just send it a few days later. I do not need yours or your target's state number (unless you can't count, in which case I need target's to verify number of hits).

I am hosting my calculator at: http://nw.mattsflat.ca/NWCalculator.exe


2008-07-02
Land Grab should now correctly handle the attacker having significantly less land than the defender
Corrected military strength coefficients.

-Chris-
05-31-2008, 03:58
rep for this Legend, thanks

k959
05-31-2008, 04:04
umm why do i get a failed to initialize properly(0xc0000135) error?

The Legend
05-31-2008, 04:11
umm why do i get a failed to initialize properly(0xc0000135) error?

Do you have .NET 2.0 or higher installed?

k959
05-31-2008, 04:15
pritty sure because when i go to update my windows i dont have any updates available besides my wmp 11 that i dont want

im going to download it and reinstall it if i dont to see it that fixs it

edit:
it works now strange thing is i had.net 3.5 installed and it didnt run but i install 2.0 and it runs

just a side note u cant go over 1 billion in any troops in the calc or it crashes

The Legend
05-31-2008, 05:01
just a side note u cant go over 1 billion in any troops in the calc or it crashes

2,147,483,647 is actually the maximum (32-bit integer), which applies to everything except economics, which allow for larger values (9,223,372,036,854,775,807 maximum in a 64-bit integer); which should far exceed what any state can produce with the current game settings.
Note that military strength, and the various other variables that are created in the Battle Simulator are allocated a 64-bit integer as well.

My next priority is the land grab formula. I will get to user input validation at some point (feels so much like bringing my work home :().

Crimson Shadow
05-31-2008, 09:02
Thanks for taking the time to do this Legend :D

Divine Intervention
05-31-2008, 10:05
The Legend....you really are a credit to this game. Not only are u still on form (I was watching your state last set and it was one which impressed me prob the most along with Neeme's restart) but your making stuff like this still :D

looks v.good.

i downloaded it and it works so i guess i have Net 2.0 installed?
can't wait for the LG formula to be tweaked...maybe ill stop embarrassing DaK with my 94 land SAs :D.

Xavior
05-31-2008, 17:39
I haven't looked at this Calc yet, but i did notice something from your older one.

For indy production, anything over ~33000 buildings would give me invalid troop production per turn. Was this a planned restriction?

Apart from that, the work put into it is remarkable.

The Legend
05-31-2008, 18:22
I was probably just using too small a data type somewhere.

As a side note, I didn't port the indy calculator over to the new version, as I'd never really used it. Is that something that I should be adding (did others use it)?

Mr President
05-31-2008, 18:48
Nice job on this Legend.. Thank you for doing this! :thumbup:

The Legend
05-31-2008, 23:00
I think/hope that I've implemented the new LG formula properly.
If it is off (not by +/- 1...), please send me the pre-attack values for your land, their land, their SAs against, and the land you gained.
A pre- or post-attack spy op of their military would also be appreciated, to confirm that they do actually have full GB protection, as the LG calculator doesn't currently account for people who don't have it.

The field validation is also in there, as is the selection of fields on focus.

Missionary
06-01-2008, 18:06
awesome work :)

p.s. i never used the indy one either :P

the old LG on i had went abit screwy on me lol.

DBozMen
06-01-2008, 18:21
Great work!

Thank you for sharing :dblthumbup:

SkyCat
06-01-2008, 21:06
nice work ;)


This application requires you to have .NET 2.0 (http://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en) or higher installed.

but what about mac or Linux users? like me :crying:



... (I was watching your state last set and it was one which impressed me prob the most along with Neeme's restart) ...
http://www.the-new-wow.com/game/state_scores_r0508.php says:

32 kassikas2(#352) [EE] 29.210 $64.608.122
51 Neeme_restart(#332) [EE] 16.776 $51.599.117

The Legend
06-02-2008, 02:12
There are Windows emulators for Linux, can one not install .NET inside the emulation? I considered making it in Java for cross-platform support, but I've been doing Java GUIs for four years of university and I ****ing hate them :p

SkyCat
06-02-2008, 04:08
There are Windows emulators for Linux, can one not install .NET inside the emulation? I considered making it in Java for cross-platform support, but I've been doing Java GUIs for four years of university and I ****ing hate them :p

i know, im using emulators to run landcalcs in linux and mac

http://y.delfi.ee/thumb/63151/2774247_ZU4BuV.png (http://pilt.delfi.ee/en/picture/2774247/)
landcalcs on ubuntu linux

but emulators mostly sucks, more native things are better!

DBozMen
06-02-2008, 04:12
There are Windows emulators for Linux, can one not install .NET inside the emulation? I considered making it in Java for cross-platform support, but I've been doing Java GUIs for four years of university and I ****ing hate them :p

four years? i stopped with the JAVA GUI after 6 months :P.

The Legend
06-02-2008, 17:53
They continue to want a pretty representation of the **** they have us do... why is beyond me

Divine Intervention
08-12-2008, 22:16
any progress on the calc to iron out some of its problems?

jasonlfunk
08-12-2008, 22:19
Do we know the formula explicitly or is it just guess work?

Crimson Shadow
08-12-2008, 23:43
Land grab formula from the manual:


(Thereland/Yourland)*(Thereland*.13) Then 30% less for every hit in the last 36 hours

Divine Intervention
08-12-2008, 23:48
some of the grabs im getting are waaaaay off from what the calculator says.

jasonlfunk
08-13-2008, 01:01
I wonder why that is...

The Legend
08-13-2008, 02:47
Pretty sure it implements the manual's version of the land grab formula; I'll confirm this weekend at the latest, been busy with work :(

KLL
08-13-2008, 04:37
Pretty sure it implements the manual's version of the land grab formula; I'll confirm this weekend at the latest, been busy with work :(

no, either the formula has changed, or GB is calculated incorrectly, i keep gettign mroe land than what the calc says (yes, i did try it for a couple of days :blushing:)

The Legend
08-13-2008, 07:58
Ya, fairly sure the manual is wrong :sneaky:

Divine Intervention
08-13-2008, 07:59
i keep getting less land than the calculator says...

Crimson Shadow
08-13-2008, 09:30
Yeah I always get alot less than what it says too.

Ive been using the old calc and it works just fine, +/- 5 land at the most

jasonlfunk
08-13-2008, 10:20
Here is the forumla implemented as it is in the manual:
http://funkja.public.iastate.edu/calculator.php



<?php
if(isset($_POST['submit']))
{
$you = $_POST['you'] * 1.0;
$them = $_POST['them'] * 1.0;
$hits = $_POST['hits'] * 1.0;

echo "<strong>Land grabbed:</strong> " . ($them/$you)*($them * .13) * pow(0.7,$hits) . "<br><br>";
}
?>
<form action="calculator.php" method=post>
Your land: <input type=text size=10 name="you" value="<?php if(isset($you)) echo $you; ?>"><br>
Their land: <input type=text size=10 name="them" value="<?php if(isset($them)) echo $them; ?>"><br>
Their Hits: <input type=text size=10 name="hits" value="<?php if(isset($hits)) echo $hits; ?>"><br>
<input type=submit value="Calculate" name=submit>
</form>


I'm pretty sure this cannot be the formula that is implemented in the game - because it is possible to grab more land then they have. Which would be interesting eh? :)

jasonlfunk
08-13-2008, 10:31
My version seems to be under the actual value by 10% or so.

Divine Intervention
08-13-2008, 14:25
Yeah I always get alot less than what it says too.

Ive been using the old calc and it works just fine, +/- 5 land at the most

link?

Crimson Shadow
08-13-2008, 18:07
I got it from the legends old website like 3 years ago...I think there might be a link in the forums somewhere.

EDIT: http://forums.nation-wars.com/showthread.php?t=2051

blaa
05-20-2012, 14:00
My excel worksheet:
http://www.upload.ee/files/2358998/nwcalc_public_nomacro.xlsx.html

Includes:
- Grab calculator (inaccurate, if you know the correct formula, then let me know)
- Battle calculator (quickly copy/paste as text enemy espionage into A1 cell)
- War calculator - BR calculator, AA calculator, Genocide calculator, Population calculator, Land calculator
- Economy - Indy, casher, techer production (thanks to ang101 and the legends calc).

Includes small tips how to use the file. If something is too vague, ask here.

I have been using the copy/paste function for like 2-3 months, I can't imagine going back to calculating break amounts in head/calculator any more. Calculating it in head may be even faster, but the risk of failing is greater and you don't get as accurate result as with this excel - reduced readyness loss.

***Make sure you copy enemy espionage FROM SAVED INTELS. There, the intel doesnt consist of different names for each unit upgrade level, therefor it's easily usable in excel.

Things to do:
Farmer production
GA calculator
copy/paste vol 2.0 -> copy enemy overview.

MellonColly
05-20-2012, 16:56
good stuff there blaa :) nice work

p-kitty
05-29-2012, 10:58
*yoink* I had just been wondering if anyone had updated something like this recently.

blaa
06-05-2012, 02:59
Version 2:
http://www.upload.ee/files/2401815/nwcalc_public_v2.xlsm.html

Added:
*Farmer production formula
*Advanced GA calculator: shows the regression of infantry after 20 AAs and regression of infantry while performing GAs.

Things to do:
copy/paste vol 2.0 -> copy enemy overview.
?

blaa
11-14-2012, 05:56
Version 3 (uploaded to permanent host now, old host deleted file after some time):
http://www.hot.ee/aeuio//nwcalc_v3_macro.xlsm

Added:
*Since the introduction of the new spy random, it became obvious that there will always be states that you can not break with spies. But you can see enemies networth, you know how much land he's got, how many spies he MUST have, so you can calculate how much infantry is required to break in SA. Note that this only applies if enemy has only spies and infantry, so you actually need to send less infantry. This tool is found in 'Random' page.
*Cleaned the workpage a bit, hid the unnecessary pages.

No macro free version, this means that you will be asked, each time you start the workpage, if you want to allow macros. I used macros for 2 buttons so they delete everything from the 'Your army' boxes. So it's not necessary at all to allow macros.

Since my set is over this month, I'll do some random stuff and probably come up with new things to add for the next version. I was thinking to find out the exact land grab formula and finding out how much army you'll lose in an attack.

Is anybody even using this? Is it difficult to use/get used to?

Divine Intervention
11-17-2012, 11:25
Version 3 (uploaded to permanent host now, old host deleted file after some time):
http://www.hot.ee/aeuio//nwcalc_v3_macro.xlsm

Added:
*Since the introduction of the new spy random, it became obvious that there will always be states that you can not break with spies. But you can see enemies networth, you know how much land he's got, how many spies he MUST have, so you can calculate how much infantry is required to break in SA. Note that this only applies if enemy has only spies and infantry, so you actually need to send less infantry. This tool is found in 'Random' page.
*Cleaned the workpage a bit, hid the unnecessary pages.

No macro free version, this means that you will be asked, each time you start the workpage, if you want to allow macros. I used macros for 2 buttons so they delete everything from the 'Your army' boxes. So it's not necessary at all to allow macros.

Since my set is over this month, I'll do some random stuff and probably come up with new things to add for the next version. I was thinking to find out the exact land grab formula and finding out how much army you'll lose in an attack.

Is anybody even using this? Is it difficult to use/get used to?

i used your old ones for war calculations (# of BR / GA) and land grabs. i still do army break calculations on my own though.

SkyCat
11-22-2012, 19:37
http://goo.gl/Er1eb (http://goo.gl/1Lkv4)
(click image to see better reso)

made a little landcalc for android (seen in my galaxy s3), but its ugly as ****, if i can find some effort to make it bit more nice maybe will add it up to google play if anyone intrested!

Divine Intervention
11-22-2012, 21:09
http://goo.gl/Er1eb (http://goo.gl/1Lkv4)
(click image to see better reso)

made a little landcalc for android (seen in my galaxy s3), but its ugly as ****, if i can find some effort to make it bit more nice maybe will add it up to google play if anyone intrested!

dont bother mate, new game next set.

SkyCat
11-22-2012, 21:44
dont bother mate, new game next set.

???????

Top12Gun
11-22-2012, 22:06
http://forums.nation-wars.com/showthread.php?94279-Nation-Wars-Redemption-V2.0

blaa
11-23-2012, 04:53
I have a feeling the new game doesn't need a calculator :P

MellonColly
11-23-2012, 12:05
haha :P

Visconte
12-02-2015, 05:00
Can someone put SoreGums excel sheet calculator up here in the first post or something? Or clean the post up a bit. I have a feeling it could help quite many people.

Dragonwolf
12-19-2018, 03:45
Cool