Perchance - Create a Random Text Generator

337 readers
3 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
26
 
 

Just recently, I've tried to add an option that disables loading all comments upon reload of the page (with the disableCommentsLoad option) but hasn't been quite possible yet ever since. Been stuck on this entire frame loading problem in my "under-construction" advanced comments plugin demo and it's been really hard to resolve as of right now. I also added a ?disableCommentsLoad=true URL parameter into the generator page so that it disables reloading all comments directly after page load.

It would also be great if that feature would actually be implemented into the comments plugin itself. Could be very handy to avoid situations like the "connection stalling" problem (see this post and the comment), and just to overall reduce unnecessary background connections, especially if you're on a browser that doesn't have a "memory saver" feature (essentially to "sleep" tabs like that to stop all the connections in the background).

But yeah, this time I wanted to make a post instead of troubleshooting the problem myself to see what solutions from other people could be (and especially for the known issues on the project). 🙂

Here's a demonstration from the thumbnail (with the disableCommentsLoad option enabled).

27
 
 

i have seen other AI image generators that can produce images with the help of you uploaded image. I have a photo of mine and i want to make some changes to it using the perchance AI generator.

Is there any way that i can upload the image and tell the AI to make the changes to it or use it to generate similar images?

28
 
 

I wanna be a part of the perchance team and I would love to join the community and learn from the ppl working on it. I wanna joinnnn‼️

29
 
 

When I open my view counter experiment page to check around, I noticed a pretty surprising hit on one of the biggest official generators on all of Perchance. The ai-text-to-image-generator generator has passed 10 million views! Yup, millions, not thousands. That's far off from other official generators which have gotten around one to four million views.

And that's just a few moments ago, now it has already gotten over 50.0k additional views as of this post was created.

Screenshot in the thumbnail from The View Counter Experiment

30
 
 

I have a gallery that has become contaminated with gross photos I dont want. The downvote / block only seems to make them invisible but others using the gallery can see unless they do the same, and if i share the gallery I dont want anyone having to see them at all.

Is there anyway a feature be added or the block/down vote feature to be updated to actually delete photos from a gallery or even possibility to delete a gallery entirely?

31
1
What is this URL request? (sh.itjust.works)
submitted 3 months ago* (last edited 3 months ago) by BluePower@sh.itjust.works to c/perchance@lemmy.world
 
 

I've been seeing more of this bizarre type of request whenever I look at the DevTools Network, with a strange request URL from https://perchance.org/cdn-cgi/rum. But whenever it stalls or not, it sometimes still lets me save the generator properly, and in some cases, it halts the saving and loading process almost indefinitely. But any good explanation is appreciated!

That is the details of the "pending" rum request:

32
 
 

there's some javascript to make the tabs work, and a piece of it is to make one tab open by default. this doesn't work, however the error is with a part of the code that IS working.

https://perchance.org/life-series-generator

33
 
 

I have tried everything, clearing cookies, using VPNs, changing browser but nothing. The only way I have been able to access it is form my phone so it seems like my PC as a whole is being blocked. Please let me know if there is any way to fix this as it is extremely frustrating.

34
 
 

Hi there everyone. I would like to make a website using AI to create children story books. Perchance seems like the perfect fit for this. I would just like to know if the creators of Perchance would be fine with me making this website, making a video about it and posting it on YouTube. Thank you.

35
36
 
 

teams for the 24/25 season

37
38
39
40
 
 

i'm going to try to start making headway in the sports category of useful generators

41
 
 

Hi there,

First of all I want to say thanks for the effort that the team puts into perchance. In today's abundance of social medias, perchance feels very DIY and oldschool, like on good old internet, which feels very refreshing.

Lyrics aside, I want to ask for advice on behalf of furry-ai gen community. As it gains more traction, the need for moderation also grows due to all kinds of ill behavior that poisons the community. Original creators of this gen do not seem to be active or respond to feedback messages. What can be done in this case?

42
 
 

Hello!

So I'm brand new to perchance, so please make sure to explain things to me very thoroughly.

I'm trying to make a random genotype generator, that then looks at what was generated and replaces it with words for the phenotype.

I've got it figured out for the most part, but what baffles me is that stringing .replace together for multiple instances (maybe I'm doing it wrong), does not have each replace function look at the entire string.

I've done quite a bit of googling, and found a few things similar to my issue, but could not understand them enough to implement the fixes.

As a word/name example: I have outputs of "Mary" and "Marybeth". I want Mary replaced with "Anne", and Marybeth replaced to "Susan".

However, what I'm essentially getting is Anne and Annebeth, with no reference to Susan whatsoever (but in my actual use-case, a number tacked on the end of a string of letters).

Is there a way to force the replace function to only replace characters if the entire bit in quotations matches, and not replace partial matches?

