Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character name as variable in response option results in malformed response text #553

Closed
ohin opened this issue Apr 21, 2024 · 7 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@ohin
Copy link

ohin commented Apr 21, 2024

Describe the bug
When using shortened version of writing a response option where you write character name followed with response text on the same line and writing the character name as a variable will result in the character name being added at the end of the text with some of the response repeated.

Example:

# in some referenced global script set the variable
name = "Character1"
{{name}}: Here is a thing you can do
- {{name}}: That's good to hear!
- {{name}}: That's definitely news

Result:
DialogueResponse.text = "That's good to hear!Character1good to hear"

However, writing the responses in "long-form" works as expected:

{{name}}: Here is a thing you can do
- That's good to hear!
   {{name}}: That's good to hear!
- That's definitely news
   {{name}}: That's definitely news

Affected version

  • Dialogue Manager version: 2.38.0
  • Godot version: 4.2.2

Expected behavior
Response prompt should not include character name from a variable in the malformed response text.

@ohin ohin added the bug Something isn't working label Apr 21, 2024
@nathanhoad
Copy link
Owner

When I use your example dialogue it appears to work for me (except I renamed name to player_name because name is already a property of Node):

image

Can you verify your Dialogue Manager version is 2.38.0?

@ohin
Copy link
Author

ohin commented Apr 23, 2024

That's weird :) Because here I am attaching minimal reproduction project, where I isolated the issue.
dialogue_manager_issue_553.zip

@nathanhoad
Copy link
Owner

Yeah you're missing the line that was added to fix this issue a little while ago: https://github.com/nathanhoad/godot_dialogue_manager/blob/main/addons/dialogue_manager/dialogue_manager.gd#L145

That does present a different problem though - somehow the swapping of files on update isn't working properly any more.

@ohin
Copy link
Author

ohin commented Apr 24, 2024

Actually, to the MRP the plugin was obtained through asset store. So there was no update path. Therefore I am guessing the fix is missing in the released version?

@nathanhoad
Copy link
Owner

Oh wow I'm an idiot - turns out the fix hasn't actually been released yet. Here I was about to tear the auto-update apart trying to find out why it wasn't working.

I'll do a release now. Thanks for pointing me to the actual problem 👍

@nathanhoad
Copy link
Owner

I just released v2.39.0 and verified that upgrading fixes the issue in that MRP project.

@ohin
Copy link
Author

ohin commented Apr 24, 2024

Great, I am glad I could help. Thank you for the great plugin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants