UODiamondCodex

Reagents Spawn System

Scatters gatherable "lost reagent" piles across grasslands so players can forage spell reagents in the wild. Source: UOD - System Reagents Spawn.scp.

How it works

Spawneri_chest_reagent_system maintains a target population of reagent piles (MORE=250):

  • Each tick, if i_random_reagent.instances already exceeds the target, it waits 60s.

  • Otherwise it rolls a random map coordinate and only spawns if the tile is t_grass. It rejects spots inside a housing region (r_housing) or near a tree (isneartype t_tree).

  • On a valid spot it creates an i_random_reagent, sets a random amount {10 20}, and randomly picks one of eight reagent graphics via DORAND 8:

    nightshade, sulfur ash, garlic, ginseng, mandrake root, spider silk, black pearl, blood moss.

    The pile is named "lost <reagent name>".

  • say lines ("Was grass" / "Wasn't Grass") report placement attempts for tuning/debug.

The pilei_random_reagent is a no-move, decaying item with a 1-hour timer. Double-clicking it (from within 3 tiles) gives the player <amount> of the corresponding reagent (serv.newitem <dispid>,<amount>) and removes the pile.

Commands / player-facing usage

No .commands. Players gather by double-clicking a "lost <reagent>" pile they find in the world (must be within 3 tiles).

Key definitions

DEFNAME Role
i_chest_reagent_system Global spawner; MORE = target pile population (250)
i_random_reagent The forageable pile; 1-hour decay, gives its reagent on dclick
DORAND 8 reagent list nightshade, sulfur ash, garlic, ginseng, mandrake root, spider silk, black pearl, blood moss

Note: Uses the same grass/housing/tree placement checks as the treasure-chest and reagent spawners; only spawns on open grassland.