Gloomy maps?

Post Reply
kronenblatt
General - Elite King Tiger
General - Elite King Tiger
Posts: 4424
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Gloomy maps?

Post 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.
kronenblatt's campaign and tournament thread hub:

https://www.slitherine.com/forum/viewtopic.php?t=108643
pipfromslitherine
Site Admin
Site Admin
Posts: 9746
Joined: Wed Mar 23, 2005 10:35 pm

Re: Gloomy maps?

Post 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
follow me on Twitter here
kronenblatt
General - Elite King Tiger
General - Elite King Tiger
Posts: 4424
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Gloomy maps?

Post 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!
kronenblatt's campaign and tournament thread hub:

https://www.slitherine.com/forum/viewtopic.php?t=108643
kronenblatt
General - Elite King Tiger
General - Elite King Tiger
Posts: 4424
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Gloomy maps?

Post 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.)
kronenblatt's campaign and tournament thread hub:

https://www.slitherine.com/forum/viewtopic.php?t=108643
pipfromslitherine
Site Admin
Site Admin
Posts: 9746
Joined: Wed Mar 23, 2005 10:35 pm

Re: Gloomy maps?

Post 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
follow me on Twitter here
kronenblatt
General - Elite King Tiger
General - Elite King Tiger
Posts: 4424
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Gloomy maps?

Post 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?
kronenblatt's campaign and tournament thread hub:

https://www.slitherine.com/forum/viewtopic.php?t=108643
pipfromslitherine
Site Admin
Site Admin
Posts: 9746
Joined: Wed Mar 23, 2005 10:35 pm

Re: Gloomy maps?

Post 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
follow me on Twitter here
Patrick Ward
Slitherine
Slitherine
Posts: 1164
Joined: Thu Sep 04, 2014 2:49 pm
Location: A small island in the Outer Hebrides.

Re: Gloomy maps?

Post 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
............................

Pat a Pixel Pusher

............................
kronenblatt
General - Elite King Tiger
General - Elite King Tiger
Posts: 4424
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Gloomy maps?

Post 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.
kronenblatt's campaign and tournament thread hub:

https://www.slitherine.com/forum/viewtopic.php?t=108643
Post Reply

Return to “Field of Glory II: Modding”