Added the ability to add and remove character slots.
BadGrampy Advanced Story Writer User's Guide 20261129
https://perchance.org/badgrampy-advanced-story-writer
This guide covers BG ASW UI revision 202611290001.
This guide follows the generator from top to bottom, reading controls from
left to right within each row.
Most text fields and settings are saved automatically in the browser’s
local storage. Reloading the page normally restores the previous working
session. Downloaded files provide separate backups that can be moved
between browsers or devices.
- SAVE / LOAD (ALL)
This first card contains the generator’s general file-management and
display controls.
SAVE ALL
Save All downloads a JSON file containing the complete writing project. It
includes the story filename, the complete profile layout, each slot's text
and active state, and the next profile number, World/Lore and its state,
Current Story, Current Chapter, Persistent Writing Instructions, What
Should Happen Next, Line-by-Line Scenario, and Reject Phrases.
A File Name must be entered before using Save All. The downloaded filename
ends with “ALL.json.”
The browser stores interface preferences such as Night Mode, Wide Mode,
Auto-Scroll, paragraph count, automatic repeat length, and manual scanner
settings separately.
LOAD ALL
Load All opens a previously created Save All JSON file. The generator
validates the file and asks for confirmation before replacing the current
project. The saved layout restores empty slots and preserves gaps in
numbering. Loading an older four-slot Save All file restores Profiles 1–4,
removes any extra slots in the current project, and makes Profile 5 the
next addition.
Updated BG ASW and BG ACW can open each other's Save All files.
SAVE STORY
Save Story downloads only The Current Story as a plain text file.
If The Current Chapter contains text, a dialog offers three choices.
Cancel stops the save. Save Story Now saves without including the Current
Chapter. Keep Then Save first moves the Current Chapter into The Current
Story and then saves it.
The File Name field supplies the downloaded filename.
LOAD STORY
Load Story loads a story from a plain text file or a compatible story-only
file.
The generator asks for confirmation before replacing The Current Story.
Loading a plain text file also places its filename, without the extension,
into the File Name field.
NIGHT MODE
Night Mode switches the generator between its light and dark color
schemes.
The button displays either “Night Mode: OFF” or “Night Mode: ON.” The
selected mode is remembered in browser storage.
WIDE MODE
Wide Mode allows the generator to use more horizontal space on a desktop
monitor while preserving the established phone and tablet layout.
The Wide Mode button appears only when the browser window is at least
1,200 pixels wide. It is hidden on narrower screens and occupies no space
in the mobile layout.
Wide Mode is OFF by default. When OFF, the generator retains its original
centered width of approximately 860 pixels. When ON, the entire generator
expands together to use the available browser width, up to a maximum of
1,600 pixels.
The button displays either “Wide Mode: OFF” or “Wide Mode: ON.” The
selected mode is remembered in browser storage.
If Wide Mode was enabled on a desktop and the generator is later opened on
a narrow screen, the mobile layout remains unchanged. The saved Wide Mode
setting takes effect again when the browser is wide enough.
CLEAR ALL FIELDS
Clear All Fields empties every textarea on the page. This includes
profiles, lore, story text, chapter text, instructions, scenarios, and
reject phrases.
The profile layout, toggle states, and numeric settings are retained. Use
Save All first if you want a backup of the text.
FILE NAME
The File Name field supplies the base filename used by Save All, Save
Story, and optionally Save Instructions and Save LbLS.
Enter a short story or project name without a file extension.
2. CHARACTER PROFILES
WRITE A PROFILE
Profiles 1–4 are always available. Use one editor for a character or
group. Give the AI details it can apply in a scene, such as a character's
goals, relationships, speaking habits, and facts that need to stay
consistent. A profile can be as simple as this:
Name: Mara Vale
Goal: Find the missing letter before the last train leaves.
Voice: Asks short questions and rarely explains her motives.
Continuity: Daniel knows she has the key but has never seen it.
ADD AND REMOVE SLOTS
Click Add Profile Slot to create a blank, inactive editor. The first added
slot in a fresh project is Profile 5. To delete an added slot, click
Remove Profile N. ASW asks for confirmation if the slot contains text or
is active. Cancel keeps the slot and its contents.
Removing a profile excludes it from future prompts and saves. Any prose or
dialogue already in Current Story or Current Chapter stays in place. Slot
numbers stay stable. If you add Profiles 5 and 6 and then remove 5,
Profile 6 keeps its number and the next addition is Profile 7.
Add, Remove, and Load All are disabled during generation and throughout an
LbLS Auto Run.
CHOOSE WHICH PROFILES THE AI USES
Set a profile to Active to include its text in the AI prompt. Set it to
Inactive to keep the text available for later. Each toggle operates
independently, so several characters can be active in the same scene.
For example, activate Mara and Daniel, type “Mara asks Daniel who took the
letter” into What Should Happen Next, then click One Paragraph. Use Prompt
Size to see how active profiles affect the size of the request. If a
character leaves the scene, switch their profile to Inactive.
SAVE OR REUSE A PROFILE
Save Profile N downloads that editor's text as a plain TXT file, such as
“BG ASW Profile YYYYMMDDHHmm.txt”. Load Profile N replaces the text in
whichever slot you choose. The slot keeps its current Active or Inactive
setting.
ASW remembers the profile layout, texts, and switches in the current
browser. Use Save All to back up the whole project, including empty slots
and the next slot number, or to move it to another browser.
3. WORLD / LORE
The World / Lore card stores shared information about the setting.
WORLD / LORE TEXT AREA
This field can contain locations, historical background, technology or
magic rules, factions, organizations, social customs, tone, genre
restrictions, setting continuity, and facts the AI must preserve.
ACTIVE / INACTIVE
The toggle controls whether World / Lore is included in AI prompts.
ACTIVE means the lore is included. INACTIVE means it remains stored but is
excluded.
SAVE LORE
Save Lore downloads the World / Lore text as a timestamped plain text
file.
LOAD LORE
Load Lore loads a plain text file into the World / Lore textarea and
replaces its current contents.
Loading lore does not automatically activate it.
4. THE CURRENT STORY
The Current Story is the long-term record of accepted story text.
CURRENT STORY TEXT AREA
This textarea contains completed material that has been kept from the
working chapter.
The generator includes this story history in prompts so the AI can
continue from established events. The Keep button in The Current Chapter
card transfers working text into this field.
PROMPT TRIMMING
The generator has a 35,000-character prompt limit.
If the complete prompt is too large, the generator may omit text from the
beginning of The Current Story when constructing the AI prompt. This
affects only the temporary prompt sent to the AI. It never deletes or
changes text in the textarea.
If the prompt remains too large even after removing all Current Story
text, generation is prevented until profiles, lore, instructions, or other
prompt material are reduced.
PROMPT SIZE PANEL
The Prompt Size panel displays the approximate size of the assembled
prompt.
It reports whether the beginning of Current Story will be trimmed, whether
the prompt is too large to generate, whether generation is in progress,
and whether regeneration or another operation has completed.
The status log records recent scanner, generation, and other operational
messages.
When the generator enters its yellow post-action state, it plays a short
completion sound. This allows generation to run in the background while
providing an audible indication that the operation has finished.
5. THE CURRENT CHAPTER
The Current Chapter is the active writing workspace. AI output is streamed
and appended here.
It remains separate from The Current Story until Keep is pressed.
CURRENT CHAPTER TEXT AREA
This textarea contains the current working chapter or scene.
You can read and edit generated text, add your own prose, remove unwanted
material, continue incomplete text, regenerate recent output, and transfer
finished work into Current Story.
While generation is running, the chapter is temporarily read-only.
Pressing the Tab key while the cursor is in this textarea activates
Continue.
PARAGRAPHS SELECTOR
The Paragraphs selector controls how many paragraphs the Paragraphs button
generates.
The available range is 1 through 100. The selection is remembered in
browser storage.
ADD TO REJECTS
Add to Rejects copies text selected in The Current Chapter and appends it
to the bottom of Reject Phrases as a new line. The selected chapter text
remains unchanged.
If the selection spans multiple lines, its whitespace is combined so that
it becomes one Reject Phrases entry.
If no text is selected, nothing is added and a warning appears in the
Prompt Size status log.
On narrower screens, the button may display the shorter label “+ Rejects.”
It performs the same action.
AUTO-SCROLL
Auto-Scroll controls whether the chapter view follows incoming streamed
text.
When Auto-Scroll is ON, the textarea remains positioned at the newest
output. When it is OFF, you can read earlier text without being pulled
back to the bottom.
PARAGRAPHS
The Paragraphs button generates the selected number of paragraphs.
Multi-paragraph generation is performed as a sequence. Each completed
piece passes through the rejection and repeated-wording checks before the
next piece begins.
ONE PARAGRAPH
One Paragraph generates one paragraph containing approximately three to
nine sentences. Middle-length paragraphs are favored.
The new paragraph is appended to The Current Chapter.
STOP
Stop immediately ends an active generation.
Partial output remains in The Current Chapter. Stopped output does not
undergo the normal reject-phrase or automatic-repeat checks.
CONTINUE
Continue writes directly from the end of The Current Chapter without
forcing a new paragraph.
If the final sentence is incomplete, Continue attempts to finish it inline
rather than beginning a new sentence. It also removes accidental overlap
between the chapter ending and the generated continuation.
REGEN LAST
Regen Last removes AI-generated text added since the current checkpoint
and generates a replacement.
The checkpoint represents The Current Chapter’s state immediately before
the relevant generation cycle began.
DELETE LAST
Delete Last removes the final paragraph from The Current Chapter. It does
not generate replacement text.
KEEP
Keep moves all Current Chapter text into The Current Story.
If Current Story already contains text, a blank line is inserted between
the existing story and the kept chapter. The Current Chapter is then
cleared, and the regeneration checkpoint is reset.
6. PERSISTENT WRITING INSTRUCTIONS
This section tells the AI how to write. Its contents are included in every
generation prompt.
PERSISTENT WRITING INSTRUCTIONS TEXT AREA
Use this field for continuing stylistic and structural rules.
Instructions are easiest to maintain when related rules are placed under
short headings and each line contains one clear direction.
An example instruction set might begin with a STYLE heading followed by
instructions to use straightforward language, focus each paragraph on one
action or idea, and show emotions through behavior and dialogue.
A DIALOGUE heading might contain instructions to keep dialogue concise and
give each speaker a distinct voice.
A PACING heading might instruct the AI to slow down important emotional
moments and avoid summarizing major events.
DETECTED REPEAT PHRASE LENGTH
Set the minimum and maximum number of consecutive words to check for
repeats after generation. Both settings accept 3–9 words. The defaults are
Min 4 and Max 5.
A phrase of N words is checked against up to N preceding paragraphs, using
Current Chapter and, when needed, the end of Current Story. If ASW detects
a repeat, it can retry the generated text from the checkpoint. Your
Persistent Writing Instructions stay as entered. The automatic check is
separate from the manual Scan Repeats tool.
SAVE INSTRUCTIONS
Save Instructions downloads the complete Persistent Writing Instructions
textarea as a timestamped plain text file.
LOAD INSTRUCTIONS
Load Instructions loads a plain text instructions file and replaces the
current textarea contents after confirmation.
USE STORY NAME IN SAVED FILENAME
When this checkbox is selected, Save Instructions includes the File Name
value in the downloaded instructions filename.
If the checkbox is selected while File Name is empty, the generator asks
for a story name instead of saving.
When the checkbox is not selected, a generic Persistent Writing
Instructions filename is used.
7. WHAT SHOULD HAPPEN NEXT
What Should Happen Next provides immediate direction for the next
generation.
WHAT SHOULD HAPPEN NEXT TEXT AREA
Enter the event, action, scene goal, or narrative instruction the AI
should follow next.
For example, the instruction might say that Mara confronts Daniel about
the missing letter. It could instead tell the AI to continue a
conversation without revealing who opened the door.
Persistent Writing Instructions control how the prose is written. What
Should Happen Next controls what should happen now.
AUTO RUN WITH LBLS
Auto Run with LbLS automatically processes the Line-by-Line Scenario.
Before Auto Run begins, a dialog warns that scenario lines will be
consumed during execution. The dialog includes a selected-by-default
option to save the complete scenario before starting.
The same dialog asks what Auto Run should do if the prompt becomes too
large. Stop and preserve the remaining scenario is selected by default and
marked as recommended. The alternative is to automatically Keep the
Current Chapter and continue.
Start Auto Run accepts the selected options and begins processing. Cancel
closes the dialog without saving, generating, or consuming scenario lines.
When started, Auto Run sets the paragraph selector to 2. It copies the
next scenario line into What Should Happen Next and counts the words in
that instruction.
If the instruction contains 100 words or fewer, it generates one
paragraph. If it contains more than 100 words, it generates two
paragraphs.
Auto Run waits for generation and all rejection checks to finish before
moving to the next scenario line. A line remains in Line-by-Line Scenario
while its output is being generated and is removed only after all required
output for that line finishes successfully.
If Stop and preserve is selected, reaching the 35,000-character limit ends
Auto Run without removing the current scenario line or any lines below it.
If Automatically Keep is selected, Auto Run moves Current Chapter into
Current Story when necessary, clears Current Chapter using the normal Keep
behavior, and retries the same scenario instruction. Because Current Story
can be trimmed when constructing the AI prompt, this normally allows
processing to continue without deleting story text from the interface.
If Automatically Keep cannot reduce the prompt sufficiently, Auto Run
stops and preserves the current and remaining scenario lines.
Generation failures, pressing Stop, or changes to the scenario during
generation also stop Auto Run without consuming additional lines. Auto Run
finishes normally when no non-empty scenario lines remain.
DELETE
Delete clears What Should Happen Next without affecting the other fields.
NEXT LINE
Next Line finds the first non-empty line in Line-by-Line Scenario, removes
it from that field, and places it into What Should Happen Next.
It replaces the previous What Should Happen Next text. It does not start
generation by itself.
8. LINE-BY-LINE SCENARIO
This card contains a queue of planned story instructions.
LINE-BY-LINE SCENARIO TEXT AREA
Enter one instruction per line. Blank lines are ignored.
A scenario might state that the travelers reach an abandoned station,
discover that someone recently used the radio, and then hear a voice Mara
recognizes. Each of those instructions would appear on its own line.
Next Line consumes the first non-empty line. Auto Run with LbLS can
process the entire list automatically.
SAVE LBLS
Save LbLS downloads the complete Line-by-Line Scenario as a timestamped
plain text file.
USE STORY NAME IN SAVED FILENAME
When this checkbox is selected, Save LbLS includes the File Name value in
the downloaded scenario filename.
If the checkbox is selected while File Name is empty, the generator asks
for a story name instead of saving.
When the checkbox is not selected, a generic Line-by-Line Scenario
filename is used.
LOAD LBLS
Load LbLS loads a plain text scenario file after asking for confirmation.
The loaded file replaces the current Line-by-Line Scenario.
9. REJECT PHRASES
The Reject Phrases card maintains wording that must not appear in newly
generated text. It also contains the manual repeated-phrase scanner.
REJECT PHRASES TEXT AREA
Enter one rejected phrase per line without quotation marks.
The check is case-insensitive and is performed after normal generation
completes. Only text generated since the current checkpoint is examined.
If a listed phrase is found, the new AI text is removed, the chapter is
restored to its checkpoint, the same operation is regenerated, and the
replacement is checked again.
Automatic rejected-phrase and repeated-wording retries share a limit of 10
attempts. If the limit is exceeded, regeneration stops and the last
generated attempt remains visible in The Current Chapter. The status area
reports that the retry limit was reached so the text can be reviewed or
edited manually.
SCAN REPEATS SETTINGS
These settings control the manual scanner. The automatic repeat check uses
its own phrase-length settings.
OCCURRENCES MIN
Occurrences Min sets the fewest times a phrase must appear before it is
reported.
The allowed range is 2 through 99. The default is 3.
OCCURRENCES MAX
Occurrences Max sets the greatest number of appearances that may be
reported.
The allowed range is 0 through 99. The default is 0.
A value of 0 means there is no maximum. If a nonzero maximum is lower than
the minimum, the generator raises it to match the minimum.
PHRASE LENGTH MIN
Phrase Length Min sets the fewest consecutive words in a scanned phrase.
The allowed range is 1 through 9. The default is 2.
PHRASE LENGTH MAX
Phrase Length Max sets the greatest number of consecutive words in a
scanned phrase.
The allowed range is 1 through 9. The default is 4.
If the maximum is lower than the minimum, the generator raises it to match
the minimum.
All four scanner settings are remembered in browser storage.
SCAN REPEATS
Scan Repeats searches the combined Current Story and Current Chapter using
the selected occurrence and phrase-length ranges.
The scanner matches without regard to capitalization and normalizes edge
punctuation for matching.
It filters common structural single words, filters many unhelpful
function-word combinations, and excludes multiword candidates that cross
punctuation boundaries.
The scanner saves up to three original-text examples for every result.
Results are shown in order of phrase length, with the longest phrases
first. Results of the same length are ordered from highest occurrence
count to lowest. Alphabetical order is used when both length and count are
tied.
SCAN REPEATS REVIEW DIALOG
The review dialog displays the repeated phrase, the number of times it was
found, its position in the review queue, and up to three examples in their
original context.
APPEND
Append adds the displayed phrase as a new line in Reject Phrases.
If the phrase is already present, it is not added again. The dialog then
advances to the next result.
SKIP
Skip leaves the displayed phrase out of Reject Phrases and advances to the
next result.
CLOSE
Close ends the current review and closes the dialog. Remaining results are
not added.
SAVE REJECT PHRASES
Save Reject Phrases downloads the Reject Phrases list as a timestamped
JSON file.
LOAD REJECT PHRASES
Load Reject Phrases loads a Reject Phrases JSON file or plain text file.
The generator asks for confirmation before replacing the current list. It
rejects incompatible JSON file types.
10. CONFIRMATION DIALOGS AND STATUS MESSAGES
The generator uses in-page confirmation dialogs for load operations that
replace work.
Depending on the action, a dialog may offer Continue, Cancel, or a
specialized third option such as Keep Then Save.
Some supported warnings include a “Don’t warn again” option for the
remainder of the browser session.
Short success, error, and completion messages appear temporarily on the
page. More persistent operational information is recorded in the Prompt
Size status area.