Room Spawn
Added in v2.0.1.
Description
Targets locations inside a room of the caster's procedural dungeon. In the default spawn mode it returns the room's spawn point. In random mode it returns up to amount random points inside the room, with optional edge padding, minimum spacing, and surface snapping.
Procedural only.
Attributes
| Attribute | Aliases | Description | Default |
|---|---|---|---|
room |
roomid, id, r, name, n |
Room template name, case insensitive. The first placed room using that template wins. When empty, the room at the skill origin is used. | (empty) |
mode |
m |
spawn returns the room spawn point; random returns random points. |
spawn |
amount |
a |
Number of random points to generate in random mode. Minimum 1. |
1 |
padding |
p |
Blocks to shrink the room box inward on X and Z before picking random points. | 0 |
spacing |
s |
Minimum horizontal (X/Z) distance enforced between generated random points. Y is not considered. | 0 |
onsurface |
onsurf, os |
When true, each random point is placed one block above the highest solid block in its column, scanning down from the top of the room box. | false |
Examples
SummonAtSpawn:
Skills:
- summon{type=SkeletalKnight;amount=1} @roomspawn
ScatterMobs:
Skills:
- summon{type=Zombie;amount=1} @roomspawn{mode=random;amount=6;padding=2;spacing=3;onsurface=true}
The first summons at the current room's spawn point. The second scatters up to six zombies across the room's surface with padding and spacing.
Aliases
-
@droomspawn -
@roomlocation -
@roomloc
Notes
- This is a location targeter. Mechanics that need entity targets get nothing from it.
- The origin used to pick the "current room" is the skill's origin location, falling back to the caster's own location. It is only consulted when
roomis empty. - In
spawnmode it returns nothing if the room has no spawn point set. - In
randommode it makes at mostamount * 20placement attempts, and discards a candidate whose column has no solid block or that violatesspacing, so you can end up with fewer points thanamount, or none at all. - Without
onsurface, Y is picked uniformly across the room's full height, so points can land inside blocks or in mid-air. onsurfacenever picks a random Y. It scans from the top of the room box downward for the first solid block in the column and places the point one block above it. Columns with no solid block are skipped.paddingis ignored unless the room is wider thanpadding * 2on both X and Z.- Mythic's standard location options also apply, including
xoffset/yoffset/zoffset,centered,surface,blocktypes,blockignores,limit, andsort.