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

Randomized lines cannot have replies. It does not add them in the lines dictionary #446

Closed
Drillur opened this issue Jan 19, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Drillur
Copy link

Drillur commented Jan 19, 2024

What I want is a series of randomized lines with randomized replies, like this:

image

The player will have no input on these conversations, as they are just background dialogue.

However, if a randomized line has a reply, even a non-randomized reply, then it will fail this assertion: assert(resource.lines.has(key), DialogueConstants.translate("errors.key_not_found").format({ key = key })) Assertion failed: Key "9" not found.


I did try this, and it fixed the issue of not adding the replies to the lines dictionary, but then it broke the randomization process of the top-level messages.

image

Perhaps I can brute-force past this myself? But I figure you should know that it doesn't work.

If I'm simply using it incorrectly, boy would that be lame!

@Drillur Drillur added the bug Something isn't working label Jan 19, 2024
@Drillur
Copy link
Author

Drillur commented Jan 19, 2024

I got it to work, and it is really ugly and inconvenient to write compared to the way I tried the first time. Yes, this is the only way to do it. If it has a reply, it must not be randomized. So, lines without replies go in their own section, and then each line with a reply must also be in its own section.

~ COAL_RANDOM
%6 => c0
% => c1
% => c2

~ c0
% COAL: Dig, dig!
% COAL: Glad to help!
% COAL: Is this lump yours? [wait=1]Just kidding!
% COAL: I hope my posture is good.
% COAL: I sure am grateful for this shovel.
% COAL: Why is this stuff purple?
=> COAL_RANDOM

~ c1
COAL: If you didn't get enough, go ahead and take some more!
% CONCRETE: Gracias, amigo.
% JOULES: Thank you.
% COPPER_ORE: Well, shoot, there, boss, don't mind if I do!
=> COAL_RANDOM

~ c2
COAL: I always liked playing support.
% => c3
% => c4
% => c5
=> COAL_RANDOM

~ c3
TARBALLS: Support as in... buffer or healer?
COAL: Healer.
=> COAL_RANDOM

~ c4
IRON_ORE: ADC for life.
=> COAL_RANDOM

~ c5
IRON: I like to tank!
=> COAL_RANDOM

Including aesthetic spacing, this doubled the amount of lines.

Also, regular lines and section jumps cannot be grouped together in a random pool. They are grouped separately. See:

image

Test3 is never reached.

@nathanhoad
Copy link
Owner

I'm not really sure what you're trying to do but if you want to have separate groups of random lines then you can add an empty line between each group.

@Drillur
Copy link
Author

Drillur commented Jan 20, 2024

The first screenshot is the most relevant to what I'm trying to do: Get randomized dialogue with no input from the player. The player won't be able to reply to anything. I also was trying to get randomized replies to certain lines, like at line 8--if Coal says the line on line 8, then 1 of those 3 characters below him would have a reply.

But there can be no reply like that to a random line.

@nathanhoad
Copy link
Owner

If you unindent all of those lines and then add empty lines between the grouped random lines it should do what you want.

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