43
 
 

In want to create the most detailed characters possible, though even now I am thoroughly impressed by this platform and how the characters interact. I registered to Lemmy just to ask the following question.

I want to set this up optimally, but despite reading the instructions, I am not sure how exactly the Character description/personality/instruction/role section should be formatted, or how much the formatting matters.

It's formatted like this:

Description of XY:

Personality: a few short sentences

Background: a few short sentences

Appearance: * a few short sentences*

There is also a # Roleplay Guidelines: part put there by default, is that something that should be left there? Does it have a function?

And that's it. I'm not sure if this is the best way to do it, or what else is a good idea to be out there.

If nothing else, it would also be really helpful if someone sent me a character that was done "correctly", so I can mimic it.

Thanks a lot!

44
 
 

I've just found another pretty cool way to get rid of the error box in a generator without using the __clearPerchanceErrors() function that you can run on the testing panel to get a similar effect (as mentioned by @perchance@lemmy.world that it's probably a "private function" as well along with other alike properties in the Perchance engine), and so I made another quick example on how you can do that.

The difference is that the error box only gets "hidden" while you can still review the errors by running [__showPerchanceErrorBox(), ""] in the testing panel, whilst all the errors get removed completely with the __clearPerchanceErrors() method.

I've also showcased how you can show the error box even when there aren't any errors in the generator whatsoever.

45
 
 

So I'm trying to make a randomizer for the game PC Building Simulator. The problem is that not all parts are compatible with each other. I have this so far:

internals // this is ran silently above the title to init all variables because Perchance is kinda weird in its interpretation of the "code"
  [make_magic()] // [selected_case = mini_itx_case ? ]

output
  [case_compatibilities[case_size]]

case_sizes
  cube
  full_tower
  micro
  mid_tower
  open_frame
  super_tower

case_compats
  cube
    mini_itx_case
    micro_atx_case
    s_atx_case
  full_tower
    mini_itx_case
    micro_atx_case
    s_atx_case
    e_atx_case
    xl_atx_case
    ssi_eeb_case
  micro
    ...
  mid_tower
    ...
  open_frame
    ...
  super_tower
    ...

mini_itx_case
  cube
    CORSAIR Carbide Series Air 740
    CORSAIR Graphite Series 380T (Black)
    CORSAIR Graphite Series 380T (White)
    CORSAIR Graphite Series 380T (Yellow)
    InWin A1 (Black)
    InWin A1 (White)
    Lian Li TU150 (Black + Window)
    Lian Li TU150 (Black)
    Lian Li TU150 (Silver + Window)
    Lian Li TU150 (Silver)
    Raijintek OPHION
    Raijintek OPHION EVO
    Raijintek Thetis
  full_tower
    be quiet! Dark Base 900 (Black)
    be quiet! Dark Base 900 (Orange)
    be quiet! Dark Base 900 (Silver)
    be quiet! Dark Base Pro 900 rev. 2 (Black)
    be quiet! Dark Base Pro 900 rev. 2 (Orange)
    be quiet! Dark Base Pro 900 rev. 2 (Silver)
    Cooler Master COSMOS C700P
    Cooler Master MasterFrame 700 (Bench Mode)
    Cooler Master MasterFrame 700 (Showcase Mode)
    CORSAIR Obsidian Series 750D
    ...
  mid_tower
    ADATA XPG Battlecruiser (Black)
    ADATA XPG Battlecruiser (White)
    ADATA XPG Defender Pro (Black)
    ADATA XPG Defender Pro (White)
    Antec DF500
    Antec P110 Luce
    Antec P120 Crystal
    Antec P8
    ASUS ROG Strix Helios
    ...
  open_frame
    Open Benchtable OBT-BC1 (Black)
    Open Benchtable OBT-BC1 (Red)
    Open Benchtable OBT-BC1 (Silver)
    ...
  super_tower
    CORSAIR Obsidian Series 1000D
    CORSAIR Obsidian Series 900D
    ...
    
micro_atx_case
  cube
    CORSAIR Carbide Series Air 740
    Raijintek Thetis
  full_tower
    be quiet! Dark Base 900 (Orange)
    be quiet! Dark Base 900 (Silver)
    be quiet! Dark Base Pro 900 rev. 2 (Black)
    be quiet! Dark Base Pro 900 rev. 2 (Orange)
    be quiet! Dark Base Pro 900 rev. 2 (Silver)
    Cooler Master COSMOS C700P
    Cooler Master MasterFrame 700 (Bench Mode)
    Cooler Master MasterFrame 700 (Showcase Mode)
    CORSAIR Obsidian Series 750D
    ...

...



make_magic() =>
  mobo_size = mobo_sizes.selectOne
  case_size = case_sizes.selectOne
  sel_case = case_compats[case_size]
  return sel_case

