Skip to content

Instantly share code, notes, and snippets.

@QuadStorm
QuadStorm / pmmod
Last active September 30, 2018 05:13
PM Mod
$Server::PMDelay = 3;
$Server::PMColor = 4;
function serverCmdPM(%client, %target, %a, %b, %c, %d, %e, %f, %g, %h, %i, %j, %k, %l, %m, %n, %o, %p, %q, %r, %s, %t, %u, %v, %w, %x, %y, %z, %ab, %ac, %ad)
{
if ($pmBans_[%client.getBL_ID()])
{
messageClient(%client, '', "You are banned from sending PMs.");
return;
}
@QuadStorm
QuadStorm / misc.cs
Last active October 13, 2018 15:43
miscellaneous scripts
function scroll(%text)
{
%charcount = getCharCount(%text);
for (%i; %i < %charcount; %i++)
{
}
}
@QuadStorm
QuadStorm / BrickifyTerrain.cs
Last active December 10, 2018 20:50
Originally made by Treynolds416. Safety checks removed -- Don't use on a public server. Samples terrain heights around each point and averages them for smoother terrain.
//BrickifyTerrain
//Turns map terrain into a 4x4 cubescape (I couldn't think of a better name)
%cubes = forceRequiredAddOn("Brick_Large_Cubes");
if(%cubes == $Error::AddOn_NotFound)
return;
$dbSelect = brick16xCubeData; // For use in Brickadia, Replace the UI name in resulting BLS files with with 4x4x200f
$dbSp = 8;
$factor = 3;
$factor2 = 2;
@QuadStorm
QuadStorm / BrickifyTerrainToFile
Last active December 13, 2018 20:32
Terrain to Bricks, direct to file
//BrickifyTerrain
//Turns map terrain into a 4x4 cubescape (I couldn't think of a better name)
%cubes = forceRequiredAddOn("Brick_Large_Cubes");
if(%cubes == $Error::AddOn_NotFound)
return;
$dbSelect = brick4xCubeData; // For use in Brickadia, Replace the UI name in resulting BLS files with with 4x4x200f
$dbSp = 2;
$factor = 3;
$factor2 = 2;
@QuadStorm
QuadStorm / BrickifyTerrainToFile2.cs
Last active May 27, 2019 22:06
Terrain to File, v2
//BrickifyTerrain
//Turns map terrain into a 4x4 cubescape (I couldn't think of a better name)
%cubes = forceRequiredAddOn("Brick_Large_Cubes");
if(%cubes == $Error::AddOn_NotFound)
return;
$dbSp = 1;
$factor = 3;
$factor2 = 1;
@QuadStorm
QuadStorm / freezecam.cs
Last active January 12, 2019 19:40
Freezes the camera for an amount of time.
function chaseCamClientToggle(%down)
{
if (!%down)
return;
if(isObject(serverConnection))
{
if ($chaseCam)
{
$chaseCam = false;
serverConnection.chaseCam(0);
@QuadStorm
QuadStorm / PCSSEfastsoft_frag.glsl
Created February 17, 2019 19:13
PCSSE pre-configured for (relatively) fast soft shadows; make an accompanying _vert file named PCSSEfastsoft_vert.glsl using a copy of the default rendercsm_vert.glsl
#version 120
#extension GL_EXT_texture_array : require
#extension GL_EXT_texture_array : enable
// Originally Port's Poisson Disc (Optimized) Soft Shadow Shader (2015), modified by Stealth Commander/QuadStorm
// Includes an ultra graphics version, a Percentage-Closer/Perceptually-Correct Soft Shadows (PCSS) implementation, and other configuration variables
// 9th version
// Configuration: For the adventurous!

Keybase proof

I hereby claim:

  • I am quadstorm on github.
  • I am quadstorm (https://keybase.io/quadstorm) on keybase.
  • I have a public key ASAtmUIXcPuUlSlKqvTGV8ULADG62u8S9-wlbkAHn6xrzwo

To claim this, I am signing this object:

@QuadStorm
QuadStorm / renderCsm_frag.glsl
Last active June 8, 2019 16:14
Default Blockland Fragment Shader using version 460
#version 460
// Varying.
in vec4 vPos;
in vec3 worldNormal;
in vec3 worldPos;
// Global directional light uniforms.
uniform vec4 dirLightDir;
uniform vec4 dirLightColor;
@QuadStorm
QuadStorm / renderCsm_vert.glsl
Created June 8, 2019 16:14
Default Blockland Vertex Shader using version 460
#version 460
// Varying.
out vec4 vPos;
out vec3 worldNormal;
out vec3 worldPos;
// 460
uniform mat4 gl_ProjectionMatrix;
in vec4 gl_Vertex;