NAME

Games::RolePlay::MapGen::GeneratorPlugin::BasicDoors - The basic generator for simple doors.

SYNOPSIS

use Games::RolePlay::MapGen;

my $map = new Games::RolePlay::MapGen;

$map->add_generator_plugin( "BasicDoors" );

DESCRIPTION

This module inserts doors all over the map.

It takes the following options (defaults shown):

The Percentages

  open_room_corridor_door_percent     => { door =>  95, secret =>  2, stuck => 25, locked => 50 },
closed_room_corridor_door_percent     => { door =>   5, secret => 95, stuck => 10, locked => 30 },
  open_corridor_corridor_door_percent => { door => 0.1, secret => 10, stuck => 25, locked => 50 },
closed_corridor_corridor_door_percent => { door =>   1, secret => 95, stuck => 10, locked => 30 },
                                                   

Here I would enumerate the precise meaning of each option, but it seems pretty clear to me. Here's an example instead. The default options listed above state that there's a 95.00% chance that a door would be placed on a room/corridor boundary (without a wall) and that it'd be stuck about 25.00% of the time.

OK, another? There would be a 0.10% chance of finding a door in the middle of an open corridor and said door would be hidden 10.00% of the time.

The Special Case

Notice that there are no room_room settings. If any two tiles are both room type tiles, then the tile is skipped unless the tiles are in different rooms. If they _are_ in different rooms, then the opening is treated as if it were a room_corridor opening (whether open or closed).

max_span

In order to put a door somewhere, and have it make sense, the BasicDoors plugin builds walls around the door to complete a span and close something off. It will not do this for a span larger than max_span.

SEE ALSO

Games::RolePlay::MapGen