> 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/introduction.md).

# Introduction

{% embed url="<https://www.youtube.com/watch?v=GRknYeuBuoE>" %}

### Description

**New! Generate Roads and Walls per sector. Roads automatically connect for overlapping Sectors.**

Setup your Town/City with Sectors and auto generate roads and walls for the whole city. Wall generation can be used to setup small holdings or farms and even fortresses within a larger walled city! Automatically adjust terrain height below each building and paint roads and paths directly on the Terrain. Split your town up into Sectors with different buildings and painting Terrain Layers. Roads, Buildings, Sectors and the main Town Generator all have separate settings and functions to allow customization, tweaking and ease of use. Raise or Lower Terrain height and Paint terrain below roads and buildings on a Town or specific Road/Building level. Buildings are setup with doors and attachment points (for adjacent building placement). The generator uses each Building's physics colliders to ensure buildings are not placed within each other. Roads are drawn using a Spline editor that automatically aligns to the terrain. You can also change the width of a road at any specific point on the Road Spline, where needed.

### **Features**

#### **\[NEW!] Road and Wall Generation**

You can now setup your Town/City with overlapping sectors with Road and Wall settings. Then run auto generation for roads and walls for the whole city. Wall generation can be used to setup small holdings or farms and even fortresses within a larger walled city! Overlapping Sectors that share the same Wall settings will be encapsulated together.

#### **Construct Tool**

Use the construct tool to create brick structures along a Spline. Either create double wall structures or buildings with floors, doors and windows. Use the supplied brick, door and window Prefabs **or create and use your own prefabs! The possibilities are endless!**

#### **Building Setup**

Buildings are set-up to indicate where doors are and where adjacent buildings can be placed using Attachment Points. Specify max height difference for adjacent buildings for better randomized results.

#### **Roads**

Roads are created using a Spline editor. The Spline is automatically aligned to the Terrain and BuildingAttachPoints are generated along the road at specifically set intervals. Use the Widths tool to change the width of a road at any specific point on the Road Spline. **\[NEW!] you can now also generate a mesh for the road.**

#### **Randomized Generation**

Specify your Building prefabs. Set a random seed. Specify max terrain slope to place buildings on. Physics checks ensure buildings are not placed within each other.

#### **Town Spawner**

Setup NPCs to spawn all over your generated town, on a Town, Sector, Building or specific Building Path Start level. NPCs are spawned and unspawned as the player moves through your town. A basic NPC is included in the examples that makes use of the built in A\* Pathfinder.

#### **Sectors**

Add Sectors to allow different Building sets and different Terrain Layers to be painted (ie residential sectors, market sectors, or industrial sectors).

#### **Terrain Manipulation**

Terrain can be manipulated below Buildings and at their Doors (with smoothing). Options allow 3 different manipulation processes: Raise below Building, Lower below Building and Raise/Lower at Doors. Each process can be run per Building or for the whole Town at once. Running a process for the whole town will arrange buildings by height and either run the process from lowest building to highest or the other way around.

#### **Terrain Painting**

Terrain can be painted below buildings and door to door (using an included basic AStar path finder). You can specify a Terrain Layer for the whole town or a separate Layer for each Sector.

#### **Terrain Neighbours**

Terrain manipulation and painting works for chunked up worlds where you have Terrain with Terrain Neighbours.

### **Integrations**

* Malbers Animations Animal Controller - [See documentation](https://quasistellar-game-development.gitbook.io/town-generator/integrations/animal-controller)

### Get it from the Unity Asset Store!

{% embed url="<https://assetstore.unity.com/packages/slug/286786>" %}

### Join us on Discord!

{% embed url="<https://discord.gg/jnUswyuppX>" %}

**Please Note: Apart from being able to create walls and fortresses with the included example bricks, you will need your own Visual Assets.**

### Assets seen in Screenshots

* [**Desert Buildings Modular**](https://assetstore.unity.com/packages/3d/environments/urban/desert-buildings-modular-144178) by Lukas Bobor
* [**lowpoly medieval buildings**](https://assetstore.unity.com/packages/3d/environments/historic/lowpoly-medieval-buildings-58289) by Szymon Łukaszuk
* [**Fantasy Lowpoly Pack (Demo)**](https://assetstore.unity.com/packages/3d/environments/fantasy/fantasy-lowpoly-pack-demo-301518) by [Black Rose Developers](https://assetstore.unity.com/publishers/107245)
* [**Low Poly Dungeons Lite**](https://assetstore.unity.com/packages/3d/environments/dungeons/low-poly-dungeons-lite-177937) by [JustCreate](https://assetstore.unity.com/publishers/44390)
* [**Low Poly Fantasy Medieval Village Vol.2 Lite**](https://assetstore.unity.com/packages/3d/environments/fantasy/low-poly-fantasy-medieval-village-vol-2-lite-242322) by [JustCreate](https://assetstore.unity.com/publishers/44390)
* WIP shots of [**Rectifying Zion**](https://www.rectifyingzion.com/) by Quasistellar Game Development


---

# 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/introduction.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.
