More range shooting for Cretan archers (Mod)

Post Reply
welk
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 294
Joined: Sat Sep 08, 2007 11:56 am

More range shooting for Cretan archers (Mod)

Post by welk »

This little mod gives +1 range to Cretan archers and improves their global efficacity (100% -> 125%)

INSTALL :

1°/ After saving original, copy the attached CombatTools.BSF file in Data/Scripts
2°/ Open your Squads excel file (Data directory) : in intersection of line "Cretan Archers" ans row "Bow" replace 100 by 125 (then, convert your squads excel file in .csv file - For French players, see the special sticked thread for this conversion)
Attachments
CombatTools.7z
(29.07 KiB) Downloaded 110 times
My two loved naval games :
Victory at sea
Mare Nostrum
welk
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 294
Joined: Sat Sep 08, 2007 11:56 am

Re: More range shooting for Cretan archers (Mod)

Post by welk »

Technical precisions : Just for information other moddeurs - Not needed to read this for using the mod

The attached CombatTools.BSF replaces or completes some line of vanilla CombatTools.BSF file => these line are :

-------------------------------------------------------
This modification to allows +1 range to Cretan Archers (5 in place of 4)


// Returns the maximum shooting range of the unit
FUNCTION MaximumRange(me)
{
int range;

range = 0;

if ((GetAttrib(me, "Bombs") > 0) || (GetAttrib(me, "Javelins") > 0) || (GetAttrib(me, "Handgun") > 0))
{
range = 1;
}

if (GetAttrib(me, "Sling") > 0)
{
range = 2;
}

if (GetAttrib(me, "Bow") > 100)
{
if (IsMounted(me) == 1)
{
range = 3;
}
else
{
range = 5;
}
}

if ((GetAttrib(me, "Bow") > 0) && (GetAttrib(me, "Bow") <101) || (GetAttrib(me, "Crossbow") > 0))
{
if (IsMounted(me) == 1)
{
range = 2;
}
else
{
range = 4;
}

if (GetAttrib(me, "Bow") <= 20)
{
range = 0;
}
}

if (GetAttrib(me, "Light_Artillery") > 0)
{
range = 6;
}

if (GetAttrib(me, "Heavy_Artillery") > 0)
{
range = 9;
}

return range;
}

-------------------------------------------------------------
This modification to allow gestion of the range 5 for shotting efficacity by FOG2 program

// Bow (Foot or Mounted)
percent = GetAttrib(me, "Bow");
if (percent > 20) // Stop Late Romans long distance shooting
{
any_shooters = 1;
if (IsMounted(me) == 1)
{
range = 3;
}
else
{
range = 5;
}
if (distance > range)
{
percent = 0;
}
else
{
if ((distance == 3) || (distance == 4) || (distance == 5))
{
percent /= 2;


---------------------------------------------------------------------------------------
This modification to allow Cretan archers to use max effect in range 5

// Returns the range at which all shooters in unit can shoot at maximum effect
FUNCTION OptimumRange(me)
{
int range;

range = 0;

if (GetAttrib(me, "Heavy_Artillery") > 0)
{
range = 9;
}

if (GetAttrib(me, "Light_Artillery") > 0)
{
range = 6;
}

if ((GetAttrib(me, "Sling") > 0) || (GetAttrib(me, "Bow") > 0) || (GetAttrib(me, "Crossbow") > 0))
{
range = 2;
}

if ((GetAttrib(me, "Bombs") > 0) || (GetAttrib(me, "Javelins") > 0))
{
range = 1;
}

if (GetAttrib(me, "Bow") > 100)
{
range = 5;
}

return range;
}
My two loved naval games :
Victory at sea
Mare Nostrum
Post Reply

Return to “Field of Glory II: Modding”