This is a concept! And this post is long! TL;DR at the end.
Text:
Just like a number, but stores text instead
Text count:
Input some text, and it'll output the number of characters.
Text expression:
Used to concatenate text.
The expression is: `I like { A } and { B }` so the output will be `I like candy and chocolate`.
Some advanced functions will be: { A.ToUpper } to make A uppercase, so CANDY { A.ToLower } to make A lowercase { A.Slice(1, 4) } to slice text, this will start at 1 and it’s 4 characters long so it’ll be andy
Of course there are a lot more functions but I’m pretty sure grazer is familiar with this
Text filter:
Used to check certain conditions for text
Of course there are a lot more options:
Number box will disappear if it’s not needed:
Text box will appear if needed:
More than x characters - Passes if the input has more characters than the specified value Fewer than x characters - Passes if the input has fewer characters than the specified value Equal to x characters - Passes if the input has the same number of characters as the specified value Is number - Passes if the text is able to be parsed to a number Is blank - Passes if the input has no characters, or only contains spaces Contains ... - Passes if the input contains the specified text Starts with ... - Passes if the input starts with the specified text Ends with ... - Passes if the input ends with the specified text
The specified value/text can be changed any time with the value input.
Text box:
A highly requested feature by @"Mhx Ar"
As you can see in the image, you can hide the background/border of the box. This would be useful for creating custom textboxes if you want them to look more fancy.
Inputs Set: Sets the text in the box In: Ouputs the text in out Alpha Enable: Enables typing in the box Disable: Disables typing in the box Outputs Confirm: Actives when the user presses ENTER on the box Focus: Actives when the user clicks the box to type on it Leave: Actives when the user leaves the box by clicking somewhere else Properties Width: The width of the box in pixels Lines: How many lines the box can have (so basically the height) "Allow any character" can be changed:
A few more notes
Label text can be changed with the label input
Alert can have 3 inputs to change the title, caption and button text. Useful if you want to display a score.
If you input a number when you're supposed to input text it'll convert it to text. For example if you input `64` to a text count it'll basically output the number of digits, so `2`.
If you input text when you're supposed to input a number it'll just ignore it. For example if you input `hello` to set a number nothing will happen.
TL;DR
Text behavior
Behavior that counts characters in text
Behavior to concatenate text
Behavior to check certain conditions on text (equal to 5 characters etc.)
I would really like to have words typed word by word. RPG maker had it over 20 years ago, and many NES and SNES games too. It’s unusual to not have any simple way to tell a story without 5000 alerts or labels.
Thanks for the all these thoughts about how we can deal with Text. I’ve been thinking about this for a while as well, and a lot of these ideas overlap with the kind of stuff I’ve had in mind.
One thing that I’ve had in mind that isn’t addressed in this thread is how to handle larger amounts of text data. Even if we have behavior blocks that handle individual units of text (usually called “Strings”), that’s not really sufficient for managing text data. For example, if we wanted to have NPCs that can carry on conversations like the RPG Maker screenshot above, we wouldn’t want to have a Text block for every piece of text.
I was thinking that we need some sort of “Data” block that could hold rows of text like:
Hello
I have a quest available.
Do you accept?
Bring me 7 rat pelts
Have you completed your quest?
Here is your reward: One n00b dagger
and it could have an input to select which text to display, e.g. “4” would display “Bring me 7 rat pelts”. This could even be a modification to the Label block, really.
So you mean adding a block to store an array? That’s not a bad idea.
There’s only one thing: Let’s say you want one string in the array to display a score (like Your score was [insert score here]), that means the string won’t always be the same. If there were things like variable names you could do Your score was { score } and give a number block the variable name “score” so it’ll take that value (or you could use the existing label property for that, it’s currently useless).
I think this is also a better and more understandable way to concatenate strings instead of using a text expression. Every number and text block has a name and you can access the value by putting the name between { }.
It would be cool if we could store those arrays in save blocks too. You could use that to save your inventory items for example, the items you have bought or whatever you have in your game. Now we literally have to make a save block for every single item.
Woah! This is really cool. I personally don’t feel like I would use 90% of what @Latif suggests but its still supper neat. The primary thing I would request at this moment would be more options for the alert block, such as being able to add multiple buttons and change more things like alpha, font, text size, ETC