Skip to content

Fix discrepancy between CLEO and native subtitles behavior#547

Merged
x87 merged 10 commits into
masterfrom
print_commands_behavior
Mar 10, 2026
Merged

Fix discrepancy between CLEO and native subtitles behavior#547
x87 merged 10 commits into
masterfrom
print_commands_behavior

Conversation

@x87
Copy link
Copy Markdown

@x87 x87 commented Mar 8, 2026

Closes #517

  • Fix CLEO subtitles not queuing as game subtitles produced with native print commands
  • CLEO subtitles now properly added to the history in the Brief Menu respecting ADD_NEXT_MESSAGE_TO_PREVIOUS_BRIEFS flag
    • No behavior change for legacy .cs4 scripts
  • Fix an issue in PRINT_BIG_STRING and PRINT_BIG_FORMATTED where styles 6 and 7 could not display at the same time
  • Apply game logic for suppressing subtitles (messages starting with a ~z~ token) to CLEO PRINT_[STRING|FORMATTED][_NOW] commands
    • No behavior change for legacy .cs4 scripts

@x87 x87 requested a review from MiranDMC March 8, 2026 04:35
@x87 x87 changed the title CLEO print commands match native commands and added to the brief CLEO print commands behavior match native commands Mar 8, 2026
@x87 x87 changed the title CLEO print commands behavior match native commands Fix discrepancy between CLEO and native print command behavior Mar 8, 2026
@MiranDMC
Copy link
Copy Markdown
Collaborator

MiranDMC commented Mar 8, 2026

I do not know. Now all these commands will be spamming briefs, which was not the case previously.

@MiranDMC
Copy link
Copy Markdown
Collaborator

MiranDMC commented Mar 8, 2026

Is it how brief works in vanilla game?
I would expect duplicates detection to only check if most recent entry is not the same. Currently text can be skipped because it is present in the briefs at all.

@x87
Copy link
Copy Markdown
Author

x87 commented Mar 8, 2026

Is it how brief works in vanilla game? I would expect duplicates detection to only check if most recent entry is not the same. Currently text can be skipped because it is present in the briefs at all.

It checks across all 20 items.

@x87
Copy link
Copy Markdown
Author

x87 commented Mar 8, 2026

I do not know. Now all these commands will be spamming briefs, which was not the case previously.

Makes sense, I can disable for .cs4

@MiranDMC
Copy link
Copy Markdown
Collaborator

MiranDMC commented Mar 8, 2026

Is state of ADD_NEXT_MESSAGE_TO_PREVIOUS_BRIEFS respected and properly reset?

@x87 x87 marked this pull request as draft March 8, 2026 16:47
@x87
Copy link
Copy Markdown
Author

x87 commented Mar 9, 2026

Is state of ADD_NEXT_MESSAGE_TO_PREVIOUS_BRIEFS respected and properly reset?

yes. it is basically always true and reset to true after any message command. its true meaning is not add, but exclude the next message from the brief

@x87 x87 marked this pull request as ready for review March 9, 2026 05:38
Comment thread cleo_plugins/Text/Text.cpp Outdated
auto& bigMessage = bigMessages[styleIdx];

strncpy_s(bigMessage, text, sizeof(bigMessage) - 1);
CMessages::AddBigMessage(bigMessage, time, style - 1);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not using styleIdx here?

Copy link
Copy Markdown
Author

@x87 x87 Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea, looks like a hidden one-off bug here?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style is clamped to valid range above, then raw value is used here.

Copy link
Copy Markdown
Author

@x87 x87 Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

problem is that styleIdx is incorrect. It clamps valid style id 7 into 6. It means you can't display both style 6 and 7 on screen at the same time

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@x87 x87 changed the title Fix discrepancy between CLEO and native print command behavior Fix discrepancy between CLEO and native subtitles behavior Mar 9, 2026
@x87 x87 requested a review from MiranDMC March 10, 2026 05:11
@x87 x87 merged commit 256673d into master Mar 10, 2026
3 checks passed
@x87 x87 deleted the print_commands_behavior branch March 10, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

print_formatted does not match print behavior

2 participants