The Art of Concatenation: Credits to @Zypheir and @Blackhole927- Difficulty 7.5/10 or 🟧

Blocks can take a really, really, long time to place down, especially because normally they’re just your average “if, else if, else if, else if, else if
”. Sure, you can copy and paste blocks. But that’s still not as fast as this way that I realized was incredibly useful. Anyways, this guide couldn’t have been made without @Zypheir and @Blackhole927, because I got inspired based on a post in the “How to make ___land” Topic and one of @Blackhole927’s topics.

Here’s an explanation from @Zypheir:

BTW Here’s Zypheir’s Contribution: How to make _____Land ⬛ - #21 by Zypheir

Concatenation is essentially using properties and text features to create an infinite “text addition” of channels. It takes up almost no space and it basically works like this.

Since properties themselves are text, what if you create a channel in the form of [insert channel name] + [insert property number] to create this?

[insert channel name and property number].

Let’s think of it this way. A long time ago, I created a guide called “How to Add Speed”, which is right here:

In this guide, I used this set of blocks:

Well, I think that if there were actually 10 speed upgrades, it would REALLY be annoying.

Instead, we can essentially create an infinite amount of speed upgrades using concatenation.

First, let’s create our property. In this guide, there was only one property called “speed”. Then, in the blocks, we made a variable that acted as another property called “speed”. So, the property called “speed” is a number value, right? Well, how about instead of the if-else loops, we broadcast a channel with this code?

Broadcast Message on Channel Create Text with Speed
Value Get Property Speed

See what this does? It broadcasts on a channel with the value of the property speed, and the word “speed” in front of it. Basically, it acts as the if-else loop before, but a lot quicker! Not only that, it can also save a lot of space in your blocks, so you don’t have to worry about the 75-block limit!

Issues

What if you have a greater, or greater or equal statement though? Well, Zypheir has found a partial solution:

Unfortunately, I don’t think you can do this for uneven rarities. So, for now, you’ll need to do this for increments and equal signs.

Difficulty of This Post?
  • 0/5 :blue_square:
  • 0.5/5 :blue_square:
  • 1/5 :green_square:
  • 1.5/5 :green_square:
  • 2/5 :yellow_square:
  • 2.5/5 :yellow_square:
  • 3/5 :orange_square:
  • 3.5/5 :orange_square:
  • 4/5 :red_square:
  • 4.5/5 :red_square:
  • 5/5 :purple_square:
  • 6/5 :black_large_square:
0 voters

Now I hope you understand the art of concatenation.

27 Likes

this is so helpful! thanks! look at what i did!


9 Likes

the art of concatenation would have helped so much!

11 Likes

Thank you so much! This is EXACTLY what I needed! I would show you what I could use concatenation for, but it was in the post


6 Likes

hmmm
 but how would you do the greater or equal?

7 Likes

I guess I’ll try to research this more


7 Likes

Someone should try and simplify the Fishtopia blocks with this

4 Likes

too bad it doesn’t work for greater or equal, so right now im thinking of ways to help

7 Likes

The pattern here is pretty much the same thing, but in increments of 100 - you can use math blocks to divide by 100 and make it a unit increment of 1.

The only problem is that rounding up (ceiling function) is only used to find whole/integer numbers, so setting ‘crateproperty’ to 0 will result in the message ‘seed0’ being sent
 you could add an extra if-else statement to account for that or just change your program to work with that message, I suppose, but it’s something that you might need to fix one way or another.

17 Likes

Good Idea!
Can I use that image?
Unfortunately, in increments, it works, but if you have uneven rarities, then it doesn’t work.

6 Likes

thanks! i might try it with the interger set 1-1500 so that that doesn’t happen! thx so much

5 Likes

This is really useful to know! It’s nice to see more and more things be discovered about how to use creative more effectively! Great guide!

5 Likes

@Zypheir, is there a quicker way to code multiple exceptions to a concatenation? I am trying to make Monopoly, and I made a popup that appears when you run out of an item while in a zone space, and it shows the name and price of the space, and an option to buy or not. The problem arises when all the spaces are not the same, like the community chest. How would I code in all of these exceptions, and is there a way to change the call to action buttons based on in-game conditions?

1 Like

I, uh
 I’m not quite sure how to conceptualize that. I’m going to try and make a simple version myself in order to test it, but is there any particular pattern that your game uses that can make the concatenation process easier (some spaces are different than others, but still follow certain placement rules)?

3 Likes

Okay. Imagine the basic Monopoly board. I had two properties (read: variables) per space: the cost, and the name. I used concatenation to simplify the code for pulling the two property indexes when you stopped on a space. However, if you’ve seen the Monopoly board, there are random different spaces everywhere. Is there a way to simplify the code without going full _____Land?

2 Likes

The idea behind concatenation is to use existing patterns to simplify a segment of code that references every individual possibility - unfortunately this only works in rather specific situations, and random distribution tends to ruin any chances that you might’ve had to reference those things reliably (think of it as a way for the computer to make decisions based on what it knows - if the program knows that certain things are always going to be in certain places, it can use shortcuts to skip past redundant evaluations
 but if it doesn’t already know which space contains which square, it isn’t going to be able to use those shortcuts to skip ahead and end up making the correct decision). There might be a way to do it by storing certain information (like the number and/or name of the tile that the player is currently on) in properties and then using those properties in the concatenation, but I haven’t really tested this yet so I can’t be sure that it works as intended.

If it does work, though, it would do something like this: the player moves around the board a certain number of spaces and ends up on a certain tile. Something representing the specific type of the tile (can be a number, name, shorthand text bit - anything you and the program can identify as belonging to that certain tile) is stored in a property. Inside your program, blocks are used to decide how much money the player has to pay
 and one way or another, you use that number to perform some sort of mathematical operation that results in a value related to the tile’s identity (which the program now knows).

What you would most likely need to do here is set that property to something reflecting the cost (would probably only work if a specific tile always has a specific cost). That being said, it would probably just be faster to run another process that is connected to that tile and sets a cost value when activated
 I’ll try and test something like that out when I figure out how to make it work.

tl;dr there isn’t any easy solution, and there isn’t a way to do it at all without certain patterns that you can have the program reference

11 Likes

This is helpful, I just need to add another row to my property spreadsheet

3 Likes
Should I make a Monopoly guide?
  • Yea
  • Nah

0 voters

7 Likes

i don’t actually know how to play monopoly :skull:

6 Likes

This is bad


Monopoly is going to take forever to make, let alone write about.

2 Likes