Enhanced artillery fire power
Moderators: rbodleyscott, Slitherine Core, Gothic Labs
-
- Lieutenant Colonel - Elite Panther D
- Posts: 1368
- Joined: Tue Dec 08, 2009 9:38 am
- Location: Italy
Enhanced artillery fire power
Hi guys!
Being working on an Age of Reason mod I would like to enhance a bit the power fire of artillery pieces.
I tried, very simply, to give the selected units a superior morale status but it doesn't seem to achieve nothing.
Has anyone some hints about haw to reach the desired effect?
Many thanks for your help!
Being working on an Age of Reason mod I would like to enhance a bit the power fire of artillery pieces.
I tried, very simply, to give the selected units a superior morale status but it doesn't seem to achieve nothing.
Has anyone some hints about haw to reach the desired effect?
Many thanks for your help!
"Audentis fortuna iuvat"
- Virgilius
(Good luck favours the brave)
- Virgilius
(Good luck favours the brave)
Re: Enhanced artillery fire power
I could have answered you a few years ago when I played with modding P&S. Unfortunately, I don't remember.
Maybe, before looking at the Scripts files, you could try to modify the squads file comparing it with what have already been done (ie. modded squads files), if you haven't done it yet :
1) Download, for example, Cronos' mod : https://www.slitherine.com/forum/viewtopic.php?t=110276
2) Open squads.csv both in your Vanilla P&S folder (in your steamapps if you use Steam) and in Cronos' mod.
3) Also open squads.xlsx in your Vanilla P&S folder
4) Compare a type of artillery in both squads.csv files. For example :
In the mod :
Saxon_Heavy_Cannon1,142,Allies,1,Artillery,Artillery,1,60,25,200,20,36,0,1,6,400,1,0,saxon_h_artillery,100,0,1,0,0,0,-1,1,0,200,100,200,0,100,100,0,0,100,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,,0,0,0,100,,,-1,6900,1,-100,1,100,,,0
In P&S :
Red_Heavy_Guns,22,Axis,2,Artillery,Artillery,1,60,25,200,20,50,0,1,0,0,1,0,Heavy_Guns,100,0,1,0,0,0,0,0,0,0,0,0,-1,1,-2,0,0,0,0,0,0,200,100,200,0,100,100,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,,,,
5) Look for numbers that are different in both lines
6) Look for what these numbers correspond in the squads.xlsx file to understand their use :

For example :
- in the squads.xlsx file above, column AH is 'bombard_shots'
- in P&S : -2
- in the mod : 100 (if I am not mistaken)
7) Make modifications, tests, tweak values...
The best for you about 'bombard_shots' may be -2 (as in Vanilla), 10, 50, 70, 100 (as in this mod), 200...
Hoping that it will help and that I don't say too much nonsense, it's been a long time since I didn't mod
Hoping you'll get your way !
PS : first verifiy any changes of columns between the squads.csv in P&S and in FoG2, comparing the column headers in their Vanilla squads.xlsx (in your steamapps ?) (btw for this reason, my example about the AH column might be wrong).
Maybe, before looking at the Scripts files, you could try to modify the squads file comparing it with what have already been done (ie. modded squads files), if you haven't done it yet :
1) Download, for example, Cronos' mod : https://www.slitherine.com/forum/viewtopic.php?t=110276
2) Open squads.csv both in your Vanilla P&S folder (in your steamapps if you use Steam) and in Cronos' mod.
3) Also open squads.xlsx in your Vanilla P&S folder
4) Compare a type of artillery in both squads.csv files. For example :
In the mod :
Saxon_Heavy_Cannon1,142,Allies,1,Artillery,Artillery,1,60,25,200,20,36,0,1,6,400,1,0,saxon_h_artillery,100,0,1,0,0,0,-1,1,0,200,100,200,0,100,100,0,0,100,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,,0,0,0,100,,,-1,6900,1,-100,1,100,,,0
In P&S :
Red_Heavy_Guns,22,Axis,2,Artillery,Artillery,1,60,25,200,20,50,0,1,0,0,1,0,Heavy_Guns,100,0,1,0,0,0,0,0,0,0,0,0,-1,1,-2,0,0,0,0,0,0,200,100,200,0,100,100,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,,,,
5) Look for numbers that are different in both lines
6) Look for what these numbers correspond in the squads.xlsx file to understand their use :

