📚 RecrypText Label Bundle - V1.3

Hello Flowlabbers! Are you currently in the process of making a visual novel? (Or other games I suppose if you’re not me…) Do you need an efficient system to handle all of your text needs? Is your blue-haired friend making fun of your sad little labels all the time? Well if you’re like most people your answer was probably: “…What?” But if your answer was a resounding yes, fear not for I have just the bundle for you!


Introducing: The Recryptext Bundle!*

recryptextgifshowcase
*This is technically the “Recryptext Lite Bundle” to account for copying issues with large bundles. The only thing that has been changed is the number of inputs.


What can this bundle do?:
This bundle is intended to replace most instances where you’d use the basic label behavior. It functions very well in most places, but especially in dialogue systems. It has a lot of flexibility, allowing for all kinds of dynamic effects, variables, and more. If you’ve used @Samuel_Tomé_PixelPizza’s text bundle, you’ll be familiar with how this one works as this bundle acts as a (very extensive) mod of his and my old systems combined.

What can’t this bundle do?:

  • This bundle does not play nice with multiple of the same bundle in one object. Unfortunately this means that there can only be one string of text per object.

  • This bundle does not handle variable kerning. This means it is ideal to use monospaced fonts when using this bundle.

  • This bundle is not as efficient at handling movement of the text itself. If you need something that moves, or rotates as if it was attached to an object, this may not be quite what your looking for. As of Version 1.3 text may now move and rotate freely.


:checkered_flag: Getting Started:

Just like PixelPizza’s bundle, you’ll need at least two objects to use this system.

  1. A character object.
  2. A text handler object.
  3. (Optional) A debug line object.

:package: Preparing Your Objects:

The Character Object:

