Template:POH room

From Darkan
Jump to navigation Jump to search


[view] [edit] [purge] Template documentation

This documentation is transcluded from Template:POH room/doc.

The POH room template displays a basic player-owned house room.

Usage

{{POH room
  |room     = name of room (see examples below)
  |doors    = list of cardinal directions (e.g. "nesw")
  |color    = background color
  |text     = alternative text for center of room
  |habitat  = if the room is Menagerie (see examples below)
}}

Note that you can use ".POH" css style to change the colour of the text inside the room, provided that you have used the "text" tag in the Template script.

Examples

Text in the middle is the value of the doors parameter that was used to generate the room. Letters can be in any order.

x
s
nw
we
new
news

Creating a floorplan

Making a floorplan for a house is time well spent. Repeatedly adding and removing rooms can cost a significant amount of money, magnified by the cost of any furniture in the rooms. The POH room template helps players in making their floorplan in a few simple steps. A floorplan requires a grid to place rooms onto. A simple way to implement this is by using a wiki table:

{| cellspacing="0" cellpadding="0" border="0"
| cell top left
| cell top right
|-
| cell bottom left
| cell bottom right
|}

The example above creates an empty table without any spacing between the two rows and the two columns. Adding more columns involves adding extra lines starting with a "|". Adding a line starting with "|-" creates another row. This mechanism can be used to create a grid that is suitable to hold a floorplan. For a floorplan, each of the cells typically will hold a room or stays empty. A simple example:

{| cellspacing="0" cellpadding="0" border="0"
| {{POH room|room=Garden}}
| {{POH room|room=Kitchen}}
|-
| {{POH room|room=Parlour}}
| 
|}

The example produces the following table:

Garden
Kitchen
Parlour

The diagram shows that the rooms do not interconnect nicely. The doors parameter can be used to add or remove doors as needed, by providing the cardinal directions the doors should face. A possible fix to the table is shown in the following wiki table code:

{| cellspacing="0" cellpadding="0" border="0"
| {{POH room|room=Garden}}
| {{POH room|room=Kitchen|doors=ws}}
|-
| {{POH room|room=Parlour|doors=nwe}}
| 
|}

This produces the following result:

Garden
Kitchen
Parlour

You can also use the doors parameter to remove certain doors, such as in cases where rooms on the second floor have unused openings that do not appear in-game.

The recommended step-by-step approach is:

  1. Create table and include the room types at the appropriate grid point. Do not use a doors parameter. Use the preview button during editing to see the result.
  2. The rooms will not interconnect as intended. Add the doors parameter to achieve the appropriate interconnects between rooms. Again use preview to evaluate the results. It may take several tries to get all the connections right.
  3. Check Category:Player-owned house plans for examples of house floorplans on other wiki user pages.

Known rooms

A complete list of rooms known by the template, and their default door positions, are:

Garden
Parlour
Kitchen
Dining Room
Workshop
Bedroom
Skill Hall
Games Room
Combat Room
Quest Hall
Menagerie
Study
Costume Room
Chapel
Portal Chamber
Formal Garden
Throne Room
Oubliette
Dungeon
Dungeon Corridor
Dungeon Junction
Dungeon Stairs
Dungeon Pit
Treasure Room
Roof

There is also a special room called "None" that will occupy the space of the room but without being shown as a room. This can be useful when laying out floor plans.

Garden
Kitchen
Parlour

Menagerie

The Menagerie is special in that the habitat changes its appearance, so if you use this template to show a Menagerie the background may be changed. For example, {{POH room|room=Menagerie}} would only show the default Garden:


Menagerie

However, {{POH room|room=Menagerie|habitat=Polar}} will show as if it were white, like so:


Menagerie

The list of options for a habitat is found here.

(None)/Garden
Jungle
Desert
Volcanic
Polar

See also