Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Bug] Terrain Generator

Trying to use terrain generator to make dynamic maps for random encounters. You know, so each forest looks unique and what not. I keep running into an issue where some things spawned in by the SpawnTrees command are, for whatever reason, spawning behind the terrain generated by the FillBG command. Anyone know what might cause this issue? I know I could manually go through and fix this issue, but that's tedious and kinda defeats the purpose of using a random terrain generator in the first place.  Follow-up question: Is there a way to dictate whether an object spawned in will appear in front of or behind another object? I would prefer for things like rocks/bushes, for example, to appear in front of the actual terrain but behind trees.
1535346472
The Aaron
Pro
API Scripter
Setting up the ordering of objects is a surprisingly non-trivial process. The only commands available to the API are toBack() and toFront(). That means to reorder the top 10 items requires 10 calls in a very specific order. Worse, there are dreadful race conditions between subsequent calls necitating a delay between them. When last I dug into it, you could get away with 50ms bewtween consecutive toBack() calls (toFront() takes more like 300ms delays).  Which script are you using? (Link?)
<a href="https://wiki.roll20.net/Script:Terrain_Generator" rel="nofollow">https://wiki.roll20.net/Script:Terrain_Generator</a> I have it installed via the 1-click install method.
1535377408
The Aaron
Pro
API Scripter
Probably there needs to be a delay between laying down the background terrain and the foreground terrain.&nbsp; However, it might need some more complicated system for reordering everything.&nbsp;
That was my initial assumption, so I tried each command one at a time and the issue still occurred. I might just have to give up. Oh well.