Random Dungeon

From ALFA
Jump to: navigation, search

Random Dungeons are an ACR feature that allows builders to create a series of template areas that will be copied and thematically populated on demand by either DMs or builders.

Using Dungeon Spawn Widgets

A DM tool is available for implementing servers for DMs to spawn random dungeons on the fly.

  1. Find the ** DM Tools ** Category on your creator and open it.
  2. Spawn an item that lists the number of areas that you'd like into your inventory
  3. Activate that item.
  4. If you're going to fill the dungeons yourself, that's it! There's a placeable where you're standing, use it to go to your dungeon.
  5. If you want to use a spawn table, find an item that lists the spawn table you'd like and activate it before entering the dungeon.
  6. If you want to use a trap table, find an item that lists the trap table you'd like and activate it before entering the dungeon.

Building Areas

Random Dungeon template areas may be tooled with the availability of monster spawn points, the capacity to link to many areas, and the capacity to be filled with traps on use.

Always Required: Area Tag

All areas to be used inside of a random dungeon must end with six numbers, 0 or 1. These six numbers mark which area transitions can be found inside of the area, and are always in the same order: NESWUD. (North, East, South, West, Up, Down)

For example:

  • random_100000 is an area which only has an exit to the north.
  • random_111100 is an area with exits to the north, the south, the east, and the west.
  • random_000011 is an area with exits up and down, but no exits in horizontal directions.

random_000000 is a special case which is not allowed. All random dungeon areas must have at least one exit.

Always Required: Tagged Transition Doors

All areas inside of a random dungeon must have doors to serve as the area transitions between the areas. These doors have two requirements--

Door Requirement 1: Tag

The door must be tagged by the exit it represents:

  • DOOR_NORTH is a door that leaves the random dungeon to the north
  • DOOR_EAST is a door that leaves the random dungeon to the east
  • DOOR_SOUTH is a door that leaves the random dungeon to the south
  • DOOR_WEST is a door that leaves the random dungeon to the west
  • DOOR_UP is a door that leaves the random dungeon upward
  • DOOR_DOWN is a door that leaves the random dungeon downward

Door Requirement 2: OnAreaTransitionClick Script

All doors must use acr_rnddungtrans as their area transition click script.

Recommended for Area Build

It is generally recommended that...

  • All areas of the random dungeon be the same size
  • All areas of the random dungeon put their up/down area transitions in the same rough position in the areas

These will help keep the illusion of the areas being "built together" and won't result in disorienting "skew" of areas or apparent "teleporting" across distances when transitioning between areas.

Required for Quests: A Boss Monster Spawn Point

Builders may optionally add waypoints with the tag MONSTER_HIGH to indicate that a monster of the CR of the dungeon's area should appear there.

It is assumed that there is only one of these per area.

If there is a spawn table attached to a random dungeon, a monster of the area's CR will spawn at the point, regardless of whether there's a quest.

If there is a quest, then an "explorer" trigger will be placed at this location, which advances the PC's quest state for the specified quest from 1 to 2.

Optional: Consequential Monster Spawn Points

Builders may optionally add waypoints with the tag MONSTER_MED to indicate that a monster of half the CR of the dungeon's area should appear there, always rounding down. For example, a CR 3 area with rat-themed spawns would likely choose a wererat (CR 3) as its boss, and spawn dire rats (CR 1) in its medium spawns.

Optional: Trivial Monster Spawn Points

Builders may optionally add waypoints with the tag MONSTER_LOW to indicate that a monster of one third the CR of the dungeon's area should appear there, always rounding down. For example, a CR 2 area with fiend-theme spawns might spawn a vargoille (CR 2) as its boss, and spawn level 1 tiefling warriors (CR "0," see below) as its low spawns.

Optional: Traps

Builders may optionally add waypoints with the tag TRAP to indicate that a trap of the CR of the dungeon's area should appear there.

Creating Spawn Tables

Spawn tables are created through code. It is recommended that this code run in the Module Load event, so that creating them does not slow down regular play and tables are ready for use in all regular interaction with random dungeons. However, these commands work from any script, and random dungeon tables can be expanded and created at any time. No special action needs to be taken to create a table; the first attempt to add a monster to the table creates it. For example, this series of commands populates a spawn table called "bugs," which can spawn monsters of CR 0 through 10. Random dungeons don't recognize fractional CRs, so all monsters less than CR 1 are put in the "CR 0" group.

// Monsters for an insect-themed dungeon

