SKNoise by ReportCards

The Addon That Includes Noise! (No, not sound.)

Events

0

Expressions

5

Effects

0

Conditions

0

Types

0

Sections

0

Structures

0

Total

5

Complete Revamp 887 days, 20 hours and 31 minutes ago

Update 1.0

This update is a complete recode of skNoise, bringing in a new way to handle generators, more ways to edit a generator and its values

Generators are now actually an object compared to constructing the entire generator through one line.
You can save a generator to a variable now as well!

Here's a quick example of creating a new generator, editing some values, and using it:

command /noise:
trigger:
set {_gen} to new simplex generator with seed 42069
set frequency of {_gen} to 0.01 # Essentially a zoom value
set {_value} to abs(value of {_gen} at player)
if {_value} < 0.5:
set block at player to black concrete
else:
set block at player to white concrete

Alongside this new format for generators, there's also a new type of generator, which is the Value generator.

This generator allows you to essentially create a seeded random number generator, for example:

command /random:
trigger:
set {_g} to new value generator with seed 1
set frequency of {_g} to 1 # Setting to 1 makes it so that each value obtained from a different location, is completely different
set {_val} to abs(value of {_g} at player)
send "Random Number: %{_val}%"

You can also do a lot more to Cellular (Voronoi) generators, such as setting its jitter (how the points are spread), return type, and changing the distance function used.

Here's a quick example of how you'd get the cell values now:

command /cellvalue:
trigger:
set {_g} to new voronoi generator with seed 1
set voronoi return type of {_g} to CellValue
set {_val} to abs(value of {_g} at player)
send "Cell Value: %{_val}%"

And yes, the average expression still exists :emoji_wink:

View Update

Fix Voronoi Noise 1040 days, 20 hours and 49 minutes ago

This update fixes voronoi noise bugs from 0.1.8

View Update

SKNoise | Voronoi Noise 1090 days, 1 hour and 32 minutes ago

NEW EXPRESSION

- Voronoi:
Syntax:
[sknoise] voronoi [noise] at [x] %number%[,] [[y] %-number%[(,|[,] and) [z] %-number%]] [with cell values]
[sknoise] voronoi [noise] at (loc|location) %location% [with cell values]

Description:
Get's the voronoi noise at a location, voronoi noise in simple words is a plot of distance between points. (Wiki)

Big Example:

command /set:
trigger:
set {_l} to location of player
set {_ogL} to location of player
loop 100 times:
loop 100 times:
set {_value} to voronoi noise at ((x-coord of {_l}) / 2), (z-coord of {_l} / 2)
if {_value} >= 0.5:
set block at {_l} to white concrete
else:
set block at {_l} to black concrete
add 1 to x-coord of {_l}
add 1 to z-coord of {_l}
set x-coord of {_l} to x-coord of {_ogL}

View Update

Normalized, bStats, and more 1106 days, 16 hours and 40 minutes ago

I lowkey forgot to update the resource here, this is a quick summary of what was changed.

(0.1.1)
Average
The expression was made more efficient

Noise Noise expressions were given a syntax to allow locations ((perlin|simplex) noise at %location%)

(0.1.2 - 0.1.4)

Seed Seed expression was originally set to return a list, this changed that
Noise These expressions were given parameters for octaves, frequency, and amplitude! Also fixed an issue with the original syntax

(0.1.5) IMPORTANT UPDATE
This is update reduced the file size by a ton, by removing skript from being bundled with the build, it reduced the file size from ~2.7mb to ~42kb

This update also changed the syntax by a lot for noise expressions.
Perlin Syntax

[sknoise] perlin [noise] at [x] %number%[,] [[y] %-number%[(,|[,] and) [z] %-number%]] [(1¦with octaves %-integer%[,] frequency %-number%(,|[,] and) amplitude %-number%)]

[sknoise] perlin [noise] at [(loc|location)] %location% [(1¦with octaves %-integer%[,] frequency %-number%(,|[,] and) amplitude %-number%)]


SimplexSyntax

[sknoise] simplex [noise] at [x] %number%[,] [[y] %-number%[(,|[,] and) [z] %-number%]] [(1¦with octaves %-integer%[,] frequency %-number%(,|[,] and) amplitude %-number%)]

[sknoise] simplex [noise] at [(loc|location)] %location% [(1¦with octaves %-integer%[,] frequency %-number%(,|[,] and) amplitude %-number%)]


(0.1.6)
Noise
The expressions were given the Normalized parameter at the beginning of the syntax

[normalized] (simplex|perlin) noise

View Update

SKNoise | The Addon to Generation 1106 days, 16 hours and 40 minutes ago

SKNOISE
The Addon That Includes Noise! (No, not sound)

The addon is still in a heavily early build and will have more to it soon. I am still somewhat new to Java so the code may not be the best, but within test runs I can generate 1 million perlin values in 0.6 seconds (With nothing but setting a local variable to the value.)

This addon allows you to create noise generators, and edit them with a lot of different values!

You can view more information about the expressions on the GitHub release. https://github.com/ReportCardsMC/SKNoise/releases/tag/1.0


(We also have SkriptHub documentation, working on SKUnity documentation as well)

View Update

© Copyright 2014-2024 skUnity

All rights reserved.