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

ai-character-chat

So I'm trying to create a javascript that will scan the User's description/role for the following fields: Last_Name, Race, Political Entity, Rank, Position to be used in Character description/personality/instruction/role and Initial chat messages, But it wouldn't work. So I came up with a twork around where its stored in the javascript. I require help in getting a javascript code that scans User's description/role.

Original ``` function extractInfo(description) { const fields = { lastName: description.split('Last Name:')[1].split('\n')[0].trim(), race: description.split('Race:')[1].split('\n')[0].trim(), politicalEntity: description.split('Political Entity:')[1].split('\n')[0].trim(), rank: description.split('Rank:')[1].split('\n')[0].trim(), position: description.split('Position:')[1].split('\n')[0].trim() };

return { getLastName: () => fields.lastName, getRace: () => fields.race, getPoliticalEntity: () => fields.politicalEntity, getRank: () => fields.rank, getPosition: () => fields.position }; }

const info = extractInfo(user.description); console.log(info.getLastName()); // Should output the last name console.log(info.getRace()); // Should output the race console.log(info.getPoliticalEntity()); // Should output the political entity console.log(info.getRank()); // Should output the rank console.log(info.getPosition()); // Should output the position ``` Retrieve each field by calling info.getLastName(), info.getRace(), and so on. Problem is replacing user.description with the actual string containing the user's description.

Work Around ``` function extractInfo(description) { const namePattern = /(?:(?:\b\w+\s){2,})(?:\b\w+\b)/; const lastName = description.match(namePattern)[1]; const racePattern = /\bRace\b\s*:\s*([\w\s]+)/; const race = description.match(racePattern)?.length > 0 ? description.match(racePattern)[1] : "Unknown"; const politicalEntityPattern = /\bPolitical Entity\b\s*:\s*([\w\s]+)/; const politicalEntity = description.match(politicalEntityPattern)?.length > 0 ? description.match(politicalEntityPattern)[1] : "Unknown"; const rankPattern = /\bRank\b\s*:\s*([\w\s]+)/; const rank = description.match(rankPattern)?.length > 0 ? description.match(rankPattern)[1] : "Unknown"; const positionPattern = /\bPosition\b\s*:\s*([\w\s]+)/; const position = description.match(positionPattern)?.length > 0 ? description.match(positionPattern)[1] : "Unknown";

return { lastName: <lastName>, race: <race>, politicalEntity: <politicalEntity,> rank: <rank>, position: <position> }; }

const updatedDescription = "<short description>"; const updatedResult = extractInfo(updatedDescription); console.log(updatedResult); ```

Where you can call each field individually by accessing the properties of the returned object, like result.lastName, result.race, result.politicalEntity, and result.rank.

2

plugin conflict between locker and tooltip

i've discovered that, using the locker plugin and the tooltip plugin, if you attempt to update locked text that has a tooltip, the tooltip stops functioning. oddly, the mouse continues to change to the hand, implying that the tooltip should be there even though it doesn't show up.

here is a generator i made to showcase the conflict: https://perchance.org/locker-tooltip-conflict-example#edit

are the developers of these plugins active here? it would be really lovely if this conflict could be fixed somehow :0 thank you all in advance for reading and helping!

8

Rename rooms in unmoderated generator

perchance.org AI Furry Generator / Fursona Maker (free, no sign-up)

AI furry art generator / fursona image maker. Create your own anthro/fursona OC images from text, via text-to-image AI - it's *completely* free, no sign-up, unlimited. Generate a furry character pfp - portrait and full-body AI art of hybrids, wolves/dogs/canids, protogen, foxes (including vixens, to...

AI Furry Generator / Fursona Maker (free, no sign-up)

Hi,

I'd like to ask for help from admins or a developer again. This is not the first time I mention this generator in here. This generator is problematic because it seems that the owner never really uses it anymore, but the gen itself is quite active and thriving and it desperately needs changes. No matter how hard we tried, we couldn't find any links to generator's owner, which we had accepted.

All I'm asking for is that is it possible for you to rename rooms for us? While we are an inclusive community, we are in desperate need for separate chats for PG13 and 18+ folk. Currently there is clear indication only for General and Prompts, people barely visit other rooms because they are named Room 1, Room 2 and Room 3. It will help tremendously if you could rename Room 3 could be renamed to '18+' (room 3 in particular for historical reasons).