AddSpawnToDungeonTable("bugs", 0, "abr_cr_ve_centi_tiny");

AddSpawnToDungeonTable("bugs", 0, "abr_cr_ve_centi_small");

AddSpawnToDungeonTable("bugs", 0, "abr_cr_ve_centi_medium");

AddSpawnToDungeonTable("bugs", 0, "abr_cr_vm_spider_tinyhunt");

AddSpawnToDungeonTable("bugs", 0, "abr_cr_vm_spider_smallhunt");

AddSpawnToDungeonTable("bugs", 1, "abr_cr_ve_centi_large");

AddSpawnToDungeonTable("bugs", 1, "abr_cr_vm_spider_mediumhunt");

AddSpawnToDungeonTable("bugs", 2, "abr_cr_ve_centi_huge");

AddSpawnToDungeonTable("bugs", 2, "abr_cr_vm_spider_largehunt");

AddSpawnToDungeonTable("bugs", 3, "abr_cr_ve_centi_huge3");

AddSpawnToDungeonTable("bugs", 4, "abr_cr_ve_centi_huge4");

AddSpawnToDungeonTable("bugs", 5, "abr_cr_ve_centi_huge5");

AddSpawnToDungeonTable("bugs", 5, "abr_cr_vm_spider_hugehunt");

AddSpawnToDungeonTable("bugs", 6, "abr_cr_ve_centi_garg");

AddSpawnToDungeonTable("bugs", 7, "abr_cr_ve_centi_garg7");

AddSpawnToDungeonTable("bugs", 8, "abr_cr_ve_centi_garg8");

AddSpawnToDungeonTable("bugs", 8, "abr_cr_vm_spider_gargantuanhunt");

AddSpawnToDungeonTable("bugs", 9, "abr_cr_ve_centi_colos");

AddSpawnToDungeonTable("bugs", 10, "abr_cr_vm_spider_colossal");

Traps are populated in the same fashion, though the command is slightly different. AddTrapToDungeonTable("physical", 0, "bouncing_betty_1");

AddTrapToDungeonTable("physical", 1, "bouncing_betty_1");

AddTrapToDungeonTable("physical", 2, "bouncing_betty_2");

AddTrapToDungeonTable("physical", 3, "bouncing_betty_3");

AddTrapToDungeonTable("physical", 4, "bouncing_betty_4");

AddTrapToDungeonTable("physical", 5, "bouncing_betty_5");

AddTrapToDungeonTable("physical", 6, "bouncing_betty_6");

AddTrapToDungeonTable("physical", 7, "bouncing_betty_7");

AddTrapToDungeonTable("physical", 8, "bouncing_betty_8");

AddTrapToDungeonTable("physical", 9, "bouncing_betty_9");

AddTrapToDungeonTable("physical", 10, "bouncing_betty_10");

AddTrapToDungeonTable("physical", 11, "bouncing_betty_11");

AddTrapToDungeonTable("physical", 12, "bouncing_betty_12");

AddTrapToDungeonTable("physical", 13, "bouncing_betty_13");

AddTrapToDungeonTable("physical", 14, "bouncing_betty_14");

AddTrapToDungeonTable("physical", 15, "bouncing_betty_15");

AddTrapToDungeonTable("physical", 16, "bouncing_betty_16");

AddTrapToDungeonTable("physical", 17, "bouncing_betty_17");

AddTrapToDungeonTable("physical", 18, "bouncing_betty_18");

AddTrapToDungeonTable("physical", 19, "bouncing_betty_19");

AddTrapToDungeonTable("physical", 20, "bouncing_betty_20");

Spawning and Populating Dungeons

Dungeons are spawned and populated by code. Builders may instantiate a dungeon by calling

CreateRandomDungeon("<instance name>", "<first part of the area tag>", <number of areas in the dungeon>);

This will create a dungeon that can be referenced thereafter by <instance name>. If you try to create a second dungeon by the same name, nothing will happen.

The dungeon will also assume that OBJECT_SELF is the exit from the dungeon. If the spawning script is being called from something other than an object inside of an area, use AssignCommand to call CreateRandomDungeon on an object which has a valid location to return players to.

A spawn table may be assigned to a spawned dungeon by calling

AssignSpawnTableToDungeon("<instance name>", "<monster table name>");

Similarly, a trap table may be assigned to a spawned dungeon by calling

AssignTrapTableToDungeon("<instance name>", "<trap table name>");

And finally, a PC can be sent to a random dungeon by calling

SendCreatureToDungeon(<creature to send>, "<instance name>");