NOTE: THIS REPO WILL NO LONGER MAINTAIN SC2. ALL FUTURE WORK ON SC2 HAS MOVED TO SHEL'S REPO HERE.
-
Keep the AI on track of your story automatically
-
Create, edit, and format world info entries all without leaving the input field
-
Define relationships, change scenes, build factions or entire worlds
-
Track which and where entries show up in the context
-
Easily place notes or entry data anywhere in the context
-
Compatible with any popular format and optionally converts entries on injection
-
Customize everything from the user interface to scene breaks and paragraph spacing
-
Designed from the ground up to be flexible and user-friendly
-
Custom titles, automatic pronoun matching, character point of view swapping, and much more!
More info at the official discord here.
Want to jump right in?
You can play a Harry Potter themed example world info with everything already setup here.
Commands for tweaking functionality of the script itself and its graphical display.
/config
toggles display of the configuration menu (enable/disable signposts, paragraph spacing etc)./debug
toggles debugging mode which outputs modified context to a menu above the input field./enable
allows script to modify context (default)./disable
disables context modification and hides the menus./show
makes the menus visible (default)./hide
hides the menus./min
minimizes the menus./max
maximizes the menus.
Commands for moving through the graphical display menus.
!
exits any menu. If changes were made, ay/n
prompt will appear to confirm saving of changes made.>
and<
moves the current selection forward (down) or back (up) the list of menu options.>>
and<<
moves the current selection to the next or previous menu page.#0
will move the current selection to the label option, or first (top) of the list of menu options.
Entering any number except 0 will move the current selection to the nth option in the list counting from the top.
Commands for creating and tweaking of context-related content, with examples. Each has a graphical menu to guide you through the process.
/e
or/entry John
creates or loads the world info entry with the label "John"./r
or/rel John
opens the relationship menu for "John"./t
or/title ex wife
creates or loads the title with the label "ex wife"./f
or/find Mary
searches and displays all scenes, entries and titles with the label "Mary"./b
or/ban John, Mary
prevents the entries "John" and "Mary" from being injected into context./b
or/ban
with no entries specified will clear all previous bans./k
or/kill John
updates entry "John" and sets their status to dead./revive Mary
updates entry "Mary" and sets their status to alive.
Commands for loading different scenes and switching control over the player character, with examples.
/y
or/you John
switches the user POV and control to the character "John" (only use with 2nd person perspective)./s
or/scene Chapter 1
opens the scene creation/editing menu for the scene with the label "Chapter 1"./l
or/load Chapter 1
loads the scene and executes any text to prompt as per configuration in the scene menu./n
or/notes
will display all currently active custom notes (see next).+π#500: You think this will be an easy victory
creates/updates a custom note labeledπ
and injected before 500 characters into the context.
Commands tailored towards power users, with examples.
/flush
will clear state.displayStats in the rare case that it bugs out.@
,#
,$
,%
, or^
are quick entry creation symbols that correspond with each entry type. Left to right, they areCharacter
,Location
,Thing
,Faction
, andOther
.#Hogwarts: is a school for wizards: is a large castle: is a place of great mystery
creates the location entry with the label "Hogwarts" and fills in each of the entry's fields with the corresponding information, separated by:
s.#Hogwarts+2: with tall gothic spires
appends the included information to the second field of the entry labeled "Hogwarts" such that it now readsis a large castle with tall gothic spires
.@convert!: John Smith, Jane Smith, Mary
will add all vanilla WIs with the keys "John Smith", "Jane Smith", and "Mary" as SC2 character entries.
Simple Context 2 features an emoji-based menu for ease of use.
β° : King John ββ Character (1/3)
π : /King John/g
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
π : King John is a terrible and cruel ruler who XYZ.
ποΈ : King John is wearing XYZ.
π : King John never likes to XYZ.
π
π¬ : β
An example of a SC2 menu
Navigation of SC2's menus is done through quick input commands.
The π
emoji marks the current selection in the menu. Simply type >
to move the current selection to the next field or >>
to move to the next page.
π
π : β
ποΈ : β
π : β
π¬ : β
Entry menu with MAIN selected
...from here, inputing >
results in...
π : β
π
ποΈ : β
π : β
π¬ : β
Entry menu with SEEN selected
At the top of the menu is the Label field, which refers to the subject of this menu. The entry and title menus also have a field for Keys, which functions exactly as it does in vanilla world info entires with the exception that regex is also accepted.
π± : Snape ββ New Character
π : /Snape/g
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
The top of the menu, showing Label and Keys fields for a new entry
Typing #
and a number will select that numbered option in the list starting from 0 at the top. The exception is the Keys field in Entry and Title menus, which can only be navigated to by inputting #0
to select the label and then >
to selet Keys.
If the menu has multiple pages, they will be shown next to the label in parentheses:
π± : Snape ββ Character (1/3)
First page of a menu
...from here, inputting >>
results in...
π± : Snape ββ Relations (2/3)
Second page of a menu
Typing !
when in a menu will exit the menu. A y/n (yes / no) prompt for saving any changes made in the menu will appear just above the input field.
βοΈ Do you want to save these changes? (y/n)
A prompt above the input bar for save confirmation of changes made
You can also skip this confirmation prompt by instead typing y!
or n!
to exit the menu with saved or discarded changes respectively.
Entries are effectively the nouns of your story (people, places, things, etc). "Entry" is short for World Info Entry as in the optional data that AI Dungeon uses to flesh out scenarios.
World info entries (or WIs for short) are incredibly useful and when used well can greatly enhance the AI's storytelling ability. However, writing them is cumbersome and tweaking them to function most effectively even more so. That's where Simple Context 2 comes in.
Creating entries in SC2 is as easy as typing
/entry Snape
From there, all you need to do is choose what type of entry this will be (for example, type character
)
ππΊοΈπ¦ππ‘ Enter the CATEGORY for this entry: (c/l/t/f/o)
A prompt above the input bar for selecting the category type for a newly created entry
and a graphical interface where you can input more details will appear at the top right of the screen.
π± : Snape ββ New Character
π : /Snape/g
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
π
π : β
ποΈ : β
π : β
π¬ : β
The Entry creation menu
Each emoji represents a different field where you can add details about the entry. The most common fields are MAIN
, SEEN
, HEARD
, and TOPIC
. Note that not all entry types have all of these fields.
Let's go over each of these:
π MAIN
describes the absolute basics of your entry. If it is a character, it might include gender, race, height, etc. This always appears alongside any mention of the entry's label. Comparible to the Zaltys formatDESC
category.ποΈ SEEN
captures the appearance of your entry: A character's eyes or hair, a location's hills or structures, etc. This triggers when an entry has been seen by a character or when its visual features have been noted in the story. Comparible to the Zaltys formatAPPEAR
category.π HEARD
involves how an entry sounds but also how it acts. This is triggered when an entry has made a sound or spoken a line and is comparible to the Zaltys formatMIND
category.π¬ TOPIC
is for any other details that either don't fit in the previous fields or are too broad to single out into just one, such as history or favorite food. Triggered when an entry has been referenced and is comparible to the Zaltys formatSUMMARY
category.
Relations is the second page of the Entry menu and refers to the various relationships the given entry has with other entries.
π§: Voldemort ββ Relations (2/3)
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
βοΈ : β° Harry [π€¬π₯π] ββ π Death Eaters [π€©ππ]
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
π : Harry:1E-
𧬠: β
π§Έ : β
π° : Death Eaters:5M+
π : β
Voldemort's Relations menu
Just beneath the Label and first set of wavy lines is a list of the entry's different relationships that SC2 recognizes. Each one has a set of emojis which, when read together, represent the nature of that relationship at a glance.
For example we can see above that Voldemort hates Harry and considers him an enemy:
β° Harry [π€¬π₯π]
Voldemort's relationship to Harry
as well as that Voldemort is the leader of the Death Eaters faction which he very much likes:
π Death Eaters [π€©ππ]
Voldemort's relationship to the Death Eaters
Check out the Relationship Mapping section below for more information on interpreting these specific emojis.
Moving further down past the second set of wavy lines, we see a few different fields. These fields are the data that SC2 reads in order to interpret the relationships that were outlined above.
One at a time, they are:
π CONTACTS : The entries that are known to this one
𧬠PARENTS : This entry's parents
π§Έ CHILDREN : This entry's children
π° PROPERTY : The entries that are owned by this one
π OWNERS : The entries that own this one
The Relations menu fields
Any numbers or letters following a :
next to any entries in a field represent relationship mapping details for that entry.
DISPOSITIONS
π€¬ 1 : Hate
π 2 : Dislike
π 3 : Neutral
π 4 : Like
π€© 5 : Adore
MODIFIERS
π + : More
π - : Less
π₯ x : Ex
TYPES
π€ F : Friends/Extended Family
π L : Lovers
β A : Allies
π M : Married/Member of Faction
π E : Enemies
FORMAT
[1-5][FLAME][-+x]
EXAMPLES
Jill:1
Jack:4F
Mary:2Lx, John:3A+
A list of the various emojis used in the FLAME relationship mapping system
Most of the emojis in the relationship mapping chart above are self-explanatory except for the MODIFIERS
which tend to cause a bit of confusion. In short, MODIFIERS
are relative symbols that can be used to enhance or decrease the value of a given TYPE
.
For example, M
in relation to a Faction
would normally mean "Member" of that faction, however M+
would mean "Leader or high-ranking member" of that faction, whereas M-
might mean temporary member or intern. The x
modifier means "used to be TYPE
but is no longer", such as with a divorced spouse (Mx
) or enemy turned ally (Ex
).
However, it is important to remember that the MODIFIERS
are relative to how the other types are being used, meaning M
could just as easily be represented as "Co-Leader" of a faction if M-
are how normal members are represented. It all depends on how the Titles being used are defined.
Furthermore, much of this system can be completely customized, especially the FLAME TYPES
. Check out the Configuration section of the SC2 script to see how.
Titles are one of the most powerful features of SC2, but are also one of the most complex.
A title represents how one entry perceives another. This can mean anything from familial relationships such as Sister or Uncle to official titles like High King to even personal feelings like My Idiot Neighbor.
To create a title, simply type /title
followed by a name for your new title into the input field.
π·οΈ : You-Know-Who ββ New Title ββ Target Entry (1/2)
π : /You-Know-Who|He Who Must Not Be Named/g
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
π
π : β
π€© : β
π₯ : β
π₯ : β
π : β
π± : β
π : β
π§βπ€βπ§ : β
The Title creation menu
It may look a little intimidating a first, but once you grasp the basics it becomes quite easy to create and use titles.
To get the most out of titles, you must first understand three important things:
- Who the
Target
andSource
pages refer to - How titles are applied to an entry (ie. automatically)
- What a title's fields represent both individually and together
Let's start by taking a look at the top of each page of the title menu:
π·οΈ : You-Know-Who ββ Target Entry (1/2)
The top of the title menu, showing the Target of the title
π·οΈ : You-Know-Who ββ Source Entry (2/2)
The top of the title menu, showing the Source of the title
As with most of SC2's menus, the top shows the Label and an indication of which page of the menu is currently displayed. The first page is for the Target
of the title and the second is for its Source
.
The Target
of a title is any entry this title will apply to. For our example of You-Know-Who / He Who Must Not Be Named, it's Voldemort.
The Source
of a title is any entry that perceives the target in the way that the title represents. In our example that's every witch and wizard except Harry and Dumbledore (who see him simply as Tom Riddle) or anyone in the Death Eaters faction (who see him as The Dark Lord).
Another way to look at the distinction between a title's target and source is to consider two people in a room:
Imagine yourself from the perspective of one of those people (the Source
) looking at the other person (the Target
) and say: "How do I consider you? Who are you to me? What do I call you?"
When you think of it this way, a title is just a one-way perspective with a name.
Keep in mind that a title is applied to an entry automatically based on how a title's fields are defined. That said, there is still a bit of setup that needs to be done first in order for a title to actually be applied to entries.
Since titles involve the relationships between entries, it is important that a given entry's relations page is filled out accurately as this is the data SC2 uses to automatically apply titles to entries.
π§: Voldemort ββ Relations (2/3)
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
βοΈ : β° Harry [π€¬π₯π] ββ π Death Eaters [π€©ππ]
γ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈγ°οΈ
π
π : Harry:1E-
𧬠: β
π§Έ : β
π° : Death Eaters:5M+
π : β
Voldemort's Relations menu page
A title's fields function as a list of conditions, all of which must match with an entry's Relations
data in order for it to be applied to that entry. This goes for both Target
and Source
pages.
It is important to only fill out the minimum necessary fields in each page of a title: broad enough to match the intended entries without needing to change them just for the title, but also specific enough to only match the intended entries.
...
...
for example in the above screenshot, if I used /you Snape it would change all the entries to:
π : You are a dour man.
ποΈ : You have greasy hair and a hooked nose.
π : You talks about the dark arts.
π¬ : You were a follower of the Dark Lord.
...
...
Note that /l!
or /load! Chapter 1
with that exclaimation point loads the scene WITHOUT executing any text to prompt.
...
Multiple scenes can be loaded at once, combining their effects
/load Intro Scene, Cloudy Weather, Jack's POV, badly hurt, fluff prompt
All notes get accumulated and overwritten in order of scene load. The SCENE BREAK text only appears for the very first scene loaded. Of course you can bypass prompt like usual.
/load! healthy, sunny weather
...
This command is a catchall that allows you to not only set as many notes to inject into context as you want, but it also allows you to specify WHERE you inject the note. Syntax is as follows:
+LABEL#POSITION:TEXT
Where:
LABEL
is the unique label to give the note (ie,think
orπ§
).POSITION
is the distance back from the user input (front of context) the note should be injected and is measured in total characters (rounded to whole sentences).TEXT
is the actual text to inject into context itself.
Examples:
+π§ :100:This is my focus text
+think:This is my think text
+β Cloudy:600:This is some weather text
+π¬ Chapter 1:This is some scene text
Editing the position of an existing note is easy. Simply call the command again with a different POSITION:
+π§ :234
+π¬ Chapter 1:675
Same with changing the content of a note:
+π§ :This is my NEW focus text
Removing a note is quick and easy:
+π§
+think
+π¬ Chapter 1
You can hoist the injected note to the very top of the context.
+π§ #-1:This will be at the top.
+β Cloudy#-20:This will be above the -1 entry (the very very top).
Or automatically append a prefixed label to it
++Weather:This note will begin with Weather as a prefix
You can set as many notes on a scene as you want. Open the scene with /s My Scene and navigate to Page 2. From here you can enter notes as you normally would from outside the menus.
Hiding notes is also possible. Add a note that is hidden by default:
+my_note#500!: This is my test note
+my_other_note!:Some note text.
To hide a visible note:
+my_note!
To show a hidden note:
+my_note!
(in progress...)
@
, #
, $
, %
, or ^
are quick entry creation symbols.
Each symbol corresponds with an entry type. Left to right, they are Character
, Location
, Thing
, Faction
, and Other
.
- When placed left of a label, they allow for quick entry creation. Fields are separated by
:
.
For example,$Hogwarts Castle: is a school for wizards: has tall gothic spires: is a place of great mystery
or@Snape: is a dour man: has greasy hair and a hooked nose: talks about the dark arts: was a follower of the Dark Lord
. - When placed left of label along with a plus or equals symbol, they allow for quick appending/overwriting of individual fields on an existing entry. Examples:
@Harry+1: this is appended to the MAIN entry
@Harry+main: same thing as ^
@Harry=3: this will overwrite the contents of the HEARD entry
@Harry=heard: same thing as ^
$Stargate=1: Stargate is a device used to travel to other planets
- When placed left of the
convert
keyword and an exclaimation point, they convert existing vanilla world info entries in bulk.
For example,@convert!: John Smith, Jane Smith, Mary
will add all vanilla WIs with those keys as SC2 character entries. If used without an exclaimation point, it will do a dry run without converting anything instead returning what would have been converted. If used with two exclaimation points, it will overwrite the existing entries.
It also works great with regex. For example:#convert!!: /.*Town/gi
Simple Context (c) by OnePunchVAM
Simple Context is licensed under a Creative Commons Attribution 4.0 International License.
You should have received a copy of the license along with this work. If not, see http://creativecommons.org/licenses/by/4.0/.