Thank you.

3

Random button broken

When I click the random button nothing happens

2

Filtering list by initial letter results in selectOne errors

Hi all! Total Perchance newbie here, so I sincerely apologize if this is obvious/already been answered. Been having fun tinkering with it, but got this weird bug...

I've got a bit of a scuffed loop set up to select a word for each letter input by the user. However, the output of filterList() isn't happy with my using selectOne on it, producing an extra two undefineds for some strange reason. I don't know if it's maybe related to the way I'm filtering the list or some other bug? Anyone know why this is happening/a better way to do it?

Thanks for all y'all's help!

4

Transferring comments admin login and notification settings data into a different browser

So I just decided to move to Firefox for the updating and managing generators stuff personally (although I might still use Edge for testing stuff) to further minimize the connection-stalling problem from happening ever again, and so I've been wondering if it's possible to move the admin login data (basically a list of generators that I just logged into admin on) and the notifications data (a list of generators and keywords I've listened to comment notifications from) into a different browser, just like importing browser data, in some ways? I want to keep things synced between two browsers and thinking of this for a while now.

I do have tried a few things such as transferring the localStorage of the comments-plugin.perchance.org (the central domain of Perchance comments plugin), and even also tried to transfer some of the cookies, and both didn't work well.

0

How to check if generator name exists

Hello y'all,

Does anyone know how to check if a perchance generator name exists on perchance?

Context:

I've added a feature to allow users to load their own datasets into the fusion-gen. The code is above, but the feature itself looks like this:

!

I'd like to be able to check if the string matches a generator that exists on perchance. Does anyone know the name of that function?

2

Two-tier selection with dynamic imports

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 :) !

2

Hierarchical Consumable list?

I've been reading up on hierarchical lists in the tutorials and the reddit pages, but I'm having problems understanding and implementing the way I'd like.

I'm working on this generator (I may turn it into a plug-in).

What I'd like to do is have a consumable list of the regions, then output a random state corresponding to that region. I've got it working correctly for a single region/state output, but I'm having trouble with the state output for the consumable list items.

Also, I used a tutorial example for the output so it currently says: "The Plains region contains Missouri" - which is correct.

I'd rather it said: "Missouri is in The Plains region" .. but I couldn't figure out how to format the output since the state is a sub item of the region, so I can't swap the output in the HTML

Any help/tips would be appreciated!

5

T2i Styles tech question...

I'm working on a new generator, and I want to experiment with the T2i Styles plugin. I do NOT want to use the T2i framework, because I don't really need it and I want to have a little more control over the output.

In the styles plug-in code, there is a link to the Styles tester: https://perchance.org/prompt-style-tester#edit

This is exactly what I'm looking for. HOWEVER: The tester doesn't work as-is. =/

Ex: Choosing a different style from the dropdown does nothing either onChange or Select > Go - it always loads the first Style in the dropdown (Painted Anime).

In the framework plugin, there IS a "remember" variable that gets set when a style is chosen... but that isn't an option on the tester? Can this be implemented easily without having to use the "Remember" plugin?

@[email protected]

@[email protected]

Thanx for any tips!

4

Perchance Text-To-Image Ad Blocker

So I'm using the most current version of firefox (desktop) and have went round and round with this. Still get the error "TL;DR: Try turning off your ad blocker." Even though I have been to many sites and followed their step. Disabled tracking feature (little shield top left corner) and made sure java was allowed. Could sure use help.

5

dynamic-import for large datasets occasionally reads values as 'undefined'

Hello , To experiment with the wonderful brand new dynamic-import-plugin I decided to try implementing this new feature on my generator for 164K first names of people , which you can find here .

The source of the names can be found here : https://github.com/Debdut/names.io

My goal here was to find a "good general solution" with the dynamic-import-plugin that I can implement for more important generators with larger datasets in the future.

The dynamic-import-plugin great improvement ; I can get access to the full list of names without long loading times. But I also have some new problems.

Question 1 (main issue)

I have this issue where the the imported values will occasionally read as 'undefined' when I import stuff. You can see it in the image above.

