[BUG] Most Resistance- and Defense-increasing technology does absolutely nothing - Cause Found

Ticket: CBA-395-54776

While I was testing out my custom race, I discovered that the resistance tech wasn't increasing resistance. Then I discovered that almost none of the resistance techs worked. The reason for this turned out to be the fact that most Resistance techs do this:

<Stats>
<EffectType>ResistanceBonus</EffectType>
<Target>
<TargetType>Faction</TargetType>
</Target>
<BonusType>Flat</BonusType>
<Value>0.2</Value>
</Stats>

End of quote

However, unlike Soldiering, ResistanceBonus and PlanetaryDefense are not Faction stats, they are Colony stats, so it started working once I changed it to this:

<Stats>
<EffectType>ResistanceBonus</EffectType>
<Scope>Global</Scope>
<Target>
<TargetType>Colony</TargetType>
</Target>
<BonusType>Flat</BonusType>
<Value>0.2</Value>
</Stats>

End of quote

Interestingly, there actually WAS one Resistance-boosting tech in the default tech tree that had this set correctly, but all the others incorrectly set their scope to Faction.

15,891 views 7 replies +2 Loading…
Reply #1 Top

I thought I saw this happening! Just my empire was too big to pin it down easily. Good catch!

Reply #2 Top

Update: This also happens with Planetary Defense.

Quoting Christian_Akacro, reply 1

I thought I saw this happening! Just my empire was too big to pin it down easily. Good catch!
End of Christian_Akacro's quote

The AI loves to go for planetary resistance technology, too, so it should help them actually defend now.

EDIT: Ticket submitted. CBA-395-54776

Reply #3 Top

This is still present in the 1.03 opt-in.

Reply #4 Top

Quoting Sansloi37, reply 3

This is still present in the 1.03 opt-in.
End of Sansloi37's quote

Still present, and I know why. It was changed to this:

<Stats>
<EffectType>ResistanceBonus</EffectType>
<Target>
<TargetType>Colony</TargetType>
</Target>
<BonusType>Flat</BonusType>
<Value>0.1</Value>
</Stats>
End of quote

It needs to be this:

<Stats>
<EffectType>ResistanceBonus</EffectType>
<Scope>Global</Scope>
<Target>
<TargetType>Colony</TargetType>
</Target>
<BonusType>Flat</BonusType>
<Value>0.1</Value>
</Stats>
End of quote

EDIT: Submitted ticket #WCS-875-33946

Planetary Defense technologies were not touched, and they also need this exact fix.

+2 Loading…
Reply #5 Top

Suddenly, I got a notification in Notepad++ that TechDefs was changed, so I reloaded it... fixed! Works now. Both defense and resistance techs.

Reply #6 Top

No it is not, at least not for all of them.

  • Altarian: Staller Marines gives a multiplier for PlanetaryDefense. PlanetaryDefense is already an multiplier in it self;
  • Drengin: fixed;
  • Iconians: fixed;
  • Iridium: fixed;
  • Krynn: JihadFocus2 has the same fault as the Altarian Staller Marines;
  • Terrans: fixed;
  • Thalan: fixed;
  • Yor fixed;
  • Generic Techdefs.xml: fixed.

So they almost got them all. :moo:

 

Reply #7 Top

Well this might explain why it is so easy to run through all the enemy colonies... Nice find!