|
Re: population calculations |
Sun, 19 April 2009 23:29 |
|
|
I know that Stars! does most of its work with integer/fraction arithmetic rather than floating point and the values you see are rounded to the nearest 100. I don't remember the details, but there were some interesting effects when it cam to transferring pop to and from ships to do with only being able to select multiples of 100 for transfer, unless you chose to transfer all of them..
Report message to a moderator
|
|
|
|
Re: population calculations |
Mon, 20 April 2009 06:32 |
|
PaulCr | | Chief Warrant Officer 3 Stars! V.I.P
| Messages: 187
Registered: February 2007 Location: An Island that kinda look... | |
|
Stars keeps 0-99 people hidden on the surface, I'm pretty sure they are included in the pop calculation and therefore you can be out by 200, ie say you have 19% growth and 599 people on the planet, you only see the 500 so you get growth of 95, so you are expecting 595 on the planet which would show has 500. If you run the pop calculation against the full 599 however you get 113 growth, added to the 599 that is 712 so stars would show 700 when a calculation with only the 500 you can see would expect it to still show only 500 at the end of it.
You can only get the missing people directly from the m file, they don't appear at all from the stars program although you can see the proper number of people expected on the planet next year.
With regards to rounding I haven't seen anything to suggest any rounding although I haven't checked a large number of calculations, I would expect the first calculation is rounded down before the second is run because it is almost certainly done as a single step with the 2nd being done afterwards if needed.
I'm actually thinking of writing something for pop management, mainly for use with IS Races to take into account any overflow to the planet, ie if you are trying to max pop with an OBRM IS race then you need the planet population at 275000 after the overflow, if you have enough pop in orbit to overflow say 50000, then you want to upload an extra 50000 into orbit, but those will grow as well so the orbit pop might might grow by 55000 so you now have to add an extra 5000 but those 5000 grow as well so you have to add yet another 500 and even when you do get a final figure, it is usually better to set the pop in orbit to grow a complete 100 by rounding down or up.
Report message to a moderator
|
|
|
Re: population calculations |
Wed, 22 April 2009 19:35 |
|
venom087 | | Crewman 3rd Class | Messages: 4
Registered: March 2009 | |
|
Well, that sure is tricky. I think I'm just going to have to accept that my utility won't always be 100% accurate. I wasn't planning on digging into the .m files. Thanks for the info.
[Updated on: Wed, 22 April 2009 19:35] Report message to a moderator
|
|
|
Re: population calculations |
Sun, 03 May 2009 13:29 |
|
LEit | | Lt. Commander | Messages: 879
Registered: April 2003 Location: CT | |
|
PaulCr wrote on Mon, 20 April 2009 06:32 | Stars keeps 0-99 people hidden on the surface, I'm pretty sure they are included in the pop calculation and therefore you can be out by 200, ie say you have 19% growth and 599 people on the planet, you only see the 500 so you get growth of 95, so you are expecting 595 on the planet which would show has 500. If you run the pop calculation against the full 599 however you get 113 growth, added to the 599 that is 712 so stars would show 700 when a calculation with only the 500 you can see would expect it to still show only 500 at the end of it.
|
Have you tested this or seen it in a game? I was under the impression that it kept the 0-99 but didn't include them in calculations, and instead added them to the total after the calculation. So I would expect 599 to show as 500, and then grow by 95 to 695 (showing as 600). Next year it would grow by 114 to 809.
- LEitReport message to a moderator
|
|
|