Setup Steps:
  1. Create a 32x32 object (Larger fonts are currently unsupported).

  2. Paste the “Recryptext Character” bundle into the object
    Link to “Recryptext Character Handler” bundle code on GitHub

  3. Create an animation for the object called “Text.” This will be your font.
    3b. (Optional) Create a new animation for every font you want to be able to use.

  4. Ensure each of your font animations follow this exact order of characters:
    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 . , : ; ! ? ` ' " - + * = # $ & @ % _ | ^ / \ ( ) [ ] { } < > ~ [SPACE] a b c d e f g h i j k l m n o p q r s t u v w x y z
    Here it is as a sample gif:
    fancytext
    (More characters may be added to the fonts per user discretion, but remember to update the ID lists in the character and text handler bundles to reflect the changes)

  5. Ensure the animation you have created is set by checking the animation behavior inside your object in [Recryptext Character] → [ID].
    5b. (Optional) For every additional font you wish to use, add a new animation behavior, set your desired font to the animation, and connect it to a new output of the router.

The Text Handler Object:

Setup Steps:
  1. Create an object to host the “Recryptext Handler” code.
    Note: You may only have one “Recryptext Handler” per object!
    Link to “Recryptext Lite” bundle code on GitHub

  2. Ensure your “Character Object” is set to spawn.
    Inside [Recryptext Lite] → [Spawn Characters] there is a character spawner (It has a note: “Update this!”)

  3. Decide if the text is skippable. If so, connect the trigger action to the input of a Message to self behavior named “Skip.”

  4. Edit input and config settings to your liking (These are explored further down the post) .

  5. Prepare any dialogue feed systems. The bundle will handle all text, but the desired lines themselves still need to be provided.

(Optional) The Debug Line Object:

Setup Steps:
  1. Create an object as tall as the height of your game named “Debug Line.”

  2. Check the “Recryptext Handler” bundle of your “Text Handler Object” to ensure your debug line is set to spawn.
    Inside [Recryptext Lite] → [Spawn Characters] → [Alignment]:
    There are 2 spawners in [Left Align]
    There is 1 spawner in [Center Align]
    There are 2 spawners in [Right Align]

  3. Inside the config bundle of the “Recryptext Handler” bundle, ensure the Debug message receives a signal of 1 if you want the lines to appear, and a signal of 0 if not.


:electric_plug: The Text Handler’s I/O:

Learn More

The text handler possesses ten separate inputs that you may utilize to create labels with. It has one output.

Note: Any inputs marked in yellow are not available in the lite version of the bundle and must be changed in the bundle itself or through “dynamic text.”

Inputs:

  • Delete - Deletes all spawned text and resets the bundle. It is highly recommended that you do this before every use.

  • Text - The desired text you would like displayed.

  • Speed - The speed of the text scroll. Any number less than 0 will make the text instantly appear. 0 is the default and fastest scroll speed. Add 0.2 to the speed until the desired scroll is achieved.

  • X -The X position of alignment. This acts as the starting point for left and right alignment and the center point for center alignment.

  • Y - The Y position of the starting line.

  • Align - Aligns each line to the left (default), to the center, or to right. Requires a text input of (left, center/centre, or right).

  • Bounds - The max length a line can be in pixels. (Default is 0, or after every word).

  • Size - Scale of the character object in percent. (Default is 100).

  • Color - Text input of the desired Hex color code. (Default is EMPTY)

  • Alpha - Opacity of the character object. (Default is 100).

  • Layer - Layer of the character object. (Default is 2).

  • FXs - Text input of any desired character effects. All effects must be spelled properly or an error will occur. If you wish to include multiple FXs at once, list them like this: effect1,effect2,etc.. A full list of all FXs can be found in the section below.

  • Start - Displays the text with the given properties.

Outputs:

  • Done - Outputs a signal when the text has finished displaying.

:sparkles:Text Effects (FXs):

Learn More

Text may require certain attributes on read or dynamically. This is the list of all the effects included with the base bundle that may be applied (Please note their spellings exactly!):

  • fadein - Characters fade in on spawn.

  • fadeout - Characters fade out on destroy.

  • shake1 - Characters shake individually.

  • shake2 - All characters shake simultaneously.

  • wave - Characters consecutively move up and down in a sine-wave-like pattern.

  • float - All characters move up and down simultaneously.

  • zoom1 - Characters start small and grow larger on spawn.

  • zoom2 - Characters start large and grow smaller on spawn.

  • rainbow1 - Characters consecutively change color.

  • rainbow2 - All characters change color simultaneously.

  • drop - Characters start above their position and drop down on spawn.

  • spin - Characters spin about their center on spawn.

  • jump - Characters start at their given position and perform a little “jump” on spawn

  • circle - All characters move in an elliptical pattern simultaneously.

  • blink1 - All characters blink on and off simultaneously.

  • blink2 - Characters blink on and off consecutively in a wave-like pattern.

  • blink3 - Characters will randomly blink on and off.

  • flipx - Characters flip around their Y-axis like a revolving piece of paper.

  • flipy - Characters flip around their X-axis like a revolving piece of paper.

  • sway - All characters move left and right simultaneously.

  • swave - Characters move in an elliptical pattern consecutively.

  • breathe - All characters softly grow and shrink in size simultaneously.

  • pulse - Characters consecutively and softly grow and shrink in size.

Here are all of the effects in a text list if you’d like to keep it in your bundle to use or reference. Thanks to @Mhx_Air for the suggestion and list

{"data":{"behavior":{"v":"2","nodes":[{"inputCount":7,"outputCount":5,"name":"Text FX List","behaviorType":"logic.data.TextList","x":450,"y":432,"group":"","id":"6aa092c39add8641","notes":"1) fadein - Characters fade in on spawn.\r\n2) fadeout - Characters fade out on destroy.\r\n3) shake1 - Characters shake individually.\r\n4) shake2 - All characters shake simultaneously.\r\n5) wave - Characters consecutively move up and down in a sine-wave-like pattern.\r\n6) float - All characters move up and down simultaneously.\r\n7) zoom1 - Characters start small and grow larger on spawn.\r\n8) zoom2 - Characters start large and grow smaller on spawn.\r\n9) rainbow1 - Characters consecutively change color.\r\n10) rainbow2 - All characters change color simultaneously.\r\n11) drop - Characters start above their position and drop down on spawn.\r\n12) spin - Characters spin about their center on spawn.\r\n13) jump - Characters start at their given position and perform a little “jump” on spawn\r\n14) circle - All characters move in an elliptical pattern simultaneously.\r\n15) blink1 - All characters blink on and off simultaneously.\r\n16) blink2 - Characters blink on and off consecutively in a wave-like pattern.\r\n17) blink3 - Characters will randomly blink on and off.\r\n18) flipx - Characters flip around their Y-axis like a revolving piece of paper.\r\n19) flipy - Characters flip around their X-axis like a revolving piece of paper.\r\n20) sway - All characters move left and right simultaneously.\r\n21) swave - Characters move in an elliptical pattern consecutively.\r\n22) breathe - All characters softly grow and shrink in size simultaneously.\r\n23) pulse - Characters consecutively and softly grow and shrink in size.","n_o":1,"startVal":["fadein","fadeout","shake1","shake2","wave","float","zoom1","zoom2","rainbow1","rainbow2","drop","spin","jump","circle","blink1","blink2","blink3","flipx","flipy","sway","swave","breathe","pulse"]}],"links":[]}}}

:clipboard: The Text Handler’s Config:

Learn More

The “Config Bundle” is located inside the “Recryptext Bundle.” It controls many functions intrinsic to the way that the that the text handler works but that the user may want change. Inside are five different bundles that control a variety of options.

Debug

Config options related to debugging text.

  • Debug - Takes an input of either 0 (False) or 1 (True). If set to true, the handler will attempt to make use of the “Debug Line” object if it has been properly set up. “Debug Lines” will indicate the beginning and ending of each line to more easily tell how the text is spaced.

Typography:

Config options related to the appearance of the text.

  • Font Style - The font the handler will use. The default is 1, but you may change the default if you have added other fonts.

  • Kerning - The amount of pixels a character represents. In effect this changes the spacing between characters. Default is 24. Larger numbers will result in larger gaps while the opposite is also true.

Speed:

Config options related to the speed of displaying text and effects.

  • Punctuation Delay - Takes an input of either true (default) or false. Determines whether the text handler will pause for different punctuation marks. This is useful for dialogue, but may be an issue for other forms of text.

  • FPS - The FPS your game is running at (30/60). This will adjust certain aspects that rely on the fps of the game.

  • Effect Speed - Changes the speed at which the FXs of your characters will move. This value will only affect text spawned by this text handler. Default is 0.1.

Sound:

Config options related to the sounds the text handler makes.

  • Sound Style - Changes the way the text handler will make sound as text is spawned. Default is 1.
    0 - None
    1 - On space and punctuation
    2 - On space only
    3 - On punctuation only
    4 - Every other character
    5 - Every third character

  • Sound Effect - Change the sound that the text handler makes as it spawns characters.

Barriers:

Barriers are points on the XY plane at which text will send a message to the text handler it came from. This is useful for detecting if moving text has passed a certain point and to perform an action in response.

  • Barrier Bounds - Sends any Minimum X, Maximum X, Minimum Y, and/or Maximum Y that is desired. These are the points at which characters will message the text handler if passed.

  • Barrier Response - Provides an area in which the responses from the characters passing the barrier bounds are received. Each mailbox will output either a 1 if the character is passed the barrier, or a 0 if it is not passed the barrier. Included in this bundle are some common responses which will be sent to the character that is passed the barrier.


:speech_balloon: Dynamic Text (The Main Show!):

Learn More

Dynamic text is the main reason for the creation and use of this bundle. Dynamic text allows you to include flags inside of your text itself, permitting you to customize your text to a much higher degree. In order to make use of dynamic text, you must include the \ (backslash) character at the start of your input text as an escape character. This character will be removed and signals to the text reader that you intend to include dynamic text in the input. From here you may use the text handler normally while including flags for two types of dynamic texts:

Variables 💾

Variables may be inserted into the text in order to change what the text says dynamically. They use curly braces { } to indicate an enclosed variable.

An example of a variable would look like this:

When “name” = “Lumella”:
\Hello, {name}! How are you today? → Hello, Lumella! How are you today?

Every variable intended for use must first be set up by the user. In order to do so, navigate to the correct bundle by following this path (They are marked by behavior notes as well):

[Recryptext Lite] → [“F-String” Replace] → [Custom Variables] → [Insert Variables] → [Replace Variable] → [Find Variable]

Once inside the “Find Variable” bundle, there are three things that must be done to ensure the variable is ready for use.

  1. Add the name of your variable to the “Variable List.” This must match exactly to how you would like to call it in your text, but does not necessarily need to match the name of any object variables, globals, or numbers it is attached to.

  2. Ensure the router is connected to the correct variable such that when the name of the variable is called, the index is the same as the output for the router you need.

  3. Ensure the variable is connected to the text output of the “Find Variable” bundle. If your variable is not a text variable type, be sure to convert it to one first.


An image depicting how the “Find Variable” bundle would look in the previous “Hello,{name}” example. Note how “name” is located in the list and how the object variable is connected to the corresponding router output.

Properties 🌈

Text properties may be changed dynamically according to the given property tags. They use angle brackets < > to indicate an enclosed property. The first part of the tag refers to the property that should be changed. A colon : then separates the property from the new value of the property.

For example:
\Hello, Lumella! <size:50>How are you today? → Hello, Lumella! How are you today?

Most properties are responsible for changing the initial inputs of the bundle in the middle of the text and thus take on the same input requirements discussed in the Text Handler’s I/O section above. Properties that may be changed dynamically like this include:

  • <speed:int> - Changes the speed of all following text.

  • <size:number> - Changes the size of all following text. Be aware that if the size is changed in the middle of the text, the bounds of the text will not update to reflect the change.

  • <color:number> - Changes the color of all following text. In order to clear the added color entirely, an empty color tag <color:> or clear color tag <color:clear> may be used.

  • <alpha:number> - Changes the opacity of all following text.

  • <layer:number> - Changes the layer of all following text.

  • <fxs:string> - Changes the FXs of all following text. This property uses the list of FXs from the The Text Effects (FXs) section above. Following the same format as the FXs input, if you would like to change multiple fxs at once use <fxs:effect1,effect2,etc.>. In order to clear all added FXs, either an empty fxs tag <fxs:> may be used or a a fxs clear tag <fxs:clear> may be used.

  • <punctuation:boolean> - Changes whether punctuation will delay the text scroll moving forward. May only be “true” or “false”.

  • <warp:number> - Will instantly load the next amount of characters given by the value.

  • <wait:number> - Waits a given number of ticks before displaying the next character. (Remember, 10 ticks = 1 second.)

  • <rotation:number> - Will rotate individual characters towards a given angle in degrees.

  • <xscale:number> - Changes the X scale of all following characters. X scale, unlike size, does not affect kerning or effects.

  • <yscale:number> - Changes the Y scale of all following characters. Y scale, unlike size, does not affect kerning or effects.

Experimental ⚠️

Note, while experimental features may be used, they may act buggy or behave strangely with other RecrypText features.

  • <italics:boolean> - Adds italics to all following characters. This uses @JR01’s skew example. It does not interact well with other properties and flickers into rotation on load. May only be “true” or “false”.

  • <kern:number> - Changes the following kerning of all characters. This works poorly with alignment and and new lines.

As of Version 1.2 you may now use the escape character \ (backslash) to print the < >, { }, and \ characters without causing errors or indicating a dynamic text tag.

Using an example from before:

When “name” = “Lumella”:
\Hello, \{name\}! How are you today? → Hello, {name}! How are you today?

This has the side effect of no longer printing \ on it’s own like in versions before 1.2. In order to print “\” you will now need to write \\ first.


:mailbox: Text Command Messages:

Learn More

Spawned text and the text handler itself may still be controlled after text has been spawned. By sending a message with the following names to the following objects you may achieve these results (Please be sure to note exact spelling and capitalization of the messages) :

  • Skip - To “Text Handler Object” Instantly loads the rest of the remaining text.

  • Set X - To all spawned “Character Object” sets all current text to a specific X coordinate. The X origin of the text depends on the alignment of the text.

  • Set Y - To all spawned “Character Object” sets all current text to a specific Y coordinate. The Y origin of the text will always be the top line.

  • Move X - To all spawned “Character Object” moves all current text a specific distance on the X coordinate. The X origin of the text depends on the alignment of the text.

  • Move Y - To all spawned “Character Object” moves all current text a specific distance on the Y coordinate. The X origin of the text depends on the alignment of the text.

  • Label Rotation - To all spawned “Character Object” rotates all characters about a single origin point with the given angle (In degrees). This relies on the alignment and average height of the text.


:x: Catching Errors:

Learn More

With a bundle so large and with so many options, there are bound to be some issues along the way to getting the perfect text for your needs. When working with the “RecrypText Bundle” please keep these common errors and issues in mind.

  • Missing Variable Errors - If the dynamic text handler is requested to find a variable using “{}” but is unable to find it, or if the variable has been improperly setup, this will result in a missing variable error. Please ensure your variable has been setup inside: [Recryptext Lite] → [“F-String” Replace] → [Custom Variables] → [Insert Variables] → [Replace Variable] → [Find Variable]. Please refer to the previous section if you need more help setting up your variables.

  • Empty Variable Errors - If your variables have been properly setup but are called when they possess no data, this will result in an empty variable error. To fix this, simply ensure the variable has been set with data before it is called.

  • Missing Property Errors - If the dynamic text handler is requested to set a property using “<>” but is unable to find it, this will result in a missing variable error. This is typically the result of a misspelling or misplacement of the syntax. Ensure that every property call follows this format: <property:value>. Please refer to the previous section if you need more help using properties.

  • Missing FXs Errors - If the text handler is given an effect it does not recognize, either through the FXs input or through the dynamic property system, this will result in a missing FXs error. This is typically the result of a misspelling or misplacement of the syntax. If you are using a list of FXs, ensure the list is all spelled correctly and only has commas separating the FXs (i.e. effect1,effect2,etc.). Please refer to the previous section if you need more help using dynamic FXs.

  • Frame Order Errors - The text handler’s inputs are very sensitive to the order you input them in-- down to the very frame. This means That you should always have your inputs layered correctly such that the inputs are set from top to bottom. If any input is performed before the delete input for example, any new values will be immediately reset, so be sure to keep your code organized and in order.

  • Syntax Errors - The bundle attempts to account for all capitalization and regional spellings in words (like center vs centre and color vs colour). Please ensure while using FXs and dynamic text that everything is spelled correctly, otherwise, things will quickly break (I can’t auto-correct everything for you!). On top of this, if you are using dynamic text, do not attempt to use “\”, “<”, “>”, “{”, or “}” in the text on their own. These will signal a dynamic text read and result in an error. If you would like to use these characters, be sure to escape them using a \ first. If there is a regional spelling for a word that you would like added, please let me know!


As you can see, this bundle is very expansive! If I missed anything (Which I probably did lol…) or if you have any suggestions, questions, or bug reports, feel free to send me a message or post on this topic!

15 Likes

This is really cool!

Also, is Flow of Feelings still being worked on?

2 Likes

This bundle is the direct result of the need for a text handler that can take on the requirements of a visual novel’s dialogue system. I’ve just released it for everyone to use (:

3 Likes

Incredible work @Recryptech - thanks for sharing!

5 Likes

Does this allow the option to instantly load text?
I don’t know how to describe it, but let’s just say the text takes a few seconds to load up letter by letter, does the bundle incorporate the ability to press E (or whatever interaction key you choose) to immediately load up the remaining text while it’s popping up?

I was working on a story-based game a bit ago and created a bundle (just using Labels) and since the text loaded about the same speed as if the player was reading it, but you also had the option to press E to instantly load it and again to load up the next dialogue.

It’s probably not a necessity, especially if the text is made to load up quickly anyway, but it’s a small feature I see in most games.
I’m not sure how it would work in your case if you’re using separate objects as the font instead of labels so it might be much different.

For a visual novel however, not sure it would be efficient or else players can skip right through the dialogue, but it’s a great system to have for standard games so if you have already played the game (or speedrunning) you can swiftly blast through the dialogue and into the game itself.

4 Likes

Yes, that’s definitely possible! If you input a negative number for the speed, it will instantly load the text. If you want the player to skip the text, just send a message named “Skip” to the object with the text handler

4 Likes

This is amazing, thank you so much again for providing this to the community :clap::fire:
The extensive Documentation is also really well written and helpful :blush:

5 Likes

This is absolutely awesome. I might use this if I ever do make a visual novel or something like that.

4 Likes

Hmm… Cool! So, with this bundle, we can make custom fonts?! This is epic!

3 Likes

This is seriously epic!

Yeah, if the objects with the font are like PixelPizza’s, you can make a custom font and input it as a sprite GIF the same way PixelPizza had set up.

3 Likes

New update! Major release V.1.2

If you are using RecrypText and want to update, be sure to update both the text handler and character handler. Just remember, if you updated any customizations or config your changes will be lost!

  • New Set X and Set Y commands.
  • New Move X and Move Y commands.
  • Text warp property (make certain sections of text instant.) This was a feature before, but should hopefully be fully implemented now.
  • Escape characters. If you want to use “{ }”, “< >”, or “\”, you can now do so freely in dynamic text as long as you use “\” before hand.
  • The “Flip” FX has been changed to “FlipX.”
  • New FXs: FlipY, Breathe, and Pulse.
  • <color:clear> is now a valid command along with the already implemented <color:>. This is to be consistent with <fxs:> and <fxs:clear>.
  • New text sound function in the config bundle.
  • Text FX speed is no longer reliant on a global setting. Effectively, this means that each character handler may now have its own speed for its effects, independent of each other.
5 Likes

I would also like to mention that this release had a shorter testing phase, so as always if you see a bug or notice anything, be sure to let me know!

5 Likes

Alright! The documentation has been updated to reflect the changes made in version 1.2 and version 1.2.1!

…Wait version 1.2.1?

New update! Minor release V.1.2.1

That’s right! While I was working on documentation and updating the git page I made some smaller changes:

  • There are no longer any globals in the RecrypText Bundle. This means that Text FX speed is now only reliant on the FX speed of the handler it spawned from, rather than being a global setting.
  • Text sound config received some more options.
  • Some frame order things were changed meaning bundle inputs are now more consistent when inputting all values at once.
  • Default text bounds is now the width of the screen rather than 0.
  • Performance should be generally improved. Thanks to the removal of the global and the introduction of more conditional switches, expression and always behaviors should usually take less resources than before.
5 Likes

That’s awesome! Thanks for the updates :blush:

Have yall seen this video I did for the RecrypText Bundle?
I think it shows really well why it is so good :smile:

On Twitter: https://twitter.com/flowlabio/status/1768746836074836403

Click the image to watch a video of the Bundle in action!
Image

Can you tell I like this bundle lol

6 Likes

Just did a minor bug fix for the character handler. If anyone has been having issues with their text not appearing, check to see if version 1.2.1.1 of the character handler bundle addresses it. Also included a text list behavior with a list of all the effects in the FX documentation. Thanks to @Mhx_Air for the suggestion and list.

Also also updated the documentation for addressing frame order errors. If you are inputting multiple values at once, be sure they all go top to bottom. Otherwise, you may experience some weird results.

3 Likes

This is so neat!
Do you happen to have a smaller version of the bundle? My cromebook can not handle copying it. :disappointed_relieved:

2 Likes

bruhhhhh you can’t copy it? That’s sadd

2 Likes

I know, Its really frustrating. I can’t copy FlowFx either :frowning:

1 Like

Really? That’s unfortunate. Have you already tried copying and pasting the code directly from the GitHub instead?

2 Likes

New update! Major release V.1.3

If you are using RecrypText and want to update, be sure to update both the text handler and character handler. Just remember, if you updated any customizations or config your changes will be lost!

  • Edited the Config Bundle’s Organization

  • Added the Barrier Config (Including bounds and response sub-bundles)

  • Added the Wait property

  • Added the Rotation property

  • Added the X Scale Property (scale properties, unlike size, do not affect kerning nor other fxs)

  • Added the Y Scale Property (scale properties, unlike size, do not affect kerning nor other fxs)

  • Added the Label Rotation command

  • Fixed a Bug Where values other than 0 input for delete messes with alignment.

  • Added an experimental italics property (Uses JR01’s mystery skew. Does not interact nicely with other properties and flickers into rotation on load)

  • Added an experimental kern property (This works very poorly as expected.)

labelmovementtest

8 Likes