• Hey! Register here to create your account, engage with the community, and talk about what is new!

Texts are cool.

stinkey

Forum adept
Joined
Sep 8, 2020
Messages
225
Reaction score
74
This isn't exactly going to cover the functions of each text variable manipulation code block, but instead a list of some of the things you can do with them.

First, some pretty basic things.
You can usually use texts in number manipulation if they are just digits and points. Because of this, you don't always have to use the parse number code block, making things like weapon stats in item tags and such easier to manipulate. However, you should get rid of whitespaces and color codes and stray letters. Another cool thing about text manipulation code blocks is that you can use regular expressions (or regex) while using code blocks that target sections of the string (remove from text, replace text, etc.). RegEx can select things such as digits, words, certain combinations of letters, digits, and other things. For example, \d selects all digits (0-9). String damage:\d+ would select everything that is "damage:" and 1 or more digits. (+ in regex means one or more of the preceding token.)

Now, some cooler things (kinda? code is cool)
Let's say you're making a custom damage system with weapons. The weapon has item tag "weaponstats": "damage:5 cooldown:10". You parse the "weaponstats" tag, and get "damage:5 cooldown:10". You can select the damage stat just like this with RegEx, though that's kind of complicated. Another way to parse "damage" is by splitting the text with splitter " ", joining it with ":", then splitting it again with ":". Now you have a list, [damage, 5, cooldown, 10], which is much easier to manipulate.
Another example of how texts are cool: you are making a plot with a custom crafting system. You have successfully parsed a list with the input items [Iron, Coal], and now you are going to softcode a system that gets the output item with lists with the recipe and item to get. You can make 3 lists. One contains all input items and output items (ie: [Iron, Coal, Steel]). Now, in the second list, you can put: ["1+2"]. The third list has ['3']. You get the index of value with Iron and Coal, which are 1 and 2, as variables var1 and var2. Now, you can get list index of value "%var(var1)+%var(var2)" as a text in the second list, which is 1. You then get the value at index in the third list with the 1 you got from the previous get list index of value, which is '3'. You get list value at index in the first list with that 3, and get steel.

Hopefully my words weren't too confusing.
 

SamMan_

Forum adept
Joined
Sep 6, 2020
Messages
121
Reaction score
73
Perhaps add some pictures? Sure this is a tutorial on text but it doesn't have to be a wall of text too :P
 

RolandMC123

Forum adept
Joined
Sep 9, 2020
Messages
186
Reaction score
50
other formatting suggestion: You could use bolds/italics and bigger text sizes for categories or important stages in the tutorial, LIKE THIS.
 

RDM

Member
Overlord
Joined
Sep 6, 2020
Messages
36
Reaction score
22
I understood everything you wrote down, but for someone who doesn't already know all of this, it could be quite hard to understand and process this wall of text. I find that in making very well-made tutorials, it definitely helps to take in consideration a couple words of advice:

- Space it all out; using pictures, lines, bullet points, really big text, or everything at once, spacing stuff out helps you break up your information into smaller, more digestible pieces.

- Have a general idea of what you want to say, how you're going to do it, and what it'll look like; having a plan not only keeps you organized but limits the amount of time you sit on your computer frustratingly trying to think of what to do next.

- Take extra time to clearly explain every bit of information you plan to send out; poorly worded, cluttered, or incomprehensible speech will be hard to understand, so keeping it all intelligable is important.

- Straight to the point; I get people try to add in quips or backstories to flesh out examples, but it's quite distracting and detracts from the suggestion most of the time. Try to save the jokes and dabble for the intro paragraph. It's a tutorial, not a novel!! :smile:

That's all just my advice, great tutorial otherwise!
 

stinkey

Forum adept
Joined
Sep 8, 2020
Messages
225
Reaction score
74
I understood everything you wrote down, but for someone who doesn't already know all of this, it could be quite hard to understand and process this wall of text. I find that in making very well-made tutorials, it definitely helps to take in consideration a couple words of advice:

- Space it all out; using pictures, lines, bullet points, really big text, or everything at once, spacing stuff out helps you break up your information into smaller, more digestible pieces.

- Have a general idea of what you want to say, how you're going to do it, and what it'll look like; having a plan not only keeps you organized but limits the amount of time you sit on your computer frustratingly trying to think of what to do next.

- Take extra time to clearly explain every bit of information you plan to send out; poorly worded, cluttered, or incomprehensible speech will be hard to understand, so keeping it all intelligable is important.

- Straight to the point; I get people try to add in quips or backstories to flesh out examples, but it's quite distracting and detracts from the suggestion most of the time. Try to save the jokes and dabble for the intro paragraph. It's a tutorial, not a novel!! :smile:

That's all just my advice, great tutorial otherwise!
thanks for the tip
ill try to make them better :)
 

ACraftingFish

Notorious member
Joined
Sep 6, 2020
Messages
106
Reaction score
19
The tutorial is nice but for someone who is starting out i'm pretty sure this would be too much information to take in at once - texts can be cool to mess with, but i think you should make sections;
Instead of putting all of the information in one block of text, maybe seperate it by difficulty - basic text information would be easy to understand, while regex and some other stuff would be a bit harder, although this would require a bit more information on the basics..
 
Top Bottom