Page 1 of 1
Twotribes Manpower bug, GD1938v3
Posted: Sat Jan 19, 2019 12:38 am
by ernieschwitz
Ok,
I've been looking into the bug, and so far found nothing. So I am going to ask you... What edits did you actually make. Did you change any of the code, or stringlists?
RE: Twotribes Manpower bug, GD1938v3
Posted: Sat Jan 19, 2019 1:05 am
by Twotribes
No all I did is double production of all production facilities (well a made complexes 15k production), I added a few cargo premades to starting cities and added a few units to a couple headquarters. Also add some PP to each nation.
I am pretty sure but not positive that China went to 15k neg after the first transfer or so of Soviet Equipment and that Britain went to neg after the Indians produced more units in manpower then Indian contributes.
The British were doing it before in 101 with no changes.
RE: Twotribes Manpower bug, GD1938v3
Posted: Sat Jan 19, 2019 1:17 am
by ernieschwitz
It is very strange.
I looked at all the things I could think of. I looked in the code, and nothing seemed wrong. I looked in the stringlists (They govern how much manpower there is in each location. Non-locations add nothing to manpower). I looked in the variables that you can set to a fixed value, and nothing was out of the ordinary, or looked wrong.
Basically I am at a loss, so far.
I might send the file to Vic for analysis.
RE: Twotribes Manpower bug, GD1938v3
Posted: Sat Jan 19, 2019 1:51 am
by ernieschwitz
I might be on to something.
Both the two countries (China and Britain) have very high numbers when it comes to their population base. It might be that the numbers added together, coupled with that both countries have played the card to increase their manpower levels is responsible (level 4 both). I need to do more investigating.
RE: Twotribes Manpower bug, GD1938v3
Posted: Sat Jan 19, 2019 2:38 am
by ernieschwitz
I was right!
Bug confirmed, and fixed.
The fix will cause a slight downward adjustment in manpower gains. Not much, about 1-4 less for some countries, at their current recruitment levels.
Example: Before the fix Japan had 1021 own manpower, and 402 for other sources. After the fix it is 1017 and 399.
This change is due to the way things are done when calculating in ATG. If you divide something by 10, it rounds down to nearest whole number. So the remainders are not considered. So if you want to multiply something by 1.3 you would have to do it by multiplying first with 13, and then dividing by 10. I had to switch some of the dividing and multiplying to a different order, thus there are some slight rounding issues. Not big stuff, but still, thought I'd mention it.
The problem was that a certain amount of digits is reserved for the size of a number. If calculations bring that number above the digits allowed, the computer interprets it as there is a minus sign ahead of the number instead. I was hitting that number.
I'll put it into the next version I get uploaded (1.0.2)
RE: Twotribes Manpower bug, GD1938v3
Posted: Mon Jan 21, 2019 2:48 am
by Twotribes
The Chinese stopped being negative but the British still are. Not sure what changed.
RE: Twotribes Manpower bug, GD1938v3
Posted: Mon Jan 21, 2019 3:13 am
by ernieschwitz
Overflow. Once the negative numbers get too big, they revert back again.