Page 1 of 1

Italy can't use oil

Posted: Fri Dec 17, 2010 11:05 am
by massina_nz
I've had something unexpected happen in one of my games. It's early 1945 and Germany has fallen before Italy. I have over 1000 oil units but the Italians can't use any of them.

Anyone got an explanation? I'm stumped.

Posted: Fri Dec 17, 2010 11:09 am
by schwerpunkt
I've run into this in a game I played against JoeRock. You still continue to get oil, just not use your stockpile. Its almost as if the stockpile belongs to Germany???

Posted: Fri Dec 17, 2010 11:38 am
by Peter Stauffenberg
This is obviously a bug that we have to look into. Can you send me an email with the save game that has the problem? Send me a PM with your email address so I can send you my email address.

Posted: Fri Dec 17, 2010 7:52 pm
by Peter Stauffenberg
The production panel to the bottom left will show the true oil consumption for Italy when Germany is conquered. I guess this shows 0. The bug is that the production panel at the top shows the oil production for the primary country (Germany). Code is added so usable oil is oil from primary, secondary and tertiary major powes belonging to a side. The secondary and tertiary are added to the primary value.

Problem is that the code didn't take into consideration that if the primary is conquered then you should actually add the oil to the secondary major power and not the primary.

This bug is fixed in GS v2.0. Unfortunately it can't be fixed in GS v1.07 since we no longer have that source code. I guess this is a vanilla game bug, but we don't fix bugs in CeaW vanilla. We only fix bugs in GS.

Each country has a separate oil pool stored and the available one is the sum of the pools. When a country is conquered the country oil pool is destroyed. So Germany will e. g. lose quite a bit of oil when Italy surrenders and it's even worse when Germany surrenders. Most of the Axis oil is generated by Germany so losing Germany means Italy will end up with little oil and no oil sources, but their off map oil production. That's the reason you end up with almost no oil when Germany surrenders.

Posted: Fri Dec 17, 2010 7:57 pm
by massina_nz
Stauffenberg wrote:The production panel to the bottom left will show the true oil consumption for Italy when Germany is conquered. I guess this shows 0. The bug is that the production panel at the top shows the oil production for the primary country (Germany). Code is added so usable oil is oil from primary, secondary and tertiary major powes belonging to a side. The secondary and tertiary are added to the primary value.

Problem is that the code didn't take into consideration that if the primary is conquered then you should actually add the oil to the secondary major power and not the primary.

This bug is fixed in GS v2.0. Unfortunately it can't be fixed in GS v1.07 since we no longer have that source code. I guess this is a vanilla game bug, but we don't fix bugs in CeaW vanilla. We only fix bugs in GS.

Each country has a separate oil pool stored and the available one is the sum of the pools. When a country is conquered the country oil pool is destroyed. So Germany will e. g. lose quite a bit of oil when Italy surrenders and it's even worse when Germany surrenders. Most of the Axis oil is generated by Germany so losing Germany means Italy will end up with little oil and no oil sources, but their off map oil production. That's the reason you end up with almost no oil when Germany surrenders.
Thanks Borger. So I guess you don't need my save game file then?

Posted: Fri Dec 17, 2010 8:12 pm
by Peter Stauffenberg
Nope. Can you please check the oil reserve shown in the production panel bottom left?

Posted: Fri Dec 17, 2010 11:21 pm
by massina_nz
Stauffenberg wrote:Nope. Can you please check the oil reserve shown in the production panel bottom left?
Yep Italy generates 1 oil per turn - bit inconvenient when most of my troops are MECHs :D

Posted: Sat Dec 18, 2010 12:18 am
by joerock22
schwerpunkt wrote:I've run into this in a game I played against JoeRock. You still continue to get oil, just not use your stockpile. Its almost as if the stockpile belongs to Germany???
Really? I didn't know that. Did you tell me at the time? Do you think it affected the end result of our game? I would hate to have won because of a bug.

Posted: Sat Dec 18, 2010 12:36 am
by schwerpunkt
joerock22 wrote:
schwerpunkt wrote:I've run into this in a game I played against JoeRock. You still continue to get oil, just not use your stockpile. Its almost as if the stockpile belongs to Germany???
Really? I didn't know that. Did you tell me at the time? Do you think it affected the end result of our game? I would hate to have won because of a bug.
I didnt mention it at the time as the biggest issue was the change of hex control which isolated some of my units. It didnt make a big difference to the last few turns as I was only moving SUBs, so no issue.