Here is what the sub-generator fusion-t2i-names-12 looks like :

!

What are the recommendations to solving this?

EDIT: Many names in this dataset contain non-standard letters , e.g different from A-Z. I am starting to suspect that might be the issue. In which case , should I just put [String("...")] over every name with non-standard letters or is there a better way?

Question 2 (secondary)

TLDR : "Am I coding this correctly?"

When I request 100 values at once from a loaded generator I initially get the "freeze" mentioned in the Dynamic Import Plugin Guide.

I'd like for an entire 10K dataset to be loaded when the generator opens . How do I do this?

Reading the code , my interpretation is that I am already doing this.

But it feels like I'm missing something here since I still get a significant "freeze" when requesting items after startup, hence the question.

Question 3 (non-essential)

In the fusion-t2i-names-12 I have this textfields where a user can press a button and get some some values for the dataset.

It would be nice to be able to display these values fusion-t2i-names-12 but I have no idea how to do this since the "_data" is placed in the $output field.

I don't want to copy paste _data as that would mean my 10K sub-set of words is now a 20K subset of words.

I assume that would impact the "main generator" if I did this and cause even more loading times.

But I'm not sure. I'm fine with copy-pasting as long as it won't affect the main generator. What should I do here?

4

function code not working?

i'm trying to make a function that creates a multi-level list. i've got function code that makes a single-level list, and that works fine, but my attempted extrapolation of that code to make a two-level list isn't working. could anyone tell me what i've done wrong and how to fix it? thank you in advance! &lt;3

4

adding roll buttons to 5e statblock generator?

i'm looking to make a generator to store ttrpg stat blocks, and use buttons to roll ability checks, saving throws, etc. the 5e stat block generator template with the drop-down menu seems like a good starting point, but since the cards are generated on the fly rather than being static in the html, i don't know how or where i'd put the code together to add buttons with little output fields below them for the rolls to go. thank you in advance for helping! i'm very grateful for the help i've received so far and for any i receive in the future! &lt;3

4

with my new generator, variables will not fully reset consistently upon pressing default "randomize" button

I need help debugging my Warhammer 40k generator. My generator works the first time, always, but then after a few clicks of randomize, it slowly breaks down and it suddenly will only generate one feature for each of the categories of Inner Cauldron, Primary Biosphere, and Outer Reaches. The chances of all getting only 1 result each are over multiple generations is nil. So I know that a variable somewhere is being overridden and stored upon a new press of the randomize button. I cant find where the issue is. The only thing that works is to refresh the page cause it always works the first time, just not on a soft reset. Please help.

You will need to press randomize a good 2 to 10 times if not more to really see the issue.

2

Need help fixing an error

Hi,

I have some background in coding (very rusty tho), and I'm trying to create a generator (my first on perchance). I got an error and while I understand why the error is happening, I don't know how to fix and keep everything like I want it.

My (poor attempt at a) generator: https://perchance.org/first-generator-try

I combined a few templates/examples to get the things I want, but of course they don't straight up work together. These are the ones I combined together: https://perchance.org/centered-minimal#edit https://perchance.org/simple-checkbox-example#edit https://perchance.org/importable-color-palette

The error(s):

An error has occurred near line number 8: Your odds declaration: "[animalBox.checked] ^[plantBox.checked]", evaluated to: "true ^true" which contains characters that aren't allowed in odds declarations. The text after the "^" character defines the chance that that item will be selected (the higher the number the greater the chance). Odds declarations should only contain numbers, mathematical/logical operators, and are also allowed to have curly and square bracket blocks which will evaluate to number characters (these will be computed on-the-fly). If you'd like to use the "^" character literally (i.e. not to declare odds), you need to put a backslash character before it like so: "\^"

and

An error has occurred near line number 8: The '^' character is used to specify how likely an item is of being chosen during a random selection. This line appears to have a '^' character, but the text after that character ([animalBox.checked] ^[plantBox.checked]) isn't a number, or didn't evaluate to a number. You're allowed to use square and curly bracket expressions to randomly/dynamically determine the odds, but these expressions must evaluate to a number. In this case your odds expression didn't result in a number.

Please help if you can and thank you in advance if you try to!

1