Modular Schematic Scripts

Emoticone11

The Dark Lord Sauron
Staff member
As a (delayed) christmas gift for y'all, I've created 243 scripts for automatically placing each of the up-to-date schemsets. You can see all the supported schemsets at /warp TreeScriptRepo. These scripts are modular, meaning that they can be freely combined with each other in any way, and integrated into any workflow. All that it requires is placing red concrete blocks wherever you want a schemset to be generated, then running the script for that schemset, and repeating for each schemset that you want.

2022-12-30_18.10.jpg

How to Use

You'll need the Macro+Keybind mod to run the scripts. Download the attached EF_Scripts.zip, and extract all the text files inside into "liteloader/common/macros" within your minecraft instance folder.

Each of the scripts is named "EF_02_<schemset>.txt", where <schemset> will generally be the same as the schemset name you use for the schematic brush. For each script you want to use, you will need to bind it to either a key or create and bind a button in the GUI Editor. Personally, I would recommend using the GUI for this (don't do all of them like this if you value your sanity though, just add the ones that you need :p):

Screenshot+2022-12-30+07.48.jpg
Screenshot+2022-12-30+08.11.37.png

Minimally, all you have to do is place red concrete blocks (251:14) wherever you want a schematic to be generated. These can be placed by hand if you want, placed with WE, or generated using the included setup script (see below). Then run the script for the schematic that you want. You'll get a message saying "Placement Complete" once the script is finished.

NOTE: The stained glass blocks (95:0 - 95:15) are all reserved by the scripts. Make sure that these blocks aren't used anywhere else within your selection, or it will place schematics on those as well.

Setup Script

I've also included two scripts for automatically placing red concrete blocks: "EF_01_Setup.txt" and "EF_01_SetupSteep.txt". The only difference between the two is that the former prevents red concrete from being placed along the edge of a level, so it's better for flat terrain.

The setup scripts use Perlin noise, meaning that they can be used to create "clusters" of red concrete blocks for schematics (see this thread for more details on how Perlin works). They use the following parameters:
  • mask: the mask to use when placing red concrete blocks (can be any mask). If you want to be even more precise when generating clusters of schematics, you can use a brush to place some placeholder block, and then mask that placeholder.
  • seed: a random seed for Perlin. It's recommended to use 0 as the default, and then any random integer when you want to switch up the noise pattern.
  • frequency: roughly, how "random" you want the clusters to be, between 0 and 1. Lower values will give larger and more concentrated clusters, higher values will give a more randomized and uniform distribution. I recommend using 0.1 as a default.
  • threshold: determines the cutoff for clusters, between 0 and 1. Lower values will lead to smaller clusters. A useful trick is to create multiple layers in a cluster (e.g., for having larger trees towards the center and smaller trees on the outside) by increasing the threshold while keeping other parameters constant.
  • density: determines how densely the schematics are placed within the clusters. I recommend trying 1 as a default, and then adjusting downwards if you want them less dense (e.g., 0.1); upwards if you want them more dense (e.g., 5).
If you want the schematics to be placed completely uniformly rather than in clusters, you should just enter 1 for both frequency and threshold.

Finally, the scripts will generate placeholder blocks around the red concrete blocks, which is useful for preventing schematics from being generated too close to each other, as well as later used for placing fallen leaves or whatnot.

NOTE: the following blocks are reserved by the setup scripts: orange concrete (251:1), magenta concrete (251:2), light blue concrete (251:3), yellow concrete (251:4), red concrete (251:14). Make sure these blocks aren't used anywhere else in your selection, or they may get messed up.

Recommended Order

Some of the more complex schematics (bushes, rocks, etc.) have some commands included at the end for automatically fixing collisions between schematics (floating plant blocks, etc.). You'll know that this is the case if the script gives a message saying "Fixing Collisions" near the end. It's possible that these commands may impact other foliage blocks, so there's a recommended order to executing the schems:

Placeholders --> Rock Schems --> Forest Detail Schems --> Bush Schems --> Tree Schems --> Manual Details

Importantly, you should avoid placing manual details (including stuff like dappled moss) before using rock/forest detail/bush scripts. For instance, the Boulder scripts may remove dappled moss that you previously placed within the selection.

The only tree schematic that fixes collisions is "EF_02_JForestElm.txt", all of the other ones should be safe.

Other

I haven't yet created scripts for every single schemset. Any group of schemsets at /warp TreeScriptRepo marked with a "WIP" block has yet to be created.

I probably won't return to this for some time, so please let me know if you urgently need a schemset turned into a script. Also let me know if I've missed any schemsets, or if you've created a new schemset that you want converted.

Otherwise, LMK if you have any questions about how to use these, and enjoy!
 

Attachments

  • EF_Scripts.zip
    290.4 KB · Views: 17