Strange, this is the first time a quirk of SH4's interface has turned into a perk
. There was no point in starting a new thread for this info, but it should help pretty much any interface modder that has to create marking lines. I have not tested this in SH3 and would appreciate if anybody (I'm looking at you Makman
) tests this.
As you all know the periscope marking lines are hardcoded to light up at night. How? Apparently, EVERY item in the Marking lines group has this feature, even the ones that you add. In SH4, it looks like this...
Then come a few text items (not important, actually i moved them offscreen)... I just added my item after them (if your Pos and Zone are the same, then yes, the marks will remain centered on the screen in SH4):
Name=Karamazov Periscope Marks ;new item
Zone= 0 0 1024 768 1 1 0x26060000 0.5 -0.5 0x260EF005 -0.5 0.5 0 0
That image, AP_Marks2.tga is a simple image file with a black alpha channel. The color channel itself is a full block of color and the marks themselves are on the alpha channel as white marks. Now here's the real trick.... The game deals with the color channel very differently than you might expect. regardless of the color in the RGB channel, during the day, it will make the marks appear black. But during the night it will make it a different color depending on the HSB values that you used that you used. It's something like this( I'll consider the values that you used to be H, S and B:
New Hue=H*S + GREEN
In other words:
becomes Perfect Green
becomes Still Perfect Red
Red with less saturation
And of course, the brighter your color is the more the marks will "lit up" during the night. However, the items will never be true opaque, no matter how white you make the alpha channel. They will have around 5-10% transparency.
Hope this info will be useful to someone. This method should work in ANY group that has such items so it should work for binoculars, Uzo, Obs Scope and the rest, hopefully in SH3 too. For example I've just made a periscope filter that makes the image appear green during the night (a sort of night vision). It's very very subtle, but it's there
Also has the effect of making the image a bit darker during the day (I mean darker than the Obs Scope).