Plugin : Dungeon gen

Author:Rex.Rainbow

Download

Properties

Actions

Map

Action:Cancel

  • Cancel current generating process.

Action:Release

  • Release map

Map - Generate

Action:Digger

  • Generate dungeon by digger algorithm.
    • Width ( number ) : Map width.
    • Height ( number ) : Map height.
    • Seed ( number ) : Random seed.
    • Room minimum width ( number ) : Room minimum width.
    • Room maximum width ( number ) : Room maximum width.
    • Room minimum height ( number ) : Room minimum height.
    • Room maximum height ( number ) : Room maximum height.
    • Corridor minimum length ( number ) : Corridor minimum length.
    • Corridor maximum length ( number ) : Corridor maximum length.
    • Dug percentage ( number ) : Stop after this percentage of level area has been dug out.
    • Time limit ( number ) : Stop after this much time has passed, in seconds.

Action:Uniform

  • Generate dungeon by uniform algorithm.
    • Width ( number ) : Map width.
    • Height ( number ) : Map height.
    • Seed ( number ) : Random seed.
    • Room minimum width ( number ) : Room minimum width.
    • Room maximum width ( number ) : Room maximum width.
    • Room minimum height ( number ) : Room minimum height.
    • Room maximum height ( number ) : Room maximum height.
    • Dug percentage ( number ) : Stop after this percentage of level area has been dug out.
    • Time limit ( number ) : Stop after this much time has passed, in seconds.

Action:Rogue

  • Generate dungeon by rogue algorithm.
    • Width ( number ) : Map width.
    • Height ( number ) : Map height.
    • Seed ( number ) : Random seed.
    • Cell width ( number ) : Cell width.
    • Cell height ( number ) : Cell height.

Expressions

For each room

Expression:CurRoomLeft

  • Get left X index of current room in a For Each loop.

Expression:CurRoomRight

  • Get right X index of current room in a For Each loop.

Expression:CurRoomTop

  • Get top Y index of current room in a For Each loop.

Expression:CurRoomBottom

  • Get bottom Y index of current room in a For Each loop.

Expression:CurRoomCenterX

  • Get center X index of current room in a For Each loop.

Expression:CurRoomCenterY

  • Get center Y index of current room in a For Each loop.

Expression:CurRoomWidth

  • Get width of current room in a For Each loop.

Expression:CurRoomHeight

  • Get height of current room in a For Each loop.

Expression:CurRoomIndex

  • Get index of current room in a For Each loop.

Map

Expression:MapWidth

  • Get width of map.

Expression:MapHeight

  • Get height of map.

Expression:ValueAt

  • Get cell value at logic X,Y. Return 1 if this cell is a wall, 0 if this cell is a room space/corridor/door, return -1 if this cell is invalid.
    • X ( number ) : Logic X.
    • Y ( number ) : Logic Y.

Expression:MapAsJson

  • Get map as JSON string. Return "" if map is not ready.

Room

Expression:RoomLeft

  • Get left X index of room by index.
    • Index ( number ) : Index of room.

Expression:RoomRight

  • Get right X of room by index.
    • Index ( number ) : Index of room.

Expression:RoomTop

  • Get top Y index of room by index.
    • Index ( number ) : Index of room.

Expression:RoomBottom

  • Get bottom Y of room by index.
    • Index ( number ) : Index of room.

Expression:RoomCenterX

  • Get center X index of room by index.
    • Index ( number ) : Index of room.

Expression:RoomCenterY

  • Get center Y of room by index.
    • Index ( number ) : Index of room.

Expression:RoomWidth

  • Get width of room by index.
    • Index ( number ) : Index of room.

Expression:RoomHeight

  • Get height of room by index.
    • Index ( number ) : Index of room.

Rooms

Expression:RoomsCount

  • Get amount of rooms.

Expression:LXY2RoomIndex

  • Get room index by a specific position. Retrun -1 if this position is not in any room.
    • X ( number ) : Logic X.
    • Y ( number ) : Logic Y.

Conditions

For each room

Condition:For each room

  • Repeat the event for each room.

State

Condition:Is generating

  • Return true if map is generating.

Condition:On completed

  • Trigger when map generating completed.

Type

Condition:Tile type

  • Return true if it is a wall/room space/corridor in a specific logic position.
    • X ( number ) : Logic X.
    • Y ( number ) : Logic Y.
    • Type ( Combo ) : Type of tile.
      • Options : ["invalid","filled wall","border wall","room space","corridor","door"]

Type - corridor

Condition:Corridor type

  • Return true if it is a dead end/L-junction/I-junction/T-junction/X-junction corridor in a specific logic position.
    • X ( number ) : Logic X.
    • Y ( number ) : Logic Y.
    • Type ( Combo ) : Type of corridor.
      • Options : ["dead end","L-junction","I-junction","T-junction","X-junction"]

Type - door

Condition:Door type

  • Return true if there has a neighbor room.
    • X ( number ) : Logic X.
    • Y ( number ) : Logic Y.
    • Neighbor ( Combo ) : Direction of room neighbor.
      • Options : ["left","right","top","bottom"]