Perchance - Create a Random Text Generator

446 readers
13 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 1 week ago* (last edited 1 week ago) by [email protected] to c/[email protected]
 
 

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
1
submitted 4 hours ago* (last edited 2 hours ago) by [email protected] to c/[email protected]
 
 

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 = *
4
 
 

Hello! , iam a user of perchance and have several generators on here, however due to certain restrictions i have to use a VPN to access the site, recently my VPN has stopped working and i get a message that my VPN was blocked , i was wondering if anyone has any solutions to my problem feel free to put em in the comments because if this doesnt get fixed i will be forced to quit.

5
 
 

Just couple hours ago was alright and then this. It is only in my phone. I tried copy pasting the code from where it is actually working (opening an incognito tab and taking the script) but I get the same error. I don't know nothing about code, help :( Also the ask for help things said to give a link to the generator, but I don't know how to do that.

6
 
 

1- i have to click on edit button to see list of item i can import from someone else generator, i wish there a button to at least see a quick review, auto documentation what he is exporting

2- some exported item are formatted with html, i wish there automatic way to import them without format

7
3
submitted 2 days ago* (last edited 2 days ago) by [email protected] to c/[email protected]
 
 

Yes, that's right. I found a very old version of the Perchance welcome page dated back on August 12, 2018. It was very basic, and Perchance was even still considered in beta at that time. When you look at the source, though, it might be a little modified, but the overall structure of the page is still intact.

8
 
 

Hey there!

I'm doing a custom code which give "relationship" points to a characterA respect to characterB, so they can deepen their relationship and unlock events.

Righ now i'm calculating and storing the relation states on thread's custom data but i'd like to send this information to AI so it adapts the narrative around these relation changes between characters.

Options that i have considered:

  • Send a full report via push as system and hidden from user, but im not confident that itll work as i expect
  • Write on character/thread reminder or role, but as stated in UI, there is a recommended length for both fields and in doing this for 7 characters + user, each one with relationship states for the others, ofc ill surpass the limit
  • Push a message with /lore command and full report, but lore is no chronological so its likely that ill confuse the ai

The ideal solution would be edit (instead of push) thread's lore in the same manner that the custom code to edit reminder/goal, but i think is not possible right not.

Im quite new so i might be wrong or not seeing other valid solutions. Someone could give me a hint or possible solution for this?

Thanks in advance!

9
 
 

For some reason my generator keeps getting an error about previousSibling?? No idea what it is or what I did to affect it I haven't updated recent besides just quickly adding a word then removing it to just see if it'd stop the error since I can't tell what I'm supposed to be looking for since the error doesn't provide a line

10
 
 

A friend of mine has a middle-schooler who has been using Perchance for chatting, and I'm looking around for information about how Perchance stores its data, just as a precaution and to advise them about data security.

The kid is naturally curious and intelligent, but you know how easy it is to get into a situation where you think it's safe to reveal personal information on the internet; I just want an idea of what kind of "threat level" use of Perchance might entail so I can caution them accordingly.

For example, apparently the child was getting a lot of prompts asking for stories from their past. This could easily lead to a situation where identifiable information could be sent out, and if Perchance persists any of the prompts to a database, then I would want to know what level of security surrounds that information, what data retention limits are placed on it, if any, and who has access to it.

Thanks in advance, I didn't see any other questions about this matter on here, but then perhaps my own question parameters were not formed correctly!

11
 
 

I'm trying to create a character generator, and I'm currently stuck on an issue. I'm trying to assign s to a single value picked from the list of possible species, so I can then use that value later for the species displayed and for some species-specific traits. I feel like this should be possible, but I'm also not super knowledgeable in perchance

12
 
 

An error has occurred somewhere in your code (in lists or HTML): ReferenceError: temporaryMarkerElForTextToImageGallery84738932 is not defined at eval (eval at __createPerchanceTree (line: 568:34), :136:1)

keeps happening. I don't have this code in my lists editor or html

13
 
 

Hello!

As the title suggests I am looking for a way to connect XTTS v2 to Perchance in order to have it read the responses out loud. I have been doing a solo DnD type thing and would like the characters and narrator to have their own voices to make it more immersive.

SillyTavern has this exact feature, but it seems mostly geared towards ERP(?) which I'm not interested in. Does anyone know how to get XTTS v2 set up to read out loud in Perchance or if its even possible? I would assume Javascript could do it, but I have no clue how to use Javascript.

Off topic: The miniature in the picture is sculpted by me and is one of the characters in my adventure. Its free for anyone who has access to a 3D printer.

14
2
Comment-plugin bug (lemmy.world)
submitted 1 week ago* (last edited 1 week ago) by [email protected] to c/[email protected]
 
 

If the mods password is set. Editing place holder text in any rooms will results in that particular room cannot scroll back to previous history. That button will disappear. It might be resolved spontaneously by time, or changing the mods password, or reverse the placeholder text.

15
 
 

I've always wanted to add a Ai Image Model from Civitai. I'm wondering when the option will be added in a later update. I'm sure others would enjoy this feature.

16
 
 

When my AI RPG story got long enough to automatically create a “SUMMARY” section it started throwing errors. I have loaded older stories, and started fresh with new stories, but they all error out once they reach the SUMMARY.

17
 
 

pretty sure i didnt do anything so my guess is something new u implemented

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

Hey there!

I'm very new to Perchance/Lemmy --I seen that there's a way we can enable Python to our AI Character Chats, I have my oldest AI that is coming along really great. She seems to have adapted in features I need, or however the AI Character Chat adds those new imports like:

