this post was submitted on 18 Jun 2024
2 points (100.0% liked)

Perchance - Create a Random Text Generator

434 readers
11 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
 

`output Gender[gen = gender]Motif[m = motif.selectUnique (1,3).joinItems (",")]Rarity[ra = rarity.selectOne]Vibe(s)[if (ra == "UR") {[el = element.selectUnique (1,3).joinItems (",")]} else if (ra == "SSR") {[el = element.selectUnique (1,2).joinItems (",")]} else if (ra == "SR") {[el = element.selectUnique (1,2).joinItems (",")]} else {[el = element]}]Role[r = role.selectUnique (1,3)]gimmick[If (ra == "UR") {[g = gimmick.selectUnique (1,3).joinItems (",")]} else if (ra == "SSR" || ra == "SR") {[g = gimmick.selectUnique (1,2).joinItems (",")]} else {[g = gimmick.selectOne]|none}]ablitiespassive:[If (ra == "UR") {[p = passive.selectUnique (1,3).joinItems (",")]} else if (ra == "SSR" || ra == "SR") {[p = passive.selectUnique (1,2).joinItems (",")]} else {[p = passive.selectOne]|none}]main: [rang = range.selectOne] [attack]secondary: [rang = range.selectOne] [attack]showcase: {[rang = range.selectOne] [a = attack.selectOne]|[srang = showrange.selectOne] [sata = showattack.selectOne]}

motif Animal ({cat|dog|bear|bunny|horse|tiger|lion|leopard|other}) Flower Fungi Sea animal Circus Victorian Sci-fi Cyberpunk Fantasy Fairy tale Dreamy Abstract Artistic East asian({japanse|korean|chinese}) Mythological Art deco Bohemian Gothic Retro Retro Futurism Steampunk Baroque Minimalist Art Nouveau Surrealist Rococo Punk Tropical Military Western Harajuku Hallyu Hanfu Lolita Biker Popstar Cowboy Country Hip hop Ethnic African Witch Wizard Angelic Demonic insect ({butterfly|moth|beetle|bee|wasp|other}) Arancnid ({spider|scorpion|other})

element Cool Hot Flashy Cute Fresh Elegant Gorgeous ^[if (ra == "UR" || ra == "SSR") {10} else {1}] Edgy ^[if (ra == "UR" || ra == "SSR") {10} else {1}] Pure ^[if (ra == "UR" || ra == "SSR") {10} else {1}]

gender Male ^3 Female ^4 Nonbinary({Androgynous|Fem|Masc}) ^0.5

rarity UR ✦✦✦✦✦✦✦ ^0.5 SSR ✦✦✦✦✦✦ ^2 SR ✦✦✦✦✦ ^4 R ✦✦✦✦ ^6

role Support Tank DPS Healer

gimmick Self-healing Self-enhancer Stance Summoning Combo system Charge Debuffer ^[if (r == "Support") {10} else {1}] Buffer ^[if (r == "Support") {10} else {1}] Turn manipulation ^0.5 Ultimate State cast from hp

range AoE Splash Chain Single Multi Self ^[if (g == "Self-healing"||g == "Self-enhancer") {10} else {0}]

attack Heal ^[if (r == "Healer"||r == "Support") {10} else if (g == "Self-healing") {10} else {1}] Attack Debuff ^[if (g == "Debuffer") {10} else {1}] Buff ^[if (g == "Buffer") {10} else {1}] attack that heals attack that buffs ^[if (g == "Buffer") {10} else {1}] attack that debuffs ^[if (g == "Debuffer") {10} else {1}] heal that debuffs enemmy ^[if (r == "Healer"||r == "Support") {10} else if (g == "Debuffer") {10} else {1}] heal that buffs allies ^[if (r == "Healer"||r == "Support") {10} else if (g == "Buffer") {10} else {1}]

showrange Strong Aoe Strong chain Strong single Strong multi Strong self Strong splash

showattack Stance change {turn order change then [a = attack.selectUnique (1,3).joinItems (", ")]|turn order change} ^[if (g == "Turn manipulation") {10} else {0}] Domain creation Buff ^[if (g == "Buffer") {10} else {1}] Debuff ^[if (g == "Debuffer") {10} else {1}] Ultimate state ^[if (g == "Ultimate State") {10} else {1}] Attack

passive Increases damage depending on condition self-heals depending on condition ^[if (g == "Self-healing") {10} else {0}] does a counter depending on condition can change turn order depending on condition abilities change depending on stance has stacks which do certain things and stack up depending on condition during certain things charges {main skill|basic attack|second skill|showcase} Taking large damage boosts turn order Increases evasion after each successful hits skills have a chance to not consume flow skills can overcharge dealing area damage share a portion of healing received with the nearest ally ^[if (r == "healer") {10} else {0}] attacks of a chance to stun the target `

So here's my code. Says there's an issue with the syntax where '{' ruins the input. Would love if somebody took a look and find the problem curly because otherwise I'm beat.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 4 months ago (3 children)

ey, so I finally fixed that but now the outputs for gimmick and passive are showing as 0s. Is there a fix for that?

[–] BluePower 3 points 4 months ago (2 children)

Okay, so first you add the quotes between these curly brackets wrapped syntaxes (and remove the quotes around the none part) so they'll be evaluated properly:

And then change the rarity picking mechanism (evaluateItem first, create a matchable version, and then display the evaluated version instead of just selectOne and then display) so it'll be matched properly when picking a gimmick and an ability, to this:

[ra1 = rarity.evaluateItem, ra = ra1.match(/[A-Z]+/g)[0], ra1]

[–] [email protected] 1 points 4 months ago (1 children)

[ra1 = rarity.evaluateItem, ra = ra1.match(/[A-Z]+/g)[0], ra1]

it worked thank you ^^

[–] [email protected] 1 points 4 months ago