perchance.org Open in urlscan Pro
2606:4700:e0::ac40:6414  Public Scan

Submitted URL: http://perchance.org/
Effective URL: https://perchance.org/welcome
Submission: On January 03 via manual from DK — Scanned from DK

Form analysis 0 forms found in the DOM

Text Content

CREATE A RANDOM GENERATOR


WELCOME TO PERCHANCE!

Perchance is a platform for creating and sharing random text generators. To
create a random generator you simply create lists which reference other lists:

output
  Your [pack] contains [item], [item] and [item].

item
  a few coins
  an old {silver|bronze} ring
  a handkerchief
  a shard of bone
  some lint
  a tin of tea leaves

pack
  purse
  backpack
  bag
  pack
  knapsack
  rucksack


try this example

So, for example, whenever you write [pack], a random item from the "pack" list
will be put in its place — as shown in this animation by Vionet20.

Here's a link to a minimal perchance generator based on the above code. You can
edit it, save your own version, and share it.

You can change the odds of items like so:

pack
  purse
  backpack ^2
  bag
	...


That makes "backpack" twice as likely as the others to be chosen when we write
[pack]. You can import other peoples' generators like this:

sentence
	I need a new {import:noun}.
	Quickly, {import:verb}!


You can also alter the capitalisation, pluralisation, tense, and other
properties of your word lists. Here's how to play around with capitalisation,
for example:

sentence
	[name.titleCase], can you hear me?
	HELLO, [name.upperCase]!

name
  patricia
	khalid
	anaya
	...


There are a bunch of different shorthand notations to make common tasks easier:

sentence
	{She|He} was about {15-20}0cm tall and was carrying {1-3} {import:concrete-noun}{s}.


If you prefer to learn via video, here's one from a community member that covers
the basics of Perchance from the perspective of RPG generator creation:



(btw, feel free to submit your own Perchance video tutorials on the hub - you
might get featured here!)

The above examples only show the absolute basics of Perchance! If you'd like to
learn more, check out the tutorial, and start playing around with a minimal
example (or the basic template). Check out the examples page and this somewhat
complexified version of the previous backpack example for some demonstration of
advanced features.

View Creations 🔧 Start Creating ⚄ Keep Learning 📚

Once you've created a generator, you can share it with others by simply sharing
the URL. You can change the URL in the "settings" menu. You can also download it
as a single HTML file so that you can run it offline, or even turn it into a
Twitter bot or a Tumblr bot. It's also easy to embed it in your own website:

<iframe src="https://null.perchance.org/my-generator-name" style="width:100%; height:600px; border:none;"></iframe>


And a note to coders: It's also possible to set up an API server for your
generator, even though Perchance doesn't have an "official" API at this point.
It's also possible to set up a Discord bot which will respond to messages with
the output of a generator that you choose.

We have a Lemmy community which you might like to join. Feel free to share your
creations there or ask questions if you need some help building your generator.
Also check out the work-in-progress useful generators list which might have some
generators that you'd find useful for importing into your own generator.

If you're looking for a simple random generator maker that just randomly selects
one of several different items that you specify, then you can still use
Perchance, but it might be a bit excessive for such a simple task. That said,
the advantage of using Perchance for something like this is that it makes it
really easy to add different weights/chances to each item and to extend it with
some additional complexity later if needed. Perchance is designed to allow you
to create random generators that have a lot of complexity, without requiring any
existing coding knowledge, and with a fairly simple interface.

Perchance is based on HTML/CSS, and JavaScript, and my secret mission with
Perchance is to get people interested in coding with a smooth, fun
learning-curve. If you enjoy using Perchance and want to take your coding skills
to the next level, you might like to learn to code on Khan Academy, or Scratch.

Finally, Perchance's structure is based on other awesome random text languages
like randomgen by Orteil and Rant by TheBerkin. Many thanks to these and other
DSL creators which inspired Perchance's syntax and functionality. You might also
like to check out Chartopia - another website which allows you to make random
generators.

