Skip to content

Advanced Formatting

Ryandw11 edited this page Oct 17, 2020 · 2 revisions

This page covers advanced formatting options that allows more powerful structure configuration.

Compiled Schematics

For large structures the replacement of signs and containers can be time consuming. To solve this issue Custom Structures has the ability to compile schematics. Compiling a schematic will result in an extra file in the schematics folder. This file is {schem_name}.cschem. The .cschem file contains additional information and calculations about the schematic allowing the plugin to replace signs and containers much faster.

Creating a Compiled Schematic

Creating a compiled schematic is the same as creating a normal one but with an additional option in the /cstructure createschem command.
Run the following command:

/cstructure createschem {schem-name} -compile

That command will create both a {schem-name}.schem and {schem-name}.cschem file. You can also use -c instead of -compile.
Note: The customstructures.createschematic.options permission is required to run that command.

Only Creating a Compiled Schematic

In order to create a compiled schematic without making a normal one you must run the following:

/cstructure createschem {schem-name} -compileOnly

That command will only produce a {schem-name}.cschem file. You can also use -cOnly instead of -compileOnly. The permission to use this command is the same as the one above.

IMPORTANT NOTE: Only use this option if you know what you are doing. Please use -compile for most cases.

Technical Information

The .cschem file is in the ODS (Object Data Structure) file format. The layout is as follows:

ver :: 1
containers :: List[]
signs :: List[]

ver is the version of the cschem layout. The current version can be retrieved from CustomStructures.COMPILED_STRUCT_VER
Both containers and signs are of the type BlockTag.