Medications and effects

The stock medications, every premade effect, and how to add your own.

In-development version. These docs cover the testing build of Prescriptions. The official release is still documented on the GitBook linked in its README.

Every medication is an inventory item with an entry in the catalog. The catalog says what it costs, how many doses it has, what effect it plays, and what it takes to bottle it.

The stock catalog

MedicationEffectLastsPrice
Pillbox Patch Kitclearinjuries30s500
Redwood Relief 10 MGsmokey25s600
Stretchyum 100 MGgingey120s400
Chiliad Burn 50 MGfire35s350
Mollis 50 MGarmor30s500
Zombix 250 MGdrunk15s500
Willie's Butt Drainsmokey10s500
Space Cadet 100 MGorbit20s750
Maze Nap 10 MGsedating40s300
Humane Orbitals 150 MGorbit25s650
Up-n-Atom Tabs 20 MGwired45s550
Vinewood Glow 80 MGeuphoria60s480
Altruist Crystal 5 MGwired30s700

Each bottle has 3 uses. Recipes are stock-room ingredients: an empty bottle plus a mix of pill binder, Humane Labs extract, Redwood leaf, ginger root, Chiliad chili, Sprunk syrup, and meteorite powder. All of it is delivered on supply runs.

What a catalog entry looks like

mollis = {
    name = 'Mollis 50 MG',
    uses = 3,                  -- doses per bottle
    maxPrescriptionDoses = 50, -- most a doctor can write for
    price = 500,               -- list price
    icon = 'fa-solid fa-shield-halved',
    effect = 'armor',          -- premade or custom effect id
    duration = 30,             -- seconds
    strength = 50,             -- only matters for armor and health
    recipe = {
        { item = 'emptybottle', count = 1 },
        { item = 'pillbinder', count = 2 },
        { item = 'humaneextract', count = 1 },
    },
},

strength only changes the armor and health effects. Everything else ignores it.

Premade effects

Set effect to any of these. Display names live in locales/en.json under Effects.Labels.

IdNameIdName
arepainLay-FlatiummellowMaze Bank Naptime
smokeyTrevor Lung TreatwiredUp-n-Atom Wired
lsdBarry Vision BlendeuphoriaVinewood Glow
fireworksPatriot Popper PackbaldingLester Hair Solution
staminaEgoChaser I.V.brighteyedHeadlight Headache
armorMollis Body ArmorcaloriedenseCluckin Bell Bulk-Up
healthBand-Aid BonanzaelectrifyingShock Jock Juice
gingeyStretchyosisglowieRadAway Lite
clearinjuriesOuch Be GoneparanoiaThey All Know
clearbleedsBleed Be GonerefreshingSprunk Splashback
drunkPißwasser HangoversedatingMaze Nap Sedate
orbitSpace CadetioumseizureShake N Bake
birdseyeBlaine County Drone CamshrinkingAnt-Man Aspirin
fireHotbox HazardslipperyBanana Peel Boost
squeekerRat Pack RuckusthirdpersonsyndromeCamera Crew Catastrophe
upsidedownTopsy Turvy RX

Pharmacists can pick any premade or custom effect when bottling.

Add your own medication

The simple path, in this resource

  1. Create the item in your inventory, with an image named after it
  2. Add an entry with the same name in the panel's meds page
  3. Restart the inventory and this resource

A custom effect

  1. Write the effect in resource/open/client/custom_effects.lua:
RegisterCustomEffect('myglow', 'Neon Glow', function(durationSec, strength)
    -- your visuals here
end)
  1. Register the same id and label in resource/open/server/custom_effects.lua, so bottling lists it:
RegisterCustomEffect('myglow', 'Neon Glow')
  1. Set effect = 'myglow' on a medication

Do not reuse a premade id, or stop and overdose. Once any custom effect exists, the bottling picker splits into Premade and Custom lists.

From another resource

You can register both at runtime with no restart. Put these in a shared script so they run on the client and the server, and start MrNewbPrescriptions first.

exports.MrNewbPrescriptions:RegisterEffect('myglow', 'Neon Glow', function(durationSec, strength)
    -- client only; the server keeps the label for the bottling list
end)

exports.MrNewbPrescriptions:RegisterPrescription('glowtabs', {
    name = 'Glow Tabs',
    uses = 3,
    maxPrescriptionDoses = 50,
    price = 400,
    icon = 'fa-solid fa-flask',
    effect = 'myglow',
    duration = 20,
    recipe = { { item = 'emptybottle', count = 1 } },
})

The glowtabs item still has to exist in your inventory. You can skip RegisterEffect and set effect = 'smokey' or any premade id.

RegisterPrescription only adds a catalog entry. To hand a player the actual medication, see CreatePrescription in the server exports.

On this page