Messing around with Lighting?

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Messing around with Lighting?

Post by GottaLove88s »

Has anyone collected a list of the best Lighting options for BA maps? Couldn't find one using the Advanced Search...

Basically, I'm looking for settings for...

(i) warm dawn,
(ii) bright midday,
(iii) evening dusk, and
(iv) dark night...

Is there a way to reduce LOS on 'night' maps? Or does this have to be done thru modifying squads.csv?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9898
Joined: Wed Mar 23, 2005 10:35 pm

Re: Messing around with Lighting?

Post by pipfromslitherine »

You can tinker with lighting via a lighting file for each mission. I would recommend starting with an existing file and beginning with tinkering with the colours to get an idea of the effects you can get.

To reduce LOS etc on night maps, use the PostStartTurn function (I don't have the exact name in front of me) - you can then go through units and reset their AP, LOS, etc. Using Post.. means it happens after the usual start of turn unit init functions.

Cheers

Pip
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Messing around with Lighting?

Post by GottaLove88s »

Thanks Pip!

Would it work if I add something like this to FUNCTION StartTurnPost(side) for my NightBattle.BSF? To halve the LOS of every unit on the map?

for(j=0;j<GetUnitCount(1);j++)
{
id = GetUnitID(1,j) ;
SetAttrib(id, "LOS", GetBaseAttrib(id, "LOS"/2)) ;
}
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9898
Joined: Wed Mar 23, 2005 10:35 pm

Re: Messing around with Lighting?

Post by pipfromslitherine »

That's pretty much how we do all those kind of things, yes.

Cheers

Pip
Post Reply

Return to “Battle Academy : Modders Corner ”