Finally, thanks to the contributors behind these awesome open source software
projects:

 * Compromise: A JavaScript natural language library that powers pastTense and
   pluralForm and the like.
 * Riot.js: A handy little UI framework that makes everything modular and nice.
 * Split.js: A library that allows you to easily split the screen up into
   resizable quadrants.
 * MongoDB: A great document/NoSQL database. I use it for everything.
 * Express.js: Helps serve you this webpage page and power the internal APIs of
   Perchance.

Thanks for checking out Perchance! •ᴗ•

⚄︎

Privacy Policy



⚄︎perchance
👥︎community
🌈hub
📚︎tutorial
📦︎resources
🎲︎generators
⊕︎new
🆕ai chat
🔑︎login/signup
✏️︎edit


fold
wrap
$meta title = Create a Random Generator pride = {import:pride-plugin} // Yep,
even the Perchance homepage is technically a "generator", but all the content is
in the HTML code in the lower-right editor.

// Yep, even the Perchance homepage is technically a "generator", but all the content is in the HTML code in the lower-right editor.







html plain text

⇱︎ fullscreen ⚠︎ warnings ⟳︎ reload auto

wrap
<h1 style="position:fixed; top:-1000px;">Create a Random Generator</h1> <h2
id="header" style="font-size:200%; margin-top:1em;">[pride()] Welcome to
Perchance! [pride()]</h2> <main> <p style="margin-top:0;">Perchance is a
platform for creating and sharing random text generators. To create a random
generator you simply create lists which reference other lists:</p> <div
style="position:relative;"> <pre>output Your \[pack\] contains \[item\],
\[item\] and \[item\]. item a few coins an old \{silver|bronze\} ring a
handkerchief a shard of bone some lint a tin of tea leaves pack purse backpack
bag pack knapsack rucksack </pre> <a href="/rg4m14ri#edit"><div
style="position:absolute;bottom:1em;right:1em;background:
#14b914;color:white;padding: 0.5em;width:max-content;border-radius: 2px;
box-shadow: 0px 2px 2px #0000005c;">try this example</div></a> </div> <p>So, for
example, whenever you write <code>\[pack\]</code>, a random item from the "pack"
list will be put in its place — as shown in <a
href="https://user-uploads.perchance.org/file/bc63c883358b59575af1b8a142b90834.mp4"
target="_blank">this animation</a> by <a
href="https://perchance.org/vionet20-gens" target="_blank">Vionet20</a>.</p>
<p><a href="/rg4m14ri#edit">Here's a link</a> to a minimal perchance generator
based on the above code. You can edit it, save your own version, and share
it.</p> <p>You can change the odds of items like so:</p> <pre> pack purse
backpack ^2 bag ... </pre> <p>That makes "backpack" twice as likely as the
others to be chosen when we write <code>\[pack\]</code>. You can import other
peoples' generators like this:</p> <pre> sentence I need a new \{import:noun\}.
Quickly, \{import:verb\}! </pre> <p>You can also alter the capitalisation,
pluralisation, tense, and other properties of your word lists. Here's how to
play around with capitalisation, for example:</p> <pre> sentence
\[name.titleCase\], can you hear me? HELLO, \[name.upperCase\]! name patricia
khalid anaya ... </pre> <p>There are a bunch of different shorthand notations to
make common tasks easier:</p> <pre> sentence \{She|He\} was about \{15-20\}0cm
tall and was carrying \{1-3\} \{import:concrete-noun\}\{s\}. </pre> <p>If you
prefer to learn via video, here's one from a community member that covers the
basics of Perchance from the perspective of RPG generator creation:</p> <p
style="text-align:center; margin-bottom:0.1rem;"><iframe width="560"
height="315" style="max-width:100%;"
src="https://www.youtube-nocookie.com/embed/2DRSuHDPU6I?si=_Ih0m9pR5qt-2b0h&autoplay=1&rel=0"
title="YouTube video player" frameborder="0" allow="accelerometer; autoplay;
clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen></iframe></p> <p style="text-align:center; margin-top:0.1rem;
font-size:70%;">(btw, feel free to submit your own Perchance video tutorials on
<a href="https://perchance.org/hub" target="_blank">the hub</a> - you might get
featured here!)</p> <p>The above examples only show the <b>absolute basics</b>
of Perchance! If you'd like to learn more, check out the <a
href="/tutorial">tutorial</a>, and start playing around with a <a
href="/minimal#edit">minimal example</a> (or the <a
href="/basic-template#edit">basic template</a>). Check out the <a
href="/examples">examples</a> page and this <a href="/aqr03wn1#edit">somewhat
complexified version</a> of the previous backpack example for some demonstration
of advanced features.</p> <div id="next-step-buttons-ctn" style="display:flex;
justify-content:center;"> <a href="/generators" style="display:inline-block;
text-decoration:none; color:white; background: #ea8616; border:0; outline:none;
padding:0.5em 1em; border-radius:3px; font-size:120%; margin:1em; box-shadow:
0px 2px 2px #00000029;">View Creations 🔧</a> <a href="/minimal#edit"
style="display:inline-block; text-decoration:none; color:white; background:
#00a3ce; border:0; outline:none; padding:0.5em 1em; border-radius:3px;
font-size:120%; margin:1em; box-shadow: 0px 2px 2px #00000029;">Start Creating
⚄</a> <a href="/tutorial" style="display:inline-block; text-decoration:none;
color:white; background: #4abe4a; border:0; outline:none; padding:0.5em 1em;
border-radius:3px; font-size:120%; margin:1em; box-shadow: 0px 2px 2px
#00000029;">Keep Learning 📚</a> </div> <style> @media screen and (max-width:
800px) { #next-step-buttons-ctn { flex-direction:column; } } </style> <p>Once
you've created a generator, you can <b>share it</b> with others by simply
sharing the URL. You can change the URL in the "settings" menu. You can also
<b>download it</b> as a single HTML file so that you can run it offline, or even
turn it into a <a href="https://perchance.org/create-a-twitter-bot"
target="_blank" style="font-weight:bold;">Twitter bot</a> or a <a
href="https://perchance.org/create-a-tumblr-bot" target="_blank"
style="font-weight:bold;">Tumblr bot</a>. It's also easy to <b>embed it</b> in
your own website:</p> <pre> &lt;iframe
src="https://null.perchance.org/my-generator-name" style="width:100%;
height:600px; border:none;"&gt;&lt;/iframe&gt; </pre> <p>And a note to coders:
It's also possible to <a href="/diy-perchance-api">set up an API server</a> for
your generator, even though Perchance doesn't have an "official" API at this
point. It's also possible to <a href="/perchance-discord-bot" target="_blank"
style="font-weight:bold;">set up a Discord bot</a> which will respond to
messages with the output of a generator that you choose.</p> <p>We have a <a
href="https://lemmy.world/c/perchance">Lemmy community</a> which you might like
to join. Feel free to share your creations there or ask questions if you need
some help building your generator. Also check out the work-in-progress <a
href="/useful-generators">useful generators</a> list which might have some
generators that you'd find useful for importing into your own generator.</p>
<p>If you're looking for a simple random generator maker that just randomly
selects one of several different items that you specify, then you can still use
Perchance, but it might be a bit excessive for such a simple task. That said,
the advantage of using Perchance for something like this is that it makes it
really easy to add different weights/chances to each item and to extend it with
some additional complexity later if needed. Perchance is designed to allow you
to create random generators that have a lot of complexity, without requiring any
existing coding knowledge, and with a fairly simple interface.</p> <p>Perchance
is based on <a
href="https://www.khanacademy.org/computing/computer-programming/html-css"
target="_blank">HTML/CSS</a>, and <a
href="https://www.khanacademy.org/computing/computer-programming/programming"
target="_blank">JavaScript</a>, and my secret mission with Perchance is to get
people interested in coding with a smooth, fun learning-curve. If you enjoy
using Perchance and want to take your coding skills to the next level, you might
like to learn to code on <a
href="https://www.khanacademy.org/computing/computer-programming"
target="_blank">Khan Academy</a>, or <a href="https://scratch.mit.edu/"
target="_blank">Scratch</a>.</p> <p>Finally, Perchance's structure is based on
other awesome random text languages like <a
href="http://orteil.dashnet.org/randomgen">randomgen</a> by Orteil and <a
href="https://github.com/rant-lang/rant">Rant</a> by TheBerkin. Many thanks to
these and other <a
href="https://en.wikipedia.org/wiki/Domain-specific_language">DSL</a> creators
which inspired Perchance's syntax and functionality. You might also like to
check out <a href="https://chartopia.d12dev.com/">Chartopia</a> - another
website which allows you to make random generators.</p> <p>Finally, thanks to
the contributors behind these awesome open source software projects:</p> <ul
style="text-align:left;"> <li><a
href="https://github.com/nlp-compromise/compromise">Compromise</a>: A JavaScript
natural language library that powers <code>pastTense</code> and
<code>pluralForm</code> and the like.</li> <li><a
href="https://riot.js.org">Riot.js</a>: A handy little UI framework that makes
everything modular and nice.</li> <li><a
href="https://nathancahill.github.io/Split.js/">Split.js</a>: A library that
allows you to easily split the screen up into resizable quadrants.</li> <li><a
href="https://mongodb.com">MongoDB</a>: A great document/NoSQL database. I use
it for everything.</li> <li><a href="https://expressjs.com">Express.js</a>:
Helps serve you this webpage page and power the internal APIs of Perchance.</li>
</ul> <p>Thanks for checking out Perchance! •ᴗ•</p> </main> <p
style="text-align:center; font-size:200%; opacity:0.2;
margin-top:0.5em;"><span>⚄&#xFE0E;</span></p> <p style="margin-bottom:2rem;
font-size:80%; color:grey; text-align:center;"><a style="color:inherit;
text-decoration:none;" href="/privacy-policy" target="_blank">Privacy
Policy</a></p> <br/> <style> ul { margin-top:0.5em; } main { max-width:900px;
margin:0 auto; background:#fff; padding:1.5em; border-radius:3px; box-shadow: 0
0.5px 0 0 #ffffff inset, 0 1px 2px 0 #B3B3B3; } p { text-align:left;
line-height: 1.4em; } body { background-color:#f6f6f6; } pre { text-align:left;
background: #333; color: white; padding: 1em; border-radius: 2px; tab-size: 2;
-moz-tab-size: 2; -o-tab-size: 2; -webkit-tab-size: 2; } code { background:
#eff0f1; padding: 1px 5px; } h2 { margin-top: 1.5em; } @media screen and
(max-width: 600px) { #header { font-size:1.6rem !important; } } </style>

  <p>Perchance is based on <a href="https://www.khanacademy.org/computing/computer-programming/html-css" target="_blank">HTML/CSS</a>, and <a href="https://www.khanacademy.org/computing/computer-programming/programming" target="_blank">JavaScript</a>, and my secret mission with Perchance is to get people interested in coding with a smooth, fun learning-curve. If you enjoy using Perchance and want to take your coding skills to the next level, you might like to learn to code on <a href="https://www.khanacademy.org/computing/computer-programming" target="_blank">Khan Academy</a>, or <a href="https://scratch.mit.edu/" target="_blank">Scratch</a>.</p>






The items listed below aren't errors - they're just "warnings". Perchance
generates "warnings" when it detects code in your editor panel that looks like
it may be a mistake, but which is technically not "erroneous" - that is, it's
valid Perchance syntax, but it's "unusual" code and so might have been an
accident on your part. Feel free to ignore these warnings if you know what
you're doing! ꒰•ᴗ•꒱

close


sign up or login to create your own generators ᕕ(ᐛ)ᕗ we only email you at your
request (e.g. for password reset) 👍︎

there was a problem connecting to the server ¯\_(⊙_ʖ⊙)_/¯ check your internet
connection?

that password is not correct (⊙.☉)7 forgot it?

that password is too short (⌐■_■) >6 chars plz

something seems wrong about that email address (⊙︿⊙)

something went wrong on the server (✖╭╮✖) plz post to forum if problem persists


cancelsignup / login

loading...

thanks for signing up! (^▽^) we just sent a verification code to (check spam
folder too) 🌺︎

there was a problem connecting to the server ¯\_(⊙_ʖ⊙)_/¯ check your internet
connection?

that code is not correct (⊙.☉)7 pls ensure you copied it exactly 👌︎

something went wrong on the server (✖╭╮✖) pls post to forum if problem persists


backverify

you're logged in! s(^‿^)-b

close

forgot your password? o(╥﹏╥)o that's all right! just enter the email you used to
sign up and you'll be sent a reset code ᵔᴥᵔ

there was a problem connecting to the server ¯\_(⊙_ʖ⊙)_/¯ check your internet
connection?

very spooky: that account was not found (⊙.☉)7 are you sure you put in the
correct email? 👻︎

something went wrong on the server (✖╭╮✖) pls post to forum if problem persists


backrequest reset code

we just sent a password reset code to 💌 when you recieve it (check your spam
folder too) enter it below and then enter a new password of your choosing
๑۞︎๑,¸¸,ø¤º°`°๑

there was a problem connecting to the server ¯\_(⊙_ʖ⊙)_/¯ check your internet
connection?

that code is not correct (⊙.☉)7 pls ensure you copied it exactly 👌︎

that password is too short (⌐■_■) >6 chars plz

something went wrong on the server (✖╭╮✖) pls post to forum if problem persists


backset password


you're logged in as - you can:

 * view your generators
 * change your password
 * change your email
 * logout


close

changing your password is easy (~‾▿‾)~ just enter your current password and your
new password •ᴗ•

there was a problem connecting to the server ¯\_(⊙_ʖ⊙)_/¯ check your internet
connection?

the current password is not correct (⊙.☉)7

that password is too short (⌐■_■) >7 chars plz

something went wrong on the server (✖╭╮✖) plz post to forum if problem persists


backset new password

your password has been changed V●ᴥ●V


close

your current email is ᶘ ᵒᴥᵒᶅ to change your email, just enter your password and
your new email 。^‿^。

there was a problem connecting to the server ¯\_(⊙_ʖ⊙)_/¯ check your internet
connection?

that password is not correct (⊙.☉)7

that new email address looks weird (⌐■_■)

something went wrong on the server (✖╭╮✖) plz post to forum if problem persists


backset new email

your email hand been changed (๑>ᴗ<๑)


close
🔤

there was a problem loading your generators ¯\_(⊙_ʖ⊙)_/¯ check your internet
connection? if the problem persists, please post to forum


back

loading...



you're viewing your generator with the url welcome - you can:

 * change its url
 * duplicate it
 * make public
 * download it
 * delete it


close

this generator's current url is: welcome

to change it, just enter a new one below ~(˘▾˘~) remember: you can only use
lower-case letters, numbers and hyphens in your url

caution: if you change it, the old url will no longer work! if your generator is
popular, and others have imported it into their own, you will break their
generators! (they will get import errors). because of this, if your generator is
popular, it's better to make a copy of this generator rather than change this
one's name ┌U・ェ・U┘

sorry, the new url must be at least 4 characters long

there was a problem connecting to the server ¯\_(⊙_ʖ⊙)_/¯ check your internet
connection?

sorry, a generator with that name already exists (⌐■_■)

something went wrong on the server (✖╭╮✖) plz post to forum if problem persists


backset new url

your generator's url has been changed ヾ(⌐■_■)ノ♪♬


close

loading...



if you click the button below, it will load a list of older versions of your
generator so you can download them in case you accidentally deleted your code,
or there was a system error. please note that if you have a very large
generator, or have saved it thousands of times, then it may take a while to
load, and may freeze up your computer for a bit - depending on how powerful it
is 🖳

load revision history



loading...

hmm (⊙_☉) there was some sort of server error while trying to get your revision
history. sorry! this doesn't happen very often. if it keeps happening (and
you've checked your internet connection), could you please make a post on the
forum?

ʕ•̫͡•ʕ•̫͡•ʔ•̫͡•ʔ


close

close


AI Roleplay Chat AI Story Generator AI Image Generator AI Anime Generator AI
Human Generator AI Character Description Generator AI Text Adventure AI Text
Generator AI Poem Generator AI Meme Maker Furry AI Art Generator AI Fanfic
Generator AI Character Chat AI Story Outline/Plot Generator