diff --git a/typeclasses/chatbots.py b/typeclasses/chatbots.py index 2b2e9c3..a98f565 100755 --- a/typeclasses/chatbots.py +++ b/typeclasses/chatbots.py @@ -32,7 +32,7 @@ class ChatBot(AI, Puppet): self.db.personality_file = personality_dir + "/" + personality + ".md" def other_say(self, speaker, speech): - # logger.info(f"chatbot hears: '{speech}' from {speaker}.") + logger.info(f"{self.key} chatbot hears: '{speech}' from {speaker}.") # logger.info(f"characters: {self.characters_here(puppets=True)}") if len(self.characters_here(puppets=True)) == 1: self.other_sayto(speaker, speech) diff --git a/typeclasses/objects.py b/typeclasses/objects.py index 5f7bf61..30be025 100755 --- a/typeclasses/objects.py +++ b/typeclasses/objects.py @@ -162,7 +162,10 @@ class ObjectParent: chars = self.search("", quiet=True, location=location, typeclass="typeclasses.characters.Character") - results = dabs + pups + chars + # Don't want to get any duplicates from our three lists, so we + # combine into one list, shove it into a hashed dictionary, + # and then back out to a list: + results = list(dict.fromkeys(dabs + pups + chars)) if ignore_self: return list(filter(lambda k: k != self, results)) else: diff --git a/world/new.ev b/world/new.ev deleted file mode 100644 index 9afed55..0000000 --- a/world/new.ev +++ /dev/null @@ -1,452 +0,0 @@ - -# Along with the heron, we should add more birds to both look at, as well as take some feathers. - - -# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:1]] -@tel/quiet mp08 -# -@create/drop birds;bird: typeclasses.puzzles.Changling -# -@set birds/plural = True -# Birds and Feathers:1 ends here - - - -# Can’t get them: - - -# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:2]] -@lock birds = get:false() -# -@set birds/get_err_msg = "They are high in the trees and much too fast." -# Birds and Feathers:2 ends here - - - -# And let’s not list them with the room’s objects since they can’t be interacted with: - - -# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:3]] -@set birds/is_hidden = True -# Birds and Feathers:3 ends here - - - -# And the generate description: - - -# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:4]] -@set birds/desc_first_prefix = "Wait, is that " -# -@set birds/desc_prefix = "Is that " -# -@set birds/desc_postfix = "? << Seems ^ It appears ^ Looks like >> << it ^ that bird >> has << dropped ^ shed ^ cast off >> a << clump ^ bunch ^ cluster >> of |Yfeathers|n." -# Birds and Feathers:4 ends here - - - -# And now for a list of the contents: - - -# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:5]] -@set birds/descs = ( - "a melancholic Soliloquy Raven, whistling a sad song", - "a purple throated Cinnabar Hearth-Finch", - "a white Moon-Sipped Egret", - "a Gossamer Ribbon-Tail", - "a Obsidian Bell-Tolled", - "a anachronistic Chrono-Cuckoo", - "a purple Sovereign Velvet-Crest", - "a rainbow-colored Prism-Weft Kingfisher", - "a berry encrusted Bramble-Spine Kestrel", - "a Dream-Stitch Wren, weaving a dream-catching net", - "a Nebula-Throated Skimmer", - "a Shatter-Glass Nightingale" - ) -# Birds and Feathers:5 ends here - - - -# The /feathers/ is a hidden Producer: - - -# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:6]] -@create/drop feathers: typeclasses.consumables.Producer -# -@set feathers/plural = True -# -@set feathers/hidden_tag = "hidden_feathers" -# -@lock feathers = view:tag(hidden_feathers) -# Birds and Feathers:6 ends here - - - -# With a description: - -# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:7]] -@desc feathers = Perhaps the molting season, stress, nutritional deficiencies, or |wyour desire|n, you find some feathers, you find various colored feathers available for the taking. -# Birds and Feathers:7 ends here - - - -# We have to have the feathers describe what it /makes/: - -# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:8]] -@set feathers/make_name = "a bunch of feathers" -# Birds and Feathers:8 ends here - - - -# And a verb when they /get/ the consumable: - -# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:9]] -@set feathers/make_verb = "$conj(gather) " -# Birds and Feathers:9 ends here - - - -# They shouldn’t be able to make too many feathers: - - -# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:10]] -@set feathers/make_limit = 1 -# -@set feathers/make_limit_msg = "You seem to have plenty of feathers." -# Birds and Feathers:10 ends here - - - -# And the feathers needs to know the /description/ of the Consumable, so that it can attach that: - -# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:11]] -@set feathers/make_desc = "A brightly colored collection" -# Birds and Feathers:11 ends here - - - -# How much is there when you pick them? - -# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:12]] -@set feathers/make_amount = 1 -# Birds and Feathers:12 ends here - - - -# Then give him the =sdesc= (not sure why I have to do both), and wake him. - - -# [[file:../../../projects/mud.org::*Raven][Raven:2]] -py raven = me.search("raven") ; raven.db._sdesc="raven" ; raven.sdesc.add("raven") ; raven.home = here -# Raven:2 ends here - - -# Let’s make a place for new toys and gadgets. - -# [[file:../../../projects/mud.org::*George’s Workshop][George’s Workshop:1]] -@teleport/quiet mp20 -# -@dig Workshop;mp21 = wood door;door,wood door;door;leave -# George’s Workshop:1 ends here - - - -# And describe the door: - - -# [[file:../../../projects/mud.org::*George’s Workshop][George’s Workshop:2]] -@desc door = A strong wooden door with iron bands. Over the door is a sign that reads, |wGeorge's Workshop|n. -# -@set door/traverse_msg = "You open the door, immediately accosted by the noise of hundreds of clockwork gadgets, and step into cacophony." -# George’s Workshop:2 ends here - - - -# And describe the new room: - - -# [[file:../../../projects/mud.org::*George’s Workshop][George’s Workshop:3]] -@teleport/quiet mp21 -# -@desc here = Garish |Ygadgets|n and beguiling |Ygizmos|n girdle this room. The worktable contains a half-completed |Yproject|n while shelves showcase completed ones. The noise of machines overwhelms the smell of chemicals. -# George’s Workshop:3 ends here - - - -# And cover the exit: - - -# [[file:../../../projects/mud.org::*George’s Workshop][George’s Workshop:4]] -@desc door = A strong wooden door with iron bands. -# -@set door/traverse_msg = "You step the door, leaving the clamor behind." -# George’s Workshop:4 ends here - - -# Like other things through this world, looking at this should give us something new: - - -# [[file:../../../projects/mud.org::*Gadgets][Gadgets:1]] -@create/drop many gadgets;gadgets;gizmos;gadget;gizmo;contraptions: typeclasses.puzzles.Changling -# -@set gadgets/plural = True -# Gadgets:1 ends here - - - -# That we can’t take: - - -# [[file:../../../projects/mud.org::*Gadgets][Gadgets:2]] -@lock gadgets = get:false() -# -@set gadgets/get_err_msg = "You can look, but you can't take that." -# Gadgets:2 ends here - - - -# And we shouldn’t see it at first, as it is in the description: - - -# [[file:../../../projects/mud.org::*Gadgets][Gadgets:3]] -@lock gadgets = view:tag(hidden_gadgets) -# -@set gadgets/hidden_tag = "hidden_gadgets" -# Gadgets:3 ends here - - - -# The pre– and postfix descriptions: - - -# [[file:../../../projects/mud.org::*Gadgets][Gadgets:4]] -@set gadgets/desc_first_prefix = "<< Fascinating ^ Interesting ^ Curious >> << collection of ^ assortment of ^ >> << gadgets ^ gizmos ^ contraptions >>. You << look at ^ notice >> " -# -@set gadgets/desc_prefix = "You << spot ^ notice ^ look at >> another << gadget ^ gizmo ^ contraption ^ >>, " -# -@set gadgets/desc_postfix = "" -# Gadgets:4 ends here - - - -# And the gadgets themselves: - - -# [[file:../../../projects/mud.org::*Gadgets][Gadgets:5]] -@set gadgets/descs = ( - "a massive grandfather clock whose face is a stained-glass window; instead of hands, a tiny mechanical owl flies in circles, chasing a glowing brass mouse that moves erratically.", - "a delicate glass terrarium containing a dancing brass elephant. A perfectly detailed raincloud crackles with silent violet lightning and drops rain on the moss below.", - "a music box with an open lid, where a tiny brass skeleton and a porcelain dryad waltz together on a velvet stage. You never realized that the music, which you would call industrial rock, could be played in 3 / 4 time.", - "a heavy bronze astrolabe maps an impossible sky; the constellations etched onto its spinning plates are shaped like deep-sea creatures—leviathans with too many eyes, anglerfish with lanterns made of embedded pearls, and massive, coiled nautiluses.|/Most unsettling are the pointer arms. Instead of straight metal brass rulers, they are sculpted to look like segmented, reaching tentacles, that point toward blank, empty spaces on the plates where no stars are etched, as if tracking things that haven't arrived yet.", - "a mechanical chameleon forged from overlapping plates of iridescent tin; it sits motionless on a pile of scrap metal, its skin slowly rippling to mimic the exact texture and rust patterns of the junk beneath it.", - "a glass jar filled with hundreds of tiny, glowing mechanical fireflies swarming and swirling in hypnotic patterns. Did it just organize themselves into a sharp silhouette of a screaming face before scattering back into chaos?", - "a miniature brass carousel where the horses have been replaced by intricately carved mechanical grasshoppers. As the carousel spins, the grasshoppers themselves remain perfectly crisp and sharp to your vision, while the wooden platform beneath blurs into a seamless ring.", - "a heavy iron kettle sitting on the cold shelf, venting a continuous, thick stream of lavender-scented steam that shapes itself into the silhouettes of leaping stags before dissolving.", - "a small, intricate birdcage made of twisted silver wire, containing a single, flawlessly polished chrome sphere that hovers dead center, singing with the unmistakable, clear warble of a nightingale." -) -# Gadgets:5 ends here - - -# Let’s create a project that can be completed by the player. - -# This should contain a “state” that looks differently for each player based on an attribute on the player. - - -# [[file:../../../projects/mud.org::*The Project][The Project:1]] -@create/drop project: typeclasses.puzzles.Stateful -# -@desc project = On the workbench lies a tangle of brass plates, tubes and mechanical gears, shaped like a bird. Unassembled, it appears to be missing parts that might help it fly. -# The Project:1 ends here - - - -# Initial default state is unfinished: - - -# [[file:../../../projects/mud.org::*The Project][The Project:2]] -@set project/name_default = "unfinished project" -# -@set project/desc_default = "On the workbench lies a tangle of brass plates, tubes and mechanical gears, shaped like a bird. Unassembled, it appears to be missing parts that might help it fly." -# The Project:2 ends here - - - -# And this is the name and description when the project is finished: - - -# [[file:../../../projects/mud.org::*The Project][The Project:4]] -@set project/name_finished = "mechanical bird" -# -@set project/desc_finished = "This contraption made of brass plates and tubing sports an array of beautiful feathers, as it flies about." -# The Project:4 ends here - - -# This Dwarf will be in the dungeons, but I would like them to come out at times. - -# [[file:../../../projects/mud.org::*George the Dwarf Tinkerer][George the Dwarf Tinkerer:1]] -@create/drop George;dwarf: typeclasses.chatbots.Dwarf -# -@set dwarf/gender = "male" -# -@set dwarf/pose = "tinkering at an unfinished project" -# -@set dwarf/pose_default = "tinkering" -# -@set dwarf/pose_sleep = "snoozing" -# George the Dwarf Tinkerer:1 ends here - - - -# And his description: - - -# [[file:../../../projects/mud.org::*George the Dwarf Tinkerer][George the Dwarf Tinkerer:2]] -@desc dwarf = Spectacles and wild unkempt hair gives this dwarf a professor-y look. He braids his long beard into two strands, and tucks each of them into pockets in his brown apron, along with various tools that chime as he moves. -# George the Dwarf Tinkerer:2 ends here - - - -# Then give him the =sdesc= (not sure why I have to do both), and wake him. - - -# [[file:../../../projects/mud.org::*George the Dwarf Tinkerer][George the Dwarf Tinkerer:3]] -py dwarf = me.search("dwarf") ; dwarf.db._sdesc="white-haired dwarf" ; dwarf.sdesc.add("white-haired dwarf") ; dwarf.home = here; dwarf.backstory("dwarf") -# George the Dwarf Tinkerer:3 ends here - - - -# And get him moving: - - -# [[file:../../../projects/mud.org::*George the Dwarf Tinkerer][George the Dwarf Tinkerer:4]] -@script dwarf = typeclasses.chatbots.TravelingNPC -# George the Dwarf Tinkerer:4 ends here - - - -# But not so much: - - -# [[file:../../../projects/mud.org::*George the Dwarf Tinkerer][George the Dwarf Tinkerer:5]] -@set dwarf/travel_time = 60 -# -@set dwarf/stay_time = 900 -# -@set dwarf/home_time = 4000 -# George the Dwarf Tinkerer:5 ends here - - -# We hard-code this character to walk from the Mysterious Stone Circle (=mp00=) and sail across the sea, and back again. - - -# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:1]] -@tel/quiet mp00 -# -@create/drop Darol;hobbit: typeclasses.chatbots.Hobbit -# @update hobbit = typeclasses.puppets.Puppet -# -@set hobbit/gender = "him" -# Darol the Adventuring Hobbit:1 ends here - - - -# Description: - - -# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:2]] -@desc hobbit = An adventurous looking chap with brown mutton chops matching his curly brown hair and his brown cloak. His emerald green eyes match his coat that ends just above his large gold belt buckle, which in turn, matches his gold hoop earring. His backpack sports a pin with an insignia. -# Darol the Adventuring Hobbit:2 ends here - - - -# And the posing? - - -# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:3]] -@set hobbit/pose = "with his thumbs in his waistcoat pocket" -# -@set hobbit/pose_sleep = "absentmindedly smoking a pipe" -# -@set hobbit/pose_default = "with his thumbs in his waistcoat pocket" -# Darol the Adventuring Hobbit:3 ends here - - - -# Then wake it. - - -# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:4]] -py hobbit = me.search("hobbit") ; hobbit.sdesc.add("hobbit") ; hobbit.backstory("dragon") -# Darol the Adventuring Hobbit:4 ends here - - - -# Moving attributes: - - -# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:5]] -@set hobbit/traveling_direction = "back" -# Darol the Adventuring Hobbit:5 ends here - - - -# He needs his stuff, like a pipe: - - -# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:6]] -@create pipe: typeclasses.things.Pipe -# -@desc pipe = A large pipe worthy of a Hobbit. -# -@give pipe = hobbit -# Darol the Adventuring Hobbit:6 ends here - - - -# Need something to state he’s adventurous: - - -# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:7]] -@create short sword: typeclasses.things.Wand -# -@desc short sword = Beautiful gold filigree on the hilt and scabbard. -# -@give short sword = hobbit -# Darol the Adventuring Hobbit:7 ends here - - - -# And his fancy waistcoat: - - -# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:8]] -@create waistcoat : typeclasses.things.BagofJunk -# -@desc waistcoat = An elegant green waistcoat. -# -@set waistcoat/stuff = "fey" -# -@give waistcoat = hobbit -# Darol the Adventuring Hobbit:8 ends here - - - -# But mostly, he needs his horn: - - -# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:9]] -@create horn : typeclasses.sailing.CallingHorn -# -@desc horn = Made from the sea mist, it calls to you -# -@give horn = hobbit -# Darol the Adventuring Hobbit:9 ends here - - - -# And get it moving: - - -# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:10]] -@script hobbit = typeclasses.chatbots.TravelingNPC -# Darol the Adventuring Hobbit:10 ends here diff --git a/world/version1.ev b/world/version1.ev index 1218d59..49d82cd 100644 --- a/world/version1.ev +++ b/world/version1.ev @@ -2027,6 +2027,139 @@ py me.search("heron").backstory("heron") # Purple Heron:9 ends here +# Along with the heron, we should add more birds to both look at, as well as take some feathers. + + +# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:1]] +@tel/quiet mp08 +# +@create/drop birds;bird: typeclasses.puzzles.Changling +# +@set birds/plural = True +# Birds and Feathers:1 ends here + + + +# Can’t get them: + + +# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:2]] +@lock birds = get:false() +# +@set birds/get_err_msg = "They are high in the trees and much too fast." +# Birds and Feathers:2 ends here + + + +# And let’s not list them with the room’s objects since they can’t be interacted with: + + +# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:3]] +@set birds/is_hidden = True +# Birds and Feathers:3 ends here + + + +# And the generate description: + + +# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:4]] +@set birds/desc_first_prefix = "Wait, is that " +# +@set birds/desc_prefix = "Is that " +# +@set birds/desc_postfix = "? << Seems ^ It appears ^ Looks like >> << it ^ that bird >> has << dropped ^ shed ^ cast off >> a << clump ^ bunch ^ cluster >> of |Yfeathers|n." +# Birds and Feathers:4 ends here + + + +# And now for a list of the contents: + + +# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:5]] +@set birds/descs = ( + "a melancholic Soliloquy Raven, whistling a sad song", + "a purple throated Cinnabar Hearth-Finch", + "a white Moon-Sipped Egret", + "a Gossamer Ribbon-Tail", + "a Obsidian Bell-Tolled", + "a anachronistic Chrono-Cuckoo", + "a purple Sovereign Velvet-Crest", + "a rainbow-colored Prism-Weft Kingfisher", + "a berry encrusted Bramble-Spine Kestrel", + "a Dream-Stitch Wren, weaving a dream-catching net", + "a Nebula-Throated Skimmer", + "a Shatter-Glass Nightingale" + ) +# Birds and Feathers:5 ends here + + + +# The /feathers/ is a hidden Producer: + + +# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:6]] +@create/drop feathers: typeclasses.consumables.Producer +# +@set feathers/plural = True +# +@set feathers/hidden_tag = "hidden_feathers" +# +@lock feathers = view:tag(hidden_feathers) +# Birds and Feathers:6 ends here + + + +# With a description: + +# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:7]] +@desc feathers = Perhaps the molting season, stress, nutritional deficiencies, or |wyour desire to help|n, you find various colored feathers available for the taking. +# Birds and Feathers:7 ends here + + + +# We have to have the feathers describe what it /makes/: + +# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:8]] +@set feathers/make_name = "a bunch of feathers" +# Birds and Feathers:8 ends here + + + +# And a verb when they /get/ the consumable: + +# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:9]] +@set feathers/make_verb = "$conj(gather) " +# Birds and Feathers:9 ends here + + + +# They shouldn’t be able to make too many feathers: + + +# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:10]] +@set feathers/make_limit = 1 +# +@set feathers/make_limit_msg = "You seem to have plenty of feathers." +# Birds and Feathers:10 ends here + + + +# And the feathers needs to know the /description/ of the Consumable, so that it can attach that: + +# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:11]] +@set feathers/make_desc = "A brightly colored collection" +# Birds and Feathers:11 ends here + + + +# How much is there when you pick them? + +# [[file:../../../projects/mud.org::*Birds and Feathers][Birds and Feathers:12]] +@set feathers/make_amount = 1 +# Birds and Feathers:12 ends here + + # The reed can be a [[file:~/src/moss-n-puddles/typeclasses/consumables.py::class Producer(Object):][producer]] that makes ten foot poles … needed to get into the hut. @@ -2905,6 +3038,15 @@ Someone has set a nice |Ychair|n for viewing. +# Then give him the =sdesc= (not sure why I have to do both), and wake him. + + +# [[file:../../../projects/mud.org::*Raven][Raven:2]] +py raven = me.search("raven") ; raven.db._sdesc="raven" ; raven.sdesc.add("raven") ; raven.home = here +# Raven:2 ends here + + + # Let’s load the goodies: @@ -5126,6 +5268,201 @@ py bt = self.search('head'); bt.sdesc.add('curious figure'); bt.db.pose = 'sitti # Dark Tunnel:5 ends here +# Let’s make a place for new toys and gadgets. + +# [[file:../../../projects/mud.org::*George’s Workshop][George’s Workshop:1]] +@teleport/quiet mp20 +# +@dig Workshop;mp21 = wood door;door,wood door;door;leave +# George’s Workshop:1 ends here + + + +# And describe the door: + + +# [[file:../../../projects/mud.org::*George’s Workshop][George’s Workshop:2]] +@desc door = A strong wooden door with iron bands. Over the door is a sign that reads, |wGeorge's Workshop|n. +# +@set door/traverse_msg = "You open the door, immediately accosted by the noise of hundreds of clockwork gadgets, and step into cacophony." +# George’s Workshop:2 ends here + + + +# And describe the new room: + + +# [[file:../../../projects/mud.org::*George’s Workshop][George’s Workshop:3]] +@teleport/quiet mp21 +# +@desc here = Garish |Ygadgets|n and beguiling |Ygizmos|n girdle this room. The worktable contains a half-completed |Yproject|n while shelves showcase completed ones. The noise of machines overwhelms the smell of chemicals. +# George’s Workshop:3 ends here + + + +# And cover the exit: + + +# [[file:../../../projects/mud.org::*George’s Workshop][George’s Workshop:4]] +@desc door = A strong wooden door with iron bands. +# +@set door/traverse_msg = "You step the door, leaving the clamor behind." +# George’s Workshop:4 ends here + + +# Like other things through this world, looking at this should give us something new: + + +# [[file:../../../projects/mud.org::*Gadgets][Gadgets:1]] +@create/drop many gadgets;gadgets;gizmos;gadget;gizmo;contraptions: typeclasses.puzzles.Changling +# +@set gadgets/plural = True +# Gadgets:1 ends here + + + +# That we can’t take: + + +# [[file:../../../projects/mud.org::*Gadgets][Gadgets:2]] +@lock gadgets = get:false() +# +@set gadgets/get_err_msg = "You can look, but you can't take that." +# Gadgets:2 ends here + + + +# And we shouldn’t see it at first, as it is in the description: + + +# [[file:../../../projects/mud.org::*Gadgets][Gadgets:3]] +@lock gadgets = view:tag(hidden_gadgets) +# +@set gadgets/hidden_tag = "hidden_gadgets" +# Gadgets:3 ends here + + + +# The pre– and postfix descriptions: + + +# [[file:../../../projects/mud.org::*Gadgets][Gadgets:4]] +@set gadgets/desc_first_prefix = "<< Fascinating ^ Interesting ^ Curious >> << collection of ^ assortment of ^ >> << gadgets ^ gizmos ^ contraptions >>. You << look at ^ notice >> " +# +@set gadgets/desc_prefix = "You << spot ^ notice ^ look at >> another << gadget ^ gizmo ^ contraption ^ >>, " +# +@set gadgets/desc_postfix = "" +# Gadgets:4 ends here + + + +# And the gadgets themselves: + + +# [[file:../../../projects/mud.org::*Gadgets][Gadgets:5]] +@set gadgets/descs = ( + "a massive grandfather clock whose face is a stained-glass window; instead of hands, a tiny mechanical owl flies in circles, chasing a glowing brass mouse that moves erratically.", + "a delicate glass terrarium containing a dancing brass elephant. A perfectly detailed raincloud crackles with silent violet lightning and drops rain on the moss below.", + "a music box with an open lid, where a tiny brass skeleton and a porcelain dryad waltz together on a velvet stage. You never realized that the music, which you would call industrial rock, could be played in 3 / 4 time.", + "a heavy bronze astrolabe maps an impossible sky; the constellations etched onto its spinning plates are shaped like deep-sea creatures—leviathans with too many eyes, anglerfish with lanterns made of embedded pearls, and massive, coiled nautiluses.|/Most unsettling are the pointer arms. Instead of straight metal brass rulers, they are sculpted to look like segmented, reaching tentacles, that point toward blank, empty spaces on the plates where no stars are etched, as if tracking things that haven't arrived yet.", + "a mechanical chameleon forged from overlapping plates of iridescent tin; it sits motionless on a pile of scrap metal, its skin slowly rippling to mimic the exact texture and rust patterns of the junk beneath it.", + "a glass jar filled with hundreds of tiny, glowing mechanical fireflies swarming and swirling in hypnotic patterns. Did it just organize themselves into a sharp silhouette of a screaming face before scattering back into chaos?", + "a miniature brass carousel where the horses have been replaced by intricately carved mechanical grasshoppers. As the carousel spins, the grasshoppers themselves remain perfectly crisp and sharp to your vision, while the wooden platform beneath blurs into a seamless ring.", + "a heavy iron kettle sitting on the cold shelf, venting a continuous, thick stream of lavender-scented steam that shapes itself into the silhouettes of leaping stags before dissolving.", + "a small, intricate birdcage made of twisted silver wire, containing a single, flawlessly polished chrome sphere that hovers dead center, singing with the unmistakable, clear warble of a nightingale." +) +# Gadgets:5 ends here + + +# Let’s create a project that can be completed by the player. + +# This should contain a “state” that looks differently for each player based on an attribute on the player. + + +# [[file:../../../projects/mud.org::*The Project][The Project:1]] +@create/drop project: typeclasses.puzzles.Stateful +# +@desc project = On the workbench lies a tangle of brass plates, tubes and mechanical gears, shaped like a bird. Unassembled, it appears to be missing parts that might help it fly. +# The Project:1 ends here + + + +# Initial default state is unfinished: + + +# [[file:../../../projects/mud.org::*The Project][The Project:2]] +@set project/name_default = "unfinished project" +# +@set project/desc_default = "On the workbench lies a tangle of brass plates, tubes and mechanical gears, shaped like a bird. Unassembled, it appears to be missing parts that might help it fly." +# The Project:2 ends here + + + +# And this is the name and description when the project is finished: + + +# [[file:../../../projects/mud.org::*The Project][The Project:4]] +@set project/name_finished = "mechanical bird" +# +@set project/desc_finished = "This contraption made of brass plates and tubing sports an array of beautiful feathers, as it flies about." +# The Project:4 ends here + + +# This Dwarf will be in the dungeons, but I would like them to come out at times. + +# [[file:../../../projects/mud.org::*George the Dwarf Tinkerer][George the Dwarf Tinkerer:1]] +@create/drop George;dwarf: typeclasses.chatbots.Dwarf +# +@set dwarf/gender = "male" +# +@set dwarf/pose = "tinkering at an unfinished project" +# +@set dwarf/pose_default = "tinkering" +# +@set dwarf/pose_sleep = "snoozing" +# George the Dwarf Tinkerer:1 ends here + + + +# And his description: + + +# [[file:../../../projects/mud.org::*George the Dwarf Tinkerer][George the Dwarf Tinkerer:2]] +@desc dwarf = Spectacles and wild unkempt hair gives this dwarf a professor-y look. He braids his long beard into two strands, and tucks each of them into pockets in his brown apron, along with various tools that chime as he moves. +# George the Dwarf Tinkerer:2 ends here + + + +# Then give him the =sdesc= (not sure why I have to do both), and wake him. + + +# [[file:../../../projects/mud.org::*George the Dwarf Tinkerer][George the Dwarf Tinkerer:3]] +py dwarf = me.search("dwarf") ; dwarf.db._sdesc="white-haired dwarf" ; dwarf.sdesc.add("white-haired dwarf") ; dwarf.home = here; dwarf.backstory("dwarf") +# George the Dwarf Tinkerer:3 ends here + + + +# And get him moving: + + +# [[file:../../../projects/mud.org::*George the Dwarf Tinkerer][George the Dwarf Tinkerer:4]] +@script dwarf = typeclasses.chatbots.TravelingNPC +# George the Dwarf Tinkerer:4 ends here + + + +# But not so much: + + +# [[file:../../../projects/mud.org::*George the Dwarf Tinkerer][George the Dwarf Tinkerer:5]] +@set dwarf/travel_time = 60 +# +@set dwarf/stay_time = 900 +# +@set dwarf/home_time = 4000 +# George the Dwarf Tinkerer:5 ends here + + # The deep forest is a place where all the Puppets can hang out when not in use. # [[file:../../../projects/mud.org::*Deep Forest][Deep Forest:1]] @@ -5224,6 +5561,122 @@ py dragon = me.search("dragon") ; dragon.db._sdesc="orange fey dragon" ; dragon. # Sir Roblees the Flamboyant Dragon:5 ends here +# We hard-code this character to walk from the Mysterious Stone Circle (=mp00=) and sail across the sea, and back again. + + +# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:1]] +@tel/quiet mp00 +# +@create/drop Darol;hobbit: typeclasses.chatbots.Hobbit +# @update hobbit = typeclasses.puppets.Puppet +# +@set hobbit/gender = "him" +# Darol the Adventuring Hobbit:1 ends here + + + +# Description: + + +# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:2]] +@desc hobbit = An adventurous looking chap with brown mutton chops matching his curly brown hair and his brown cloak. His emerald green eyes match his coat that ends just above his large gold belt buckle, which in turn, matches his gold hoop earring. His backpack sports a pin with an insignia. +# Darol the Adventuring Hobbit:2 ends here + + + +# And the posing? + + +# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:3]] +@set hobbit/pose = "with his thumbs in his waistcoat pocket" +# +@set hobbit/pose_sleep = "absentmindedly smoking a pipe" +# +@set hobbit/pose_default = "with his thumbs in his waistcoat pocket" +# Darol the Adventuring Hobbit:3 ends here + + + +# Then wake it. + + +# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:4]] +py hobbit = me.search("hobbit") ; hobbit.sdesc.add("hobbit") ; hobbit.backstory("dragon") +# Darol the Adventuring Hobbit:4 ends here + + + +# Moving attributes: + + +# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:5]] +@set hobbit/traveling_direction = "back" +# Darol the Adventuring Hobbit:5 ends here + + + +# He needs his stuff, like a pipe: + + +# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:6]] +@create pipe: typeclasses.things.Pipe +# +@desc pipe = A large pipe worthy of a Hobbit. +# +@give pipe = hobbit +# Darol the Adventuring Hobbit:6 ends here + + + +# Need something to state he’s adventurous: + + +# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:7]] +@create short sword: typeclasses.things.Wand +# +@desc short sword = Beautiful gold filigree on the hilt and scabbard. +# +@give short sword = hobbit +# Darol the Adventuring Hobbit:7 ends here + + + +# And his fancy waistcoat: + + +# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:8]] +@create waistcoat : typeclasses.things.BagofJunk +# +@desc waistcoat = An elegant green waistcoat. +# +@set waistcoat/stuff = "fey" +# +@give waistcoat = hobbit +# Darol the Adventuring Hobbit:8 ends here + + + +# But mostly, he needs his horn: + + +# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:9]] +@create horn : typeclasses.sailing.CallingHorn +# +@desc horn = Made from the sea mist, it calls to you +# +@give horn = hobbit +# Darol the Adventuring Hobbit:9 ends here + + + +# And get it moving: + + +# [[file:../../../projects/mud.org::*Darol the Adventuring Hobbit][Darol the Adventuring Hobbit:10]] +@script hobbit = typeclasses.chatbots.TravelingNPC +# Darol the Adventuring Hobbit:10 ends here + + # And now that we are done, say it: