Jump to content
The Dark Mod Forums

Recommended Posts

Posted

Sadly, I'm not optimistic about ever seeing subtitle accommodations based on HUD preferences, or on user choices.

Given all the dust that's been kicked in my face for wanting just auto-selected two-width subtitle boxes, even as a user option.

 

  • Like 1
Posted (edited)
On 1/9/2024 at 8:16 PM, Geep said:

Sadly, I'm not optimistic about ever seeing subtitle accommodations based on HUD preferences [...]

It isn't that difficult, but it looks a little ugly code-wise.

In the latest version from @stgatilov found in this post just replace:

#define SUBTITLE_BASE_Y (379 - 52 * SUBTITLE_IDX)

with:

EDIT - Removed because it was wrong. Check this post.

Mind you! this again is a quick hack with no guarantees. Code must be properly assessed if we go for it.

Edited by snatcher
Wrong code
  • Like 1

TDM_Modpack_Thumb.png

Posted

It appears it's only affecting the vertical positioning of the subtitle slot stack, so I wouldn't think it affects max chars per slot

  • Like 1
Posted
5 hours ago, snatcher said:

We should look to have dynamic references based on HUD preferences. Boring stuff, I know.

Btw. A lot of talk about this is in the beginning of this topic.

Posted

It is not perfect, but it can be.

The downsides are:

  • New dependency with a different gui. If [tdm_inv.gui] changes in certain areas [tdm_subtitles_message.gui] should change accordingly.
  • Players with a huge lightgem and/or "acquire" text might sometimes get subs above the middle of the screen. I say these players should expect that to happen and wouldn't worry about it.

TDM_Modpack_Thumb.png

Posted
1 hour ago, snatcher said:

It isn't that difficult

Not technically, no.

snatcher, maybe it's soon time for a subtitle Modpack to offer some of the design alternatives.

  • Like 1
Posted

I just want you guys to happily keep working on this project, delivering subtitles 🙂

@stgatilov has incorporated many changes already in his version. If we do something else that feels right, he might evaluate further changes.

@Geep, do you feel comfortable on getting the dynamic positioning right? I am sure you do.

TDM_Modpack_Thumb.png

Posted
9 minutes ago, snatcher said:

do you feel comfortable on getting the dynamic positioning right?

I am willing to take a look at it, but not before sometime next week. Working on the last vocal set, for the Cynic, first.

  • Like 1
Posted

It looks like sooner or later we'll have to add settings menu for subtitles.

Verbosity can be moved to it.
Then there can be this big switch between background and outlined text.
And a bunch of color settings for various elements.

The only thing I wish to not see there is any settings which can affect text layout 😥

Posted

Btw.  is there a way to reload subtitles without restarting tdm?

So let's say I test a subtitle and then I edit the subtitle while the game is running. If I load a save I don't get the edited subtitle it seems.

 

Posted
18 hours ago, datiswous said:

is there a way to reload subtitles without restarting tdm?

Dunno. I always assumed not. So for my testSubtitles... FMs, I adopted a QA workflow to make corrections in large batches, so the restart was needed less often.

  • Like 2
Posted
On 1/9/2024 at 11:19 PM, Geep said:

I am willing to take a look at it, but not before sometime next week [...]

I made wrong assumptions in the previous attempt and I would say this is the right SUBTITLE_BASE_Y we want in [tdm_subtitles_message.gui]:

#define SUBTITLE_BASE_Y (379 - (20*("gui::bigTextSize"-1) + 32*("gui::lightgemSize"-1) + 14*("gui::lightgemSize"*"gui::barSize"-1)) - 52*SUBTITLE_IDX)

 

Some tests and examples for small HUD, default HUD, large HUD. The green rectangle is where the "acquired" messages are displayed. Subtitles are dynamically position right above them.

dyn-sub-pos.jpg

 

I couldn't get all three blocks to show up at the same time but almost:

dyn-sub-pos2.jpg

This little change is good to go, imho.

  • Like 1

TDM_Modpack_Thumb.png

Posted

@Geep Regarding 0.24 vs 0.25 font scale.

I think there was purpose, though I can't say now which exactly.
Maybe it was to ensure that all the text fits, maybe it was to make vertical padding symmetric.

Anyway, why do you think 0.24 and 0.25 differ?
I did not look in the code yet, but I think what engine does is 1) choose most suitable image, 2) render quad texture with it.

Indeed, we can avoid some blurring if the pixel size of the quad exactly matches the image size.
But I guess the engine counts font size in 640x480 virtual resolution. So even if the font size would be "12", it would later be stretched over whatever width you really have (if your aspect ratio is 16:9 then height would be stretched equally, but otherwise it would be stretched with different factor).

  • Like 1
Posted

