Page 1 of 1
Defense Bonus set to 0 in Editor but 0.5 is being sent to the game
Posted: Mon Apr 29, 2024 1:02 am
by Lothos
Screenshots show it, the Defense Bonus is set to 0 for all Resource Types
But 0.5 is being sent for all of the fields you see below for all resource types but this only happens when AA upgrade is at 1.
The upgrade itself is at 1 for each of thoes fields and you can see it in the value portion of the screenshot.
Re: Defense Bonus set to 0 in Editor but 0.5 is being sent to the game
Posted: Mon Apr 29, 2024 8:00 am
by BillRunacre
What does the screen in the Editor for the actual upgrade benefits for AA show?
(Terrain defense bonus data as shown in your second image will not be shown in the resource's properties screen).
Re: Defense Bonus set to 0 in Editor but 0.5 is being sent to the game
Posted: Mon Apr 29, 2024 10:15 am
by El_Condoro
Yes, it's the resource bonuses for the research that is being added.
[Edit]: One for the devs. Why does the naval value show zero when there is a 2 bonus. I thought it might be because a naval unit can't occupy a capital but neither can a carrier, which does show the bonus.

Re: Defense Bonus set to 0 in Editor but 0.5 is being sent to the game
Posted: Mon Apr 29, 2024 10:33 am
by Lothos
BillRunacre wrote: Mon Apr 29, 2024 8:00 am
What does the screen in the Editor for the actual upgrade benefits for AA show?
(Terrain defense bonus data as shown in your second image will not be shown in the resource's properties screen).
Here you go
Re: Defense Bonus set to 0 in Editor but 0.5 is being sent to the game
Posted: Mon Apr 29, 2024 11:41 am
by El_Condoro
There seems to be a bug here. It happens in the basic campaign, too.
When AA for a resource (Settlement to Major Capital) 0.5 per level of AA is added to the Defense Bonus (cf. Defense Values) for each type of air unit, even if the AA research should not give that. When the AA level is set to 5 for a country, its settlements, towns, capitals et al all give 0.5, 1.0, 1.5, 2.0, and 2.5 as a Defense Bonus according to the level of AA.
This can be seen in the editor when the properties of the resource are viewed and changed.
Good spot, Lothos.
Re: Defense Bonus set to 0 in Editor but 0.5 is being sent to the game
Posted: Thu May 02, 2024 6:19 pm
by Hubert Cater
This looks purposeful as far as I can tell from my end, e.g. I'm guessing at one time the defence bonus a unit would receive for being on a resource was a full point, or whatever the full value of the increment was set in the editor, and it must have been determined at some point it was too much, so was later halved (per level) as you can see from your screenshots.
Hope this helps!
Re: Defense Bonus set to 0 in Editor but 0.5 is being sent to the game
Posted: Thu May 02, 2024 6:44 pm
by Lothos
Hubert Cater wrote: Thu May 02, 2024 6:19 pm
This looks purposeful as far as I can tell from my end, e.g. I'm guessing at one time the defence bonus a unit would receive for being on a resource was a full point, or whatever the full value of the increment was set in the editor, and it must have been determined at some point it was too much, so was later halved (per level) as you can see from your screenshots.
Hope this helps!
Hi Hubert
So you are saying the 0.5 bonus is hardcoded and not changable or removable?
Re: Defense Bonus set to 0 in Editor but 0.5 is being sent to the game
Posted: Thu May 02, 2024 8:30 pm
by Hubert Cater
It is hard coded in the sense that when there is an upgrade to the resource, e.g. via Anti-Aircraft levels, a bonus is applied to the benefit of the resource.
In this case, the resource has a bonus applied to its stats taking into account direct attacks, and then the units on top of that resource will also have a 'defense bonus' improvement applied from the benefit of the Anti Aircraft levels.
The question at that point was just how much and it looks like the full value was felt to be too much... thus the benefit was halved.