Perchance - Create a Random Text Generator

460 readers
5 users here now

⚄︎ Perchance

This is a Lemmy Community for perchance.org, a platform for sharing and creating random text generators.

Feel free to ask for help, share your generators, and start friendly discussions at your leisure :)

This community is mainly for discussions between those who are building generators. For discussions about using generators, especially the popular AI ones, the community-led Casual Perchance forum is likely a more appropriate venue.

See this post for the Complete Guide to Posting Here on the Community!

Rules

1. Please follow the Lemmy.World instance rules.

2. Be kind and friendly.

  • Please be kind to others on this community (and also in general), and remember that for many people Perchance is their first experience with coding. We have members for whom English is not their first language, so please be take that into account too :)

3. Be thankful to those who try to help you.

  • If you ask a question and someone has made a effort to help you out, please remember to be thankful! Even if they don't manage to help you solve your problem - remember that they're spending time out of their day to try to help a stranger :)

4. Only post about stuff related to perchance.

  • Please only post about perchance related stuff like generators on it, bugs, and the site.

5. Refrain from requesting Prompts for the AI Tools.

  • We would like to ask to refrain from posting here needing help specifically with prompting/achieving certain results with the AI plugins (text-to-image-plugin and ai-text-plugin) e.g. "What is the good prompt for X?", "How to achieve X with Y generator?"
  • See Perchance AI FAQ for FAQ about the AI tools.
  • You can ask for help with prompting at the 'sister' community Casual Perchance, which is for more casual discussions.
  • We will still be helping/answering questions about the plugins as long as it is related to building generators with them.

6. Search through the Community Before Posting.

  • Please Search through the Community Posts here (and on Reddit) before posting to see if what you will post has similar post/already been posted.

founded 1 year ago
MODERATORS
1
10
submitted 3 weeks ago* (last edited 3 weeks ago) by perchance to c/perchance
 
 

I've received a few messages from experienced developers asking how they might be able to help improve Perchance. I typed out a decently long (but somewhat rambling and incomplete) response to a message just now and figured I might as well post it publicly for the benefit of others who are interested.

The TL;DR is probably: The most impactful thing that devs can do for the perchance community is to just have fun building things (generators/plugins/etc) that are interesting/useful to you, and then share your creations with friends or communities that might enjoy them. This is very helpful!

Message response below:


The Perchance site itself is really just a code editor with a sandboxed iframe (that the code is thrown into), and a mongodb server for accounts/generators, so not a lot of my dev time goes into that level of the platform. And the DSL/engine doesn't change much at this point (though an overhaul will likely come at some point), so most of my time is spent on creating plugins, examples/applications, and stuff like that.

I could add a bunch more features to the site, but I prefer to keep the foundation very simple, which is why I create plugins like perchance.org/upload-plugin and perchance.org/comments-plugin and so on. I.e. instead of adding comments as a "native" feature, I just add it as a plugin, which allows me to be more nimble and experimental.

There are limits to this, of course. One native feature that is sorely needed imo is collaborative editing - akin to Google Docs, so you can just share a link to start working on stuff with others. Another is optional AI-assisted code auto-completion. For both of those I need to upgrade to CodeMirror 6, but the Lezer stuff is kinda gnarly. If someone managed to get the Perchance DSL highlighted with CodeMirror 6 that would be very handy, but this is definitely not a "good first issue". I did spend one day on it, thinking that's all it'd take, but I now realize that it's something which I'll need to set aside several days for, and I've been putting it off.

Here's the basic setup for CodeMirror 6: https://perchance.org/codemirror6-basic-html#edit

And I originally thought I'd use the same mixed parsing approach that @codemirror/lang-html uses, except instead of the HTML script tags triggering the transition from non-JS text to JS-highlighted text, it'd be square brackets (and function headers), but I think the problem with that is that the HTML parser has the advantage that the closing script tag in HTML code always means "end of JS" (even if it's e.g. in the middle of a JS string! this can be somewhat surprising to many web devs), whereas closing square brackets can 'validly' occur in JS code without necessarily indicating the end of a square block. Someone here seems to have come to the conclusion that Lezer might not be a good fit for this sort of thing, and so a stream parser might be the way to go, but I'm not so sure, because IIUC, @codemirror/lang-javascript manages to do it with template strings. I.e. ${ to indicate start of JS, and } to indicate end. That's almost identical to what is needed for the Perchance DSL, so it seems like Lezer can do this. But maybe @codemirror/lang-javascript is doing some non-Lezer stuff, since IIRC there are some proprocessing/tokenization things you can do before it gets passed to Lezer. Either way, using the official JavaScript (or html/markdown/etc - which includes it as a sub-module) parser, with some minimal modifications, is probably the way to go, since I don't want to have to maintain a from-scratch lib of that level of complexity.

So that's one thing that comes to mind right now, but that said, probably the most helpful thing that community members can to do to help Perchance is to create generators/plugins/games/etc. An interesting one that I noticed a few days ago, as an example: https://perchance.org/ai-roguelike and another: https://perchance.org/infinitecraft-but-its-a-trading-card-game

The advantage of helping in this way is: 1) it's fun and you can just build stuff that's interesting to you, and 2) it doesn't require any coordination with me or anyone else. The latter point is pretty important because I'm a pretty solitary/hermit type of person, so it may be hard to get in contact with me for several weeks at a time.

