Compulsions are essentially a multi-phased approach to an addiction. You get to have small character buffs for giving into the compulsion, but if you do so too often it will turn into a full addiction.
Here is an example of what a compulsion looks like:
:: maid compulsion [compulsion]
{
(if:$character's "side effects" contains "maid")[
(unless:($has_ap_mod:"compulsive cleaner mod"))[
(set:$action_point_mods to it + (a:(dm:
"name","compulsive cleaner mod",
"title","Compulsive Cleaner",
"description","As a compulsive cleaner, you find doing chores oddly satisfying. Complete chores regularly, and you'll get an XP bonus.",
"good message","You feel accomplished after tidying up! Your XP gain will be increased for a while.",
"addiction message","You are starting to *need* the satisfaction of a clean environment... if you don't clean regularly, your XP gain will decrease.",
"bad message","You're feeling anxious about the messy state of things... your XP gain has decreased until you complete some cleaning.",
"normal wear off","It's been a while since you've done a thorough cleaning...",
"type","xp",
"removal criteria","Remove the Live-In Maid side effect if you want to remove this compulsion.",
"addiction threshold",10,
"times triggered",0,
"cooldown",7,
"lower cooldown",5,
"cooldown floor",3,
"last day",-1
)))
]
](else:)[
(set:$action_point_mods to it - (find:_mod where _mod's name is "compulsive cleaner mod",...$action_point_mods))
]
}
Name | name (more like an id) that will exist in $action_points_mods, when checking if you have the compulsion |
Title | What shows up under compulsions (more of a name) |
Description | General description to go with the title on the Compulsions screen |
Good Message | The displayed message when you give in, can tell the player what they’re being rewarded with here. |
Addiction Message | The displayed message if it’s become an addiction, and you give in. You can warn the players what the penalty is IF they don’t continue to give in. |
Bad Message | The displayed message when the penalty is applied |
Normal Wear Off | The displayed message when you meet the removal criteria |
Type | can be either “slot”, “regen”, or “xp” – which gives you an AP slot, bonus AP regen, or XP |
Removal Criteria | Text explanation for how to remove the compulsion |
Addiction Threshold | how many times you do the thing before it becomes an addiction |
Times Triggered | gets initialized as 0, but counts up as you give in. Used for the addiction threshold |
Cooldown | how often you need to do it (In days, I think?) |
Lower Cooldown | how long before the cooldown decreases |
Cooldown Floor | the lowest it can go |
Last Day | gets initialized as -1. The next time you give in, it gets recorded as the day number. |
Once you have it set up, then you would set up a trigger for the completing the compulsion event.
<!-- Used when chores are finished -->
(if:($has_ap_mod:"compulsive cleaner mod"))[(display:"action point mod trigger")]