Text Device Alignment

I’ve recently started trying to build a visual novel engine, and have come across a dilemma. In most visual novels, the text is aligned with the left side of the dialogue box. However, the text device in GKC is centered rather than using the left side. I can’t just use a text device for each box, as I want the characters to appear one by one, and there would be way too many lines of dialogue for memory to keep up.

One solution I’ve been thinking of is adding a bunch of spaces to the end of the line as a sort of counterweight based on how long the text is. However, this creates a problem due to different letters being different widths. I would need to have a library of the widths of each character, and I can’t store it in a text property due to an inability to convert substrings to numbers.
I was thinking of using a number property for each letter, but I have to include all the capital letters and symbols, which would eat up a bunch of my property limit. Then, I’d need to find about how many tenths of a space are in each letter, which needs to be as accurate as possible.

Does anyone have any ideas, and does anyone have a good way to find the width of characters?

3 Likes

By characters, do you mean sentry’s, dialogue people (st) or barrier art?

By characters I mean letters, numbers, symbols, or anything else that can be part of a string.

1 Like

I would use zones, but you’d have to use a ton of memory.

This seems like a rather advanced game. Very impressive if you pull this off

2 Likes

I kinda wanted a specific font and outline, but the ASCII character is certainly helpful. I think using it in conjuction with spaces would allow for more precise alignment.

Use a different Text Box Device for each line and set a building grid snap to 1 or 2, then align them all on the left side.

I understand not wanting to read the large block of text above, but it’s important to have absorbed all of the information in the post provided if you’re gonna reply.
I can’t have a text device for every single piece of dialogue because I’m planning on having a lot of dialogue.

1 Like