this post was submitted on 18 Dec 2023
1 points (100.0% liked)

Perchance - Create a Random Text Generator

0 readers
1 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 :)

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.

Have fun generating! ⚄︎

founded 1 year ago
MODERATORS
 

This is reported by Lamatiel on Discord.

Using the external lore file (lore book) doesn't properly get saved/used. The manual lore input works just fine.

Here are some fixes that I made in this copy of the page

  • Line 7777 @ HTML Panel - m.text to m.text.split('\n').join('\n\n') to have proper empty lines per lore entry on the textarea display.
  • Line 7783 @ HTML Panel - e.text to e.text.split('\n').join('\n\n'), same reason as above, so even without reloading the URLs the formatting would be good.
  • Added let newLoreBookEntries = result.loreBookUrlEntriesText.replace(/\r/g, "").split(/\n{2,}/).map(e => e.trim()).filter(e => e); after Line 7790 @ HTML Panel to parse the lore from the lorebook URL files.
  • Added newLoreEntries = newLoreEntries.concat(newLoreBookEntries) to combine the lore from manual entry and lorebook URL entries, added after the previous line.
  • Line 7816 @ HTML Panel - originalLoreEntriesText !== result.loreEntriesText to originalLoreEntriesText !== newLoreEntries.join("\n\n"), this would compare the new lore entries to the original one better since the old comparison only compares the manual lore entries.

Some notes:

  • Upon saving the character after writing the lorebook URLs on the Character Edit, the lore doesn't apply immediately. We need to go to /lore, show the character specific lore, then reload the URLs, then save, for the lorebook URLs to apply.
  • Removing the lorebook URLs doesn't remove the lore from that URL from the current lore list, we need to manually remove it.
no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here