Answered: How to change the generals command range

Post Reply
RLO92
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 6
Joined: Sun Feb 05, 2017 6:15 pm

Answered: How to change the generals command range

Post 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
Last edited by RLO92 on Wed Feb 01, 2023 7:44 pm, edited 2 times in total.
RLO92
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 6
Joined: Sun Feb 05, 2017 6:15 pm

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

Post 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
Post Reply

Return to “Field of Glory II: Modding”