Welcome to RandomGen : a simple tool to create random text generators, and a directory of such generators.
Alright, let's make some stuff!
A random generator is a simple application that produces random text at the click of a button. There are generators that output random names, others that write descriptions of strange imaginary monsters, but you could imagine a generator for just about anything - such as a generator that returns a random story, or a random cooking recipe!
Well, it's fairly easy. All generators in RandomGen are simply text files that our website converts into generators.
To make your own generator, you will have to write that text file using the syntax described below (you'll see, you can do all kinds of neat stuff). Here's what a finished generator source file looks like : http://pastebin.com/raw.php?i=cKeB4v4J. Pretty readable, huh?
You will then have to find a place online to store your text file (pastebin.com is a good one; your text files are hosted for free and, if you register, you can edit them as much as you want. Here are some other text-hosting sites).
Once you're happy with your new generator, all that remains to do is to share it with the world!
To use a generator, take its source file's URL and append it to https://orteil.dashnet.org/randomgen/?gen=.
A generator stored at www.example.com/mygenerator.txt would be usable at https://orteil.dashnet.org/randomgen/?gen=www.example.com/mygenerator.txt.
To create a random generator, you simply have to define lists of things that reference each other. For example :
$animal cat dog fish $phrase My pet is a [animal]. I am feeding my [animal].
&amount=10" to the url; you can also change the base generator by adding "
&seed=element".
$name : My Generator
$author : Author
$description : Description of my generator
$picture : http://.../pic.png
$amount : 3
$button : Another!
$include http://url.com
$animal
$+animal
$>animal
fish
fish {20%}
I own a [animal].
I need a quick random [word|term|thing to say].
I am eating a [[fruit]|[vegetable]|[candy]].
My pet is a [animal,#pet]. I've always wanted a [#pet].
My [#pet]'s name is [name,#name,written]. Would you like to see [#name]?
$animal cat {action:meows} dog {action:barks} fish {action:swims} $phrase I have a [animal,#pet]. My [#pet] is [#pet,as action].
This is a bit trickier. The syntax {attribute:value} will add custom properties to elements which can be referred to later. You could use this for things such as gender, verb tenses, alternate descriptions, and so on.
My [#pet] is [#pet,as action,or sleeping]
This defines what to fall back to ("sleeping") if the specified attribute doesn't exist for an element.
$phrase Look at my %1. I love my %1 and my %2. $out "[phrase,%[cat|dog],%[wife|husband|kids]]"
This will give a phrase where %1 is replaced with [cat|dog] (which itself will be parsed into "cat" or "dog") and, if present, %2 with "wife"/"husband"/"kids".
There are [100-10000] leaves here.
Returns a random number between two bounds.
My name is [random syllable,x2-6].
The "x2-6" will return between two and 6 of the specified element.
There is [an] [word].
[an] will be replaced by "a" or "an", depending on the next letter.
Look at all the [animal][s]!
[s] will replace the previous word to its proper plural (this is not fool-proof and can sometimes return silly results).
The book's cover reads "[book name,title]".
The "book name" will have title-like capitalization ("my cat has asthma" will be converted to "My Cat Has Asthma").
Look at my [animal]. Look At My [Animal]. LOOK AT MY [ANIMAL]!!!
The engine will detect the proper letter case and will respectively return : "Look at my cat. Look At My Cat. LOOK AT MY CAT!!!"
This might not always work; if you need to capitalize something like [#pet], you can write [#1,Abc].
hey let's go see [movie name,lower]
"movie name" will be rendered in all lower case.
(talking fast) [phrase,compress]!
"phrase" will render with no spaces at all, so "I love horses" will become "Ilovehorses".
[word,first part]...[word,middle part]...[word,last part]
Returns a third of "word" as specified; "first part" of "abcdefghi" would display as "abc".
This is a [animal,mundane], and this is a [animal,mundane].
Normally, RandomGen tries not to repeat the same thing twice in the same output. Specifying "mundane" means that the randomly-chosen animals are allowed to be duplicates.
$allow duplicates
Adding this anywhere in your file negates the default behavior where RandomGen tries not to repeat things when picking from random selections.
[animal,#pet,hidden]My pet is [#pet,as action].
Adding "hidden" means this element won't be displayed, which lets you set identifiers without having to have them in the output text.
$seed text : Enter your name here!
This turns your generator into a shindan. What this means is the user is prompted to enter text as a seed (usually their name), and your generator will generate the same result every time for that seed. "Shindan" is japanese for "diagnosis"; this system is often used as a fun way to determine someone's love-bound celebrity or what animal they are or to read their fortune.
You are [seed], a proud [warrior|wizard|ranger].
The keyword "seed" will be replaced by whatever seed the user inputs.
Finally, you can use some html tags to add a bit of formatting.
Tags allowed are <b>, <i>, <u>, <q>, <p>, <small>, <big>, <h1>, <h2>, <h3> and <br>.
RandomGen trims the spaces at the start and end of lines. If you want a space there, you'll have to type it between brackets, as [ ].
Ready to show off your new generator? Take its url and share it with anyone you want. Send it to your family, your friends, your dog!
People on the unofficial RandomGen subreddit or on our Discord server will be more than happy to try your generator and give you feedback. And who knows, if your generator makes enough noise, we might even end up adding it to the list!
RandomGen is an app by Orteil and Opti, 2014-2020. All rights reserved.
We hope you have as much fun using it as we had making it!
Need to contact us? See our homepage.