<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.lostsouls.org/w/skins/common/feed.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Man location - Revision history</title>
		<link>http://wiki.lostsouls.org/w/index.php?title=Man_location&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.8.2</generator>
		<lastBuildDate>Sun, 10 May 2026 10:48:32 GMT</lastBuildDate>
		<item>
			<title>Laine at 20:44, 11 June 2007</title>
			<link>http://wiki.lostsouls.org/w/index.php?title=Man_location&amp;diff=3971&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Files==&lt;br /&gt;
&lt;br /&gt;
 /def/descriptor/location.c&lt;br /&gt;
 /lib/descriptor/location.h&lt;br /&gt;
 /daemon/locations.c&lt;br /&gt;
 /lib/locations.h&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Location descriptors are used by the random location selection system.&lt;br /&gt;
Locations which are suitable for random selection are registered with&lt;br /&gt;
the locations daemon using location descriptors, and the descriptors&lt;br /&gt;
are used in the selection process.&lt;br /&gt;
&lt;br /&gt;
The standard support module for control daemons includes functions for&lt;br /&gt;
registering locations for use by the random location system, which is&lt;br /&gt;
referred to as &amp;quot;publishing&amp;quot; them.  Example of items being published from&lt;br /&gt;
a project control daemon:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;Project.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    inherit &amp;quot;/std/daemon&amp;quot;;&lt;br /&gt;
    inherit &amp;quot;/mod/daemon/control&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;daemon.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    void configure() {&lt;br /&gt;
        ::configure();&lt;br /&gt;
        // set_creator(), set_area(), extensions, and so on here...&lt;br /&gt;
        add_published_location(Project_Room(&amp;quot;entrance&amp;quot;), Rarity_Unusual,&lt;br /&gt;
            Location_Danger_Safe);&lt;br /&gt;
        add_published_location(([&lt;br /&gt;
            Location_File   : ({&lt;br /&gt;
                Project_Room(&amp;quot;hall1&amp;quot;),&lt;br /&gt;
                Project_Room(&amp;quot;hall2&amp;quot;),&lt;br /&gt;
                Project_Room(&amp;quot;hall3&amp;quot;),&lt;br /&gt;
            }),&lt;br /&gt;
            Location_Rarity : Rarity_Very_Rare,&lt;br /&gt;
            Location_Danger : Location_Danger_Moderate,&lt;br /&gt;
        ]));&lt;br /&gt;
        add_published_location(([&lt;br /&gt;
            Location_File   : (:&lt;br /&gt;
                if(Project_Daemon(&amp;quot;control&amp;quot;)-&amp;gt;query_trap_sprung())&lt;br /&gt;
                    return Project_Room(&amp;quot;pit&amp;quot;);&lt;br /&gt;
                else&lt;br /&gt;
                    return Project_Room(&amp;quot;trap&amp;quot;);&lt;br /&gt;
            :),&lt;br /&gt;
            Location_Rarity : Rarity_Exotic,&lt;br /&gt;
            Location_Danger : Location_Danger_Extreme,&lt;br /&gt;
            Location_Egress : Location_Egress_Restricted,&lt;br /&gt;
        ]));&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
===Public Fields===&lt;br /&gt;
&lt;br /&gt;
Location_File: Designates the file name of the location.  Required.&lt;br /&gt;
A set of rooms, rather than a single one, may be designated; this is&lt;br /&gt;
done to avoid flooding the random locations list with many similar&lt;br /&gt;
rooms.  Note that when this is done, the rooms in the list should be&lt;br /&gt;
as similar in configuration as possible, so that any given one can be&lt;br /&gt;
examined as representative of the group.  Can be any of the following:&lt;br /&gt;
&lt;br /&gt;
    A string object name&lt;br /&gt;
    An array of string object names (which will be passed through&lt;br /&gt;
        random_element() to find the final object to use)&lt;br /&gt;
    A mapping of string object names to integer weights (which will&lt;br /&gt;
        be passed through random_element() as with an array)&lt;br /&gt;
    A closure, which may return any of the above or an object&lt;br /&gt;
&lt;br /&gt;
Location_Rarity: The general rarity with which the location is to be&lt;br /&gt;
selected.  This is an integer rarity value from rarity.h.  Required.&lt;br /&gt;
&lt;br /&gt;
Location_Danger: A general indication of how dangerous the location is.&lt;br /&gt;
Required.  Factors to take into account when selecting this value include&lt;br /&gt;
any environmental dangers and hostile characters present or nearby.  The&lt;br /&gt;
values that can be used are:&lt;br /&gt;
&lt;br /&gt;
    Location_Danger_Sanctuary: The location protects those in it, as&lt;br /&gt;
        with the Losthaven cathedral.&lt;br /&gt;
    Location_Danger_Safe: The location is generally safe.&lt;br /&gt;
    Location_Danger_Low: The location has a low level of danger.&lt;br /&gt;
    Location_Danger_Moderate: The location is moderately dangerous.&lt;br /&gt;
    Location_Danger_High: The location is highly dangerous.&lt;br /&gt;
    Location_Danger_Extreme: The location is extremely dangerous.&lt;br /&gt;
&lt;br /&gt;
Location_Egress: A general indication of how difficult it is to leave&lt;br /&gt;
the location or its general area.  The values that can be used are:&lt;br /&gt;
&lt;br /&gt;
    Location_Egress_Ordinary: There are no unusual obstacles to&lt;br /&gt;
        leaving the location.  (This is the default.)&lt;br /&gt;
    Location_Egress_Difficult: There are some obstacles to leaving the&lt;br /&gt;
        location, though the location is not designed to be difficult&lt;br /&gt;
        to leave (or if it is, the measures are not very effective).&lt;br /&gt;
    Location_Egress_Restricted: The location is designed specifically,&lt;br /&gt;
        and effectively, to prevent departure, as with a jail cell or&lt;br /&gt;
        trap room.&lt;br /&gt;
&lt;br /&gt;
===Internal Fields===&lt;br /&gt;
&lt;br /&gt;
Location_Object: Query this field to retrieve a sample room object for&lt;br /&gt;
the location.  The room will be loaded if it has not yet been.  Do not&lt;br /&gt;
set this field.&lt;br /&gt;
&lt;br /&gt;
Location_Tag: The tag for the descriptor system.&lt;br /&gt;
&lt;br /&gt;
===Support Functions===&lt;br /&gt;
&lt;br /&gt;
'''object Location_Resolve(descriptor dxr)'''&lt;br /&gt;
&lt;br /&gt;
Used to obtain the final room object from a descriptor, evaluating any&lt;br /&gt;
closure targets and selecting from among any random distribution lists,&lt;br /&gt;
loading the room, and returning it.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
[[man descriptors|descriptors(mechanisms)]], [[man rarity|rarity(mechanisms)]], [[man selection|selection(mechanisms)]], [[man item|item(descriptors)]], [[man character|character(descriptors)]]&lt;/div&gt;</description>
			<pubDate>Mon, 11 Jun 2007 20:44:21 GMT</pubDate>			<dc:creator>Laine</dc:creator>			<comments>http://wiki.lostsouls.org/Talk:Man_location</comments>		</item>
	</channel>
</rss>