Making an army's team all disrupted at the start of a battle . . .
Posted: Thu Jul 21, 2022 1:45 pm
Sorry, I would have sent this by e-mail but it is chewing up the format. I have 5 units in the left flank of the Lancastrian army at Hedgeley Moor, who I want to start as "disrupted" because their morale was very poor. Looking at an old example from an ancient Greek battle that I had for some reason, I think I have to put this (below) in the BSF file. The only thing that I know is definitely wrong are the 2's at the end of the line in Morale State and UpdateDisplayMoraleState. What is the number for "disrupted"? Is it 1? So should I change those 10x2's and replace them all with 1's? Thanks.
FUNCTION CustomiseUnits()
{
int i;
int id;
int starting_strength; // starting strength - percent of full base unit strength
int morale;
// Set Lancastrian bill/longbowmen Disrupted
id = GetUnitOnTile(27,35);
SetAttrib(id, "MoraleState", 2);
UpdateDisplayMoraleState(id, 2);
id = GetUnitOnTile(24,35);
SetAttrib(id, "MoraleState", 2);
UpdateDisplayMoraleState(id, 2);
// Set Lancastrian billmen Disrupted
id = GetUnitOnTile(26,35);
SetAttrib(id, "MoraleState", 2);
UpdateDisplayMoraleState(id, 2);
// Set Lancastrian men-at-arms Disrupted
id = GetUnitOnTile(25,35);
SetAttrib(id, "MoraleState", 2);
UpdateDisplayMoraleState(id, 2);
// Set Lancastrian levies Disrupted
id = GetUnitOnTile(23,35);
SetAttrib(id, "MoraleState", 2);
UpdateDisplayMoraleState(id, 2);
// Reskin armies to randomly use available variant textures. If both sides have the same unit type, the two sides will use different variant textures for that unit if more than 1 texture exists.
// Comment out the two lines below if you don't want variant textures to be automatically applied.
// If you want to reverse which side gets which set of variant textures, change the second parameter to 1. This is useful to make the same army use the same texture set in reversed scenarios.
ReSkinArmy(0, 0);
ReSkinArmy(1, 0);
FUNCTION CustomiseUnits()
{
int i;
int id;
int starting_strength; // starting strength - percent of full base unit strength
int morale;
// Set Lancastrian bill/longbowmen Disrupted
id = GetUnitOnTile(27,35);
SetAttrib(id, "MoraleState", 2);
UpdateDisplayMoraleState(id, 2);
id = GetUnitOnTile(24,35);
SetAttrib(id, "MoraleState", 2);
UpdateDisplayMoraleState(id, 2);
// Set Lancastrian billmen Disrupted
id = GetUnitOnTile(26,35);
SetAttrib(id, "MoraleState", 2);
UpdateDisplayMoraleState(id, 2);
// Set Lancastrian men-at-arms Disrupted
id = GetUnitOnTile(25,35);
SetAttrib(id, "MoraleState", 2);
UpdateDisplayMoraleState(id, 2);
// Set Lancastrian levies Disrupted
id = GetUnitOnTile(23,35);
SetAttrib(id, "MoraleState", 2);
UpdateDisplayMoraleState(id, 2);
// Reskin armies to randomly use available variant textures. If both sides have the same unit type, the two sides will use different variant textures for that unit if more than 1 texture exists.
// Comment out the two lines below if you don't want variant textures to be automatically applied.
// If you want to reverse which side gets which set of variant textures, change the second parameter to 1. This is useful to make the same army use the same texture set in reversed scenarios.
ReSkinArmy(0, 0);
ReSkinArmy(1, 0);