@stgatilov, I likewise think that the chosen source image would be the same for 0.24 and 025. In the case of Stone, that would the 24pt (corresponding to 0.50 textscale), since no 12pt source image is available. And agree that scale factors of 0.24 and 0.25 should render character sizes slightly differently. As long as it was purposeful, even at the potential cost of minor blur, that's fine. As you imply, such blur may be unavoidable anyway, since the otherwise-desirable aspect compression would also inflict it.

Just need to think of the 0.24 scale results as 11.5 point size instead of 12.

  • Like 1
Posted
On 1/12/2024 at 1:51 PM, snatcher said:

this is the right SUBTITLE_BASE_Y we want in [tdm_subtitles_message.gui]:

#define SUBTITLE_BASE_Y (379 - (20*("gui::bigTextSize"-1) + 32*("gui::lightgemSize"-1) + 14*("gui::lightgemSize"*"gui::barSize"-1)) - 52*SUBTITLE_IDX)

 

This is based on the tdm_subtitles_message.gui given in the stgatilov's post you referenced, and also identically in 2.12 beta 3.

I have reviewed this as you requested. I can't speak to the accuracy of the green bars in your screenshots, but the calculation seems correct. It derives from the calculation in mainmenu_settings_guisize.gui (of beta3), which finds the top edge of the bounding box of the Inventory Pickup Message (e.g., "Acquired 80 in Jewels"), then reduces that to account for the subtitle backing field height of 37, plus a 4 pixel gap between the lowest subtitle field and the pickup message.

I also confirmed that the beta3 calculation of the top edge of Inventory PickupMessage is identical in both mainmenu_settings_guisize.gui and tdm_inv.gui; the latter is part of the HUD during game play.

  • Like 2
Posted

As designed, this should avoid overlap of the subtitles with the resizable central HUD elements: health bar, light gem, breathe bar, pickup message. It would not avoid all potential overlaps with the resizable corner elements.

Posted
2 hours ago, Geep said:

[...] I can't speak to the accuracy of the green bars in your screenshots [...]

I just added (in-game) a background color to the rectangle of the "Acquired" message for better reference.

1 hour ago, Geep said:

[...] It would not avoid all potential overlaps with the resizable corner elements.

I think you better let it be 🙈

Some players might make the light-gem a little smaller or larger and these players have been serviced. Players with tiny or huge HUD elements are on their own (and they know it!)

TDM_Modpack_Thumb.png

Posted
19 hours ago, snatcher said:

Some players might make the light-gem a little smaller or larger and these players have been serviced.

True. Regarding this dynamic design, it could be argued that we should ignore the Acquired field (Inventory Pickup Message), since messages there are shown rarely, and not at all if the user turns it off. Instead, place the low subtitle slot just above the breath bar. Then all the subtitles slots would be lower. However, this would increase overlap with the corners, unless some mitigation was done. That could be done engine-side, if the slot-fill priority was changed to, e.g., middle-slot first, low-slot last. So the conflict-prone low-slot becomes rarely used.

Other mitigating ideas -

- move the Acquired field to the top, right under the Objectives Message field

- do away with the Acquired field, and instead deliver its message using the subtitle mechanism (possibly with color markup or a different font than regular subtitles). This would require an engine enhancement, to generate a subtitle given a runtime-assembled string, without any sound file.

Posted
7 hours ago, datiswous said:

For gui's there is reloadGuis and for xdata there's reloadXData.

@stgatilov could something like this be added for subtitles as well? Or does it already exist?

I did something for it.

I think it should be reloadDecls...
Rather logical since subtitles are decl files.
 

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.


  • Recent Status Updates

    • thebigh

      Starting a playthrough of the whole Dark Mod, from oldest mission to newest. I've knocked over the first few already and about to start Living Expenses. Only ~170 missions to go!
      · 8 replies
    • Ansome

      I'm back! Happy new years, TDM folks!
      I brought with me a quick update for my first FM that fixes up a lot of small issues that didn't get caught in beta testing. I didn't exactly expect it to take me nearly 9 months to release a patch, but it's been a wild year to say the least. Teaching, finishing up my Master's of Education, and all manner of other events forced me to drop out of the anniversary FM contest and ate up all my time, but I'm back again in a comfortable position to start catching up on all the new FMs. I may even start work on another spooky project of greater length and difficulty in the coming year.
      Thanks again for the warm welcome to the community and have a happy new year!
      · 3 replies
    • JackFarmer

      I got myself the apple tv trial subscription. I have to say, “Foundation” (season 1) is very exciting. Shall I read the books as well?
      · 2 replies
    • datiswous

      One more like..
       

      · 3 replies
    • snatcher

      TDM Modpack v4.6 released!
      Introducing... the Forward Lantern mod.
      · 0 replies
×
×
  • Create New...