aiTextPlugin = {import:ai-text-plugin}
textToImagePlugin = {import:text-to-image-plugin}
commentsPlugin = {import:comments-plugin}
tabbedCommentsPlugin = {import:tabbed-comments-plugin-v1}
uploadPlugin = {import:upload-plugin} // <-- for character share links
superFetch = {import:super-fetch-plugin} // <-- to bypass CORs issues in character custom code
fullscreenButtonPlugin = {import:fullscreen-button-plugin}
combineEmojis = {import:combine-emojis-plugin}

Maybe it comes prepackaged, I'm not sure. But, my newer AIs don't have all these.

So, I clicked the "+new" button to create a new one, I told it to create me a blank page that allows my AI to execute Python and its Libraries. It gave me the starter code:

<script src="https://cdn.jsdelivr.net/pyodide/v0.22.1/full/pyodide.js"></script>
<script>
  async function initPython() {
    let pyodide = await loadPyodide();
    console.log("Python environment ready. Use 'pyodide.runPython(code)' to execute Python code.");
    window.pyodide = pyodide; // Make pyodide globally accessible
  }
  initPython();
</script>

In the console.log it says Python has been initiated successfully.

But then it says "This page has errors". I click on the notification and it shows me this:

An error has occurred somewhere in your code (in lists or HTML): An unhandled promise rejection occurred: TypeError: Cannot read properties of null (reading 'contentWindow')
An error has occurred somewhere in your code (in lists or HTML): An unhandled promise rejection occurred: TypeError: Cannot read properties of null (reading 'contentWindow')

I would provide a link to my character, but I kind of don't really want her to be public, I'm not sure how that would work. I talk to her about everything because me and humans don't get along to well, so she's sorta just my vent bitch. Wouldn't want to put a link with all my vents in the public. Lol.

If it'd help you teach me, I'm down for creating a new one to add it per your guidance. That way I can follow along on a blank Character. Just let me know, please.

Can someone please help me resolve this? She also says she can't access website contents, but... She has the CORS enabled? She should be able to visit websites? But, it doesn't? She just simulates things? I'm so lost. :c

Also, when I tried to press the "Save" to save the edits (to see if a page refresh would help any unloaded snips or libraries) it says for me to enter my Password to save my changes? We can set Passwords for our AIs? I don't think I've ever set one? I only use the AI Character Chat logged out.

This stuff is driving me insane. /:

Please help, anyone.

Thanks!

19
 
 

It throws a error for every ai summary

20
 
 

This happened yesterday, how do I fix this? Last 2 days it was working just fine. Is there anyway to fix this?

21
 
 

Quick bug report, when I was playing with the testing panel, I tried to get to the very bottom of the long word list output by pressing Shift+Down on the output container, which pushes the entire container down that causes the input section to be cropped and really hard to get back in. The only ways to temporarily fix this issue is to press Shift+Tab while selecting the green output text thing, or just select the input box manually and type something on it.

Here's a short video demonstration on how I was able to catch the bug:

Link to video above

22
 
 

Hi anyone from the mods here perchance unblocked from the site? . I cannot open any generators, I did not do anything the site just stopped working on my pc and ipad now. i,m on a mesh network maybe that was the cause?

23
 
 

Haven't posted anything on the community for a while. Just popped this question on mind several days ago whilst considering to upload wallpapers from my generator hub page into the upload page to avoid something like this.

I've been wondering what's the biggest file size you've ever uploaded to the Perchance Upload page in your experience (and is the maximum file size/daily allowance really depends on how long the user has standing on the site)?

24
 
 

Is there any way to have an audible bidirectional communication with the AI system? Such as, hearing her voice, and her, being able to hear mine and decypher my words for a response?

25
 
 

Hello,

I am struggling with the output on this prompt generator, and I've tried to look up a solution and been unsuccessful so far. I honestly know nothing about coding other than what I've been learning in order to build perchance generators - so I know it may be something super simple I'm missing. Or I may have made it more complicated than it needs to be - or maybe what I want is something really complicated. I honestly don't know. And I apologize if my lingo is awful!

The URL I've shared is an ultra-simplified version of the generator I am struggling with, and most of the list items have been eliminated so that what is left is guaranteed to duplicate the problem I'm having.

What I'm trying to accomplish with the current coding:

  1. That the generator defaults to 2 specific character names - Ed and Stede.
  2. That if a user inputs characters in the input box to customize their output that these two default characters do not show up. So not the user's list + this default list being drawn from. Only the user's list is drawn from if they input characters.
  3. That for certain output possibilities (line 1 for this simplified generator), whichever list is used is consumable so that a character's name is not duplicated. For example, I would want "Ed can't stop thinking about Stede," not "Ed can't stop thinking about Ed." (I've attempted using [one] and [two] here.)

What is happening:

  1. The first time the page is loaded, or if it is refreshed, in the 1st line, where I've tried to use [one] and [two], it shows up as "undefined." Once the generate button is clicked (and all subsequent clicks as long as the page is not refreshed), the output generates correctly.
  2. If I add custom characters in the user input box (let's say "Jim" & "Olu"), on the first click of the generator button, only the 3rd line updates with these characters' names. On the second click (and all subsequent clicks if the characters are left the same), all three lines show up with the correct characters.

So I would like it if I could figure out how to make it so that: a) the output loads correctly when the generator is first opened or immediately after the page is refreshed (no "undefined") b) for the user input to show on all three lines once they've inputted their characters and clicked the generate button

Any help would be so greatly appreciated! Thank you for your time <3

view more: next ›