I've spent quite a bit of time recently building generators to try and provide examples of games/experiences/tools that can be created with the AI plugins. The more people there are doing this, the more I can move down to the lower levels of Perchance. My bottleneck is currently at the higher "application" level, rather than the platform level, if that makes sense.

2
 
 

Welcome to the Perchance Community!

Perchance.org is a platform for sharing and creating random text generators.

This Lemmy community is for:

  • Asking for help with problems, issues, or requests about generators in Perchance
  • Sharing and showcasing your created generators, templates, plugins, or pages in Perchance
  • Starting friendly discussions about topics related to Perchance
If it is your first time in using Lemmy, please check out this message from Lemmy.World and the Support Page from Lemmy.World to get started on using Lemmy.

Posting from Mastodon

Feel free to checkout this post to know how to post in this Lemmy Community through Mastodon.

Other Community Links

Rules

Here are some rules in this community:

  • Please follow the lemmy.world instance rules.
  • Be kind and friendly.
    • Please be kind to others on this community (and also in general), and remember that for many people Perchance is their first experience with coding. We have members for whom English is not their first language, so please be take that into account too :)
  • Be thankful to those who try to help you.
    • If you ask a question and someone has made an effort to help you out, please remember to be thankful! Even if they don't manage to help you solve your problem - remember that they're spending time out of their day to try to help a stranger :)
  • Only post about stuff related to perchance.
    • Please only post about perchance related stuff like generators on it, bugs, and the site.
  • Search through the Community Before Posting
    • Please Search through the Community Posts here (and on Reddit) before posting to see if what you will post has similar post/already been posted.

Posting

Here are some optional tags to add in your title to categorize the posts. These are merely tags, you still need to title your post effectively.

  • [Bug] - if you think you find any bug in Perchance, use this tag.
  • [Question] or [Help] - this is to denote that your post is a question or requesting for help
  • [Suggestion] - for any suggestions in Perchance
  • [Feedback] or [Appreciation] - for any feedback or appreciation to any generator or to Perchance in general.
  • [{Generator Category}] - Used to share any generator with the specified category
    • Text, Image, Template, Hub, Plugin, Preprocessor, Community/RP, Game, Experiment, Useful Generator
  • [Fluff] or [Non-Generator] - Non-generator posts but about Perchance
  • [Tutorial] or [Guide] - for any Perchance related tutorials or guides to help others

AI Plugins Posts

Here is a FAQ for the AI tools in Perchance.

We would like to ask to refrain from posting here needing help specifically with prompting/achieving certain results with the AI plugins (text-to-image-plugin and ai-text-plugin) e.g. "What is the good prompt for X?", "How to achieve X with Y generator?"

There are guides, tutorials, and resources on the internet that can be applied when prompting in the AI tools in Perchance.

We will still be helping/answering questions about the plugins as long as it is related to building generators with them.

If you need help in prompting, please post on the 'sister' forum at Casual Perchance

Getting Started with Perchance

To get started with Perchance, check out the Perchance Tutorial or the Beginner Tutorial at the Perchance Hub Learn Tab to get to know the website.

Asking for help

Feel free to ask for help but please check out these tips on searching for an answer:

  • Check the following pages, to see if your question has already been answered or talked about or a plugin has been made for it. We recommend using the browser's search function (ctrl+f) and searching for similar keywords to your question/problem.
  • If you didn't find anything about your problem there, feel free to search through the posts/articles here:
  • If you can't still find anything related to your problem, feel free to post a thread here.
    • Please title your post effectively.
    • Please provide a link to your generator with your attempts of solving the problem.
    • Try to explain what you want it to do and what example output it should be doing.
3
 
 

One day my computer crashed while I was using it and now it's just this. It doesn't work in a normal window but it does work in an Incognito one. I do not know what happened. (I have not touched any code in this AI character chat)

4
2
submitted 2 days ago* (last edited 2 days ago) by BaooRami to c/perchance
 
 

