How to change morale level for suppression/white flag?
Posted: Wed Oct 17, 2012 8:37 am
Does anyone know where the code is that affects the suppression level of units?
Granfali has updated MoraleTools.BSF to reduce suppression morale from 50 to 0 (making for tougher infantry for our GJS campaign).
The problem is the white flag that usually shows up over suppressed units still shows at 50, not 0.
This looks like the code that shows the white flag, but all the 50s have already been switched to 0s.
Could the white flag be anywhere else?
Thanks!
GL88
Granfali has updated MoraleTools.BSF to reduce suppression morale from 50 to 0 (making for tougher infantry for our GJS campaign).
The problem is the white flag that usually shows up over suppressed units still shows at 50, not 0.
This looks like the code that shows the white flag, but all the 50s have already been switched to 0s.
Could the white flag be anywhere else?
Thanks!
GL88
Code: Select all
// if morale low suppress unit
if ( (before >= 0) && (morale < 0 ) && ( destroyed == 0 ) )
{
AddVizFunctionCall ("SetUnitIconMask", me, 8) ;
// if unit is visible show suppression
// play "pinned down"
PlayVoice (FXRand(162,164), me, 3 ) ;
AddVizUnitText(me, "IDS_UNIT_SUPPRESSED", "ffffff") ;
// vehciles retreat one tile as they cant really take cover
if ( GetAttrib(me, "Blocking") != 0 )
{
Log ("MoraleUpdate armour suppressed retreat");
RetreatToCover (me, 0, 1, 1) ;
}
// suppressed units lose action points immediately
ap = GetBaseAttrib(me, "AP") / 4 ;
ap = GetAttrib(me, "AP") - ap ;
if ( ap < 0 )
{
ap = 0 ;
}
SetAttrib(me, "AP", ap) ;
}