Page 1 of 1

Gloomy maps?

Posted: Sat May 25, 2024 9:17 am
by kronenblatt
Is it possible (and easy) to add a gloomy and darker touch to the maps in Ancients and Medieval?

Ideally through some general settings, like reduced (or even lack of sun) light, instead of modding separate map tiles and gfx.

Re: Gloomy maps?

Posted: Mon May 27, 2024 5:26 pm
by pipfromslitherine
The most flexible way would be to turn on the CLUT mapping for the battles. It doesn't seem to be turned on for the battles right now, but it's easy enough to enable.

To do this:

- Go to DATA/GFX in the install folder.
- copy the clut.txt file, rename it to battle.txt
- open the new battle.txt file.
+ change the ID to be 101.
+ change the SHADER entry to be dim.txt
+ save the file
- go into the SHADERS folder inside the DATA/GFX folder
- copy the clut.txt file in there, and name it dim.txt
- open the new dim.txt file
+ go down to line 66 or so, it should read col.xyz = tex3D(gCLUT, uvw) ;
+ change the line so that it reads: col.xyz = col.xyz * 0.5 ;
+ save the file

Now when you run the game, your battles will be a lot dimmer. You can change the pixel shader (everything inside the bottom main(...) function) as you like, but most simply you can change the numeric value in your new line (0.5) to any value that works for you (1 will be back to what is was before).

Cheers

Pip

Re: Gloomy maps?

Posted: Mon May 27, 2024 7:11 pm
by kronenblatt
pipfromslitherine wrote: Mon May 27, 2024 5:26 pm The most flexible way would be to turn on the CLUT mapping for the battles. It doesn't seem to be turned on for the battles right now, but it's easy enough to enable.

To do this:

- Go to DATA/GFX in the install folder.
- copy the clut.txt file, rename it to battle.txt
- open the new battle.txt file.
+ change the ID to be 101.
+ change the SHADER entry to be dim.txt
+ save the file
- go into the SHADERS folder inside the DATA/GFX folder
- copy the clut.txt file in there, and name it dim.txt
- open the new dim.txt file
+ go down to line 66 or so, it should read col.xyz = tex3D(gCLUT, uvw) ;
+ change the line so that it reads: col.xyz = col.xyz * 0.5 ;
+ save the file

Now when you run the game, your battles will be a lot dimmer. You can change the pixel shader (everything inside the bottom main(...) function) as you like, but most simply you can change the numeric value in your new line (0.5) to any value that works for you (1 will be back to what is was before).

Cheers

Pip
Thanks, pip: appreciated!

Re: Gloomy maps?

Posted: Mon May 27, 2024 7:37 pm
by kronenblatt
pipfromslitherine wrote: Mon May 27, 2024 5:26 pm ...
I can put this in the mod to apply only to the mod, right? (Because I can't seem to get it to work there, even when having written col.xyz = col.xyz * 0.1.)

Re: Gloomy maps?

Posted: Mon May 27, 2024 7:48 pm
by pipfromslitherine
I am pretty sure that these files are not mod-aware, so it would be a global change of your install data. If you wanted to do something that is per-campaign or mod, you would need to do something to the lighting files - which can be per-campaign or per-scenario. It doesn't look like they are mod-aware, but as I say, they can be assigned inside a campaign (in DATA/LIGHTING).

Cheers

Pip

Re: Gloomy maps?

Posted: Mon May 27, 2024 8:11 pm
by kronenblatt
pipfromslitherine wrote: Mon May 27, 2024 7:48 pm I am pretty sure that these files are not mod-aware, so it would be a global change of your install data. If you wanted to do something that is per-campaign or mod, you would need to do something to the lighting files - which can be per-campaign or per-scenario. It doesn't look like they are mod-aware, but as I say, they can be assigned inside a campaign (in DATA/LIGHTING).

Cheers

Pip
OK, thanks. And then I would change each of the text files, or any specific ones (Is it only _DayLight.txt that are used for each map type)? So how do I switch between e.g. _DayLight and _Sunset: put _Sunset content in _DayLight file, or something more sophisticated?

Re: Gloomy maps?

Posted: Mon May 27, 2024 9:27 pm
by pipfromslitherine
I would suggest replacing all the lighting files (although IIRC you can just use a default lighting file - it's been a while since I had to use them). You can set the lighting file that a map uses in the editor, and with script commands.

Cheers

Pip

Re: Gloomy maps?

Posted: Thu May 30, 2024 1:22 pm
by Patrick Ward
kronenblatt wrote: Mon May 27, 2024 8:11 pm
pipfromslitherine wrote: Mon May 27, 2024 7:48 pm I am pretty sure that these files are not mod-aware, so it would be a global change of your install data. If you wanted to do something that is per-campaign or mod, you would need to do something to the lighting files - which can be per-campaign or per-scenario. It doesn't look like they are mod-aware, but as I say, they can be assigned inside a campaign (in DATA/LIGHTING).

Cheers

Pip
OK, thanks. And then I would change each of the text files, or any specific ones (Is it only _DayLight.txt that are used for each map type)? So how do I switch between e.g. _DayLight and _Sunset: put _Sunset content in _DayLight file, or something more sophisticated?
You can define the basic lighting type in a scenario with the Conditions menu in the Editor. This will allow you to choose three lighting changes though I don't know if you can change their timing. If you want more control over lighting changes during a scenario then you need to talk to Paul59 as he did it in many.
https://www.slitherine.com/forum/member ... e&u=110822

To make them all gloomy, reduce the three COLOUR values by an equal amount.
Ignore the CLUTS. They didn't work and so weren't maintained or updated for Medievals style.

Pat

Re: Gloomy maps?

Posted: Tue Jun 11, 2024 8:41 pm
by kronenblatt
Patrick Ward wrote: Thu May 30, 2024 1:22 pm
kronenblatt wrote: Mon May 27, 2024 8:11 pm
pipfromslitherine wrote: Mon May 27, 2024 7:48 pm I am pretty sure that these files are not mod-aware, so it would be a global change of your install data. If you wanted to do something that is per-campaign or mod, you would need to do something to the lighting files - which can be per-campaign or per-scenario. It doesn't look like they are mod-aware, but as I say, they can be assigned inside a campaign (in DATA/LIGHTING).

Cheers

Pip
OK, thanks. And then I would change each of the text files, or any specific ones (Is it only _DayLight.txt that are used for each map type)? So how do I switch between e.g. _DayLight and _Sunset: put _Sunset content in _DayLight file, or something more sophisticated?
You can define the basic lighting type in a scenario with the Conditions menu in the Editor. This will allow you to choose three lighting changes though I don't know if you can change their timing. If you want more control over lighting changes during a scenario then you need to talk to Paul59 as he did it in many.
https://www.slitherine.com/forum/member ... e&u=110822

To make them all gloomy, reduce the three COLOUR values by an equal amount.
Ignore the CLUTS. They didn't work and so weren't maintained or updated for Medievals style.

Pat
Thanks, but I can’t seem to make it work, for Medieval.