📗TraitDictionary | AI Dungeon

📗TraitDictionary

Use this script to tell the AI exactly what you mean when you say something in a story card, whether that's specifically what you meant by a chosen term, or a whole nuanced personality quirk. Sometimes you're describing a character with certain words, but those words might have varied meanings depending on who reads them. So many people use 'brave' and 'courageous' interchangably, but they really don't mean the same thing. But long, nuanced explanations describing a character's personality can use up a lot of characters. A succinct list would be more precise, if only the words within the list were clearly defined. Enter the 📗TraitDictionary, a script that allows AI Dungeon to interpret certain terms [in_brackets] as complete, user-defined sentences. Let's say you want to describe a character that has few true fears, but has little ability to face the things that do scare them. Instead of writing the complete sentence and using up so many characters, you could instead write: [brave][cowardly] and then tell the script what those terms mean when you say them. brave: "brave: possessing few fears, but not necessarily the ability to face the things you do fear", courageous: "courageous: possessing above-average ability to face the things that you do fear", timid: "timid: possessing many fears, or conversely, quicker than average to feel fear", cowardly: "cowardly: possessing below-average ability to face the things that you do fear", With this, you can define the nuance behind what you're aiming for in a character yourself. But traits don't have to be limited to just personality. A trait is just a short hand [in_brackets] term that the script will understand as a complete explanation. You could write traits for complex quirks, or to describe fantasy elements. Don't want your vampires being totally tropey, but instead something specific to the story you're writing? Define what the [vampire] trait means in the script. vampire: "vampire: people with long, sharp cuspids; pale or greyish skin, and the ability to 'drink' odd, often metaphysical things (such as nightmares or mystical energy); they are not exceptionally long-lived, nor are they undead; they have no trouble with garlic or sunlight, and they have reflections in mirrors; they are not all goths", Don't agree with a predefined term that comes with the script? Rewrite it! The script can have traits hard-coded into it, visible and editable only to the scenario creator. In addition, any story card with the type or trigger "TraitDictionary" will be included into the list of traits. Using this distinction, players can read traits and add their own, but creators can keep certain traits hidden and unchangable. This could be used to create traits that represent a character's secret. A character could be given a trait like [secret], and the code itself could define that as: secret: "secret: used to be a member of a spooky cult; now ashamed of it, and won't tell anyone except those who are super close", With this, you can keep certain twists a secret from players. Conversely, by making most of the traits visible to players, people can make OC's in the world of your scenarios, following along with what you've set up for them. Input Tab: https://pastebin.com/bH5kwxJK Context Tab: https://pastebin.com/M0iUBqXm (I've included some //commented out entries for a few other scripts, to try and make installation easier.) The scenario comes with twenty (yes, 20) pages of pre-written traits in the form of story cards. This includes a mostly blank "Custom" one with an example trait. If you'd like to use them, simply export/import the story cards during play. The script DOES NOT come with any traits hard-coded in (except for a sample secret). Define traits yourself so you can tell the AI what YOU mean when you say something about a character. -UPDATE- I made it run the process of converting [traits] into full explanations twice, so now you could write one trait to include others. Example: [elfpire] elfpire = "elfpire: [vampire][elf]", That above example might not make any sense, but it gets the idea across. This would allow you to create a single [trait] that encompasses all [traits] in a character's personality, saving even more space. -UPDATE 2- The script now recognizes story cards with the trigger "TraitDictionary", not just cards with that as the type. -UPDATE 3- *listed in comment section -NOTICE- Since I am a filthy coding noob, I relied on Replit.com to code this. I was unsure about that at first, but studying the code the AI wrote actually taught me something. If any true coder sees this and likes it, by all means, take it and run with it. Build on it and soup it up. Anyone can use this anywhere for any reason. Go nuts, see what I care. I mean... Have fun, see what I care.

Cover art for 📗TraitDictionary, a customizable scenario on AI Dungeon