I will be playing with the mod a bit later this evening, but I wanted to check in first. Is there something special I need to do to edit the text color? You mentioned being able to change it to green by changing something but I wasn't sure what. THANKS
@
nepomuk
Ok let's look at text colour.
-----------------------------------------------------------------
For starters I recommend activating Dev mode so you can tinker with the values and load the changes in-game without exiting.
Open up d3dx.ini
and uncomment this line
;include = EDHM-ini/Dev.ini
so that it looks like this
include = EDHM-ini/Dev.ini
Save the file then start Elite. You'll see green overlay text on-screen that indicates you're in Dev mode.
** When you've finished modding the text colour, re-comment that line or it will impact your FPS
make it look like this when you've finished, and save d3dx.ini
;include = EDHM-ini/Dev.ini
-----------------------------------------------------------------
Next, open up f969184721bd5dec-ps.txt, which is the main text colour shader
I prefer to edit in
Notepad++ with Javascript language activated for nice code highlights (Language/J/Javascript). It also shows line numbers.
I should note I have set the mod to only change orange text, as it's nice to have other colours pop up occasionally.
Go to line 78
Code:
dp3 r2.x, r0.xyzx, l(0.600000, 0.000002, 0.000004, 0.000000)
dp3 r2.y, r0.xyzx, l(0.000001, 1.600000, 0.000005, 0.000000)
dp3 r2.z, r0.xyzx, l(0.800000, 0.000003, 0.000006, 0.000000)
I managed to insert a nice matrix into this shader that looks like the XML. It's not always possible with every shader but this one seems to work.
x = red
y = green
z = blue
w = opacity (but very rarely works on its own)
dp3 means a dot product of 3 components
r2 is the output variable (r2.x is the red output, r2.y is the green output, r2.z is the blue output)
r0 is the standard Elite variable/colour
and the values in the matrix are our RGB modded colours
So we are going to multiply r0 (original Elite colours) by the values in the matrix, to give an output stored in r2
The first column applies the original red channel to the output colours (usually the best to use as it's the strongest channel)
The second column applies the original green channel to output colours (usually used for shading)
The third column applies the original blue channel to the output (which is often empty and not useful here)
I notice 3Dmigoto has inserted zeros in the fourth column, it's really just a dummy variable (filler, doesn't do anything). However, while we're modding I'll change the r0.xyzx to r0.xyzw so there's no chance of adding too much x (red)
Ok so lets start with default Elite colours so you can see where it shows through
Insert this matrix on line 78,79,80. See how it looks like the default Elite XML?
Code:
dp3 r2.x, r0.xyzw, l(1.0, 0.0, 0.0, 0.000000)
dp3 r2.y, r0.xyzw, l(0.0, 1.0, 0.0, 0.000000)
dp3 r2.z, r0.xyzw, l(0.0, 0.0, 1.0, 0.000000)
Save the shader file, and in-game press F11 to reload (you can change this key binding in Dev.ini)
You'd probably expect orange text everywhere, but that doesn't happen because the text colour is now orange, and I've instructed lots of different shaders to detect orange and apply a new colour. But that won't happen when we change it to green or yellow.
Press ALT F9 if you'd like to see how default Elite looks without any mod at all.
-----------------------------------------------------------------
But let's ignore all that for now and make the text green.
Change the matrix to this and F11 to reload:
Code:
dp3 r2.x, r0.xyzw, l(0.0, 0.0, 0.0, 0.000000)
dp3 r2.y, r0.xyzw, l(1.0, 0.0, 0.0, 0.000000)
dp3 r2.z, r0.xyzw, l(0.0, 0.0, 0.0, 0.000000)
We've used the original Elite red channel (first column, the strongest colour) and applied it to the green channel. Basically we have swapped the red and green channel.
Note: We could have also used the second column but I don't think there's any shading we need to preserve (I used the second column in the mod because I didn't fully understand the colour channels a few months ago, and since it works I didn't want to muck it up by changing things)
We've also removed all red and blue (0.0 for both), so this is pure green.
If that green is too bright, you can reduce it to 0.6 or something like that
Code:
dp3 r2.x, r0.xyzw, l(0.0, 0.0, 0.0, 0.000000)
dp3 r2.y, r0.xyzw, l(0.6, 0.0, 0.0, 0.000000)
dp3 r2.z, r0.xyzw, l(0.0, 0.0, 0.0, 0.000000)
-----------------------------------------------------------------
I just noticed this new matrix allows me to take the blue tint off the text without side-effects elsewhere (text was turning green on the carrier when I tried to fix it previously)
So I might update the mod with this new text shader over the next few days, to something like this (might be a little too bright):
Code:
dp3 r2.x, r0.xyzw, l(0.7, 0.0, 0.0, 0.000000)
dp3 r2.y, r0.xyzw, l(0.8, 0.0, 0.0, 0.000000)
dp3 r2.z, r0.xyzw, l(0.8, 0.0, 0.0, 0.000000)
(the red channel is slightly reduced as it's an overpowering output when at the same level as Green and Blue, really noticeable when trying to make things white)
Ok, so you have your Green text, and you can add a little blue or red if you want
different types of green
-----------------------------------------------------------------
Now onto Yellow.
Yellow is equal amounts of red and green, zero blue
So full-on yellow would be this:
Code:
dp3 r2.x, r0.xyzw, l(0.8, 0.0, 0.0, 0.000000)
dp3 r2.y, r0.xyzw, l(0.8, 0.0, 0.0, 0.000000)
dp3 r2.z, r0.xyzw, l(0.0, 0.0, 0.0, 0.000000)
But if you want slightly yellow, then we increase red and green relative to white
So perhaps something like this:
Code:
dp3 r2.x, r0.xyzw, l(0.95, 0.0, 0.0, 0.000000)
dp3 r2.y, r0.xyzw, l(0.95, 0.0, 0.0, 0.000000)
dp3 r2.z, r0.xyzw, l(0.7, 0.0, 0.0, 0.000000)
or
Code:
dp3 r2.x, r0.xyzw, l(0.95, 0.0, 0.0, 0.000000)
dp3 r2.y, r0.xyzw, l(0.95, 0.0, 0.0, 0.000000)
dp3 r2.z, r0.xyzw, l(0.5, 0.0, 0.0, 0.000000)
Ok you now have the tools to change the text colour yourself. But let me know if you need any help with a particular colour
o7