I notice that in the campaigns, there are txt files containing each general's info.
What do the three parameters (type, quality, combat) mean? I assume combat is the duel rating of the general, but how do type and quality affect combat radius?
Editing Generals txt files
-
- Field of Glory 2
- Posts: 28014
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Editing Generals txt files
type is 0 = Sub-General, 1 = CinC, 2 = Ally Generalkvnrthr wrote:I notice that in the campaigns, there are txt files containing each general's info.
What do the three parameters (type, quality, combat) mean? I assume combat is the duel rating of the general, but how do type and quality affect combat radius?
quality affects command range - 0 = 4, 1 = 8, 2 = 12 squares.
Richard Bodley Scott
Re: Editing Generals txt files
I would like to ask a question about general names. Whether it is possible to make division of lists of names for CinC-generals and sub-generals within one sideID for a campaign? I know how to make these lists in .txt file. I do not know how to set a condition for CinC with scripts (maybe in FUNCTION GetRandomGeneralName(nameType, sideID) in GeneralTools.BSF)
-
- Field of Glory 2
- Posts: 28014
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Editing Generals txt files
That would be the right place. But the function does not know whether it is looking for a C-in-C name or a SG/AG name.mkrass wrote:I would like to ask a question about general names. Whether it is possible to make division of lists of names for CinC-generals and sub-generals within one sideID for a campaign? I know how to make these lists in .txt file. I do not know how to set a condition for CinC with scripts (maybe in FUNCTION GetRandomGeneralName(nameType, sideID) in GeneralTools.BSF)
It would require some other modding to make it work.
Richard Bodley Scott
Re: Editing Generals txt files
It seems to me that I found a script combination for this from CampaignTools.bsf. At least I'm satisfied with the result.rbodleyscott wrote:That would be the right place. But the function does not know whether it is looking for a C-in-C name or a SG/AG name.mkrass wrote:I would like to ask a question about general names. Whether it is possible to make division of lists of names for CinC-generals and sub-generals within one sideID for a campaign? I know how to make these lists in .txt file. I do not know how to set a condition for CinC with scripts (maybe in FUNCTION GetRandomGeneralName(nameType, sideID) in GeneralTools.BSF)
It would require some other modding to make it work.
Resulting script in FUNCTION GetRandomGeneralName(nameType, sideID) in GeneralTools.BSF:
Code: Select all
if (sideID == 16)
{
if (CinC != 255)
{
if (nameType == 0)
{
ret = 0;
}
if (nameType == 1)
{
ret = FXRand(500,504);
}
if (nameType == 2)
{
ret = 500;
}
}
unitCount = GetUnitCount(side);
for (i = 0; i < unitCount; i++)
{
id = GetUnitID(side, i);
if (id != -1)
{
if (GetAttrib(id, "General") > -1)
{
if (GetAttrib(id, "GeneralType") != 1)
{
if (nameType == 0)
{
ret = 0;
}
if (nameType == 1)
{
ret = FXRand(505,515);
}
if (nameType == 2)
{
ret = FXRand(505,515);
}
}
}
}
}
}