All help topics · Link to this topic
Showing help on 'effects-programming'
Consumable effects: $effectful and $effects_pcSet item.effects to a map of names to seconds.
Example: item.effects = ["thc" -> 1200];
item.intensity sets the dose per bite or sip.
Food applies effects on every bite, including the first and last.
Chomp delivers the remaining bites in one dose.
Drinks apply effects on every successful sip.
effect_delay is onset delay in seconds for each dose.
effect_msg is an optional onset message.
Delayed doses save settings before consumed food is recycled.
THC adds dose linearly, without tolerance.
Other effects keep max intensity unless dose_response is linear.
:add_effect(waif) applies, merges, and schedules expiry.
:has_effect(name) returns the waif or 0.
:settle_effects() updates remaining time before reading effects.
:apply_effects(player, ?dose=1.0) multiplies the item's intensity by dose.