Where do I install modules?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By takochako

I’m trying to install the Open Simplex Noise module but I don’t know where to put it. I installed Godot via Scoop and can’t find any directory with Godot’s files. I do have a directory in my Documents folder called “Godot” but that’s where my projects are, and I’m not sure if that’s what the docs are referring to. Can someone please help?

:bust_in_silhouette: Reply From: Xrayez

The only way to have custom modules available in the engine is to compile the engine yourself, which is not as simple as installing it (but it’s fairly simple process if done step-by-step):

You have to get the source code of Godot to compile it with the module. Copy the contents of the repository inside an opensimplex directory under Godot’s modules folder. The name is important for the module to compile properly.

But good news for you! Godot 3.1 will have OpenSimplex module already integrated into the engine (currently alpha), so you could wait for stable version to be released.

Nevermind about SimplexNoise name, it was renamed to OpenSimplexNoise to reflect the fact that it’s a somewhat different algorithm in order to eliminate confusion in the future, and in case other noise types get integrated as well.

Example usage from the docs:

var noise = OpenSimplexNoise.new()

# Configure
noise.seed = randi()
noise.octaves = 4
noise.period = 20.0
noise.persistence = 0.8

# Sample
print(noise.get_noise_2d(1.0, 1.0))
print(noise.get_noise_3d(0.5, 3.0, 15.0))
print(noise.get_noise_4d(0.5, 1.9, 4.7, 0.0))

There is GDNative that allows one to make modules without recompiling the engine, but it’s not widespread yet and may be not as portable as native modules due to existing binding bugs.