Re: More Modding Questions
Posted: Sat Apr 12, 2025 9:42 am
It worked fine. I did as follows.
In StartTurn.BSF file (under DATA\BATTLE\SCRIPTS\), I added a function:
And also referred to it at the beginning of StartTurn() function, adding CustomStartBattleLighting(); :
Finally, to get the dawn light also when setting up the army, I also added a similar function in MoreScenarioTools.BSF file (under DATA\SCRIPTS\), just to try it out:
And called upon it at the beginning of the SetRegionalDaylight() function in the same file:
Of course, more lighting files can be created and called upon, creating a more gradual sunrise and sunset. (There are as mentioned above more lighting files, such as EarlyMorning, MidMorning, and so on.)
I tried it out in Snugglebunnies' Middle Earth Mod and it looked particularly cool in the battles involving the evil side, e.g., Angmar, Orcs, Mordor.
In StartTurn.BSF file (under DATA\BATTLE\SCRIPTS\), I added a function:
Code: Select all
FUNCTION CustomStartBattleLighting()
{
int turn;
turn = GetTurn();
if (turn < 6)
{
SetLightingFile("NorthernEurope_Dawn");
}
else if (turn < 10)
{
SetLightingFile("NorthernEurope_EarlyMorning");
}
else if (turn < 14)
{
SetLightingFile("NorthernEurope_MidMorning");
}
else if (turn < 40)
{
SetLightingFile("NorthernEurope_DayDull");
}
else
{
SetLightingFile("NorthernEurope_Sunset");
}
}
Code: Select all
if (GetWinner() == -1) // If game not already ended
{
// MODDED
CustomStartBattleLighting();
Code: Select all
FUNCTION ModdedRegionalDayLight()
{
SetLightingFile("NorthernEurope_Dawn");
}
Code: Select all
FUNCTION SetRegionalDaylight()
{
int deadline;
// MODDED TO ADJUST DAY LIGHT
ModdedRegionalDayLight();
return;
I tried it out in Snugglebunnies' Middle Earth Mod and it looked particularly cool in the battles involving the evil side, e.g., Angmar, Orcs, Mordor.
