Go to Topic: PreviousNext
Go to: Message ListNew TopicSearchLog InPrint View
Cybernations Calculator Information
Posted by: C2Talon
Date: March 24, 2009 01:47PM

Please use this thread for any questions, comments, concerns, et al you may have about the Cybernations Calculator. Some detailed information about the calculator is below.


=====================
Description
=====================
A web-based comparative calculator for Cybernations that you can see the difference between what you have now and what you might think of changing your set up to.


=====================
Known Missing Calculations
=====================
    [*] Navy: All
    [*] Literacy: I know it's purely tech based and have some 500+ data plots of it, I just cannot seem to find the formula.
    [*] Environment: Above 50% Literacy there is a -1 Environment change. Since I don't have the literacy formula, I can't really account for this change.
    [*] Mars and Moon: wonders and resources.
    [*] There is a part of the Happiness equation that I do not know, so any calculated changes to happiness will be slightly skewed, but not by more than 1% in the very worst case. The less the change, the less the skewing.


=====================
Notes on Usage
=====================
    [*] When using the copy/paste feature, it is recommended to copy from the source code of the nation summary page, instead of the old way of copying from the page you see. If you do not, and are not using Firefox, you will have to manually fill in the resources.
    [*] While you can copy/paste the summary page of any nation, a few things will be missing:
      [*] If using your own nation:
        [*] Events
        [*] Nuclear Position -- unless you own nukes
        [*] 90% Literacy -- unless tech over 700
        [*] Aircraft Levels -- if tech over 500, sets to 9
      [*] If using another nation, all the above will be missing, as will:
        [*] Tax Rate
        [*] Environment
        [*] Global Radiation
        [*] Happiness
        [*] Citizen Income
    [*] Events: These serve a dual purpose. You can put actual events that are affecting your nation as implied. You can also put factors that are that are not directly included on the face of the calculator if you need to, such as trade bonuses.
    [*] Environment: When adding environment to a perfect environment (Global Radiation+1), such as when removing Border Walls, the calculator will add the full environment effect, even if your nation doesn't change from the perfect environment in game. If you know this will happen, you can counteract it by using the "Event Environment" field on the future side by as much as you need.
    [*] Government: Anarchy: Does not mean you're in the state of anarchy, just that your government selected is Anarchy. The state of anarchy and the government of Anarchy are two different things. I will probably add actual selectable anarchy effects later.
    [*] Happiness: There is part of this equation that I do not know, thus any happiness calculated will be slightly skewed. Since happiness directly affects income, if you lose happiness your future income will be slightly overestimated, but if you gain happiness your future income will be slightly underestimated.
    [*] Nation Strength: All calculations are done assuming no units are deployed.
    [*] Citizen Income: If your citizens currently make exactly $10.00, it is very likely that any positive changes you make to the future side will not be calculated as they would be in game. This is because the game sets $10.00 to be the minimum they can possibly make, even if they actually make less.


=====================
Partial Changelog
=====================

2010.04.07
- FEAT It is now possible to copy/paste the source code of the nation summary page to fill out the form.

2009.12.02
- FIX Mining Industry Consortium and National Environment Office calculations.

2009.08.31
- FEAT Can now copy/paste another nation's status screen to fill in the calculator fields

2009.03.24
- ADD Military
- ADD ADP and all military Wonders
- ADD Environment calculations
- ADD Nation Strength calculations
- ADD Land Area calculations
- ADD Soldiers affecting income notification
- FIX Sugar and Wheat no longer affect Land Area
- FIX Lead halves Nuke effect on Environment

2008.08.15
- ADD Numbers for 15k+ infra

2008.07.24
- ADD 4 new improvements concerning Navy
- ADD Mining Industry Consortium wonder
- TODO Land equations
- TODO At least 2 other wonders

2008.05.19
- Added Environment level indicator
- Changed a few governments to reflect in-game changes.

2008.05.15
- Added 4 wonders that were added a few months ago.
- Added Global Radiation Level field
- Fixed bug with Nuclear Position field
- TODO numbers for 15k+ infra

2008.05.07
- Added copy/paste field.

2008.03.11
- Changed Affluent Population and Fine Jewelry to reflect in-game changes.
- TODO 4 new wonders.

2007.10.30
- Changed all governments to reflect in-game changes.

2007.10.20
- Readded improvement/wonder cost

