Skip to content

Instantly share code, notes, and snippets.

@Deamon5550
Last active August 29, 2015 14:04
Show Gist options
  • Select an option

  • Save Deamon5550/c14a43ed9e279e94ac7e to your computer and use it in GitHub Desktop.

Select an option

Save Deamon5550/c14a43ed9e279e94ac7e to your computer and use it in GitHub Desktop.
Stencil Rework
Stencil Brush:
Notes:
-If you have better names for the types, that would be great
-The type is the selection method, which all fall into one of 4 shapes (cuboid, ellipsoid, ellipse_extruded, and poly_2d)
-The _d suffix on selections is to denote that it is defined based on additional clicks and not brush settings (set, ellipse, ellipsoid
and poly_2d are defined by default)
Commands:
key: /command [required] (optional)
/b st (name default=Clipbaord Only) (type default=set) (mask default=none) (-r|rotate [#]|[p# y# r#]) (-f|flip [N|S|NORTH|SOUTH][E|W|EAST|WEST][U|D|UP|DOWN])
Types: [ set, ball|b, disc|d, voxel|v, voxeldisc|vd, discface|df, voxeldiscface|vdf, ellipse|el, ellipsoid|elo, sphere_d, disc_d,
voxel_d, poly_2d, cylinder|cyl, cylinder_face, cylinder_d, ellipse_extruded]
Masks: [ None (legacy full), Replace (legacy fill), Negative_Replace (legacy replace) ]
If no name is given then saving is disabled and the region is stored in your clipboard only
/b stack (name default=selection) (type default=set) (mask default=none) [n] -instant|i
Types: [ set, ball|b, disc|d, voxel|v, voxeldisc|vd, discface|df, voxeldiscface|vdf, ellipse|el, ellipsoid|elo, sphere_d, disc_d,
voxel_d, poly_2d, cylinder|cyl, cylinder_face, cylinder_d, ellipse_extruded]
Masks: [ None (legacy full), Replace (legacy fill), Negative_Replace (legacy replace) ]
If no name is given then saving is disabled and the region is stored in your clipboard only
this brush acts like the stencil brush except that upon pasting the stencil is stacked away from the sniper n times
if the instant flag is set the region is stacked as soon as the selection is complete
Actions:
Arrow:
right click:
selection of region (see below)
left click:
if the selection is complete (see below)
copy region, with the reference point set to the targeted block
if a name is specified then the region is saved down to the filesystem
does not clear 'selection' allowing left clicking again to resave
if crouching:
delete the contents of the region
Gunpowder:
right click:
pastes the region from clipboard, if it exists
left click:
nothing
Region Selection:
Types: [ set, ball|b, disc|d, voxel|v, voxeldisc|vd, discface|df, voxeldiscface|vdf, ellipse|el, ellipsoid|elo, sphere_d, disc_d,
voxel_d, poly_2d, cylinder|cyl, cylinder_face, cylinder_d, ellipse_extruded ]
set: (default) (shape: cuboid)
first: one corner
second: opposite corner
region is a cuboid with opposite corners defined by the first and second clicks
ball|b: (shape: ellipsoid)
first: selects center,
region is a sphere centered on the first click with radius equal to the sniper's brush size
disc|d: (shape: ellipse_extruded)
first: selects center
region is a flat disc centered on the first click with radius equal to the sniper's brush size
voxel|v: (shape: cuboid)
first: selects center
region is a cube centered on the first click where the length of each side is 2n+1 where n is the sniper's brush size
voxeldisc|vd: (shape: cuboid)
first: selects center
region is a square disc centered on the first click, where the length of a side is 2n+x where n is the sniper's brush size
discface|df: (shape: ellipse_extruded)
first: selects the center
region is a flat disc along the same plane as the face of the block selected with radius set to the sniper's brush size
voxeldiscface|vdf: (shape: cuboid)
first: selects the center
region is a flat disc along the same plane as the face of the block selected where the length of a side is 2n+x where n is the
sniper's brush size
ellipse|el: (shape: ellipse_extruded)
first: selects the center
second: defines the first radius (x if plane is XY or XZ and y if plane is YZ)
third: defines the second radius (z if plane is YZ or XZ and y if plane is XY)
region is an ellipse along the same plane as the face of the block selected with major and minor radii defined by the second and
third clicks
ellipsoid|elo: (shape: ellipsoid)
first: selects the center
second: defines the x radius
third: defines the y radius
fourth: defines the z radius
region is an ellipsoid, with radii defined by the second to fourth clicks.
sphere_d: (shape: ellipsoid)
first: selects the center
second: selects the radius
region is a sphere with radius defined by the second click's distance from the center
disc_d: (shape: ellipse_extruded)
first: selects the center
second: selects the radius
region is a disc along the plane of the face selected by the first click, with a radius defined by the length of the vector from the
center to the second click projected onto the plane of the disc
voxel_d: (shape: cuboid)
first: selects the center
second: selects a corner
region is a cuboid centered on the first click with radii defined by the seconds click position relative to the center
poly_2d: (shape: poly_2d)
first: selects the center
second-n: selects the points
region is a 2d polygon formed as follows
points are projected onto the plane of the face selected by the first click and scanned clockwise from the major axis
A set of triangles is then created
where each triangle is formed between a point, the next point, and the center
the last point is connected to the first, as long as the last point is greater than 180 degrees from the starting angle of the
scan
the polygon formed by the union of these triangles is then extruded to a height defined by the snipers voxel-height
cylinder|cyl: (shape: ellipse_extruded)
first: selects the center
region is a cylinder with radius defined by brush size and height defined by voxel-height
cylinder_face: (shape: ellipse_extruded)
first: selects the center
region is a cylinder with radius defined by brush size and height defined by voxel-height
the cylinder created faces the axis perpendicular to the face of the block selected
cylinder_d: (shape: ellipse_extruded)
first: selects the center
second: selects the radius
region is a cylinder with height defined by voxel-height
cylinder_face_d: (shape: ellipse_extruded)
first: selects the center
second: selects the radius
region is a cylinder with height defined by voxel-height
the cylinder created faces the axis perpendicular to the face of the block selected
ellipse_extruded: (shape: ellipse_extruded)
first: selects the center
second: defines the first radius (x if plane is XY or XZ and y if plane is YZ)
third: defines the second radius (z if plane is YZ or XZ and y if plane is XY)
region is an ellipse along the same plane as the face of the block selected with major and minor radii defined by the second and
third clicks
region is extruded perpendicular to the plane to a height defined by the sniper's voxel-height
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment