View Issue Details

IDProjectCategoryView StatusLast Update
0005914The Dark ModSoundpublic06.01.2024 19:26
Reporterstgatilov Assigned ToDragofer  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product VersionTDM 2.10 
Target VersionTDM 2.11Fixed in VersionTDM 2.11 
Summary0005914: Add subtitles to New Job
DescriptionNow that subtitles are present in Saint Lucia mission, the same should be done for New Job.

P.S. Pay special attention to custom GUI messages in this mission...
TagsNo tags attached.

Relationships

related to 0006197 resolvedstgatilov Subtitles not shown during cutscenes 
related to 0006337 resolvedstgatilov Misalignment in mission lists 

Activities

Obsttorte

Obsttorte

02.07.2022 07:00

developer   ~0014937

For reference, as this is beeing worked on already

https://forums.thedarkmod.com/index.php?/topic/21220-210-subtitles/#comment-468196
nbohr1more

nbohr1more

15.12.2022 04:52

developer   ~0015574

WIP Files attached.

Needed fixes:

Convert the "convo1_02court.ogg" subtitle to srt format and break it up
Make sure the One Eye Guard sub-title fires
Make sure the mission end dialog fires
newjob_subs.zip (5,395 bytes)
Dragofer

Dragofer

29.12.2022 10:03

developer   ~0015647

Last edited: 29.12.2022 10:03

I've made a test map called subs3 that automatically plays all conversation soundshaders in the FM, together with proofread subtitles by Amadeus. The first line of the script is a switch to activate a cameraView entity while the sounds are playing, which confirms the fix for subtitles in cutscenes in 0006197.

It seems to be working fine except:
- 1st sound is a little bit too long and the last letters get cut off. There should really be an automatic line break into 2 lines.
- 2nd sound is far too long and probably needs to become srt.
- The generic conversations at the end have no subtitles, probably because they are generic AI soundshaders.
- The mainmenu_briefing.gui file seems to be from before the big GUI cleanup, so it throws a lot of console warnings. It seems various changes were made in order for subtitles to play during this briefing.
subs3.pk4 (12,800 bytes)
Dragofer

Dragofer

31.12.2022 17:19

developer   ~0015660

Rev 16720
Add subtitles to A New Job. Also delete redundant efxs folder outside of the .pk4 (contents identical to efxs folder inside the .pk4).

Only real issue left before this can be set to resolved is that line that's a few characters too long to fit on the subtitle GUI and doesn't get broken up into 2 lines. It warrants an engine change imo.
stgatilov

stgatilov

03.01.2023 16:39

administrator   ~0015687

Fixed the endline problem:
  r10232 Break GUI text to new line BEFORE overflowing character, not AFTER it.
  r10233 As a followup to previous commit, don't round text sizes to integer without need.

Please pay attention to the sizes/alignment/overflow of text now =)
nbohr1more

nbohr1more

04.01.2023 13:34

developer   ~0015696

No bugs seen with the latest changes thus far.

Setting to resolved.

The tracker can be re-opened if any problems are found in the next beta version.
Dragofer

Dragofer

04.01.2023 18:14

developer   ~0015700

Thanks
Daft Mugi

Daft Mugi

05.01.2023 22:00

developer   ~0015703

Using r10233, I've found that books often have the last few words truncated from a page.
DR preview and in game look different.

Using r10220, the books look fine.
So, probably either r10232 or r10233 causes the truncation of book pages.
stgatilov

stgatilov

05.01.2023 22:20

administrator   ~0015705

Any particular example?
stgatilov

stgatilov

05.01.2023 22:26

administrator   ~0015706

Here is one bad poster in Iris, which is tweaked to exact width and the old "slightly overflowing" linebreak rule.
Daft Mugi

Daft Mugi

05.01.2023 23:59

developer   ~0015707

I wonder if it would be worthwhile to have two code paths: one for subtitles and one for books.

I'm helping with beta testing "Seeking Lady Leicester".
in the Discord beta2 channel for that mission, I reported the truncation of several book pages until we realized it was just my build (r10233).
Would it be possible for you to join that channel to see those examples?
stgatilov

stgatilov

06.01.2023 08:06

administrator   ~0015709

I would prefer to simply return the overflow.
Apparently, single-letter overflows don't bother people much, but occasional page overflows will.

Don't see how subtitles are different from ordinary books.
If mappers have tuned all their book texts manually for years, they sure can do that for subtitles too.