I omitted a lot of stuff. My make_magic() function is fine. sel_case returns the name of one of the top-level lists (e.g. mini_itx_case or s_atx_case) which is great, but it is a string, not a reference to the list. How do I convert the string sel_case to an actual list reference?

46
 
 

For me , whenever I load datasets into the Fusion Generator I have to be mindful on how many items I load into the generator upon start.

If I load too much data , or do something crazy with the HTML , then there is a risk some users ( like those who browse perchance on older phones ) will not be able to access the generator page at all.

They will get a browser error message, and will not be able to access the generator at all to report the problem. They will be locked out forever , effectively.

So my suggestion is to have some kind of default "Oops something went wrong" page when loading generators on a perchance page.

The generator owner can customize the text written on the page. Maybe the image as well.

Importantly , they should be able to direct the user to somewhere (like a discord page) where they can report the problem.

TLDR : If the generator fails to load , show a link to a "Bug Report" page

47
 
 

So I'm testing out a new method for sampling prompts which I , at scale , would need to import via the dynamic imports plugin .

I want to use a two-tier selection process.

I select a random category like "Star Trek" and then within that category select "tags" that are associated with "Star Trek" (more info below).

This works for normal imports. But I'm wondering how to make this possible for dynamic imports.

I have no clue how to do this. I have no idea what is causing the error either.

Example here to showcase the problem (you can skip reading this post and just go here ):

Example-generator:

https://perchance.org/fusion-t2i-tv-series-perchance-example-1

Sub-generators with different methods :

https://perchance.org/fusion-t2i-tv-series-1

https://perchance.org/fusion-t2i-tv-series-2

Reason behind this:

I want to randomly select a category, for instance "Star Trek" . Then within that category, I have asked Bing Copilot , which is an AI chatbot that can browse the web , to generate "tags" that are associated with "Star Trek".

It looks like this in https://perchance.org/fusion-t2i-tv-series-2.

//-----//

Discord link to .json savefile for those who wish to test the prompts

Again , this works for normal imports.

But since I will likely be able to get a LOT of data out of Bing Copilot for stuff , I'd like some ideas/suggestions on how to make this work with dynamic imports.

No rush , but ideas are very welcome :) !

48
 
 

In the discord @BluePower@sh.itjust.works was talking about getting a username in the comments section, and said there was a command called user. the command did not work for me, and didnt show up at all.

here are screenshots of the command list for @BluePower@mastodon.social and me.

49
 
 

Note to everyone who used my Power Tabs Plugin before, if you ever had so many tabs on your tabs plugin and having an overlapping text issue on the plugin like this:

I've recently mitigated about the issue, and well, there's now a very handy solution to this! You can use some HTML styling, by setting a fixed width across all the tabs like this:

<style>
  ._powerTabs td {
    width: 150px;
  }
</style>

This will make all the tabs in your generator adjust its width beyond its technical limits, and thus will make the top part scrollable if those tab heads' widths occupy more than the entire width of the tab container.

Some notes:

  • You can just put the HTML snippet above anywhere in the HTML panel or put the innerHTML of it into your already existing style element if you have one.
  • You can see the fix in action in this example I just made.
  • This fix will apply to all the tab containers in your generator if you have more than one of them, like on this example. If you want the fix to apply only on certain tabs, you'd need to wrap the [tab(...)] thing that outputs the tabs plugin into a div or a p element like this: <p class="myTab">[tabs(...)]</p> and then give a class on it, and then you can insert a different HTML styling like this:
<style>
  .myTab ._powerTabs td {
    width: 150px;
  }
</style>
  • If you want to set the tab to be wider, you can change the width to a larger number like 200px, 225px, 250px, and so on.

I've just updated the plugin with a small addition of adding a special class to the outer layer of the tab container, so you'll be able to do this fix by yourself and, in addition, do some advanced CSS styling on the plugin (which you'll be able to do through the lists soon!)


Additional info worth to mention: If you have the wordwrap option set to wrap in your tabs, the tab heads will adjust to the minimum width needed to fit on to the titles, but not adjusting to its fixed width. If that fix doesn't work, try replacing the width part after ._powerTabs td { with min-width so the tab heads will explicitly adjust to their minimum width.

You can actually apply the wordwrap = wrap behavior only for the tab content without affecting the tab heads so the fix above will still work:

  ._powerTabs > div > div {
    word-wrap: break-word;
  }
50
 
 

explained to someone why:

stuff = blah blah blah
  thing = meow

doesn't work. But it actually could. 'stuff' COULD be an object that can both hold it's own value AND hold arrays of items. Tho probably so much would have to be changed to have it work seamlessly that it's undoable. Interesting potential improvement that came to light today tho.

view more: ‹ prev next ›