installation
step 1 install LALib extension
- in SillyTavern open
Extensions - in the top-right select
Install Extension

- put a link in the text field
- click
Install For All Users

- ...wait
- after installation - reload the tab
Q. what is LALib extension?
A. extension that enhances scripting in SillyTavern. by adding many new scripts: text-manipulation, JSON parsing, fetch/get data from other sites and so more
step 2 give ST permission to read derpibooru
- open ANY chat with ANY character
- send the following text to a character
- click on the
Allow Connection to derpibooru.orgbutton below

- go to SillyTavern's settings and DISABLE
Forbid External Media

step 3 install script
- open
ExtensionsthenQuick Reply

- scroll down to the
Edit Quick Repliessection, and click on buttonCreate New Quick Reply Setbutton ( + icon), provide any name you want (i.e. lovemaking)

- next to it select created Set
from dropdown

- scroll up to
Global Quick Reply Sets, click on+ signnext to it, select created Set and optionallydisable buttons

- download this file (backup at the end of guide)
- scroll down to
Import Quick Reply From Fileat the VERY BOTTOM, import the file you downloaded

- you will see a huge script in the window above

- finally
ENABLE Quick Replies(at the top)

Q. does it mean this script always work for ALL cards?
A. no, only for the 4chan card. the script checks if the current bot name is4onechanand activates only on a match.
step 4. card
- download/import 4onechan card
- ST will inform you that bot has
embedded regex. click YES to allow them

- open the card and check out the greeting. if you see a random image in 2nd post then everything works

- try to create a new chat - image should change

- if image ain't shown then:
a) try opening a new chat again. maybe image is private or has forbidden tags? see below
b) check you disabled Forbid External Media in settings
c) check you ENABLED Quick Replies
step 5 enable regex
- scoped regex might be disabled by default. you need to enable them
- open
ExtensionsthenRegex - down below look for
Scoped Scripts. they must be ON

extras:
- formatting breaks at higher temperatures
- models with small brains like Gemini Flash may get confused easily. try using mid/big models
- model/script checks your last message. if it contains
OOCthen it will treated as instruction/command. if it does not containOOCthen your last message will be converted into proper post. persona's name goes as namefagging. see the images below as examples of interaction



- one more time - script takes your persona's name as your namefag. you can name your persona "princess Luna" and LARP as her. posters will react accordingly, then rename your persona to "the only human in Equestria" and ponies will react differently. samefagging ftw
- script and model are trying their best to give proper (You) to your messages, and apply proper design when ponies quote you but system ain't perfect
- correct colors for greentext and tags are not guaranteed, newlines either. but I have tried
- model has NO idea what image it picks. in fact it picks nothing - ST just rolls with a random number and model copy-pastes it. so anticipate picrel will NOT be related to anything poster posts. at all. but when stars align perfectly, it is cute

-
open the script and check the first line:
these are banned tags. if model/ST picks an image that includes at least one of these tags - then image will not be shown for you, you don't want to be spooked by a random image of a dead pony do you? adapt that list according to your preferences
- some images are set to private by the uploader or moderators (for example DNP lists). in this case image will not be shown either
- tags are clickable and will take you to quoted post BUT read below

clickable tags STOP working correctly and instead open tag in NEW TAB if you EDIT a message
the reason lies in ST's retarded code: it sanitizes link attribute and forcefully sets target=\_blank to all chat links even if unaccounted for
script can fix it and change target=\_blank to target=\_self but ONLY at the end of model's generation. you cannot fire script at message edit sadly.
you can fix this issue manually tho! after editing your messages, send the following command into chat:
it will fix broken tags.
sorry anons but I have no other ideas how to fix it