/tg/ Station 13 - Modules - TypesVar Details - Proc Details

random

Base class for all random spawners.

Vars

anchoredStops persistent lootdrop spawns from being shoved into lockers
lootA list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
loot_subtype_pathThe subtypes (this excludes the provided path) to combine with the loot list
loot_type_pathThe subtypes AND type to combine with the loot list
remove_if_cant_spawnWhether items that cannot be spawned will be removed from the loot list. Keep it TRUE unless you've a good reason.
spawn_all_lootWhether the spawner should spawn all the loot in the list
spawn_loot_chanceThe chance for the spawner to create loot (ignores spawn_loot_count)
spawn_loot_countHow many items will be spawned
spawn_loot_doubleIf the same item can be spawned twice
spawn_loot_splitWhether the items should be distributed to offsets 0,1,-1,2,-2,3,-3.. This overrides pixel_x/y on the spawner itself
spawn_loot_split_pixel_offsetsThe pixel x/y divider offsets for spawn_loot_split (spaced 1 pixel apart by default)
spawn_random_offsetWhether the items should have a random pixel_x/y offset (maxium offset distance is ±16 pixels for x/y)
spawn_scatter_radiusDetermines how big of a range (in tiles) we should scatter things in.

Procs

get_spawn_locationsIf the spawner has a spawn_scatter_radius set, this creates a list of nearby turfs available that are in view and have an unblocked line to them.
make_itemMakes the actual item related to our spawner.
skew_loot_weightsLevels out the weights of loot if lower than 1, or makes rarer spawns even more rare.
spawn_lootIf the spawner has any loot defined, randomly picks some and spawns it. Does not cleanup the spawner.

Var Details

anchored

Stops persistent lootdrop spawns from being shoved into lockers

loot

A list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)

loot_subtype_path

The subtypes (this excludes the provided path) to combine with the loot list

loot_type_path

The subtypes AND type to combine with the loot list

remove_if_cant_spawn

Whether items that cannot be spawned will be removed from the loot list. Keep it TRUE unless you've a good reason.

spawn_all_loot

Whether the spawner should spawn all the loot in the list

spawn_loot_chance

The chance for the spawner to create loot (ignores spawn_loot_count)

spawn_loot_count

How many items will be spawned

spawn_loot_double

If the same item can be spawned twice

spawn_loot_split

Whether the items should be distributed to offsets 0,1,-1,2,-2,3,-3.. This overrides pixel_x/y on the spawner itself

spawn_loot_split_pixel_offsets

The pixel x/y divider offsets for spawn_loot_split (spaced 1 pixel apart by default)

spawn_random_offset

Whether the items should have a random pixel_x/y offset (maxium offset distance is ±16 pixels for x/y)

spawn_scatter_radius

Determines how big of a range (in tiles) we should scatter things in.

Proc Details

get_spawn_locations

If the spawner has a spawn_scatter_radius set, this creates a list of nearby turfs available that are in view and have an unblocked line to them.

make_item

Makes the actual item related to our spawner.

spawn_loc - where are we spawning it? type_path_to_make - what are we spawning?

skew_loot_weights

Levels out the weights of loot if lower than 1, or makes rarer spawns even more rare.

spawn_loot

If the spawner has any loot defined, randomly picks some and spawns it. Does not cleanup the spawner.