Or alternatively, accept the change and gradually fix the GUIs.
Daft Mugi

Daft Mugi

06.01.2023 16:33

developer   ~0015710

Yes, having one code path is ideal. Less code is usually better.
Unfortunately, the text overflow logic for books has been around a long time, so we are stuck with it. Without it, books break.

Would it be much trouble to have two code paths?
Fixing text overflow logic for subtitles now will help mappers out a lot. One less thing to worry about, and it provides a better player experience.

Books and subtitles are similar, but they have different contexts. So, different logic for each makes sense given this situation.
Daft Mugi

Daft Mugi

06.01.2023 16:41

developer   ~0015711

I wonder if this is related as well (posted 2 hours ago):
https://forums.thedarkmod.com/index.php?/topic/21260-down-and-out-on-newford-road-by-thebigh-jan-26-2022-christmas-connections-contest-entry/&do=findComment&comment=481746
Dragofer

Dragofer

06.01.2023 17:01

developer   ~0015712

The problem is you can't really workaround this problem because the subtitle is meant to be exactly what's said, so you can't add or remove words or turn it into a .srt. Also, I've only rarely encountered overflow in readables, probably because overflow can only happen at the end of a page, not at the end of every line as with subtitles.
nbohr1more

nbohr1more

06.01.2023 17:34

developer   ~0015714

Other than reverting the change, it might be possible to nudge the boundary field on the readable assets.
Of course, it will still be labor intensive but chances are if you fix one instance it will also fix other affected missions.
Testing will be a bear though... If I recall correctly there might be command to force viewing all readables in a mission...
stgatilov

stgatilov

06.01.2023 21:20

administrator   ~0015715

Two code paths often means only that the old one gets broken not today but much later =)

There is no contextual difference between subtitles and readables at all.
And the overflow issue is the same for all of them.
I wonder how can it be that this overflow in subtitles looks like a big problem,
while tons of similar overflows in readables (I guess the line overflow should happen in books all the time) was not marked as a big problem many years ago =(

I was ready that some could get broken, but right now it seems that everyone catches this kind of problem everywhere.
I don't think it is feasible to go through all core readables, all mission briefings, all mission custom guis.
Daft Mugi

Daft Mugi

06.01.2023 23:37

developer   ~0015716

"Two code paths often means only that the old one gets broken not today but much later =)"
Maybe we are thinking of two different strategies?

I'm thinking: if (subtitles) { subtitle_overflow() } else { overflow() }
Both code paths would get used all of the time, so none should get broken later.

Or, formatter pattern, perhaps?: if (subtitles) { overflow(SubtitleFormatter) } else { overflow(DefaultFormatter) }

I imagine there are a lot of steps involved, which would need tweaking at each step for this split to be possible.
For example, how would "idDeviceContext::DrawText()" and "idEditWindow::EnsureCursorVisible()" know that it was called for subtitles vs default?
So, I imagine it is troublesome to implement the split, but I haven't had a chance yet to go through the code.
Daft Mugi

Daft Mugi

06.01.2023 23:54

developer   ~0015717

One difference in context is that books and briefings are published works.
The authors set the text to flow and align a certain way, based on the text overflow logic at the time. They may have chosen particular words to end on certain pages. Changing that breaks their presentation and hard work.
So, the overflow logic better not be changed.

Subtitles, on the other hand, don't have to be set a certain way by the author. It just needs to match what's spoken and look ok. Subtitles can have different overflow logic.

That's the difference in context that I see.
Even though technically the overflow problem is the same for both, the current situation is that fixing one, breaks the other when using one set of overflow rules.
stgatilov

stgatilov

07.01.2023 14:49

administrator   ~0015722

I investigated how things work in DarkRadiant, and how they work in readables.
The full details are internal:
  https://forums.thedarkmod.com/index.php?/topic/21710-implicit-linebreaks-in-text/

The interesting findings are:
  * DarkRadiant sometimes puts linebreaks incorrectly, see e.g. the guest list book in "Inn business" mission.
  * The overflowing characters are not cut away in readables, the engine just renders them outside their window --- that's why there are not complaints about overflow.

So I reverted back and now 1-character overflow is allowed again:
  r10237 Reverted commit 10232 (Break GUI text to new line BEFORE overflowing character, not AFTER it).
Also, I added a slightly expanded "holder" parent window for subtitles:
  r16724. Add non-cutting padding to subtitles text windows.
Daft Mugi

Daft Mugi

07.01.2023 17:06

developer   ~0015725

Sounds good! =)

