Jump to content

Recommended Posts

Posted

As most of you know spotting other aircraft in SF2 is quite difficult.
I think most are using the red targeting box to engage enemy aircraft. But only the currently targeted aircraft is marked with the red box and not the other aircrafts.
Another option would be to turn labels on (HUD Display option set to "Easy"). Unfortunately the label text is too verbose and is also shown at too long distances. Some people already had the idea to change the label text into a single dot but AFAIK nobody has accomplished it yet...until now...

I proudly present the "dot label mod": dot_label_mod.zip

With this mod labels are shown as a dot and only within a distance of 10 nm. This mod uses a modified text drawing shader that hides all characters and digits of the label text and only draws the "dot" character. Unfortunately there is a negative side effect: the text in the target info box is also "filtered" by this shader and therefore not correctly displayed. So I disabled the target info box. Furthermore to get rid of the way point label text (which shows up if the HUD Display option is set to "Easy") the shader also completely hides all text that is drawn with NormalColor. This means that also the text in the top info box and in the bottom left info box is hidden. But the afterburner message is still shown.

To install this mod just put the contents of the zip file (huddata.ini and twfont.fx) into your Flight folder and set the HUD Display option to "Easy".
The enemies are shown with red dots, and friendlies are shown with blue dots. But you can change the colors to your liking by changing the values of EnemyTargetColor and/or FriendlyTargetColor in the huddata.ini AND setting exactly the same values (without the alpha compononent) in the twfont.fx files:

 

e.g:
if you set in huddata.ini

EnemyTargetColor=0.1,0.2,0.3,0.4

you must set in twfont.fx

float3 EnemyTargetColor = float3(0.1,0.2,0.3);
  • Like 6
  • Thanks 1
  • 8 months later...
Posted (edited)

Correction: the full labels are displayed whenever I make any changes to the TWFONT file (i.e. in order to change the colors)

 

If you change the colors in the twfont.fx file you must also change the colors in huddata.ini. The enemy/friendly target color in twfont.fx must exactly be the same as in huddata.ini (ignoring the alpha value).

Or maybe you introduced a syntax error in the twfont.fx and the game engine fall back to the original fx file.

Can you send me your huddata.ini and twfont.fx file so that I can check it.

Edited by mue
Posted

Lol got it working after digging up my CS101 knowledge from the depths of my brain. I actually realized this might be perfect for another project of mine - I've got two other questions: would it be possible to use this to hide the text displayed by the message system but only the white text? Second, would it be possible to make this show only digits but not characters (so that the distance is shown but not the type)?

  • 1 year later...
Posted (edited)

I have a question here. Is it possible to still have the target info displayed in the lower right?

 

The reason for this is that it's the only way on mission types like SEAD to determine which targets are you primary targets... I guess the full target info isn't even needed. Just a way to know when you've targeted a primary target...

 

Edit - NM. I re-read the OP and now see this is a limitation of how this was accomplished

Edited by malibu43
  • 1 year later...
Posted

For some reason I see labels not as dots, but as small vertical dashes. Can I make them into dots somehow? Also, what are the numbers do I put in for dark-grey color?

img00060.JPG

img00062.JPG

Posted
13 hours ago, Dornil said:

For some reason I see labels not as dots, but as small vertical dashes. Can I make them into dots somehow? Also, what are the numbers do I put in for dark-grey color?

In the huddata.ini the following must be set:

[SmallLabelFont]
TextFontName=Courier
TextSize=10

The color numbers for grey are x,x,x. For dark-grey x is small, e.g EnemyTargetColor=0.1, 0.1, 0.1

Posted

Could it be related to difference in system fonts or to ingame resolution? 

Which parameters in TWFONT.FX can I play with to try and make it work as it should be?

Posted
11 hours ago, Dornil said:

Could it be related to difference in system fonts or to ingame resolution? 

Which parameters in TWFONT.FX can I play with to try and make it work as it should be?

The relevant parameters are uvMin and uvMax in lines 93 and 94. These parameters define the rectangular area (which should contain the "dot") on the font texture. Only fragments (pixels) with texture coordinates within that rectangular area are drawn visibly.

Posted
20 minutes ago, Dornil said:

Any method to find this dot spot, other that try and fail?

None that I know of.
I think I used some kind of binary search:
1.) split the texture in two halfs: rectangle1 with uvMin / uvMax = (0.0,0.0) / (0.5,1.0); rectangle2 with  (0.5,0.0) / (1.0, 1.0)
2.) try both rectangles and check with which the dot (besides other characters) is drawn.
3.) split this rectangle further on (step 1.)): e.g. if the dot is in rectangle 2, then the next two (smaller) rectangle areas to check are (0.5,0.0) / (1.0,0.5) and (0.5,0.5) / (1.0,1.0)

Posted

Sorry, I'm not following:( What is that texture we are talking about?

Currently I can't see any characterts in the labels, just some frangments.

Posted
9 hours ago, Dornil said:

Sorry, I'm not following:( What is that texture we are talking about?

Currently I can't see any characterts in the labels, just some frangments.

The font texture is internally generated by the game accordingly to the given font type and size. An example you can see here: https://learnopengl.com/In-Practice/Text-Rendering

If your defined texture area (uvMin, uvMax) cuts some characters then only fragments of those characters are drawn .

Posted

Where can I see this particular texture, generated by SF2? Just to understand where to move the rectangle. Can I also somehow increase the size of this rectangle temporarily, to see where it is on the texture?

  • 4 months later...
Posted (edited)
5 hours ago, Neurosci said:

Hey I'm curious what lines determine the 10nm limit for this. Curious if its possible to limit display of labels to within 10nm but not modify the text?

The draw distance for labels is determined by the game engine and AFAIK can not be changed.
What my mod does is, it blocks all characters but the 'dot'. The distance text for distances greater 10 nm is drawn in the format x nm (e.g. 23 nm). That text contains no 'dot', all text is blocked. If the distance is less than 10 nm, the format changes to x.x nm (e.g. 9.9 nm). That text contains a 'dot' and the dot is visible because it's not blocked.

Edited by mue
changed wording
Posted
7 hours ago, mue said:

The draw distance for labels is determined by the game engine and AFAIK can not be changed.
What my mod does is, it blocks all characters but the 'dot'. The distance text for distances greater 10 nm is drawn in the format x nm (e.g. 23 nm). That text contains no 'dot', all text is blocked. If the distance is less than 10 nm, the format changes to x.x nm (e.g. 9.9 nm). That text contains a 'dot' and the dot is visible because it's not blocked.

Gotcha. Do you think its possible to use that same concept to block all text over that distance as it already does, but still display all text under that distance?

Posted
16 hours ago, Neurosci said:

Gotcha. Do you think its possible to use that same concept to block all text over that distance as it already does, but still display all text under that distance?

No.

  • 5 years later...
Posted

Excuse the Necroposting, but don't feel my question deserves a new threat.

- Is there any way to asignate Labels to SAM and or missiles?

Thanks!

Posted (edited)

not necessarily a no. just not a yes :lol:

my guess however, is that the labels apply to targetable vehicles, while AAMs/SAMs are considered ammo and thus dont get labels

Edited by daddyairplanes
  • Haha 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy, and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..