For example :
- in the squads.xlsx file above, column AH is 'bombard_shots'
- in P&S : -2
- in the mod : 100 (if I am not mistaken)
7) Make modifications, tests, tweak values...
The best for you about 'bombard_shots' may be -2 (as in Vanilla), 10, 50, 70, 100 (as in this mod), 200...
Hoping that it will help and that I don't say too much nonsense, it's been a long time since I didn't mod

Hoping you'll get your way !
PS : first verifiy any changes of columns between the squads.csv in P&S and in FoG2, comparing the column headers in their Vanilla squads.xlsx (in your steamapps ?) (btw for this reason, my example about the AH column might be wrong).
Re: Enhanced artillery fire power
Lysimachos wrote: ↑Mon Nov 04, 2024 4:12 pm Hi guys!
Being working on an Age of Reason mod I would like to enhance a bit the power fire of artillery pieces.
I tried, very simply, to give the selected units a superior morale status but it doesn't seem to achieve nothing.
Has anyone some hints about haw to reach the desired effect?
Many thanks for your help!
You would need to change the artillery POA values in the scripts, possibly in CombatTools.bsf. There is nothing in the Squads.csv that would change their effectiveness.
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Field of Glory II Medieval Scenario Designer.
FOGII TT Mod Creator
Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
-
- Lieutenant Colonel - Elite Panther D
- Posts: 1368
- Joined: Tue Dec 08, 2009 9:38 am
- Location: Italy
Re: Enhanced artillery fire power
Thank's guys for the hints!
I'm going to have a look at the CombatTools.bsf.
I'm going to have a look at the CombatTools.bsf.

