Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,3 @@ DerivedDataCache/*

# Doxygen
MAIN_PAGE.md
Document/doxygen
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log - Procedural 3D Dungeon Generator Plug-in

## 20251225-1.8.0 (63)
### Changes
* Added the ability to specify the direction in which dungeon rooms unfold.
* Added options for starting positions.
* Added a notification system for communicating breaking changes.
* Fixed several bugs
### 変更点
* ダンジョンの部屋の展開方向の指定を追加
* スタート位置の選択肢を追加
* 破壊的な変更を連絡するための通知システムを追加
* いくつかの不具合を修正

## 20251118-1.7.10 (62)
### Changes
* Unreal Engine 5.7 support
Expand All @@ -10,6 +22,16 @@
* 植物の分布方法を修正
* いくつかの不具合を修正

## 20251122-1.7.9 (62)
### Changes
* Unreal Engine 5.7 support
* Revised plant distribution methods
* Fixed several bugs
### 変更点
* Unreal Engine 5.7対応
* 植物の分布方法を修正
* いくつかの不具合を修正

## 20251004-1.7.8 (61)
### Changes
* Added the ability to assist actors spawning into the aisle grid
Expand Down
4 changes: 4 additions & 0 deletions Document/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Built data for doxygen
doxygen

# Ignore files
.bak
15 changes: 15 additions & 0 deletions Document/FDungeonDoorActorParts.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# FDungeonDoorActorParts Guide

FDungeonDoorActorParts is a **container for door Blueprint classes** used when spawning doors in generated rooms or corridors. It keeps your door variations organized.

## Typical use
- Register one or more door Blueprint classes that include meshes, animations, and collision.
- The generator spawns the class you specify for each door position.

## Key UPROPERTY fields
- **ActorClass (`UClass*`, EditAnywhere/BlueprintReadWrite)**
The Blueprint (or other Actor class) used as the door. If left empty, no door is spawned at that slot.

## Editing tips
- Keep doors self-contained: include frame, open/close logic, and sounds in the Blueprint so swapping classes is painless.
- Test that the pivot and collision line up with the dungeon grid to avoid gaps or overlaps.
16 changes: 16 additions & 0 deletions Document/FDungeonDoorActorParts.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# FDungeonDoorActorParts 説明書

FDungeonDoorActorParts は、**部屋や通路の入口にスポーンさせるドア用アクターを登録するための入れ物**です。位置・向きのオフセット情報(FDungeonPartsTransform)に加えて、ドアとして扱うアクタークラスを指定します。

## 主な使い方
- 既存の Blueprint ドア(`DungeonDoorBase` を継承)を `ActorClass` に設定すると、生成時にそのドアが配置されます。
- メッシュやアニメーションを変えた複数のドアを作成し、メッシュセットやフロアごとに差し替えることで、同じダンジョンでも雰囲気を変えられます。

## UPROPERTY の意味
- **ActorClass (`UClass*`, EditAnywhere/BlueprintReadOnly, AllowedClasses=`DungeonDoorBase`)**
生成時にスポーンするドアアクターを指定します。`DungeonDoorBase` を継承した Blueprint や C++ クラスのみ選択可能です。未設定のままだとドアは置かれません。

## 編集のヒント
- 開閉方向や位置合わせはベースクラスの Transform で調整できます。壁厚に合わせて奥行きを微調整すると自然に見えます。
- ドアの機能(鍵付き・破壊可能など)はドアクラス側で作り込んでください。ここでは「どのドアを置くか」だけを選びます。

15 changes: 15 additions & 0 deletions Document/FDungeonMeshParts.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# FDungeonMeshParts Guide

FDungeonMeshParts is a **container that records which single static mesh to place and how to offset/rotate it** for pillars, walls, ceilings, and similar pieces. The placement is driven by the base transform data (FDungeonPartsTransform), while the look comes from the `StaticMesh` you assign.

## Typical use
- Express requests like “place this pillar 30 cm to the right and rotate it 90°” with a `StaticMesh` plus its offset/rotation.
- When you list multiple FDungeonMeshParts inside a mesh set ([UDungeonMeshSetDatabase](./UDungeonMeshSetDatabase.en.md)), generation can pick one based on random choice or selection rules.

## Key UPROPERTY fields
- **StaticMesh (`UStaticMesh*`, EditAnywhere/BlueprintReadWrite)**
Specifies the static mesh that will be spawned. Leave it empty and nothing appears, so always assign a mesh. Because the mesh pivot becomes the placement origin, adjust the pivot in the asset if you want easier alignment.

## Editing and placement tips
- Use the base Transform offset/rotation to fine-tune the position. Matching the grid size values (GridSize/VerticalGridSize in [UDungeonGenerateParameter](./UDungeonGenerateParameter.en.md)) keeps everything snapped.
- Register several meshes for the same role so the database selection rules can add variety during generation.
16 changes: 16 additions & 0 deletions Document/FDungeonMeshParts.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# FDungeonMeshParts 説明書

FDungeonMeshParts は、**柱や壁など 1 枚のスタティックメッシュを「どこに・どの向きで」置くかを記録する入れ物**です。配置位置はベースクラスのオフセット情報(FDungeonPartsTransform)で決まり、見た目は `StaticMesh` の差し替えで変わります。レベルデザイナーやアーティストが自前のメッシュを登録し、テーマに合わせて柱・壁・天井などのパーツを切り替える用途を想定しています。

## 主な使い方
- 「この柱メッシュを 30cm 右に、90 度回して置いてほしい」といった要望を、`StaticMesh` とオフセットで表現します。
- メッシュセット([UDungeonMeshSetDatabase](./UDungeonMeshSetDatabase.ja.md))に複数の FDungeonMeshParts を並べると、生成時にランダムやルールに応じて選択されます。

## UPROPERTY の意味
- **StaticMesh (`UStaticMesh*`, EditAnywhere/BlueprintReadWrite)**
生成時にスポーンするスタティックメッシュを指定します。未設定だと何も置かれないので、必ず設定してください。メッシュの原点が配置基準になるため、メッシュ側でピボット調整を済ませておくと位置決めが楽になります。

## 編集と配置のヒント
- オフセットや回転はベースクラスの Transform で調整できます。グリッドサイズ([UDungeonGenerateParameter](./UDungeonGenerateParameter.ja.md) の GridSize/VerticalGridSize)に合わせた値にするとスナップが揃います。
- 同じ役割のメッシュを複数登録しておくと、DB 側の選択ルールでバリエーションを出せます。

15 changes: 15 additions & 0 deletions Document/FDungeonRandomActorParts.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# FDungeonRandomActorParts Guide

FDungeonRandomActorParts collects **one or more actor assets and picks one at random** when the dungeon is generated. Use it for props like torches, crates, or decorative pieces that should vary.

## Typical use
- Register several Actor/Blueprint assets, then let the system choose one for each placement slot.
- Place the part inside a mesh or actor set so different props can appear across rooms and corridors.

## Key UPROPERTY fields
- **Actors (`TArray<UClass*>`, EditAnywhere/BlueprintReadWrite)**
The list of actor classes to choose from. Empty entries are skipped. All items in the list are treated with equal probability.

## Editing tips
- Keep the list short and focused (e.g., 3–5 options) so randomness remains controlled and easy to test.
- If an actor needs specific offsets or rotation, handle it inside the actor Blueprint itself so the placement stays consistent.
16 changes: 16 additions & 0 deletions Document/FDungeonRandomActorParts.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# FDungeonRandomActorParts 説明書

FDungeonRandomActorParts は、**同じスポーン地点に複数のアクター候補を登録し、確率で出し分けるための入れ物**です。向きやオフセットを持つ FDungeonActorPartsWithDirection を継承しつつ、`Frequency` で出現頻度を調整できます。

## 主な使い方
- 祠・宝箱・環境オブジェクトなど、同じ場所に「たまに置きたい」装飾を確率付きで登録します。
- ダンジョン生成パラメータ側の「ランダムアクター」配列に追加すると、生成時に抽選されます。

## UPROPERTY の意味
- **Frequency (`float`, EditAnywhere/BlueprintReadWrite, 0.0〜1.0)**
配置確率。1.0 なら毎回必ず配置、0.5 なら 50% の確率で出現します。複数のパーツを並べる場合、それぞれ個別に判定されるため「二つとも出る」こともあります。確率を下げればレア感を演出できます。

## 編集のヒント
- 同じ役割のアクターを複数登録しておくと、Frequency を調整するだけで「ごくまれにレアオブジェクトが混ざる」などの演出が簡単になります。
- 回転や位置合わせはベースクラスの Transform 設定を利用してください。メッシュの向きに合わせて方向指定しておくと自然に並びます。

23 changes: 23 additions & 0 deletions Document/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Dungeon Generator Documentation Links

Use the links below to open each reference guide. English and Japanese (ja) versions are grouped together for quick access.

## English
- [UDungeonGenerateParameter](UDungeonGenerateParameter.en.md)
- [FDungeonMeshParts](FDungeonMeshParts.en.md)
- [FDungeonRandomActorParts](FDungeonRandomActorParts.en.md)
- [FDungeonDoorActorParts](FDungeonDoorActorParts.en.md)
- [UDungeonMeshSetDatabase](UDungeonMeshSetDatabase.en.md)
- [UDungeonInteriorDatabase](UDungeonInteriorDatabase.en.md)
- [UDungeonSubLevelDatabase](UDungeonSubLevelDatabase.en.md)
- [UDungeonRoomSensorDatabase](UDungeonRoomSensorDatabase.en.md)

## 日本語
- [UDungeonGenerateParameter](UDungeonGenerateParameter.ja.md)
- [FDungeonMeshParts](FDungeonMeshParts.ja.md)
- [FDungeonRandomActorParts](FDungeonRandomActorParts.ja.md)
- [FDungeonDoorActorParts](FDungeonDoorActorParts.ja.md)
- [UDungeonMeshSetDatabase](UDungeonMeshSetDatabase.ja.md)
- [UDungeonInteriorDatabase](UDungeonInteriorDatabase.ja.md)
- [UDungeonSubLevelDatabase](UDungeonSubLevelDatabase.ja.md)
- [UDungeonRoomSensorDatabase](UDungeonRoomSensorDatabase.ja.md)
76 changes: 76 additions & 0 deletions Document/UDungeonGenerateParameter.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# UDungeonGenerateParameter Guide

UDungeonGenerateParameter collects the settings for dungeon generation. This guide explains **the intent, default behavior, and edit conditions** for the Blueprint-exposed UPROPERTY fields in a way that non-engineers can tune the generator for their desired look and feel. Focus on how each option affects the player experience instead of code locations.

## Basics (reproducibility and debugging)
- **RandomSeed (`int32`)**: Seed for generation. Fix it to reproduce a layout; use 0 to randomize every run. `EditAnywhere`, `ClampMin=0`.
- **GeneratedRandomSeed (`int32`)**: The seed actually used in the last generation. Read-only reference when you want to recreate a found layout.
- **GeneratedDungeonCRC32 (`int32`)**: CRC32 of the last generated dungeon. Useful for version-to-version comparisons (read-only).

## Room size and spacing (exploration feel and visibility)
- **RoomWidth (`FInt32Interval`)**: Min/max room width. Smaller for corridor-like areas, larger for combat arenas. UI clamps to 1 or more.
- **RoomDepth (`FInt32Interval`)**: Min/max room depth. Raise it to create more elongated rooms. UI clamps to 1 or more.
- **RoomHeight (`FInt32Interval`)**: Min/max room height. Increase for vertical combat or sightlines. UI clamps to 1 or more.
- **RoomMargin (`uint8`)**: Horizontal gap between rooms. Wider margins reduce claustrophobic corridors; narrow margins increase density. Editable only when `MergeRooms` is off; min 1.
- **VerticalRoomMargin (`uint8`)**: Vertical gap between rooms. Helps avoid overlap in multi-layer layouts. Editable only when `MergeRooms` and `Flat` are off; min 0.

## Room/floor candidates and layout policy (overall map shape)
- **NumberOfCandidateRooms (`uint8`)**: Initial number of room candidates. More candidates mean longer generation but greater variety. Range 3–100.
- **MergeRooms (`bool`)**: Whether to merge adjacent rooms. Useful for large halls, but disables Margin and ExpansionPolicy edits when on.
- **ExpansionPolicy (`EDungeonExpansionPolicy`)**: Directional growth policy (horizontal, vertical, any). Enable vertical growth for multi-level mazes. Editable only when `MergeRooms` and `Flat` are off.
- **NumberOfCandidateFloors (`uint8`)**: Number of candidate floors to attempt. Raise to encourage multi-layer structures. Range 0–5; editable only when `Flat` is off.
- **Flat (`bool`)**: Force a single-floor layout. Handy for top-down prototypes; suppresses floor-related and vertical margin options.

## Player start and missions (core gameplay flow)
- **MovePlayerStartToStartingPoint (`bool`)**: Automatically moves PlayerStart to the chosen start room after generation for quick playtests.
- **StartLocationPolicy (`EDungeonStartLocationPolicy`)**: How the start room is picked (southernmost, highest, central, multi-start, etc.). Shapes the opening flow. `UseCentralPoint` and `UseMultiStart` require `UseMissionGraph` to be disabled. When using `UseMultiStart`, the generator creates as many start rooms as there are `PlayerStart` actors.
- **UseMissionGraph (`bool`)**: Enables key/mission generation. Leave off for free exploration; turn on for key hunts and controlled routes. Tends to be stable when `MergeRooms` is off and `AisleComplexity` is 0 (per comments).
- **AisleComplexity (`uint8`)**: Corridor complexity. Increase for maze-like feel. Editable only when both `MergeRooms` and `UseMissionGraph` are off; range 0–10. When `UseMissionGraph` is on, the getter forces this to 0.

## In-room structures (personality of each space)
- **GenerateSlopeInRoom (`bool`)**: Add slopes inside rooms for vertical accents and sight breaks (may become always-on in future).
- **GenerateStructuralColumn (`bool`)**: Add structural columns for cover and silhouette variety (may become always-on in future).

## Grid size (snap and movement baseline)
- **GridSize (`float`)**: Horizontal voxel size. Align to your mesh dimensions for clean snapping. `ClampMin=1`.
- **VerticalGridSize (`float`)**: Vertical voxel size. Match your jump height or stair slope for consistent feel. `ClampMin=1`.

## Mesh parts (art style and density)
- **DungeonRoomMeshPartsDatabase (`[UDungeonMeshSetDatabase](./UDungeonMeshSetDatabase.en.md)*`)**: Mesh parts DB for rooms. Swap to change the art theme.
- **DungeonAisleMeshPartsDatabase (`[UDungeonMeshSetDatabase](./UDungeonMeshSetDatabase.en.md)*`)**: Mesh parts DB for corridors. Use a separate set if you want distinct corridor style.
- **PillarPartsSelectionMethod (`EDungeonPartsSelectionMethod`)**: How pillar parts are picked (random, depth-based, etc.). Adjust to bias pillar variety.
- **PillarParts (`TArray<[FDungeonMeshParts](./FDungeonMeshParts.en.md)>`)**: Pillar mesh list. Swap to change silhouettes or cover options.

### Mesh parts and databases in context
- **[FDungeonMeshParts](./FDungeonMeshParts.en.md)**: Holds a single static mesh plus transform offset (inherits `FDungeonPartsTransform`). Simple for art teams to request exact placement/orientation for pillars or similar pieces.
- **[UDungeonMeshSetDatabase](./UDungeonMeshSetDatabase.en.md)**: Groups floor/wall/ceiling mesh sets with selectable policies (depth-based, random, etc.). Swap here to change the art theme per room or corridor.
- **[FDungeonRandomActorParts](./FDungeonRandomActorParts.en.md)**: Registers actors (e.g., a torch Blueprint) with spawn probabilities via `Frequency` (0.0–1.0). Great for occasional rare decorations.
- **[FDungeonDoorActorParts](./FDungeonDoorActorParts.en.md)**: Door actor parts referencing `DungeonDoorBase`-derived Blueprint classes plus offsets. Use to mix keyed doors or visual variants.
- **TorchPartsSelectionMethod (`EDungeonPartsSelectionMethod`)**: How torch parts are chosen. Tune to control wall decoration and visibility rhythm.
- **FrequencyOfTorchlightGeneration (`EFrequencyOfGeneration`)**: Torch spawn frequency. Lower for darker mood, higher for bright dungeons. Default `Rarely`.
- **TorchParts (`TArray<[FDungeonRandomActorParts](./FDungeonRandomActorParts.en.md)>`)**: Torch/lamplight actor list. Change flame color or shape to alter atmosphere.
- **DoorPartsSelectionMethod (`EDungeonPartsSelectionMethod`)**: Door parts selection method. Useful for highlighting important rooms.
- **DoorParts (`TArray<[FDungeonDoorActorParts](./FDungeonDoorActorParts.en.md)>`)**: Door variants to mix keyed doors or different looks.

## Product-only databases (`PRODUCT_ONLY`) (final polish)
- **DungeonInteriorDatabase** ([UDungeonInteriorDatabase](./UDungeonInteriorDatabase.en.md)): Interior placement DB. Swap to change furniture/decoration themes.
- **DungeonSubLevelDatabase** ([UDungeonSubLevelDatabase](./UDungeonSubLevelDatabase.en.md)): Start/goal and special sublevel DB. Use to inject event-specific levels.

## Room sensors (triggers and presentation)
- **DungeonRoomSensorClass (`UClass*`)**: Direct sensor class reference. Marked `DeprecatedProperty`; prefer the database for new setups.
- **DungeonRoomSensorDatabase ([UDungeonRoomSensorDatabase](./UDungeonRoomSensorDatabase.en.md))**: Database controlling room sensors and their effects (BGM, buffs, spawns, etc.).

### How to use the product-only databases
- [**UDungeonInteriorDatabase**](./UDungeonInteriorDatabase.en.md): Manages interior presets by tags and regenerates voxel placement data on Build. Swap themes quickly to test different moods.
- [**UDungeonSubLevelDatabase**](./UDungeonSubLevelDatabase.en.md): Registers sublevels for start/goal rooms or special events. Must match this parameter’s GridSize. Supports direct start/goal assignments plus capped random injections for secret rooms or scripted boss arenas.
- [**UDungeonRoomSensorDatabase**](./UDungeonRoomSensorDatabase.en.md): Draws from `DungeonRoomSensorBase`-derived classes with conditions by depth or identifiers. Includes an event to spawn extra corridor actors after generation, letting you centralize BGM changes, traps, or other room-entry effects.

## Extra info (troubleshooting)
- **PluginVersion (`uint8`)**: Plugin version, read-only. Useful for support and cross-environment checks.

### Edit-condition reminders
- Enabling `MergeRooms` disables editing of `RoomMargin`, `VerticalRoomMargin`, and `ExpansionPolicy`.
- Enabling `Flat` disables floor-related options (`NumberOfCandidateFloors`) and vertical margins.
- When `UseMissionGraph` is enabled, `GetAisleComplexity` returns 0, effectively ignoring the complexity setting.

Use this guide when adjusting dungeon generation parameters in Blueprint to understand how each option shapes the resulting layout and play experience.
Loading