Post by BusterTheFox on Jan 30, 2012 5:19:05 GMT -8
(THIS IS AN OLDER VERSION OF MY TEXT SYSTEM. Here's a link to the new version!: stagecast.proboards.com/index.cgi?action=display&board=tips&thread=33
This is a perfect text system I came up with. It's just like any text system you might find in a commercial RPG. It's easy to manage and looks great! Also very easy to edit!
VARIABLES YOU WILL NEED FOR THIS TUTORIAL:
"Display"
"Text1"
"Text2"
Put "0" into Display.
Put any message you would like to display in Text1 and Text2.
CHARACTERS YOU WILL NEED:
You only need to make one. Make a large text box at the bottom of the stage. I suggest putting it on the second space from the bottom and the first space from the left. Crop it so that it goes across The entire bottom two panels of the stage. Place you Character1 anywhere above the text box.
WHAT EVERYTHING DOES:
Display is a variable that tells the text box which block of text to display. For instance, Text1 says, "Hello world", and Text2 says, "How are you?". If Display is "1", it will display "Hello world". The single character you created is the object you will be making your rules on. And, of course, the text box at the bottom of the screen is where the actual text is displayed.
RULES:
First, make a rule that states:
Click Done.
Next, make another rule ON THE TEXT BOX ITSELF. This one is complicated, and things can go wrong if things aren't done in EXACTLY the order in which I list them here! So be careful.
First off, create two checks. It should look something like this:
Next, you'll be using the Calculator app. It's the little icon at the top of the "Then..." Window.
Once you're in the Calculator, click on the tab that says "Text". This will open up another new window.
Next, drag Text1 into the calculator's "screen" (the place where the numbers show up). Click the small yellow tab on the right to open up the full interface. You should see that the text in Text1 is displayed.
Next, go into the Text window that opened up and click "Char. #". Back in the Calculator, click on "1". This will make the result of the calculation whatever the first letter of Text1 is. Next, go into the text box's variables and drag the empty Text variable into the calculator's "screen". Then, go back into the Text options. Click, "Append Characters" and then drag the result of the last calculation into the screen. This entire calculation does two things:
1. Figured the first letter of Text1.
2. Puts whatever the first letter of Text1 is into the text box.
Drag that calculation into the left half of the first check and then drag the text box's Text variable into the right half. This puts the first character into text, same way as I just described. (NOTE: If you don't do this, the calculation won't be put into anything!)
Now that your first check is done, it's time to go back into the Calculator. You're on the home stretch now; this one is easier than the last!
Once again, drag Text1 into the Calculator. Go back into the Text options and click on "Remove Character #". Click "1" on the Calculator. Then, click on the "=" button. This will remove the first character of Text1.
Put that calculation into the left side of the check and put Text1 into the right side.
Okay! At this point, you should save you sim so that you have a reset point in case you did something wrong. Once that's done, hit play and press any key. "1" should go into Display, telling the text box to display what's in Text1! You should see the text scroll right into place until it ends (If you did it right, you can see how useful this can be; you can have rather long messages in there!). If it doesn't work the first time, just go back through the steps and try again.
That's not all, though! You may have noticed as the text displayed that the characters in Text1 were being deleted even as they were appearing in the text box. Unfortunately, there's no way to make it so that the text does not disappear if you want to achieve the scrolling effect. However, there is a simple way around this! This is where your "Text2" variable comes in!
First, make a new rule on your text box:
Finally, make another rule on the text box:
Make the "THEN" portion of this rule exactly the same as the one for Text1, only replace all instances of Text1 with Text2 in the Calculations (you'll have to re-do the calculation for every text block, so no copying! This is because you can't edit calculations very easily once they're done).
Doing this will make it so that when you press any key, the text is put back into Text1 and Text2 is displayed.
LAST RULE:
Let's say that whatever is in Text2 was the end of this person's dialogue. In this case, make one final rule:
This will set Display back to default and replace the text variables back to normal. Now, if you press any key, it will display Text1 again, and then Text2, and then finish. You can loop this as much as you want!
BONUS TIPS!:
- You can edit the way the text looks by going into its variables. This includes text size, text color, and many other options.
- You can edit the text as much as you want! You could even empty the entire variable and replace it with a completely different message! You won't have to worry about changing dialogue in the case of typos or incorrect information!
- In some cases, you might want to put some other rules on the text box. In this case, try putting all of your text rules into a "Do Random" folder in the rules window. This is so that no other rules take too much priority; if it's in Do Random, the text rule you want will eventually come close enough to the top for it to work (Hopefully sooner than later, but you might not have this problem to begin with).
- If you don't want to keep the text box on-screen at all times, you can make it appear on the screen and then edit the text box's variable to make it larger. Then, once the box is there and you have Display pointing the box towards text, cover the entire rule with a "Don't care what else" area. This way, the text rules will work no matter WHERE the text box is! It can even be on top of a bunch of other objects! This can be useful for when you have stages that go off the side of the screen but you still need to display text.
- It's easy to allow players to input text into a text box. For instance, allowing them to put in their own name. This is an example of a way to do this:
First of all, edit the text box's variable to make it so that the player can edit the text while the game is running. This way, they will be able to put their name in. Then, make the rule:
This will put what the player typed into a variable. Then, you can add them together. If you're not sure how to do this, ask me and I'll detail it for you. It's pretty simple.
- You get get text timing effects (Like the MOTHER/Earthbound series) by using a TextWait variable. You can then make it so that when the text box has a certain message in it, it doesn't display the rest until the TextWait variable is 0. When it's more than or equal to 0, it counts down. Change that number to change how long the lag is. If you've ever play Mother 2 or 3 or Earthbound, you should know how interesting this can make text be. If you've never seen that type of thing in action, just don't worry about this (or, go look up a YouTube video and watch how the text doesn't come up all at once)
- It's easy to use this system to make "speech bubbles" for a comic book style look. All you have to do is create the bubble itself as a character. Then, fit a text box into the speech bubble. When making the rule for displaying text, put a "Don't Care What Else" area on the Before part of the rule. This will make it so that it works even if the speech bubble is on top of other objects.
PROBLEMS:
There's really only one known thing you'll have to look out for when using this system: It doesn't prevent the player character from moving if you have one. If you're making an RPG, for instance, you might have to make some means to prevent the player from moving if there's text being displayed. This system works in "Moving at the Same Time", so any character that the player can control can do anything while the text is being displayed.
This means that if the player, for instance, gets into a battle where the Display variable is changed, when the player returns to the Overworld, the text that was being displayed in cut short because the correct Display number is not shown. Depending on how you did it, it should still work out if the entire text block is there, but try not to let the player move while it's displaying.
ENDING:
There are a ton of options for using this system and it's also very versatile. You can use it in almost any occasion and the text itself is almost NEVER set in stone unless you make a rule that refers specifically to a portion of the text. As long as you're careful with how to make your text system, you'll have a great means to display messages to players. Good luck with your next text-heavy RPG! :3
EDIT: New tip added 3/12! Feel free to PM me with any questions regarding these techniques!
This is a perfect text system I came up with. It's just like any text system you might find in a commercial RPG. It's easy to manage and looks great! Also very easy to edit!
VARIABLES YOU WILL NEED FOR THIS TUTORIAL:
"Display"
"Text1"
"Text2"
Put "0" into Display.
Put any message you would like to display in Text1 and Text2.
CHARACTERS YOU WILL NEED:
You only need to make one. Make a large text box at the bottom of the stage. I suggest putting it on the second space from the bottom and the first space from the left. Crop it so that it goes across The entire bottom two panels of the stage. Place you Character1 anywhere above the text box.
WHAT EVERYTHING DOES:
Display is a variable that tells the text box which block of text to display. For instance, Text1 says, "Hello world", and Text2 says, "How are you?". If Display is "1", it will display "Hello world". The single character you created is the object you will be making your rules on. And, of course, the text box at the bottom of the screen is where the actual text is displayed.
RULES:
First, make a rule that states:
IF:
[Any key] is pressed,
THEN:
PUT "1" into "Display".
Click Done.
Next, make another rule ON THE TEXT BOX ITSELF. This one is complicated, and things can go wrong if things aren't done in EXACTLY the order in which I list them here! So be careful.
IF:
Display is "1",
THEN:
PUT [Calculation] into [The text box's text]
PUT [Calculation] into Text1.
First off, create two checks. It should look something like this:
PUT [] into []
PUT [] into []
Next, you'll be using the Calculator app. It's the little icon at the top of the "Then..." Window.
Once you're in the Calculator, click on the tab that says "Text". This will open up another new window.
Next, drag Text1 into the calculator's "screen" (the place where the numbers show up). Click the small yellow tab on the right to open up the full interface. You should see that the text in Text1 is displayed.
Next, go into the Text window that opened up and click "Char. #". Back in the Calculator, click on "1". This will make the result of the calculation whatever the first letter of Text1 is. Next, go into the text box's variables and drag the empty Text variable into the calculator's "screen". Then, go back into the Text options. Click, "Append Characters" and then drag the result of the last calculation into the screen. This entire calculation does two things:
1. Figured the first letter of Text1.
2. Puts whatever the first letter of Text1 is into the text box.
Drag that calculation into the left half of the first check and then drag the text box's Text variable into the right half. This puts the first character into text, same way as I just described. (NOTE: If you don't do this, the calculation won't be put into anything!)
Now that your first check is done, it's time to go back into the Calculator. You're on the home stretch now; this one is easier than the last!
Once again, drag Text1 into the Calculator. Go back into the Text options and click on "Remove Character #". Click "1" on the Calculator. Then, click on the "=" button. This will remove the first character of Text1.
Put that calculation into the left side of the check and put Text1 into the right side.
Okay! At this point, you should save you sim so that you have a reset point in case you did something wrong. Once that's done, hit play and press any key. "1" should go into Display, telling the text box to display what's in Text1! You should see the text scroll right into place until it ends (If you did it right, you can see how useful this can be; you can have rather long messages in there!). If it doesn't work the first time, just go back through the steps and try again.
That's not all, though! You may have noticed as the text displayed that the characters in Text1 were being deleted even as they were appearing in the text box. Unfortunately, there's no way to make it so that the text does not disappear if you want to achieve the scrolling effect. However, there is a simple way around this! This is where your "Text2" variable comes in!
First, make a new rule on your text box:
IF:
[Any key] is pressed,
THEN:
PUT [The text box's text] INTO Text1
PUT [Erase the text out of the text box] INTO [The text box's text]
PUT "2" INTO "Display"
Finally, make another rule on the text box:
IF:
Display is "2"
Text1 is [Empty]
Make the "THEN" portion of this rule exactly the same as the one for Text1, only replace all instances of Text1 with Text2 in the Calculations (you'll have to re-do the calculation for every text block, so no copying! This is because you can't edit calculations very easily once they're done).
Doing this will make it so that when you press any key, the text is put back into Text1 and Text2 is displayed.
LAST RULE:
Let's say that whatever is in Text2 was the end of this person's dialogue. In this case, make one final rule:
IF:
Text2 is [Empty]
[Any key] is pressed,
THEN:
PUT [Text box] into Text2
PUT [clear the text] into [Text box]
PUT "0" into Display.
This will set Display back to default and replace the text variables back to normal. Now, if you press any key, it will display Text1 again, and then Text2, and then finish. You can loop this as much as you want!
BONUS TIPS!:
- You can edit the way the text looks by going into its variables. This includes text size, text color, and many other options.
- You can edit the text as much as you want! You could even empty the entire variable and replace it with a completely different message! You won't have to worry about changing dialogue in the case of typos or incorrect information!
- In some cases, you might want to put some other rules on the text box. In this case, try putting all of your text rules into a "Do Random" folder in the rules window. This is so that no other rules take too much priority; if it's in Do Random, the text rule you want will eventually come close enough to the top for it to work (Hopefully sooner than later, but you might not have this problem to begin with).
- If you don't want to keep the text box on-screen at all times, you can make it appear on the screen and then edit the text box's variable to make it larger. Then, once the box is there and you have Display pointing the box towards text, cover the entire rule with a "Don't care what else" area. This way, the text rules will work no matter WHERE the text box is! It can even be on top of a bunch of other objects! This can be useful for when you have stages that go off the side of the screen but you still need to display text.
- It's easy to allow players to input text into a text box. For instance, allowing them to put in their own name. This is an example of a way to do this:
First of all, edit the text box's variable to make it so that the player can edit the text while the game is running. This way, they will be able to put their name in. Then, make the rule:
IF:
[Any key] is pressed
(NOTE: The player will have to press Enter or click off of the text box before this will work)
THEN:
PUT [Text box's text] INTO Name
(Or whatever you want to name that variable)
This will put what the player typed into a variable. Then, you can add them together. If you're not sure how to do this, ask me and I'll detail it for you. It's pretty simple.
- You get get text timing effects (Like the MOTHER/Earthbound series) by using a TextWait variable. You can then make it so that when the text box has a certain message in it, it doesn't display the rest until the TextWait variable is 0. When it's more than or equal to 0, it counts down. Change that number to change how long the lag is. If you've ever play Mother 2 or 3 or Earthbound, you should know how interesting this can make text be. If you've never seen that type of thing in action, just don't worry about this (or, go look up a YouTube video and watch how the text doesn't come up all at once)
- It's easy to use this system to make "speech bubbles" for a comic book style look. All you have to do is create the bubble itself as a character. Then, fit a text box into the speech bubble. When making the rule for displaying text, put a "Don't Care What Else" area on the Before part of the rule. This will make it so that it works even if the speech bubble is on top of other objects.
PROBLEMS:
There's really only one known thing you'll have to look out for when using this system: It doesn't prevent the player character from moving if you have one. If you're making an RPG, for instance, you might have to make some means to prevent the player from moving if there's text being displayed. This system works in "Moving at the Same Time", so any character that the player can control can do anything while the text is being displayed.
This means that if the player, for instance, gets into a battle where the Display variable is changed, when the player returns to the Overworld, the text that was being displayed in cut short because the correct Display number is not shown. Depending on how you did it, it should still work out if the entire text block is there, but try not to let the player move while it's displaying.
ENDING:
There are a ton of options for using this system and it's also very versatile. You can use it in almost any occasion and the text itself is almost NEVER set in stone unless you make a rule that refers specifically to a portion of the text. As long as you're careful with how to make your text system, you'll have a great means to display messages to players. Good luck with your next text-heavy RPG! :3
EDIT: New tip added 3/12! Feel free to PM me with any questions regarding these techniques!