Page 1 of 1

Answered: How to change the generals command range

Posted: Sat Jan 28, 2023 10:56 am
by RLO92
Greetings,

so I'd like to change the command range of the generals. Any idea where I can find the critical entry?

So from 8 to 12 for CinC or Quality1 SubGeneral;
and from 4 to 8 for Quality0 Subgeneral.

I found the following function in the GeneralTools.bsf:

FUNCTION GetGeneralRange(me, type)
{
int quality;
int range;

quality = GetAttrib(me, "GeneralQuality");

if (quality == 0) // TC
{
range = 4;
}
else
{
if (quality == 1) // FC
{
range = 8;
}
else // IC
{
range = 8;
}
}

if (type == 0)
{
range /= 4;
}

return range;
}

Changing the parameters doesn't seem to work; or at least it doesnt' show visually. Am I missing something?

Thanks in advance.

Greetings
RLo

Re: Question: How to change the generals command range?

Posted: Wed Feb 01, 2023 7:44 pm
by RLO92
If anyone was wandering:
The above line in GeneralsTools.BSF is indeed the correct line to apply the Generals CommandRange.

However for changing the visual effect of the command range (hotkey 3) you need to access the file Callbacks.BSF under the following line:

// Show general command range
if ((gShowCommandRange == 1) && (showSide == GetUnitSide(me)))
{
if (GetCurrentSelectedUnit() == me)
{
if (GetAttrib(me, "General") != -1)
{
range = (GetAttrib(me, "GeneralQuality") + 1) * 4;


Greetings
RLo