All the gallery screenshots from the Bitter Coast and the Ascadian Isles that get so many oohs and aahs have one thing in common: palettes (usually).
They use custom tinting and color-shifts to give the area atmosphere and boost the environment.
This works great, except it makes Balmora turn bright green too.
So, with a little programming work, I've whipped up a simple solution to this. Using MWSE, MGE and their script functions, fully dynamic cell-based tinting is now available.
This can be used to add special tint or new fog colors to your horror mod, swamp, or just make the Bitter Coast always green and Solstheim always icy blue.
The system consists of a small mod with 2 global scripts, a single simple shader, a small program and a ruleset.
From my testing, there was absolutely no FPS hit (on some systems running the shader might cost 1 or 2 FPS). The ruleset is loaded by the program, which then communicates with Morrowind through a pipe, and the scripts pass the info on to the shader. Because the lookups (which are the longest part of the process, sometimes taking as much as 0.025 seconds) are done only when the cell changes and are performed asynchronously with Morrowind, the scripts are designed to request new color info, let the game run for a moment, then process the data. This leads to very few script commands being executed in any given frame, making the scripts run pretty darn quick.
This system is exceptionally mod-able and flexible. The current cell and player's position are sent to the program each time the cell changes, and it uses some internal methods to find the best color to send back. The rules are human-readable and come from a simple text file, which has paired match strings and color rules.
Three types of matches are supported:
- Simple matches (if the match is "Seyda Neen", then any cell with that exact name will match)
- Cube matches (uses the player's position to match, if they are within a defined volume)
- Regex matches (besides having to use regex, since it's the solution to everything, this allows for wildcard and patter matches)
For example, if you wanted to match any wilderness cell (there are a lot), the match would be:
- Wilderness
- indicates a simple match, then "Wilderness" (case-sensitive) is the name. For something more complex, you could use the regex match:
@ Vivec(.*)
to match any cell that starts with Vivec (this will match the whole town area, essentially). For something more detailed, you could use:
^ -1000, -1000, 100, 1000, 1000, 1000
to match any player that is within a 2000-unit square around origin, between 100 to 1000 units above water-level.
I'm working on making things even more flexible (perhaps an update interval) and will be adding combined cube/simple and cube/regex rules here soon (filter for areas within a cell).
There's no transition between colors at the moment and the shader is still set up for some debugging, so you'll get a colored band across the left edge of the screen, but otherwise, this seems to work. I just need testers to try it out for me.
Edit: The download may not be working, though it looked like it when I was playing. If the shader doesn't change color, let me know. I think the debug mode of the program may be broken at the moment.
http://www.mediafire.com/?oganyzydnqk
Install Instructions:
- Download
- Extract
- Move the ESP and shader folder to your Data Files directory
- Enable the ESP
Playing Instructions:
- Start MWFogProject.exe
- Start Morrowind
- Play
If the scripts work, you should see the shader load and some occasional debugging messages. I'll be removing those before release, obviously.
If the program and everything else works, you'll see the world and band change color when the cell changes.
There are only a few rules in the db at the moment, for Seyda Neen, Vivec, and a few altitude levels (the world will turn more blue as you go up).
I haven't bound fog properly, so at the moment the fog color isn't changing, but the tint will and is usually noticeable.
Once it's done on the tech side, I'll be putting together a full db of colors for the stock game and expansions, as well as any mods I have.
Any testing will be greatly appreciated.