Hello everyone. New to the community as well as learning html for it. I was building an image generator purely from html css and js.

I have a div with some text inside it. This is not a textarea, just a div with text dynamically updated.

How can I use this text as Prompt?

I saw another generator without a framework that uses this, but on a textarea.

<textarea oninput="promptData.prompt=this.value"placeholder="prompt"></textarea>

while i want to set value from this div as prompt

<div id="positivePrompt" class="prompt-text">
  ${patterns.positive}
</div>

Please guide or point me somewhere. Thanks

5
 
 

Hello, Vanilla here. I am the one who made the "A Plant's Life" generator.

There is an issue in this generator where you have to click the "Who's my gardener?" text, "Cool!" text, and the "Approve" button twice in order to make the brown box with text appear. This is strange, because there is a generator with the similar code that this generator is inspired by, and that generator doesn't have a similar issue. When you click the "Continue" button after choosing a deputy and medicine cat, it will show you a box with an image and white text in it, along with the clan event log, instead of having the annoying issue where you have to choose deputy and medicine cats and click the "Continue" button again.

I am not sure if this is a bug, but I find this strange, because of the other generator. Can anybody please provide the code/feedback to fix that for me? Thanks.

6
1
Continuous generation (self.perchance)
submitted 2 days ago by petermaffay09 to c/perchance
 
 

How can I make the generator go on with the story without having to press "next paragraph" the whole time?

7
1
submitted 2 days ago by wthit56 to c/perchance
 
 

A button in the top toolbar that adds the generator to your "favourites" list. List is shown in a dropdown, or as icons in the topbar, or on a particular page, etc.

Could be used to collate a "most favourited generators" page.

8
 
 

I genuinely cannot figure this out for the life of me. I don't understand why [brd] will output the name and the [brd] appearing at the end after the two line breaks is different from the first one. It should be storing the selection, but it isn't. Somehow the variant IS stored???

I also don't understand why [brd.name] isn't working. Might be tied to the issue I described in the paragraph above this.

As for dynamic odds not working...

It should be impossible for Okapi to be selected if the breed is Aberration, and yet.

Any and all help is GREATLY appreciated.

9
 
 

I'm helping my friend make a turn-based battle game called Emoji Battles, and I'm attempting to make several things within the Perchance editor. I'm hoping for the simplest ways to implement these features into the sheet without too much hassle. I'm learning how to use more advanced features here, but I am not nearly experienced enough to implement these myself. If this is too much to ask, please let me know.

  • Luck system Most chances in the game function on a coin-flip system, being either a land or a fail. This functions on percentages, (ex: land^25, fail^75) The game has a luck system, where the amount of luck you have multiplies your chances. I would like to figure our a way to have a number you input multiply your chances by a specific increment, (ex: if luck = 0, 25% chance to land, if luck = 2, 50% chance to land)

  • Save/reset system I would like for the user to have their values automatically saved upon exit, so they will stay when they return. This also makes room for a reset system, where you can automatically revert to the default values. If this isn't possible in Perchance, I want to add a way to export your data, so you can load it in at a later time.

  • Emoji deck/mana system This one is by far the most ambitious, but I am praying I can get it done. Every player has a deck with 8 emojis total, each with an amount of mana. Every usage of an emoji depletes 1 mana, and the mana regenerates by 0.5 every turn without buffs. I am hoping for the player to be able to input their emoji deck, and keep track of the mana they have. Since it's difficult to keep track of manually, I want to add a button that increases mana by a specific increment whenever it's pressed. I have two ideas for how this would work. Either you input the emoji, the mana count, and the max amount of mana in their own unique boxes, or the generator has data on every emoji in the game, and you can put in just the emoji list and have the generator know the maximum mana count. The first option is by far the easiest solution, but the second one makes it easier to randomly pick between an emoji in your deck.

I am hoping anyone here is willing to help me on this, this is an advanced project and I'm grateful for any help I can get. :)) Here's the link for the original project: https://perchance.org/7f73z6hd9a#edit

10
 
 

Perchance AI chat (with images), the one linked by the AI character image generator won't load for me: the website will load fine, but after that, it gets stuck buffering while loading the code, only to go to a white display. all the code and other website functions can still be accessed from this state, but the generator itself won't load.

11
1
Error code in a chat (perchance.org)
submitted 1 week ago by TealDragon1 to c/perchance
 
 

So I am trying to chat with an AI named Ignis I made and it says error code 512 and Ignis will not respond and it happened with one of my other chats that i made then transfered onto my phone from another device via usb. Anyone know what the error code means and how to fix it. It also take forever to actually respond.

