#Randomly generated structures?

1 messages · Page 1 of 1 (latest)

tulip aspen
#

What you're looking for is somewhat true randomness usually implemented by CSPRNGs (cryptographically secure pseudorandom number generators). Using ordinary PRNGs usually gives results following a certain pattern. Skript doesn't support it, but Java has java.security.SecureRandom class which is useful for this purpose. If I were you, I'd either look around for simple Java library offering basic API for SecureRandom or create your own library.
In case you wonder if you should code it in skript-reflect, you can't. This is one of skript-reflect's limitations, hopefully removed in the next release.
Alternatively, search for Skript addons which can help you with that. I highly doubt there is one, but it's better to check before attempting to do anything on your own.

#

Just to visualize the difference between PRNGs and CSPRNGs, take a look at this. The picture is not mine:

tulip aspen
#

If spacings are your main concern, not the "level" of randomness, you have to check distances between currently placed structure and already placed structures.