Memories are anything that happens in XCL, which can be referenced at other points in time. A memory first must be registered using the $remember macro. Individual memories are stored in the $memories
array as datamaps.
Each memory is a datamap consisting of 8 pairs of entries. 5 of these values are supplied to via the $remember macro. The other 3 (day, timeslot, and location) are captured automatically.
Register New Memory
To register a new memory we use the $remember macro along with 5 arguments (in this order):
- id
- strength
- npc
- media
- tags
($remember:"stepsis shoplifting",14,"stepsis","none","didnt yell at her","caught shoplifting")
ID is just the name of the memory. It must be unique, if you use $remember with an existing ID, it will overwrite it. You can update memories by specifying the ID so make sure it’s something you can refer back to.
Strength indicates how many days before the memory is wiped (you’re not gonna remember something super minor several weeks from now.)
- Whenever the age of the memory exceeds the strength level, the memory will be cleared from this set.
- Memories with a strength of -1 are never removed – bear in mind that this means they can grow.
- Memories with the same ID replace each other.
NPC is just the name of the npc involved. It should match the NPC’s id, as it’s used to load night thoughts.
Media is the address of the media that goes with the memory. Usually like the last video or a picture.
Tags can be whatever details you want to define about the scene. This is an array field, so you can add multiple entries.
Here is an example of what a full memory might look like:

Triggering a Dream
To have a memory trigger a dream, you set the last tag to “dream”, followed by the name of the dream passage. In this example “dream facial choice” would be the name of the passage that starts the dream. The dream will play that night when the character goes to bed.
($remember:"cum facial",8,"none","none","dream","dream facial choice")
Updating a Memory
To update a memory, use the $remember_update macro. There are 3 things you can do with this macro:
- Add Tags (add)
- Add Media (add media)
- Remove Tags (remove)
The macro’s first argument is the operation, followed by the memory’s id, then finally the tag.
<!-- This adds "took her place" and "took pill in office" to the "stepsis shoplifting" memory -->
($remember_update:"add","stepsis shoplifting","took her place","took pill in office")
<!-- This adds media to the "stepsis shoplifting" memory -->
($remember_update:"add media","stepsis shoplifting","places/mall/security.jpg")
<!-- This removes "took her place" and "took pill in office" from the "stepsis shoplifting" memory -->
($remember_update:"remove","stepsis shoplifting","took her place","took pill in office")
Deleting a Memory
To remove a memory, use the $forget macro:
($forget:"stepsis shoplifting")
This removes it from the $memories
array.
Recalling a Memory
You can use the $recall macro to load a specific memory into the $memory
variable.
($recall:"stepsis shoplifting")
This lets your refer to that memory’s values.
Doing things with Recalled Memories
<!-- Playing/Showing media from the memory -->
($vid:$memory's media)
($pic:$memory's media)
<!-- Load NPC from memory into $npc (and right side panel) -->
(set:$npc_to_load to $memory's npc)(display:"load npc male")
<!-- Check tags for X -->
(set:$tags to $memory's tags)
(if:$tags contains "secretary")[You stress a bit about your upcoming SECRET-ary demo...]
(if:$tags contains "shoplift bj"["Ugh, when that creepy guard made me blow him... I bet you were jealous it wasn’t you... I mean, your eyes were practically popping out!"]
<!-- Refer to/check the day of the memory -->
(if:$memory's day is $day)[That was earlier today!]
(else-if:$memory's day is $day-1)[That was yesterday!]
(else:)[That was $day-($memory's day) days ago!]
<!-- Refer to the location -->
Remember, that happened (print:$memory's location)?
<!-- Locations for the memory all start with "at", "while", "during", or "in".
They would be read like: "in the shower", "while giving a sales demo", "at the mall", "while shopping" -->
Add Memory to Shower/Night/Masturbation Thoughts
The following are examples of how you would use the thought/masturbation passage tags to insert memories. (Thanks DatDude!)
Shower Thoughts
<!-- This passage uses the shower_thought passage tag to add the "summer city drive" memory to the shower thought variable.-->
:: summer city drive shower thought trigger [shower_thought]
{
(set:$shower_thought to "summer city drive")
(set:$shower_thought to (cond-twirl:
($recall:"summer city drive"), "summer city drive",
$shower_thought
)
)
}
<!-- The name of this passage matters -- the name needs to be "shower thought " + _your memory's name_. So a memory named "summer city drive" needs a shower thought passage called ":: shower thought callie pickup"-->
:: shower thought summer city drive
{
(set:$tags to $memory's "tags")
You think about your relaxing drive into Summer City. (if:$tags contains "listened to music")[The music on the radio wasn't half bad!](else:)[The road noise did get old after a while though...]
(nl:1)
<span class='borderless'>(link:"Recall that moment...")[($pic:$memory's "media")]</span>
($remember_update:"add","summer city drive", "shower thought")
(nl:1)($forget:"summer city drive")<!-- This memory is forgotten after one instance so that it only occurs on the first day.-->
(nl:1)
}
Night Thought
<!-- This passage uses the night_thought passage tag to add the "callie pickup" memory to the night thought queue.-->
:: callie pickup night thought trigger [night_thought]
{
(set:$night_thought to "callie pickup")
(set:$night_thought to (cond-twirl:
($recall:"callie pickup"), "callie pickup",
$night_thought
)
)
}
<!-- The name of this passage matters -- the name needs to be "night thought " + _your memory's name_. So a memory named "callie pickup" needs a night thought passage called ":: night thought callie pickup"-->
:: night thought callie pickup
{
(set:$tags to $memory's "tags")
*The girl you met on your drive into town was gorgeous. *(if:$character's "id" is "jia")[*You'll have to try X-Change if you want to meet her though...*](else:)[*She said she prefers girls with red hair... Is there a type of X-Change that can do that?*](set:$npc to (dm:"name","Callie","img","img/npc/girls/callie/intro.jpg"))
(nl:1)<span class='borderless'>(link:"Remember her face.")[(live:0.5s)[(replace:?right_options)[($pic:$npc's img)](stop:)]]
($remember_update:"add","callie pickup", "night thought")
(nl:1)
}
Masturbation
<!-- This passage uses the "male_masturbation_memories" tag to load an option to use the "callie pickup" memory to masturbate with, with the link showing as "The hot hitchiker you met " plus the length of time. So probably "The hot hitchiker you met yesterday" in the end.-->
<!-- Note the end of the long line of code which sets the difficulty. The arousal cleared is set to (min:1,(rnd:$character's masculinity / 180,1))-->
:: callie load male masturbation [male_masturbation_memories]
{
(if:($recall:"callie pickup") and not (checkdm:$memory,"tags","contains","masturbated"))[(set:$options to $options + (a:(dm:"link","The hot hitchhiker you met " + ($memory_time:$memory) + "...","id","callie pickup","cum factor",(min:1,(rnd:$character's masculinity / 180,1)))))]
}
<!-- The name of this passage matters -- your male masturbation passage needs to be ":: male masturbation no porn " + _your-memory-name_ . So something like ":: male masturbation no porn callie pickup" with a memory named "callie pickup"-->
:: male masturbation no porn callie pickup
{
(if:($recall:"callie pickup"))[(replace:?right_options)[($pic:$npc's img)]*The first girl you meet in Summer City, and she's a total knockout! *
(if:$character's "id" is "jia")[*You'll have to take X-Change to meet her again though...*]
(else:)[*She said she prefers girls with red hair... Is there a type of X-Change that can do that?*]
]
($forget:"callie pickup")($simple_option:"male masturbation no porn result","Cum.")
}