Strings have many uses, as covered in the beginning String DS and you may already be wondering how to apply them in even more inventive ways! In this section we will lay down some of the more advanced concepts, including techniques on how to create string-based systems.

Because of the vast amount of data alone that strings can hold compared to arrays, it's a good idea to master string manipulation for any type of database that would otherwise be impossible to achieve without a Dream Package (for PS storage). The main drawback with using string manipulation, though, is that strings are far more difficult to manipulate than arrays.

Tip: The term string will often be used throughout this guide instead of message (although they both refer to the same feature).

Tutorial 1: Text substitution and strings

So, there's text substitution for variables (%Var), special text replacement strings (like [FURRE]), other strings (such as ~Message) and even PhoenixSpeak entries called up through $ (like $dream.EntryName). We'll use this knowledge as a building block of advanced string manipulation!

So let's see an example string that's jam packed with lots of text replacement. How about one called ~CookieStartup which has all of this in here: a variable called %Cookies with the value 42, a player named Joey, a message called ~Baker that contains the text ‘Grannyfurre’ and a PS entry within the Dream table that is called BakeryName and has the value Grannyfurre’s Confectionery in it. This is how it would look in the DS:

(5:250) set message ~CookieStartup to {[FURRE] just started up a new Cookie Confectionery called $dream.BakeryName with ~Baker as their baker, they are starting out with %Cookies cookies!}.

And then in Dream, the ~CookieStartup string would say:

{Joey just started up a new Cookie Confectionery called Grannyfurre’s Confectionery with Grannyfurre as their baker, they are starting out with 42 cookies!}

So yes, strings can hold a ton of information inside them!

Account E-Mail