I look forward to trying it out.
stgatilov

stgatilov

16.01.2023 08:48

administrator   ~0015787

Why is the new mainmenu_briefing.gui of New Job directly changing "Subtitle0::visible"?
Is it necessary?
Now it gives a warning, because the names of windows have changed.
Dragofer

Dragofer

16.01.2023 21:01

developer   ~0015793

Last edited: 16.01.2023 21:02

The creator of the subtitles also provided a custom version of the briefing GUI. With the old GUI the subtitles dont appear during the briefing. Admittedly I didnt look too much into why this is the case and adopted the custom GUI since it otherwise appears to be functionally identical.
stgatilov

stgatilov

17.01.2023 07:37

administrator   ~0015808

I deleted the lines and fixed the other GUI warnings in svn rev 16743.
Geep

Geep

19.01.2023 21:35

reporter   ~0015835

There seems to be a mismatch between SUBTITLE_SLOTS (value of 4 in UserInterface code) and the number of subtitle fields in tdm_subtitles_common.gui (namely 3). Or am I misunderstanding that these should match?

My 2.11 source code download was from a while ago, so excuse if this has changed.

Issue History

Date Modified Username Field Change
07.03.2022 15:50 stgatilov New Issue
02.07.2022 07:00 Obsttorte Note Added: 0014937
14.12.2022 19:43 nbohr1more Status new => acknowledged
15.12.2022 04:52 nbohr1more Note Added: 0015574
15.12.2022 04:52 nbohr1more File Added: newjob_subs.zip
17.12.2022 12:07 Dragofer Relationship added child of 0006197
28.12.2022 21:29 stgatilov Relationship deleted child of 0006197
28.12.2022 21:29 stgatilov Relationship added related to 0006197
29.12.2022 10:03 Dragofer Note Added: 0015647
29.12.2022 10:03 Dragofer File Added: subs3.pk4
29.12.2022 10:03 Dragofer Note Edited: 0015647
31.12.2022 17:19 Dragofer Note Added: 0015660
02.01.2023 15:50 nbohr1more Assigned To => Dragofer
02.01.2023 15:50 nbohr1more Status acknowledged => feedback
03.01.2023 16:39 stgatilov Note Added: 0015687
03.01.2023 16:39 stgatilov Status feedback => assigned
04.01.2023 13:34 nbohr1more Note Added: 0015696
04.01.2023 13:35 nbohr1more Status assigned => resolved
04.01.2023 13:35 nbohr1more Resolution open => fixed
04.01.2023 13:35 nbohr1more Fixed in Version => TDM 2.11
04.01.2023 18:14 Dragofer Note Added: 0015700
05.01.2023 22:00 Daft Mugi Note Added: 0015703
05.01.2023 22:20 stgatilov Note Added: 0015705
05.01.2023 22:26 stgatilov Note Added: 0015706
05.01.2023 22:26 stgatilov File Added: iris (2023-01-05 23-25-59) (3329.15 415.22 132.25).jpg
05.01.2023 23:59 Daft Mugi Note Added: 0015707
06.01.2023 08:06 stgatilov Note Added: 0015709
06.01.2023 16:33 Daft Mugi Note Added: 0015710
06.01.2023 16:41 Daft Mugi Note Added: 0015711
06.01.2023 17:01 Dragofer Note Added: 0015712
06.01.2023 17:01 Dragofer Note View State: 0015711: private
06.01.2023 17:02 Dragofer Note View State: 0015711: public
06.01.2023 17:34 nbohr1more Note Added: 0015714
06.01.2023 21:20 stgatilov Note Added: 0015715
06.01.2023 23:37 Daft Mugi Note Added: 0015716
06.01.2023 23:54 Daft Mugi Note Added: 0015717
07.01.2023 14:49 stgatilov Note Added: 0015722
07.01.2023 17:06 Daft Mugi Note Added: 0015725
16.01.2023 08:48 stgatilov Note Added: 0015787
16.01.2023 21:01 Dragofer Note Added: 0015793
16.01.2023 21:02 Dragofer Note Edited: 0015793
17.01.2023 07:37 stgatilov Note Added: 0015808
19.01.2023 21:35 Geep Note Added: 0015835
06.01.2024 19:26 stgatilov Relationship added related to 0006337