2007.08.05
- Added Environment field for more accuracy

2007.07.29
- Updated infra upkeep for all infrastructure levels over 5000
- Fixed bug with Intelligence Agencies

2007.06.27
- Fixed typo on Infra Upkeep calculations
- Fixed bug involving future Tech not applying to Infra Upkeep

2007.06.25
- First public version

2007.06.16
- Complete overhaul of previous calculator from the ground up

-C2Talon
Infinity. Nihility.



Edited 13 time(s). Last edit at 04/29/2010 03:06PM by C2Talon.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Laverick Phoenix
Date: March 28, 2009 09:32PM

Hey, the copy and paste feature doesn't work if you're pasting someone else's nation, it only works for your own. It shouldn't be too hard to fix that.

As Minister of Education for NADC I use your calculator a lot to help train our members and make sure they're making the best decisions. It would make my job a lot easier if I could paste their information instead of manually adding resources and improvements for each person.

Also, for Literacy and Nuclear Power can't you parse information from the Extended Nation Display? Create code that looks for "Literacy: " and then do an If statement to check if it's greater than 89? You could do the same for Nukes looking for the string "researching nuclear technology for the use of nuclear power plants"

Anywho, the only thing I really care about is being able to paste another nations resources and improvements. Those things are tedious.

Thanks.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: C2Talon
Date: March 31, 2009 04:00AM

Quote
Laverick Phoenix
Hey, the copy and paste feature doesn't work if you're pasting someone else's nation, it only works for your own. It shouldn't be too hard to fix that.
I hate to say it, but that's not really a bug, that's a feature. Part of the reason is because you need information that isn't available on someone else's page, like income, happiness, environment, et al to get any reasonable calculations. I can see where you're coming from though, so I think I'll put it on my to-do list so it at least fills out what's available.

Quote
Laverick Phoenix
Also, for Literacy and Nuclear Power can't you parse information from the Extended Nation Display?
I thought about doing that before, but this sort of fits in with the first thing: the standard and extended displays don't have all the same information. That, and I don't really want to require one display over another. I know I never use the extended display for anything, and I'm sure there is people who don't even know it exists. Regardless, I'll put this in the maybe pile.

They both really have to do with the exact same thing though, so when I get to one I'll likely do the other as well.

-C2Talon
Infinity. Nihility.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Charles
Date: May 23, 2009 05:56PM

Quote

Soldiers: There are apparently much more adverse affects when you have a much greater 80% of soldiers to citizens ratio, but I've only been able to figure out for slightly above 80%.

Yeah, I've had negative happiness before, after receiving extra soldiers in aid.

The icon for that is actually kind of cool.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Phonoi
Date: August 15, 2009 07:53AM

Quote
C2Talon
Quote
Laverick Phoenix
Hey, the copy and paste feature doesn't work if you're pasting someone else's nation, it only works for your own. It shouldn't be too hard to fix that.
I hate to say it, but that's not really a bug, that's a feature. Part of the reason is because you need information that isn't available on someone else's page, like income, happiness, environment, et al to get any reasonable calculations. I can see where you're coming from though, so I think I'll put it on my to-do list so it at least fills out what's available.

I know you already answered him, but it still doesn't work even if you have all their information. At least I'm still trying to get it work. I run Economics for my alliance so I take people's audits of their nation, and put their complete info into the calculator but I still have to do it by hand.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: C2Talon
Date: August 31, 2009 03:09PM

I've finally gotten around to making it so you can copy/paste another nation's status screen and parse the info that is given. Besides the things that normally cannot be filled in automatically, the following will also not be automatically filled in when copy/pasting from another nation:

Tax Rate
Environment
Global Radiation
Happiness
Citizen Income

Also, I will probably no longer be updating the calculator with new stuff that comes in the game unless information about the changes come to me, since I no longer play due to admin changing the deletion times without informing anyone. Thus, the 2009.03.24 update is the last official time that the calculator was up-to-date with the game. This update was merely to add the most requested feature, since I actually have a ton more time on my hands now that I don't spend hours a day on the game.

-C2Talon
Infinity. Nihility.



Edited 3 time(s). Last edit at 08/31/2009 03:16PM by C2Talon.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Keve69
Date: September 08, 2009 01:58AM

Do you use regex to get each variable? or explode/impode etc.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: C2Talon
Date: September 08, 2009 12:30PM

