|
|
|
|
|
August 2nd, 2008, 08:01 PM
|
First Lieutenant
|
|
Join Date: Nov 2006
Posts: 739
Thanks: 1
Thanked 8 Times in 8 Posts
|
|
Re: Population Resets to Zero
The situation stated in the OP can't happen.
I just reproduced the problem, the reset occurred in the vicinity of 320000 people. I wasn't watching closely as I thought I was a long way from the reset point so I don't have the exact number. I strongly suspect 327670 is the largest possible population. It's year 36.
Note that the gems reset if you go over 32767 gems. They wrap into negative numbers, though--you can't use the gem type until you've collected another 32768 of them.
|
August 2nd, 2008, 08:48 PM
|
Major General
|
|
Join Date: Mar 2007
Location: Seattle
Posts: 2,497
Thanks: 165
Thanked 105 Times in 73 Posts
|
|
Re: Population Resets to Zero
Thanks for checking that out, Loren. The gems is also good to know about, although it's hard to conceive of hitting that limit in one of my games (doubt I've ever banked even 1000 gems).
-Max
__________________
Bauchelain - "Qwik Ben iz uzin wallhax! HAX!"
Quick Ben - "lol pwned"
["Memories of Ice", by Steven Erikson. Retranslated into l33t.]
|
August 2nd, 2008, 11:41 PM
|
First Lieutenant
|
|
Join Date: Nov 2006
Posts: 739
Thanks: 1
Thanked 8 Times in 8 Posts
|
|
Re: Population Resets to Zero
It occurs to me that I ought to mention one other thing I learned in that test: Three Red Seconds can be cast on an enemy province.
The game goes very fast if you have a sufficiently powerful siege force in every enemy province. I couldn't simply take the provinces because that would have reduced his dominion and risked an unwanted dominion kill.
|
August 3rd, 2008, 12:27 PM
|
Corporal
|
|
Join Date: Dec 2006
Location: My Own Reality
Posts: 64
Thanks: 18
Thanked 0 Times in 0 Posts
|
|
Re: Population Resets to Zero
I'am sorry but I didn't imagine my population resetting at around 500k three times. The situation stated by myself in the OP can and did happen to me on three occasions.
|
August 3rd, 2008, 06:39 PM
|
|
National Security Advisor
|
|
Join Date: Sep 2003
Location: Eastern Finland
Posts: 7,110
Thanks: 145
Thanked 153 Times in 101 Posts
|
|
Re: Population Resets to Zero
How sure are you about that 500 000 value? There is an overflow bug, but if it doesn't always happen at same point there's something weird going on. I doubt the pop cap would be terrain dependent, but I can't think of anything else ATM.
|
August 3rd, 2008, 07:06 PM
|
|
Second Lieutenant
|
|
Join Date: Jul 2007
Location: Durham, NC
Posts: 509
Thanks: 84
Thanked 44 Times in 14 Posts
|
|
Re: Population Resets to Zero
There's a really tiny chance that the variable used to keep track of the population is two unsigned chars. "Unsigned" meaning it goes from 0-512 instead of -256 to 256, then the value multiply by some constant to get the actual value displayed in the game. If that was the case then the population would overflow to 0 at 512, but a char is not the optimal data type to store this kind of value so it's not likely.
|
August 3rd, 2008, 11:50 PM
|
First Lieutenant
|
|
Join Date: Nov 2006
Posts: 739
Thanks: 1
Thanked 8 Times in 8 Posts
|
|
Re: Population Resets to Zero
Quote:
sector24 said:
There's a really tiny chance that the variable used to keep track of the population is two unsigned chars. "Unsigned" meaning it goes from 0-512 instead of -256 to 256, then the value multiply by some constant to get the actual value displayed in the game. If that was the case then the population would overflow to 0 at 512, but a char is not the optimal data type to store this kind of value so it's not likely.
|
What?!?!?!
An unsigned byte goes from 0 to 255. A signed byte goes from -127 to 127.
An unsigned word goes from 0 to 65535. A signed word goes from -32767 to 32767.
This latter is what I think they used and they are adding an extra zero for display purposes.
|
August 4th, 2008, 12:04 AM
|
|
Second Lieutenant
|
|
Join Date: Jul 2007
Location: Durham, NC
Posts: 509
Thanks: 84
Thanked 44 Times in 14 Posts
|
|
Re: Population Resets to Zero
Right, but what mordici is saying is that his population is rolling over at 500k. The closest variable being 2 unsigned chars (512 x 1000), even though that would be inefficient. Hence its unlikeliness.
|
August 4th, 2008, 03:27 PM
|
First Lieutenant
|
|
Join Date: Nov 2006
Posts: 739
Thanks: 1
Thanked 8 Times in 8 Posts
|
|
Re: Population Resets to Zero
Quote:
sector24 said:
Right, but what mordici is saying is that his population is rolling over at 500k. The closest variable being 2 unsigned chars (512 x 1000), even though that would be inefficient. Hence its unlikeliness.
|
Where are you getting this 512 from, though? Modern machines use 8-bit bytes!
|
August 5th, 2008, 01:04 AM
|
Corporal
|
|
Join Date: Dec 2006
Location: My Own Reality
Posts: 64
Thanks: 18
Thanked 0 Times in 0 Posts
|
|
Re: Population Resets to Zero
I just want to clarify what I said again cause sector24 said that my population was rolling over at 500k.
My population rolled over at around 500k, which means that somewhere between 400 and 500k a rollover did occur. In all three cases I didn't notice it on the turn it happened, so I have no idea exactly what amount my population was at before it happened.
Also, I don't know if this has any bearing on this, but I'll provide this anyway. I run this game on a Macintosh computer running Mac OS X 10.4.11 and it is version 3.17 of Dominions. I don't know exactly what mods were running at the time, but there are a few I know for sure where running. They were the following:
Better Independents
Better Independents Resource
Deadly Seas
I hope this information helps.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|