"Audentis fortuna iuvat"
- Virgilius
(Good luck favours the brave)
- Virgilius
(Good luck favours the brave)
Re: Enhanced artillery fire power
You can change artillery firepower in Shooting_Logic.BSF. An example from my mod (where I added more powerful artillery canister shots, when the distance is 4 tiles or less):Lysimachos wrote: ↑Mon Nov 04, 2024 4:12 pm Hi guys!
Being working on an Age of Reason mod I would like to enhance a bit the power fire of artillery pieces.
I tried, very simply, to give the selected units a superior morale status but it doesn't seem to achieve nothing.
Has anyone some hints about haw to reach the desired effect?
Many thanks for your help!
// Artillery more random than other types - but high damage hits less frequent than low damage hits
if ((IsUnitSquadType(me, "Artillery") == 1) || (IsUnitSquadType(me, "Light_Artillery") == 1))
{
if (distance > 4)
{
skew_type = 2;
minDam = 0;
maxDam = base_damage * 3;
}
else
{
skew_type = 1;
minDam = base_damage * 2;
maxDam = base_damage * 4;
}
}
else
{
skew_type = 1;
minDam = base_damage / 2;
maxDam = base_damage * 3;
maxDam /= 2;
}
-
- Lieutenant Colonel - Elite Panther D
- Posts: 1368
- Joined: Tue Dec 08, 2009 9:38 am
- Location: Italy
Re: Enhanced artillery fire power
Really interesting stuff, Cronos, I'll take care of the great tip! (hoping to release soon a first little version of the mod I'm working on)
"Audentis fortuna iuvat"
- Virgilius
(Good luck favours the brave)
- Virgilius
(Good luck favours the brave)
-
- Lieutenant Colonel - Elite Panther D
- Posts: 1368
- Joined: Tue Dec 08, 2009 9:38 am
- Location: Italy
Re: Enhanced artillery fire power
I've tried to work on the Shooting_Logic.BSF file but I'm not really happy of the results.
Probably I miss something.
First of all I don't understand what the skew_type definition refers to.
Secondly, it seems to me that augmenting the numbers in the minDam and maxDam column should enhance the chance of making casaulties but it doesn't seem to have a real impact because in many occasion the gun shot is completely useless and no one is killed ...
Is there anyone that can explain a bit how the file really works?
Thanks for any hint
Probably I miss something.
First of all I don't understand what the skew_type definition refers to.
Secondly, it seems to me that augmenting the numbers in the minDam and maxDam column should enhance the chance of making casaulties but it doesn't seem to have a real impact because in many occasion the gun shot is completely useless and no one is killed ...
Is there anyone that can explain a bit how the file really works?
Thanks for any hint
"Audentis fortuna iuvat"
- Virgilius
(Good luck favours the brave)
- Virgilius
(Good luck favours the brave)
Re: Enhanced artillery fire power
There is the FUNCTION SkewedRandom(min, max, skew_type) in Tools.BSF - all skew types are described in comments:Lysimachos wrote: ↑Sat Jan 11, 2025 8:02 pm First of all I don't understand what the skew_type definition refers to.
Code: Select all
// Returns skewed randomly generated number.
FUNCTION SkewedRandom(min, max, skew_type)
{
int result;
int randomizer;
int difference;
if (skew_type == 0) // Uniform distribution
{
result = Rand(min,max);
}
if (skew_type == 1) // Bell-shaped distribution
{
result = Rand(min,max) + Rand(min,max);
result /= 2;
}
if (skew_type == 2) // Left skew (low values predominant)
{
// This version is equivalent to (Rand(0, max - min) ^ 2) / ((max - min) ^ 1) + min.
// It gives an average value of approximately 2/3 of the average of a non-skewed range.
difference = max - min;
result = Rand(0, difference);
result *= result;
result /= difference;
result += min;
}
if (skew_type == 3) // Right skew (high values predominant)
{
// Not yet implemented.
Log ("Skew Type 3 not yet implemented");
result = Rand(min,max); // To avoid crashing if it is attempted to be used.
}
return result;
}
-
- Lieutenant Colonel - Elite Panther D
- Posts: 1368
- Joined: Tue Dec 08, 2009 9:38 am
- Location: Italy
Re: Enhanced artillery fire power
Thanks mate for the further explanation.
It seems to me that now I'm (hopefully) beginning to better understand the mechanism involved in the script.
Will make some trials and then I'll report the results!
It seems to me that now I'm (hopefully) beginning to better understand the mechanism involved in the script.
Will make some trials and then I'll report the results!
"Audentis fortuna iuvat"
- Virgilius
(Good luck favours the brave)
- Virgilius
(Good luck favours the brave)
-
- Lieutenant Colonel - Elite Panther D
- Posts: 1368
- Joined: Tue Dec 08, 2009 9:38 am
- Location: Italy
Re: Enhanced artillery fire power
At the moment it seems I've obtained good results for a more impressive gun fire (no 0 casualties reports, damages generally between 10 and 25 and some provoked disruptions) inserting the skew_type=0 as follows:
// Artillery more random than other types - but high damage hits less frequent than low damage hits
if ((IsUnitSquadType(me, "Artillery") == 1) || (IsUnitSquadType(me, "Light_Artillery") == 1))
{
skew_type = 0;
minDam = base_damage / 2;
maxDam = base_damage * 3;
}
else
{
skew_type = 1;
minDam = base_damage / 2;
maxDam = base_damage * 3;
maxDam /= 2;
}
if ((print == 1) && (printPOAs == 0))
{
// Artillery more random than other types - but high damage hits less frequent than low damage hits
if ((IsUnitSquadType(me, "Artillery") == 1) || (IsUnitSquadType(me, "Light_Artillery") == 1))
{
skew_type = 0;
minDam = base_damage / 2;
maxDam = base_damage * 3;
}
else
{
skew_type = 1;
minDam = base_damage / 2;
maxDam = base_damage * 3;
maxDam /= 2;
}
if ((print == 1) && (printPOAs == 0))
{
"Audentis fortuna iuvat"
- Virgilius
(Good luck favours the brave)
- Virgilius
(Good luck favours the brave)