Skip to content

[GEN][ZH] Fix nationalism and patriotism/fanaticism being applied when not in a horde #1300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4473,17 +4473,17 @@ void AIUpdateInterface::evaluateMoraleBonus( void )
//if ( draw && !us->isKindOf( KINDOF_PORTABLE_STRUCTURE ) )
// draw->setTerrainDecal(TERRAIN_DECAL_NONE);

// horde
if( horde )
{
us->setWeaponBonusCondition( WEAPONBONUSCONDITION_HORDE );

} // end if
else
us->clearWeaponBonusCondition( WEAPONBONUSCONDITION_HORDE );

// nationalism
#if RETAIL_COMPATIBLE_CRC
if( nationalism )
#else
//TheSuperHackers @bugfix GeneralCamo/Mauller nationalism should only be applied when within a horde
if( horde && nationalism )
#endif
us->setWeaponBonusCondition( WEAPONBONUSCONDITION_NATIONALISM );
else
us->clearWeaponBonusCondition( WEAPONBONUSCONDITION_NATIONALISM );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4742,29 +4742,32 @@ void AIUpdateInterface::evaluateMoraleBonus( void )
//if ( draw && !us->isKindOf( KINDOF_PORTABLE_STRUCTURE ) )
// draw->setTerrainDecal(TERRAIN_DECAL_NONE);

// horde
if( horde )
{
us->setWeaponBonusCondition( WEAPONBONUSCONDITION_HORDE );

} // end if
else
us->clearWeaponBonusCondition( WEAPONBONUSCONDITION_HORDE );

// nationalism
#if RETAIL_COMPATIBLE_CRC
if( nationalism )
{
#else
//TheSuperHackers @bugfix GeneralCamo/Mauller nationalism and fanaticism should only be applied when within a horde
if( horde && nationalism )
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This clearly was the original intent/design, BUT we need to make this corrected behavior opt-in in GameData.ini because it is a Controversial change that makes China weaker.

GameData.ini:

  WeaponBonus = HORDE  RATE_OF_FIRE  150%  ;Horded troops fire their weapons 25% faster
  WeaponBonus = NATIONALISM  RATE_OF_FIRE  125%  ;Horded troops with nationalism fire their weapon an additional 25% faster
  WeaponBonus = FANATICISM   RATE_OF_FIRE  125%  ;Horded troops with nationalism fire their weapon an additional 25% faster

So we need to have something like:

HordeWeaponBonus = NATIONALISM  RATE_OF_FIRE  125%
HordeWeaponBonus = FANATICISM  RATE_OF_FIRE  125%

with

WeaponBonus = HORDE  RATE_OF_FIRE  150%

being a HordeWeaponBonus implictly.

That way the code also does not need using RETAIL_COMPATIBLE_CRC.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no evidence that this was "clearly" a design decision or intention. This is contradicted by both the original manual and the in-game description, which states that the bonus applies to horde bonus specifically.

Copy link

@xezon xezon Jul 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you misread my comment. I am claiming that the intention was that Nationalism was meant to apply to Hordes.

The ini comment is pretty clear on this with

;Horded troops with nationalism fire their weapon an additional 25% faster

Also as you said the tooltip is clear on this:

CONTROLBAR:TooltipChinaUpgradeNationalism
"+25% to Horde bonus for Red Guard, Tank Hunter and Battlemaster"

And the terrain decal of the Nationalism Horde is also clear on this:

image

Still, this change is controversial, because it significantly affects gameplay and therefore needs to be treated with care.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might be worth play testing it at some point to see how much it affects normal gameplay.
I would imagine that affected units would be horded a lot of the time so typically would be getting all bonuses.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that is for much later. This change is too early.

#endif
{
us->setWeaponBonusCondition( WEAPONBONUSCONDITION_NATIONALISM );
// fanaticism
if ( fanaticism )
us->setWeaponBonusCondition( WEAPONBONUSCONDITION_FANATICISM );// FOR THE NEW GC INFANTRY GENERAL
else
us->clearWeaponBonusCondition( WEAPONBONUSCONDITION_FANATICISM );
}

if ( fanaticism )
us->setWeaponBonusCondition( WEAPONBONUSCONDITION_FANATICISM );
else
us->clearWeaponBonusCondition( WEAPONBONUSCONDITION_FANATICISM );
}
else
{
us->clearWeaponBonusCondition( WEAPONBONUSCONDITION_NATIONALISM );


#if !RETAIL_COMPATIBLE_CRC
us->clearWeaponBonusCondition( WEAPONBONUSCONDITION_FANATICISM );
#endif
}

} // end if
#ifdef ALLOW_DEMORALIZE
Expand Down
Loading