From 9e034c38b15f4e0c27ac1c2d685f8826603508b6 Mon Sep 17 00:00:00 2001 From: Benjamin Bay Date: Fri, 20 Dec 2019 17:23:52 -0800 Subject: [PATCH 1/3] grammar additions --- story/grammars/fantasy_rules.json | 38 ++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/story/grammars/fantasy_rules.json b/story/grammars/fantasy_rules.json index c090484d..cfd33424 100644 --- a/story/grammars/fantasy_rules.json +++ b/story/grammars/fantasy_rules.json @@ -25,6 +25,9 @@ "artist" : ["artist", "artisan", "fresco painter", "glasspainter", "limner", "painter", "sculptor"], "writer" : ["composer", "illuminator", "limner", "playwright", "poet", "writer"], "profession" : ["#writer#", "#artist#", "#fisher#", "#hunter#", "#farmer#"], + "color" : ["black", "white", "red", "gray", "blue", "#uncommon_color#"], + "uncommon_color" : ["green", "brown", "green", "brown", "golden", "silver", "scarlet"], + "weapon" : ["staff", "sword", "spear", "flail", "mace", "dagger", "bow", "arrow", "lance"], @@ -42,7 +45,8 @@ "celestial" : ["the sun", "the moon", "the stars"], "domain" : ["#element#", "#more_element#", "#celestial#", "harvest", "fertility", "war", "good fortune", "thresholds", "love", "wisdom", "#profession.s#"], "god" : ["god", "deity", "goddess"], - "deity" : ["#god# of #domain#"], + "god_adj" : ["just", "cruel", "omniscient", "all-knowing", "mischevious", "wise", "reckless", "omnipotent", "#color#", "prudent", "jealous", "kind", "graceful", "magnificent", "traditional", "famous", "new", "old", "ancient", "wrathful", "fruitful", "gracious"], + "deity" : ["#god# of #domain#", "patron #god# of #domain#", "#god_adj# #god# #fantasy_name#"], "group" : ["group", "bunch", "delegation", "host"], "humanoid" : ["elf", "dwarf", "gnome", "halfling", "hobbit", "goblin"], "noble_class" : ["trader", "noble", "merchant", "soldier", "captain", "aristocrat", "duke", "count", "lord", "priest"], @@ -53,20 +57,23 @@ "grand_home_adj" : ["great", "grand", "large", "spacious"], "grand_home_adj_opt" : ["#grand_home_adj# ", ""], "noble_location" : ["with a #group# of #character.s#", "in a #grand_home_adj_opt##nice_home#"], - "festival" : ["#season# festival", "festival of the #deity#", "festival of the year of the #animal#"], + "festival" : ["#season# festival", "festival of the #deity#", "festival of the #animal#", "festival of the year of the #animal#"], "season_opt" : ["#season# ", ""], "noble_two" : "Throughout the #realm# it is the #festival#. To celebrate, you are feasting #noble_location#. #subordinate.s.capitalize# bustle #to_fro#.\n\nAs a #character# #toast#, you #action#", "week_month" : ["week", "fortnight", "month"], "week_months" : ["weeks", "fortnights", "months"], "time_periods" : ["#week_month#", "#two_to_ten# #week_months#"], - "speak" : ["speak", "chat", "talk", "converse", "discuss"], + "chat" : ["speak", "chat", "talk", "converse"], "ask" : ["ask", "request", "demand"], "noble_organization" : ["organization", "delegation", "guild", "league", "faction"], - "matter" : ["about a matter of importance to the #realm#", "on behalf of a foreign #noble_organization# of #humanoid.s#", "with information regarding a rival house", "with demands from your #subordinate.s#"], - "noble_three" : "Every day for the past #week_month#, a certain #character# has come to your #grand_home_adj_opt##nice_home# #ask#ing to #speak# with you, apparently #matter#. Unsure if #he_she# is trustworthy, you finally agree to meet.\n\nAt the meeting, you #action#" , + "matter" : ["about a matter of importance to the #realm#", "on behalf of a foreign #noble_organization# of #humanoid.s#", "with information regarding a rival house", "with demands from some #professioe.s#"], + "trustworthy" : ["trustworthy", "reliable", "dependable", "well-intentioned", "worth your time"], + "noble_three" : "Every day for the past #week_month#, a certain #character# has come to your #grand_home_adj_opt##nice_home# #ask#ing to #chat# with you, apparently #matter#. Unsure if #he_she# is #trustworthy#, you finally agree to meet.\n\nAt the meeting, you #action#" , - "noble_prompt": ["#noble_one#", "#noble_two#", "#noble_three#"], + "noble_four" : "You and your bodyguards are #on_the_way# #towards# #village_full# to celebrate the #festival# with your subjects. You #road_encounter#.\n\nYou #action#", + + "noble_prompt": ["#noble_one#", "#noble_two#", "#noble_three#", "#noble_four##"], "noble_context1" : "You are , a noble #from_fantasy#. You have a #noble_item1# and a #noble_item2#.", "noble_context" : ["#[noble_item1:#noble_item#][noble_item2:#noble_item#]noble_context1#"], @@ -95,8 +102,8 @@ "place" : ["valley", "forest", "plain", "mountain", "swamp", "river", "cave", "cavern", "lake", "expanse", "cliff"], "monster_quest" : ["#kill# the #evil_adj# #monster# of Larion. #you_ve.capitalize# heard #he_she_it# lives to the #cardinal_dir# of #the_your# #realm#"], - "artifact_adj" : ["lost", "holy", "gold", "fabled", "mythic", "legendary", "blessed", "cursed", "forgotten"], - "artifact" : ["grail", "fleece", "gauntlet", "banner", "stone", "sword", "helmet", "ring", "book", "chalice", "tome", "gem", "bow"], + "artifact_adj" : ["lost", "holy", "gold", "fabled", "mythic", "legendary", "blessed", "cursed", "forgotten", "#color#"], + "artifact" : ["grail", "fleece", "gauntlet", "banner", "stone", "sword", "helmet", "ring", "book", "chalice", "tome", "gem", "bow", "scepter", "staff"], "whole_artifact" : "#artifact_adj# #artifact# of #fantasy_name#", "find" : ["find", "discover", "recover"], "rumored" : ["is rumored to", "is said to", "was prophesied to"], @@ -173,8 +180,9 @@ "go_near" : ["#stare# at", "#sneak# towards", "approach"], "private" : ["private", "restricted", "forbidden", "confidential", "secure", "secret", "personal"], "chamber" : ["chamber", "study", "office", "antechamber", "room", "basement", "attic"], + "great_wizard" : ["#great# #magical_role# #fantasy_name#", "#fantasy_name# the #color#"], "order" : ["order", "command", "remind", "direct", "demand"], - "wizard_three" : "You are apprentice to the #great# #magical_role# #fantasy_name#. Before leaving on an errand, they #order.ed# you to never enter their #private# #chamber#... but your curiosity has gotten the best of you.\n\nAs you #go_near# the door, you #action#", + "wizard_three" : "You are apprentice to the #great_wizard#. Before leaving on an errand, they #order.ed# you to never enter their #private# #chamber#... but your curiosity has gotten the best of you.\n\nAs you #go_near# the door, you #action#", "wizard_prompt" : ["#wizard_one#", "#wizard_two#", "#wizard_three#"], "wizard_context" : "You are , a wizard #from_fantasy#. You have a #wizard_item# and a #wizard_item#.", @@ -188,9 +196,9 @@ "working" : ["working", "toiling", "laboring", "sweating"], "morning_time" : ["at the break of dawn", "at daybreak", "early", "early in the morning"], "field_verb" : ["plowing", "tilling", "cultivating", "caring for"], - "peasant_work" : ["feeding the #farm_animal_type#", "#field_verb# the fields", "harvesting the crops", "planting new crops", "#working# in the fields", "shearing the #woolen#", "milking the #milky#"], + "peasant_work" : ["feeding the #farm_animal_type#", "#field_verb# the fields", "harvesting the crops", "planting new crops", "#working# in the fields", "shearing the #woolen#", "milking the #milky#", "shoveling dung"], "begin" : ["begin", "go about", "start", "get to", "get about"], - "second_thing" : ["For a while, you have wanted to run away.", "In the distance, your master is yelling at some other workers.", "The sun beats down upon you.", "This has been your daily routine since you were young."], + "second_thing" : ["For a while, you have wanted to run away.", "In the distance, your master is yelling at some other workers.", "The sun beats down upon you.", "This has been your daily routine since you were young.", "You mutter a prayer to the #deity#."], "peasant_prompt" : "You wake up #morning_time# and #begin# #peasant_work#. #second_thing# You #action#", "peasant_context" : "You are , a peasant #from_fantasy#. You have #peasant_item# and #peasant_item#.", @@ -202,7 +210,7 @@ "city" : ["city", "town", "village", "market"], "steal" : ["steal from", "shoplift", "burgle", "break into"], "rob" : ["steal from", "rob", "jump", "pickpocket", "con"], - "target" : ["someplace to #steal#", "someone to #rob#"], + "target" : ["someplace to #steal#", "someone to #rob#", "a #profession# to #rob#"], "along" : ["along", "down"], "townsfolk" : ["townsfolk", "local vendors", "people", "crowd", "populace"], "amongst" : ["amongst", "in the midst of", "among"], @@ -217,7 +225,11 @@ "stealing" : ["stealing", "mischief", "pickpocketing"], "inn_adj" : ["your favorite", "a nearby", "a crowded", "a busy", "a cheap"], "rogue_two" : "After a #day# of #stealing#, you head towards #inn_adj# inn to stay for the night. #position.capitalize# you #action#", - "rogue_three" : "Today you decided that simple #stealing# isn't enough anymore. You long for a more ambitious goal: taking for yourself #whole_artifact#. You #action#", + "isnt" : ["isn't", "is not"], + "enough" : ["enough", "sufficient", "good enough"], + "not_enough" : ["#isnt# #enough#", "#isnt# #enough# anymore"], + "simple" : ["simple", "basic", "general", "standard"], + "rogue_three" : "This #time# you decided that #simple# #stealing# #not_enough#. You long for a more ambitious goal: taking for yourself #whole_artifact#.\n\nYou #action#", "rogue_prompt" : ["#rogue_one#","#rogue_two#", "#rogue_three#"], "rogue_context" : "You are , a rogue #from_fantasy#. You have #rogue_item# and #rogue_item#." } From afb9414d8d3b66bafa56349e193efc5f2ea4c8a1 Mon Sep 17 00:00:00 2001 From: Benjamin Bay Date: Fri, 20 Dec 2019 17:50:39 -0800 Subject: [PATCH 2/3] grammar additions --- story/grammars/fantasy_rules.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/story/grammars/fantasy_rules.json b/story/grammars/fantasy_rules.json index cfd33424..bdee7876 100644 --- a/story/grammars/fantasy_rules.json +++ b/story/grammars/fantasy_rules.json @@ -28,6 +28,7 @@ "color" : ["black", "white", "red", "gray", "blue", "#uncommon_color#"], "uncommon_color" : ["green", "brown", "green", "brown", "golden", "silver", "scarlet"], "weapon" : ["staff", "sword", "spear", "flail", "mace", "dagger", "bow", "arrow", "lance"], + "relative" : ["father", "mother", "brother", "sister", "cousin", "uncle", "aunt"], @@ -180,7 +181,7 @@ "go_near" : ["#stare# at", "#sneak# towards", "approach"], "private" : ["private", "restricted", "forbidden", "confidential", "secure", "secret", "personal"], "chamber" : ["chamber", "study", "office", "antechamber", "room", "basement", "attic"], - "great_wizard" : ["#great# #magical_role# #fantasy_name#", "#fantasy_name# the #color#"], + "great_wizard" : ["#great# #magical_role# #fantasy_name#", "#fantasy_name# the #color.capitalize#"], "order" : ["order", "command", "remind", "direct", "demand"], "wizard_three" : "You are apprentice to the #great_wizard#. Before leaving on an errand, they #order.ed# you to never enter their #private# #chamber#... but your curiosity has gotten the best of you.\n\nAs you #go_near# the door, you #action#", "wizard_prompt" : ["#wizard_one#", "#wizard_two#", "#wizard_three#"], @@ -194,7 +195,7 @@ "woolen" : ["sheep", "goats", "llamas"], "milky" : ["cows", "goats"], "working" : ["working", "toiling", "laboring", "sweating"], - "morning_time" : ["at the break of dawn", "at daybreak", "early", "early in the morning"], + "morning_time" : ["at the break of dawn", "at daybreak", "early", "early in the morning", "at the cock's crow"], "field_verb" : ["plowing", "tilling", "cultivating", "caring for"], "peasant_work" : ["feeding the #farm_animal_type#", "#field_verb# the fields", "harvesting the crops", "planting new crops", "#working# in the fields", "shearing the #woolen#", "milking the #milky#", "shoveling dung"], "begin" : ["begin", "go about", "start", "get to", "get about"], @@ -210,7 +211,7 @@ "city" : ["city", "town", "village", "market"], "steal" : ["steal from", "shoplift", "burgle", "break into"], "rob" : ["steal from", "rob", "jump", "pickpocket", "con"], - "target" : ["someplace to #steal#", "someone to #rob#", "a #profession# to #rob#"], + "target" : ["someplace to #steal#", "someone to #rob#", "some #profession# to #rob#"], "along" : ["along", "down"], "townsfolk" : ["townsfolk", "local vendors", "people", "crowd", "populace"], "amongst" : ["amongst", "in the midst of", "among"], From c5280f9827aa857bc8bc03ded964043f2e36b99c Mon Sep 17 00:00:00 2001 From: Benjamin Bay Date: Sat, 21 Dec 2019 14:08:10 -0700 Subject: [PATCH 3/3] added tracery indefinite article support --- story/grammars/fantasy_rules.json | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/story/grammars/fantasy_rules.json b/story/grammars/fantasy_rules.json index bdee7876..54600f2c 100644 --- a/story/grammars/fantasy_rules.json +++ b/story/grammars/fantasy_rules.json @@ -57,10 +57,10 @@ "toast" : ["offers a toast", "gives a speech", "recites a prayer", "announces future plans", "loudly argues", "sings a ballad"], "grand_home_adj" : ["great", "grand", "large", "spacious"], "grand_home_adj_opt" : ["#grand_home_adj# ", ""], - "noble_location" : ["with a #group# of #character.s#", "in a #grand_home_adj_opt##nice_home#"], + "noble_location" : ["with #group.a# of #character.s#", "in a #grand_home_adj_opt##nice_home#"], "festival" : ["#season# festival", "festival of the #deity#", "festival of the #animal#", "festival of the year of the #animal#"], "season_opt" : ["#season# ", ""], - "noble_two" : "Throughout the #realm# it is the #festival#. To celebrate, you are feasting #noble_location#. #subordinate.s.capitalize# bustle #to_fro#.\n\nAs a #character# #toast#, you #action#", + "noble_two" : "Throughout the #realm# it is the #festival#. To celebrate, you are feasting #noble_location#. #subordinate.s.capitalize# bustle #to_fro#.\n\nAs #character.a# #toast#, you #action#", "week_month" : ["week", "fortnight", "month"], "week_months" : ["weeks", "fortnights", "months"], @@ -76,8 +76,7 @@ "noble_prompt": ["#noble_one#", "#noble_two#", "#noble_three#", "#noble_four##"], - "noble_context1" : "You are , a noble #from_fantasy#. You have a #noble_item1# and a #noble_item2#.", - "noble_context" : ["#[noble_item1:#noble_item#][noble_item2:#noble_item#]noble_context1#"], + "noble_context" : "You are , a noble #from_fantasy#. You have #noble_item.a# and #noble_item.a#.", @@ -125,11 +124,11 @@ "quest_type" : ["#monster_quest#", "#artifact_quest#", "#rescue_quest#"], "could" : ["will", "may", "should", "could"], - "adventure" : ["an adventure", "a quest", "a journey", "a crusade"], + "adventure" : ["adventure", "quest", "journey", "crusade"], "beginning" : ["going on", "beginning", "setting out on"], - "quest" : ["You are #beginning# #adventure# to #quest_type#. You set out #towards# a #place_adj# #place# that #could# take you there.\n\nAs you approach, you #action#"], + "quest" : ["You are #beginning# #adventure.a# to #quest_type#. You set out #towards# #place_adj.a# #place# that #could# take you there.\n\nAs you approach, you #action#"], "knight_prompt" : "#quest#", - "knight_context" : "You are , a knight #from_fantasy#. You have a #knight_item# and a #knight_item#.", + "knight_context" : "You are , a knight #from_fantasy#. You have #knight_item.a# and #knight_item.a#.", @@ -159,7 +158,7 @@ "book" : ["#normal_book#", "#spellbook#", "book", "spellbook"], "magic_discipline" : ["alchemy"], "through" : ["through", "across", "throughout", "about"], - "wizard_drafts" : ["After a #week_month# of travel you arrive at the ruin ", "Your apprentice has done it again; #he_she# has summoned a being "], + "wizard_drafts" : ["After #week_month.a# of travel you arrive at the ruin ", "Your apprentice has done it again; #he_she# has summoned a being "], "road" : ["road", "river", "path"], "wizard_exchange" : ["notes", "spells", "gossip", "goods", "research", "banter", "knowledge"], "wizard_colleage" : ["another wizard", "a fellow wizard", "a sorcerer", "a #evil_role#", "a #attrib# #char#"], @@ -169,12 +168,12 @@ "wandering_opt" : ["#wandering# ", ""], "troupe" : ["group", "band", "troupe", "crew", "gang", "party"], "dancer" : ["dancer", "actor", "entertainer"], - "road_encounter" : ["#encounter# #looks_like_opt#a #creature#", "#encounter# a #wandering_opt#troupe of #profession.s#"], + "road_encounter" : ["#encounter# #looks_like_opt##creature.a#", "#encounter# a #wandering_opt#troupe of #profession.s#"], "wizard_one" : ["You are #on_the_way# #towards# #village_full# to exchange #wizard_exchange# with #wizard_colleage#. You #road_encounter#.\n\nYou #action#"], "old" : ["old", "aged", "experienced", "elderly", "venerable"], "around_opt" : [" about", " around", ""], "wizard_pos" : ["wise", "intelligent", "crafty", "powerful", "magical"], - "wizard_two" : ["You face a #place_adj# #place# as images of #random_object.s# #flicker# #through# your #mind#. What was that? Though #old# and #wizard_pos#, your memory extends only a few #week_months# back. Now you #wander##around_opt#, trying to #remember# what happened.\n\nYou #action#"], + "wizard_two" : ["You face #place_adj.a# #place# as images of #random_object.s# #flicker# #through# your #mind#. What was that? Though #old# and #wizard_pos#, your memory extends only a few #week_months# back. Now you #wander##around_opt#, trying to #remember# what happened.\n\nYou #action#"], "great" : ["great", "renowned", "world-famous", "legendary"], "stare" : ["look", "stare", "gaze"], "sneak" : ["sneak", "creep", "inch", "move", "go"], @@ -185,10 +184,10 @@ "order" : ["order", "command", "remind", "direct", "demand"], "wizard_three" : "You are apprentice to the #great_wizard#. Before leaving on an errand, they #order.ed# you to never enter their #private# #chamber#... but your curiosity has gotten the best of you.\n\nAs you #go_near# the door, you #action#", "wizard_prompt" : ["#wizard_one#", "#wizard_two#", "#wizard_three#"], - "wizard_context" : "You are , a wizard #from_fantasy#. You have a #wizard_item# and a #wizard_item#.", + "wizard_context" : "You are , a wizard #from_fantasy#. You have #wizard_item.a# and #wizard_item.a#.", - "peasant_item" : ["a #metal_adj_opt#pitchfork", "the shirt on your back", "a #metal_adj_opt#shovel", "a dirty rag", "a #metal_adj_opt#spade", "a #metal_adj_opt#sickle", "shears", "a basket", "a plough", "a #metal_adj_opt#scythe", "a dirty hat"], + "peasant_item" : ["#metal_adj_opt#pitchfork", "shirt on your back", "#metal_adj_opt#shovel", "dirty rag", "#metal_adj_opt#spade", "#metal_adj_opt#sickle", "shears", "basket", "plough", "#metal_adj_opt#scythe", "dirty hat"], "farm_animal" : ["pig", "cow", "chicken", "llama", "goat", "horse", "donkey", "rabbit", "hog", "mule", "sow"], "farm_animal_sing" : ["sheep", "livestock", "cattle"], "farm_animal_type" : ["#farm_animal.s#", "#farm_animal_sing#"], @@ -201,11 +200,11 @@ "begin" : ["begin", "go about", "start", "get to", "get about"], "second_thing" : ["For a while, you have wanted to run away.", "In the distance, your master is yelling at some other workers.", "The sun beats down upon you.", "This has been your daily routine since you were young.", "You mutter a prayer to the #deity#."], "peasant_prompt" : "You wake up #morning_time# and #begin# #peasant_work#. #second_thing# You #action#", - "peasant_context" : "You are , a peasant #from_fantasy#. You have #peasant_item# and #peasant_item#.", + "peasant_context" : "You are , a peasant #from_fantasy#. You have #peasant_item.a# and #peasant_item.a#.", - "rogue_item" : ["a pair of gloves", "a cloak", "a deck of cards", "a dagger", "lockpick", "a mask", "a shawl", "a pipe", "a key", "a length of rope", "darts", "a sickle", "a mace"], + "rogue_item" : ["pair of gloves", "cloak", "deck of cards", "dagger", "lockpick", "mask", "shawl", "pipe", "key", "length of rope", "bundle of darts", "sickle", "mace"], "walk" : ["walk","go"], "street" : ["street", "streets", "square", "road"], "city" : ["city", "town", "village", "market"], @@ -232,6 +231,6 @@ "simple" : ["simple", "basic", "general", "standard"], "rogue_three" : "This #time# you decided that #simple# #stealing# #not_enough#. You long for a more ambitious goal: taking for yourself #whole_artifact#.\n\nYou #action#", "rogue_prompt" : ["#rogue_one#","#rogue_two#", "#rogue_three#"], - "rogue_context" : "You are , a rogue #from_fantasy#. You have #rogue_item# and #rogue_item#." + "rogue_context" : "You are , a rogue #from_fantasy#. You have #rogue_item.a# and #rogue_item.a#." }