I'm not really an expert here, but I would like to share all I have learnt before I forgot it.
Sorry me if I don't use the right words when trying to describe the effect of each value. I would be glad if other people correct me.
0.Related Files
\data\descr_battle_map_lighting_and_fog_control.txt
\data\descr_daytypes.txt
\data\descr_skydome.txt
\data\descr_solar_system.txt
\data\descr_pallete.txt
1.descr_battle_map_lighting_and_fog_control.txt
BI has additional lines in this file not present in RTW nor ATW. But I have verified they work for ATW.
Lighting
Only affects the landscape, not the units.
-min_light_intensity: This is the darkness of the shadows, and the main reason I have wrotten this tutorial.
I'm almost sure this is a minimum (not a multiplier), so by increasing it, your are removing (not reducing) the shadow effects when the light is under that value.
Vanilla value is 1.0 and so they have dissabled completely the shadowing of the landscape... I can't understand it.
Most mods uses values between 0.7 and 1.0, and I think it really improves the battlemap aspect, but only for morning sunlight.
If you want to see full shadowing at evening, sunset or sunrise, I suggest to reduce it to at least 0.4. But no less than 0.2 if you want to see something at night.
The problem with this value is that it reduces the lighting for all the enviroment, and there is no way, at least I have not found it, to increase the brightness of the enviroment. Even when there are hundreds of ways to reduce it.
-max_light_intensity: this one is the opposite to previous one, it controls the brightness of light zones.
Be carefull with high values greater than 1.5, because fog at day could look like ufos coming.
Between those 2 values, it seems you can control the contrast of the enviroment.
Screens using vanilla daytypes, at sunset/sunrise, just changing min_light_intensity=0.2. Enviroment textures and vegetation are from vanilla RTW (with The_Lordz NTW2 skies, Prometheus grass, and resized vegetation).
Same values at evening/morning: min_light_intensity=0.2.
Same values this time at middle day: min_light_intensity=0.2.
-ambient_reduce_proportion: Values starting by "ambient" seems to affect only the sunlight modifications defined in the files: \data\descr_daytypes.txt and \data\descr_skydome.txt.
It seems this one changes the light reduction in the shadowed areas, but I'm not sure. The effect over the landscape is minimal.
If your daytype reduces the sun light, this "ambient" value seems to multiply this effect.
-ambient_color_increase_proportion: It is a multiplier to each color component (RGB). I guess it just multiplies the corresponding RGB value defined in daytypes and skydome.
Unit Lighting
Same values than the landscape lighting, this time only for units. If the values are too different to those in the landscape, then the units do not seem placed there. But I think it is important for gameplay that units are always more bright than the enviroment.
-unit_ambient_reduce_proportion: This effect is more clear in the units than the landscape. Increase it if you want the units darker in the side where they do not receive sunlight.
-unit_ambient_multiplier and unit_diffuse_multiplier: I have always used the same value for both, like vanilla rtw.
It seems they affect how much the unit is iluminated in the side they receives the sun light. Increase it if you want units shining from sun side, very obvious compared to the other side.
Fog
-enable_gloom: This enables the gloom effect of the fog. I like more the visual aspect with this option dissabled (this line removed), or at least reducing his effect in the line:
gloom_fog_exponential 0.005 to 0.002 or lower.
-I have not modified the other values, but there is at least one value very important when you are designing your "daytypes":
Code:
haze_to_fog_transition_exponential 0.0004
When the fog value defined in descr_daytypes.txt is higher than that (no matter if you defined it for a foggy or a clear day), then:
-If at day, the sky clouds are not used, and replaced by a grey sky
-If at night, there are no starts, but a black sky, and the fog is black so it can simulate perfectly the darkness of the night.
I have found this weatherevent to be the most realistic way to create a night battle, copied from the file
descr_daytypes.txt:
Code:
weatherevent night_fog
cloud heavy ;not used due to fog value
precipitate none ;can be enabled without affecting the light conditions
wind calm ;I think not used unless raining
fog light 0.0006 ;the "light" word do not sems to have much effect, the numeric values is the importatn one: the fog density
Of course, you need values of "min_light_intensity" lower than 0.5 for it to look dark (darker the less this value). And you can control the reduction of the light with the distance, by increasing the fog value in the weatherevent (fog value = ammount of black gloom).
First screen using min_light_intensity=0.4 and fog=0.0008 (no sky). Second one using min_light_intensity=0.4 and fog=0.0002 (sky with clouds)
Same night lighting, this time with torches:
Rome TW landscapes were the bigger dissapointment when I upgraded my computer and I played with full graphics for first time. And now, I have seen it is not the engine, nor even the textures, but the lack of shadows what make it so dissapointing.
I would like to know if other people also see these changes as an improvement, so I share here my current file in case you want to test it and comment it here . Note most of the values are the same than vanilla.
2.descr_daytypes.txt
This file already includes a detailed description of each parameter. But it is hard to understand the real effect of some parameters until you test them. I'll try to describe the effect of those values.
The most important when you define a new daytype is to know that the possition of the sun and the moon in the sky is hardcoded (or at least I have not found any file to change it), they are automatically placed in the sky depending on the time of the day.
And the shadows and lights you see in the enviroment are mostly based on sun possition. All you can do with the values of this file is to change the colour and to reduce the intensity of the light, not the position of the source.
Also, those values are RGB mutipliers, as well as the values you will find in descr_skydome.txt. And it seems the base values are hardcoded, because no matter if you change all the values in those files to "1", the light will still be darker at sunrise and sunset, with the maximum at midday.
-time: 24hr value for time event start
-sun_colour: this is the color of the circle that represents the sun itself. All zeros "0 0 0" would look like an eclipse.
-sunlight: this is the light of the enviroment when the sun is above the horizon. It affects to both the landscape and the units.
-moonlight: this is the light of the enviroment when the sun is below the horizon. It affects to both the landscape and the units.
-haze_colour: this is the colour of the fog if the fog density is greater than 0, no matter if it is a clear or hazy or foggy day. (fog density is defined in the weatherevent, Part 1 of this descr_daytypes.txt)
-cloud_colour: this is the color of the sky. I think it does not affect the lighting of the enviroment nor the units. Only the visual aspect of the clouds in the sky.
Example of new daytype:
That looks like this: (1st screen at midday, 2nd at sunset)
3.descr_skydome.txt
This file includes RGB multipliers similar to those in descr_daytypes.txt. You can define here the horizontal colour variation for different times of the day. They affect to all climates, but you can define different values for each season.
I hope people more experienced with those files can help me to correct and increase the info.
By the way, I have recently discovered the file \data\descr_pallete.txt, and I guess it includes many of the parameters that I thought hardcoded... I'll keep testing.