Skip Navigation

Search

Welcome to 'Perchance.org' Community! (Posting Rules/Other Community Links)

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.

Other Community Links

Rules

Here are some rules in this community:

  • Please follow the lemmy.world instance rules.
    • The full rules are posted here: (https://legal.lemmy.world/)
    • User Rules: (https://legal.lemmy.world/fair-use/)
  • 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

Posting from Mastodon

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

---

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.
14

Screenshots fail on some pages!

My newer generators are not having their screenshots generated. https://perchance.org/perchance-object-reference

Though this one works somehow: https://perchance.org/list-management-plugin

They're using the same formatting and scripts for the page as all my others.

1

HTML entities interpreted as HTML by update function

Seems to be related to this: ___htmlToElements(). It takes a string which is the text, ignoring the fact that HTML entities are not normal characters and should not be interpreted as normal HTML. For example, &lt; will be interpreted as < which can open a tag.

Example: https://perchance.org/qzi72h52te#edit

So if an element contains any perchance code, and HTML entities, the HTML entities are essentially lost and become real characters. Which isn't what you want if you're trying to present plain-text code to the user.

Definitely does not work as expected at least.

0

non-function $preprocess silently errors

No error message makes it to the display.

In the console there is:

Critical error in __createPerchanceTree: TypeError: Cannot read properties of undefined (reading 'startsWith')

And in the error messages there's just this:

Your generator's script seems to have errors in it. If you haven't recieved any other errors above this one which could indicate what went wrong, then this could be a bug in the Perchance engine. *etc...*

("recieved" should be "received" by the way 😜)

0

Escaped child $output code block accesses parent of the parent?

As seen here: https://perchance.org/p5bdhjbfv6#edit

So it still runs somehow? And accesses the grandparent somehow? Likely a bug with how escapes are stripped out--and perhaps recursively processed or something...

0

The generators page shows deleted generators

Right this moment it's showing a card for the rpaqzhfsa2 generator. Clicking on it takes you to that address. Which doesn't exist. Indicating it just shows any "latest-saved" generator even if it actually doesn't exist anymore.

!

!

2

Info in gallery looks messed up

It no longer covers the image etc. Clicking on the title/description shows the info. These aren't inherently bad things, but the way it's currently done with icons and text and images all overlapping each other it's confusing to even look at, let alone read the field names. Maybe at least blur and lighten what's behind, perhaps drop-shadows beneath the text, etc. to improve readability.

(This could be in the middle of an adjustment anyway, which is fair enough.)

!

7

Text-to-image assumes the iframe will be in the page by the time it completes generating

This line errors, if the iframe has been removed when there's a message received about it (completion I guess?):

464: document.querySelector(`iframe.${privateIframeId}`).contentWindow.postMessage({type:"originNotify", frameId:privateIframeId}, serverOrigin);

0

Defining function onload() {} will call it

I guess because you're always copying everything onto the window object?

So if you then call it yourself, because "you don't think it's been called automatically, because why would it? You haven't told it to do that"... it's actually being called twice.

2

Very odd things going on with giving objects

I explored this here: https://perchance.org/481tgbwo1k#edit

I can't even guess as to what's happening with some of this. Most bizarre...

5

Setting document.body.innerHTML triggered by a breaks saving

5

If there's a missing prop= there is absolutely no error reporting

As seen here: https://perchance.org/ihmcs2z5nn#edit

__perchanceError() doesn't show on the page, or in the console. throw new Error() doesn't either.

Edit: Similar for in a <script> tag. The error does go to the console, but no perchance error shows up. So later if you call a function that wasn't created in that script tag because of that hidden error, you just get the error that the function isn't there--as if there was no problem with the script tag, but the function just isn't there, for no apparent reason.

Would be better if the script tag's error was also shown in the perchance error box so it doesn't lead to misleading reporting like this.

2

Unsaved generator changes trigger confirm after deleting is confirmed

If you have a generator that has been saved at least once, you can open its settings and choose to delete the generator. You then need to confirm. If you do, it says the generator has been deleted, and it will take you to the homepage.

But then if there are unsaved changes, it has that warning about leaving the page. But As the user has confirmed they want to delete the generator, saving doesn't even mean anything anymore anyway. If they cancel and stay on the page, they can continue to edit and even save.

When they save, though the save fails and the preview shows a warning like: (⊙.⊙) sorry, we cannot find a generator called curxte4k6u! and it never comes out of the saving state.

It's all a bit pointless and there's no point in ever staying. I'd say the expected behaviour is that after it's been deleted it shouldn't care if there are unsaved changes anymore, and just let the redirect to the homepage happen as expected--without that confirmation popup.

2

text-to-image: JS object with falsy prompt breaks

Caused by this code:

if(!data.prompt) { d.prompt = data.evaluateItem.toString(); }

It expects the settings object itself to have an .evaluateItem property, which it normally won't have. Ideally it should handle that too instead of erroring. (I've put a failsafe into my advanced plugin for now.)

I think it should always fall back to using "" as the prompt. Which at the very least would stop this error from happening. Though it's still blocked from generating anything with a message. I also feel like it should still just generate an image, unless there's something actually bad that will happen on the server-side because of this that I'm not seeing?

4

Dropdown menus don't show up when refreshing after choosing an art style in ai-text-to-image-generator (and other t2i-based image generators)

So in https://perchance.org/ai-text-to-image-generator (and other t2i-based image generators) you could choose an art style and then a few dropdowns come below the prompt description textbox allowing you to choose any additional effects (or built-in modifiers, I should say) to be added to the prompt.

!

Well, I've found a bug on these. When I choose one that has a dropdown menu (for example, "Professional Photo"), the dropdowns did come out, but when I reload the page, the option I chose earlier retained, however the dropdowns did not come out as if the default option was selected.

!

I also tested if this bug happened on other t2i-based AI image generators too, such as https://perchance.org/furry-ai and https://perchance.org/ai-image-lab, and it also did the same, so this is most likely a bug within the t2i framework.

6

text-to-image-plugin and NSFW content

  1. if you add "underwear" to negativePrompt, then any images are considered NSFW!

  2. if you enter, for example, "women only on thong", then it gives NSFW but without warning.

"seed":24312861,"prompt":"women only on thong","width":512,"height":768,"guidanceScale":7,"negativePrompt":"","maybeNsfw":false

2

text-to-image-plugin ignores background and background-color styles

I see what the code is meant to do... it removes those from the style so it's not on the element. And adds it to injectedStyles for the iframe to see. But that seems to actually do nothing.

For image generation, if you're lucky you see it for a split second before the full-page grey element is shown. So at least there it is actually added by the iframe. Maybe the page background could be made grey by default and the injected style could override, and the grey element could just not have a background. At least then it would work. (Though as we can't change the text colour, people could make an unreadable mess. On the other hand, that's allowed by allowing any styling in the first place ;P)

The gallery doesn't appear to add it at all, though.

Feature Request: CSS Injection

While we're on the topic, I had a feature request... a property to inject full-on CSS. This would make things very flexible. Even allow us to prevent gallery saving by hiding that button, etc. Allow us to cater to dark mode in whatever way we wish also. And this background removing and injecting thing could just be commented out entirely because this new property would do the job... and actually do the job, too.

2

Tabs behave strangely in editor

Test: https://perchance.org/weird-tabs-3209482304#edit

> Edit: Note, after saving and loading, tabs work correctly? Maybe? If you start a new generator, you can see the problem happening. Remember to copy an actual tab character from someplace.

In the above editor, the HTML panel has tab characters in it. They behave as expected, apart from when they are at the start of a line--then they just take up no width at all. What's expected is, they move the next character to the next available tab slot, like in other code editors.

In the List editor, the tabs are always converted into two-space groups. Which is interesting, seeing as how they're all converted to tabs again by the engine before processing.

0

Editor: dragging middle separator all the way to the left hides the panes on the right

As seen here: screen capture.

6

Image generations show all buttons without hovering

Seems when they load, all buttons are shown regardless of if the user is hovering over them or not. Then when hovering, they're shown of course. Then moving the mouse away hides the buttons and it all works as normal. Seems unintended that it thinks the user is hovering onload when they're not. Not sure why that's happening.

(Also I don't think it was happening until very recently. So possibly a breaking change.)

7