12
1
Perchance Error 521 (lemmy.world)
submitted 1 week ago by HerAfterlife to c/perchance
 
 

Getting this error message.

13
 
 

on making any edit in the interactive terminal's code (lists of HTML), the entire thing goes black. the error that it shows is really odd too, the line of code causing the error is blank, and it says "the error may be near line number -2", which isn't possible.

14
 
 

What plugin do they use? I don't see anything, is it built in the plugin?

15
 
 

The ability to save JSON files from AI chat is awesome! I'm wondering as a backup if something happens to perchance, is there a way to convert these into text?

16
 
 

Sometimes after I press the continue button, the text goes crazy-it generates on and on even after I press stop, and starts generating gibberish. Anyone else experience this?

17
1
submitted 1 week ago* (last edited 1 week ago) by Swxxt to c/perchance
 
 

I just running my gen and edit UI dissapeas, i tryed to restart page and my browser, but it dosent helps, also when i turning edit mode editing UI dosent appears. Please help if you can

18
 
 

Hi guys, today I logged in the perchance.org/ai-character-chat like every day but it shows an error like in the picture, and I can't do anything, just a white screen. Please help me fix this. Thank you!

19
2
submitted 1 week ago by Swxxt to c/perchance
 
 

I dont find anything in multiplayer, I want make multiplayer tic tac toe, is someone have solution?

20
 
 

I've built another mini generator inside of my experiment page, The View Counter Experiment, inspired off this generator that generates a color based on a random object using the power of AI for the day. I'm glad on how it turned out to be.

It's located in the AI Experiments tab on the right if you want to try that out.

21
-2
submitted 1 week ago* (last edited 1 week ago) by Alllo to c/perchance
 
 

@Perchance you mentioned improving the ai art a while ago and mention on the page of the plugin improving it.

I now have an opinion which can be summarized by looking at this image. This is SD3.5

I managed maybe 40 upvotes tops in that forum with Perchance images and even SDXL can't do things coherently enough to really convey a message. Anyway, so after much SDing, I, having used SD3.5 significantly, find it is top tier and competes at top tier while none of the other SDs can. Interestingly I also broke 100 upvotes via Bing. I find I basically use Perchance and SD3.5 now (they are different and SD3.5 is not actually 100% better. Variety among images actually seems less. Like if I take prompts made on beautiful people in to sd3.5, all images with words 'mythic superwitch' and 'dreamlike' become images of ugly glowy red midgets, no matter the variation of the other like 90 words of the prompt).

So, while I have literally no idea how achievable this is, my perspective is that Perchance is a fine unique niche now and that upgrading to anything before 3.5 is not 3.5 and thus a waste ~it would just be 'along the same lines as 3.5 but worse'. Also it, and even SDXL before it are different enough from Perchance that i think ai-plugin should not be 'upgraded' but a second plugin made for, hopefully, SD3.5 and users can use one or the other for quite some time. Just my opinion on the ai art upgrading I hear occasionally.

22
2
submitted 1 week ago* (last edited 1 week ago) by [email protected] to c/perchance
 
 

Finally released another whole plugin after 5 months of releasing the Power Rain Plugin last time. This plugin, as its name says, allows you to have those fancy little counter that moves/animates as you change the numbers up, down, or however you like, easily set-up in your generator. You can even customize the style of the counter and the individual digits in the counter!

Fun fact: I've just learned that you can bind custom functions into any element (and probably nodes too) before making this plugin...

23
1
submitted 1 week ago* (last edited 1 week ago) by Slenderino to c/perchance
 
 

(I´m not english speaker of myself, sorry if there´s any misspelling or error)

Hi!, I´m currently working on a Python script that exports perchance ai characters, and I would like to know if there´s a better way than creating an empty character and exporting it in order to try to recognise its parameters from the file exported, I´m looking to know primarily the ones in "data":"data"[0]:"rows" (where the character is stored, where there is name, roleInstruction, maxParagraphCountPerMessage, etc.), and I would like to now the GUI name v/s the code name and the possible values for each one. If anyone knows this information or has a better way of getting it don´t hesitate to comment it!

24
0
Error (lemmy.world)
submitted 1 week ago by Be3LIkii to c/perchance
 
 

I used the site for a long time, no errors occurred, I did not do anything that could stop the site from working correctly, in my opinion. Maybe someone has already encountered a similar problem?

25
1
submitted 1 week ago* (last edited 1 week ago) by [email protected] to c/perchance
 
 

I found a bug within this template that it cannot show the asterisks on the password properly (syntax error). The simple fix is just to use iterators to wrap the ast variable so it becomes an array and is compatible with selectMany:

password = [[...ast].selectMany(6,9)]
ast = *
view more: next ›