I wrote this before I knew about regex, so it's using explode to grab variables from the copy/paste input. That's mostly why it used to only fill in very few things if it didn't have all the information, i.e. copy/paste would only fully work if it was your own nation. Regex is definitely superior though.

If I had to rewrite the copy/paste feature, it would use regex to fill in variables from the nation page's source, instead of using the copy/paste from the browser-generated page. That way it would work in any browser. It's something I may still add that if I get a lull in my school work.

-C2Talon
Infinity. Nihility.



Edited 1 time(s). Last edit at 09/08/2009 12:53PM by C2Talon.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Requia
Date: December 01, 2009 04:53PM

The mining industry consortium doesn't appear to adjust income.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: C2Talon
Date: December 01, 2009 06:22PM

Seems an extremely bad typo caused the National Environment Office to take over what the Mining Industry Consortium is supposed to do.

Thanks for pointing that out. It should be working as intended now.

-C2Talon
Infinity. Nihility.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Travis McCrea
Date: December 16, 2009 04:56PM

So before... you said that you would not be releasing the source, but you were going to when you were going to quit the game.

Since you no longer have the desire to update the script, could you release the source so someone who is willing to keep it updated (and add additional features)? Because the source code is hacky doesn't mean that should keep you from releasing it, the new version can have the sourcecode released and you can see what could have been done to make it better and learn?

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: C2Talon
Date: December 20, 2009 03:18PM

No.

-C2Talon
Infinity. Nihility.



Edited 1 time(s). Last edit at 12/20/2009 08:01PM by C2Talon.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Travis McCrea
Date: December 26, 2009 02:27AM

:) thats fine, cURL will work.

However, Do you plan on updating this script further with the additional wonders and such?

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: C2Talon
Date: December 29, 2009 07:49PM

Quote
Travis McCrea
:) thats fine, cURL will work.
Good luck with that.

Quote
Travis McCrea
However, Do you plan on updating this script further with the additional wonders and such?
I have zero data on Mars and Moon wonders, so this is impossible for me in the moment. As for anything else, maybe. Afterall, I did add a (much requested) feature shortly after I quit the game, and did just fix a bug less than a month ago.

-C2Talon
Infinity. Nihility.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Lord AMRFT
Date: January 30, 2010 09:45PM

Thank you for this !!!

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Zojj
Date: April 03, 2010 06:38PM

Hey I noticed the lack of positive feedback here. Your tool is great! Hopefully you have a counter and take pride in that.

I've been in your shoes.. figuring out the math is fun, then boring afterwards. Kinda like building legos. =)

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: C2Talon
Date: April 06, 2010 11:30PM

Thanks for the support. I appreciate it.


2010.04.07 Update:
- It is now possible to copy/paste the source code of a nation's summary page to fill out the form. This should work in any browser. This is the recommended way to do it now.
- You can still copy/paste the summary page like before (copying the rendered page), just with almost any browser now. However, if you're not using Firefox, you will have to manually fill in the resources.

-C2Talon
Infinity. Nihility.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: John
Date: June 03, 2010 11:53PM

It doesn't look like you take into account the increased environment with a literacy rate over 50%..

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: C2Talon
Date: June 04, 2010 10:37AM

That is correct. It's listed under the "Known Missing Calculations" in the top post of the thread. Not knowing the literacy formula prevents me from accounting for it.

-C2Talon
Infinity. Nihility.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Lyle
Date: June 26, 2010 03:14PM

Can you fix this to include navies for a more accurate calculation please? thanks :)

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: C2Talon
Date: June 27, 2010 06:21AM

That is not that easy to implement. On the nation status page, your entire navy is represented by a single number. To extract exactly which ships those are is impossible. I could make it do a "best guess", but it would only be a guess and not be correct for everyone. In order to make sure everything is accurate as possible, I'd have to add 8 more fields to fill in per side on an already crowded interface, each of which would have to be manually filled in. Having to add 16 fields for 1 thing is not really something I want to do in the moment.

Originally, the calculator didn't even have a place to input military information. The only reason why it is on there now is because some of the units started affecting something other than just bills, so it was necessary to add them. As far as calculations are concerned, the navy does nothing but add to bills and nation strength. Until it does something else in game, I can't see it being added. At least until there's an easier way than adding 16 things for the 1.

