> For the complete documentation index, see [llms.txt](https://quasistellar-game-development.gitbook.io/town-generator/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://quasistellar-game-development.gitbook.io/town-generator/reference/construct.md).

# Construct

The Construct class is derived from the Road class and contains the same properties with the following additions.

## General

### General Settings

#### Auto Generate

If enabled the Construct will automatically be generated after changes are made.

#### Construct Seed

Set a Random Seed for random generation.

#### Auto Break

If enabled a Break process will be run after the Construct has been generated.

#### Break Size

Set the size of each break in a Spline.

#### Break Seed

Set a Random Seed for the break process.

#### Auto Bake

If enabled the generated Construct Meshes will be baked together.

#### Create LOD

If enabled LODs will be created for the baked mesh. The final mesh is separated into Inner/Outer Bricks, Windows/Doors and Floors/Roof Meshes. The Highest LOD contains all parts, next LOD removes the Floors, Windows and Doors and the lowest LOD keeps only outer bricks.

#### Save Baked Mesh

If enabled the Baked Mesh will be saved to disk.

#### Keep Construct Objects After Bake

If enabled all separate construct bricks will be kept active and their Renderer components disabled. (This is WIP functionality to allow modifying the Construct while playing and will be changed in a future update).

### Selection Properties

Apply Wall Construct Settings for a specific Spline of the selected knot.

### Wall Construct Settings

#### Settings

A list of Wall Construct Settings scriptable objects corresponding to the Splines of the Spline Container.

A grouped list of Wall Construct Settings set on this Construct will be displayed for quick and easy editing right on the Construct.

See Wall Construct Settings for more details.

### More Options

#### Scale Bricks To Fit

Each section of a Spline, from one knot to the next, is generated separately. If this is enabled the generated bricks for the section will be scaled along the Z axis to fit as closely as possible.

#### Alternate Bricks

Enable to have bricks alternate instead of being stacked right on top of each other. This also adds half bricks on ends.

#### Ignore Intersections

If disabled the generation process will determine brick intersections with Windows and Doors and either not add a brick or scale the brick to try and fit correctly.

#### Min Points Within

This value applies to detecting intersections. The mac number of points being checked are 9. Both sides of a brick's Top Left, Top Right, Bottom Left, Bottom Right and a center point.\
Default: 5

#### Snap Doors and Windows

Enable to have Doors and Windows snap to bricks along the spline.

#### Rnd Floor Scale

A random scale is applied to floor pieces to help with Z-fighting issues.

#### Rnd Brick Scale

A random scale is applied to brick pieces to help with Z-fighting issues.

### Create Mesh

Same properties as on the Road component

## Terrain Manipulation

Same properties as on the Road component.

## Path Painting

Same properties as on the Road component.

## Functions

### With Selection

#### Insert Corner

This is a helper function for adding a corner to the spline container at the selected knot. The Spline is split at the selected knot and a new spline added with the selected knot as a middle point and two more knots, one before and one after the selected knot at Corner Length distance from the middle knot. The Corner Settings object will be applied to the corresponding Wall Construct Settings for the newly added Spline.

**Corner Length:** Distance from middle knot to add the new start and end knots.

**Corner Settings:** Wall Construct Settings to apply to the new Spline.

**Button: Insert Corner at Knot:** Adds the corne&#x72;**.**

#### Button: Force Regenerate Section (n)

Manually regenerate the section of the selected knot. (n) being the knot index.

#### Button: Focus Camera On Knot (n, s)

Cause the Camera to focus on the selected knot. (n) being the knot index, (s) being the spline index.

#### Button: Focus Camera On Spline (n)

Cause the Camera to focus on the spline of the selected knot. (n) being the knot index.

### Generate and Bake Meshes

#### Button: Generate

Manually run the generation process.

#### Button: Break

Manually run the break process.

#### Button: Rebuild

Manually run the rebuild process.

#### Button: Bake

#### Button: Remove Bake

### Terrain Manipulation

Same functions as on the Road component.

### Paint on Terrain

Same functions as on the Road component.

### Utilities

#### Button: Fix Object Pivot Point

This Helper function re-center's the object's pivot point. When drawing Spline knots the origin of the object never ends up being at it's center and in some cases we may need to have it fixed.

## Peasants

Same properties as on the Road component.

## Debugging

Same properties as on the Road component.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://quasistellar-game-development.gitbook.io/town-generator/reference/construct.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
