{"id":1583,"date":"2025-08-28T01:16:42","date_gmt":"2025-08-28T01:16:42","guid":{"rendered":"https:\/\/x-change.life\/wiki\/?post_type=docs&#038;p=1583"},"modified":"2025-08-28T01:16:43","modified_gmt":"2025-08-28T01:16:43","slug":"adding-a-dream","status":"publish","type":"docs","link":"https:\/\/x-change.life\/wiki\/docs\/adding-a-dream\/","title":{"rendered":"Adding a dream"},"content":{"rendered":"\n<p>So, you&#8217;ve seen dreams in the game and want to add your own. Awesome. So how do we do that?<\/p>\n\n\n\n<p>There are some creative ways to add a dream, but the least invasive way is to utilize the memory system. Normally you&#8217;d have the character encounter something that they could remember. <\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>:: some passage\n&lt;!-- stuff happens to trigger a memory being stored -->\n&lt;!-- So here you name the memory, how many days to remember it for, the NPC involved, media for the memory, any tags for the memory-->\n($remember:\"name of memory\",100,\"npc name\",\"media file\",\"tag(s)\",\"dream\",\"name of dream passage\")\n\n&lt;!-- Example: -->\n($remember:\"new thing dream\",100,\"bruce\",\"none\",\"cool thing to dream about\",\"dream\",\"new dream intro\")<\/code><\/pre>\n\n\n\n<p>It is super important to have &#8220;dream&#8221; and then the name of the passage that start the dream as the LAST two arguments in the $remember macro.<\/p>\n\n\n\n<p>Next, you set up the night thought. This is the piece of text that appears on the screen right as you are going to bed, just before the dream.<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>:: night thought new thing dream trigger &#91;night_thought]\n{\n\u00a0 \u00a0 (if:($recall:\"new thing dream\") and not (checkdm:$memory,\"tags\",\"contains\",\"night thought\"))&#91;(set:$night_thought to \"new thing dream\")]\n}<\/code><\/pre>\n\n\n\n<p>Here you are saying if you can recall the memory, and &#8220;night thought&#8221; isn&#8217;t one of the tags of the memory, then trigger the night thought. The syntax is important, $night_thought must match the name of the passage. <code>\"night thought \" + $night_thought<\/code>, for the passage name.<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>:: night thought new thing dream\n{\n\u00a0 \u00a0 &lt;!-- Here you put what you want to show up on the screen just before you go to bed and have the dream. -->\n\u00a0 \u00a0 Man, that new thing was really cool...\n\n\u00a0 \u00a0 &lt;!-- If you included tags in your memory, like if you had choices to make and you saved those choices as tags, then you could do conditional responses here too. -->\n\n\u00a0 \u00a0 (set:$tags to $memory's tags)\n\u00a0 \u00a0 (if:$tags contains \"jealous\")&#91;\n\u00a0 \u00a0 \u00a0 \u00a0 Man that new thing was really cool, I'm so jealous that I don't have one.\n\u00a0 \u00a0 ]\n\u00a0 \u00a0 (else-if:$tags contains \"sad\")&#91;\n\u00a0 \u00a0 \u00a0 \u00a0 Man that new thing was really cool, I'm so sad that I don't have one.\n\u00a0 \u00a0 ]\n\n\u00a0 \u00a0 &lt;!-- Then you update the memory to add night thought, you're telling the other night thought passage that you've already had this night thought, so it won't trigger again-->\n\u00a0 \u00a0 ($remember_update:\"add\",\"new thing dream\",\"night thought\")\n}<\/code><\/pre>\n\n\n\n<p>Next is the actual fun stuff. It&#8217;s the dream itself. I won&#8217;t even attempt to put everything that you can do because the possibilities vary way too much. You&#8217;ll have to use that modder&#8217;s intuition and come up with something neat!<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>:: new dream intro\n{\n\u00a0 \u00a0 &lt;!-- This is the launching off place for your dream. Set it up however you like, play a video, pick some choices, whatever you want.-->\n\u00a0 \u00a0 (link:\"Next\")&#91;($cs:\"new dream next\")]\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>:: new dream next\n{\n\u00a0 \u00a0 &lt;!-- An example of how you'd move to another passage, or whatever. Then at the end of the dream, send the player to the wakeup passage-->\n\u00a0 \u00a0 (link:\"Wake up\")&#91;($cs:\"new dream wake up\")]\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>:: new dream wake up\n{\n\u00a0 \u00a0 (display:\"location and time\")\n\u00a0 \u00a0 ($pic:\"scenes\/home\/dreams\/wake up.jpg\")(inc:'day')\n\u00a0 \u00a0 (set:$character's status to $character's gender)(display:\"refresh portrait\")\n\u00a0 \u00a0 ($play:\"ambience\",\"morning\")\n\n\u00a0 \u00a0 The morning light shining through your window onto your face wakes you from your slumber... etc etc\n\n\u00a0 \u00a0 &lt;!-- Whatever else you want to happen when you wake up.-->\n\n\u00a0 \u00a0 (set:$overnight_messages to it + (a:$dream's id))($forget:$dream's id)(dec:'day')\n    ($simple_option:\"advance day\",\"Start the day...\")\n}<\/code><\/pre>\n\n\n<div class=\"wp-block-post-author\"><div class=\"wp-block-post-author__avatar\"><img alt='' src='https:\/\/secure.gravatar.com\/avatar\/384cda5fc4bc6358275720780b32f834?s=48&#038;d=mm&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/384cda5fc4bc6358275720780b32f834?s=96&#038;d=mm&#038;r=g 2x' class='avatar avatar-48 photo' height='48' width='48' \/><\/div><div class=\"wp-block-post-author__content\"><p class=\"wp-block-post-author__name\">chloe<\/p><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>So, you&#8217;ve seen dreams in the game and want to add your own. Awesome. So how do we do that? There are some creative ways to add a dream, but the least invasive way is to utilize the memory system. Normally you&#8217;d have the character encounter something that they could remember. It is super important [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":[],"doc_category":[16],"doc_tag":[21],"_links":{"self":[{"href":"https:\/\/x-change.life\/wiki\/wp-json\/wp\/v2\/docs\/1583"}],"collection":[{"href":"https:\/\/x-change.life\/wiki\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/x-change.life\/wiki\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/x-change.life\/wiki\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/x-change.life\/wiki\/wp-json\/wp\/v2\/comments?post=1583"}],"version-history":[{"count":1,"href":"https:\/\/x-change.life\/wiki\/wp-json\/wp\/v2\/docs\/1583\/revisions"}],"predecessor-version":[{"id":1584,"href":"https:\/\/x-change.life\/wiki\/wp-json\/wp\/v2\/docs\/1583\/revisions\/1584"}],"wp:attachment":[{"href":"https:\/\/x-change.life\/wiki\/wp-json\/wp\/v2\/media?parent=1583"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/x-change.life\/wiki\/wp-json\/wp\/v2\/doc_category?post=1583"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/x-change.life\/wiki\/wp-json\/wp\/v2\/doc_tag?post=1583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}