-C2Talon
Infinity. Nihility.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Joe
Date: June 27, 2010 07:49PM

The bulk infra purchase feature doesn't seem to do anything?

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: C2Talon
Date: June 27, 2010 09:11PM

You have to have your nation information already entered, or have the copy/paste version or source code in the correct field, then have to enter a number in the "Bulk Infra Purchase" field, then press calculate. However, if you enter too high or low of a number (currently +/-25000), it will just default the value to zero and not calculate the bulk infra purchase.

For bulk infra purchase, the calculator will show calculations for before the infra purchase in the table at the top, calculations for after the purchase in the table underneath that, as well as the cost of the total purchase.

-C2Talon
Infinity. Nihility.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Yamin
Date: June 29, 2010 05:43PM

Suggestions for future updates:

1. Limit resources so people can't select more than the limit. Maybe incorporate harbor. Unless you want to do like "fantasy" mode or something.

2. This one might be a tad larger. Find out what a ruler could do to optimize their net income without telling them to buy more infrastructure, technology, or land.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Lyle
Date: July 15, 2010 04:01PM

Quote
C2Talon
That is not that easy to implement. On the nation status page, your entire navy is represented by a single number. To extract exactly which ships those are is impossible. I could make it do a "best guess", but it would only be a guess and not be correct for everyone. In order to make sure everything is accurate as possible, I'd have to add 8 more fields to fill in per side on an already crowded interface, each of which would have to be manually filled in. Having to add 16 fields for 1 thing is not really something I want to do in the moment.

Originally, the calculator didn't even have a place to input military information. The only reason why it is on there now is because some of the units started affecting something other than just bills, so it was necessary to add them. As far as calculations are concerned, the navy does nothing but add to bills and nation strength. Until it does something else in game, I can't see it being added. At least until there's an easier way than adding 16 things for the 1.


I was thinking more along the lines of a box where you manually enter the your Nations Navy bills and then having say the resources lead calculate the -5% in navy upkeep.

Say your the Total cost of All navy Ships are 200,000.00

This info would be Manually entered into the Navy Bill box on the Current Setup side of the Calculator

Then say a nation has the resouces of Lead & Oil Totaling a 30% decrease in Navy Upkeep

The new Navy Bill total would be as Followed 200,000 - 30% = 140,000

So in the Top Screen it would show something like

------------------Current--------- Future-------------Difference

Navy Bills-----200,000-------140,000-------------60,000


I know it wont add into the NS but it would help with Optimizing trades and allow for more Accurate audits.

Basically everything i just said works just like the NS box only you have to enter it manually, Now a problem may arise when a nation has no Navy upkeep but i;m sure there's away to code it in not to use navy bills with resources if bills are 0.

I don't know much about coding I just wanted to share my ideas :)

Hope this isn't confusing
Also love the Site. I've used it since day one with my nation :D

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: C2Talon
Date: July 22, 2010 11:16PM

@Yamin: Most know how many resources they can have, and if they want to see what they would have if they had them all, then why not? However, since I started temporarily playing again, I've noticed I end up counting things on this calculator a bit too much, so at the very least I'll probably add a counter for how many resources are checked and the number of improvements selected to make it easier.

As for your #2, there's just way too many factors to take into account, like if the player improvement swaps, temp trades resources frequently, or any number of other things. Those would be better written in a guide than trying to implement them in this calculator. However, using the calculator to figure out if you wanted to do any of those things, and what you would get from them, is part of the reason this calculator exists.


@Lyle: I was about to add what you suggested, since having a navy is pretty expensive and it seemed like a decent compromise, until I saw both Uranium and Microchips only reduce the upkeep for specific navy vessels. In effect, I'm pretty sure it's back to adding a bunch of fields or not for the one thing, which is unfortunate.

Also, you multiply % modifiers, not add them. Oil (-10%) and Lead (-20%) would give:
0.9 * 0.8 = 0.72 --- it would only cost 72% of the upkeep, or be a 28% reduction in the upkeep, whichever you prefer. Everyone thinks you add them together when you start playing the game, at least until they are told or they figure out the numbers don't add up, so don't worry about missing that.

-C2Talon
Infinity. Nihility.

Options: ReplyQuote
Re: Cybernations Calculator Information
Posted by: Bozo
Date: September 03, 2010 04:55PM

So how do you do this

Options: ReplyQuote


Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.