<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.lostsouls.org/w/skins/common/feed.css"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.lostsouls.org/w/index.php?action=history&amp;feed=atom&amp;title=Man_item</id>
		<title>Man item - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.lostsouls.org/w/index.php?action=history&amp;feed=atom&amp;title=Man_item"/>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_item&amp;action=history"/>
		<updated>2026-05-10T10:45:40Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.8.2</generator>

	<entry>
		<id>http://wiki.lostsouls.org/w/index.php?title=Man_item&amp;diff=3969&amp;oldid=prev</id>
		<title>Laine at 20:40, 11 June 2007</title>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_item&amp;diff=3969&amp;oldid=prev"/>
				<updated>2007-06-11T20:40:24Z</updated>
		
		<summary type="html">&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/item.c&lt;br /&gt;
 /lib/descriptor/item.h&lt;br /&gt;
 /daemon/items.c&lt;br /&gt;
 /lib/items.h&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
Item descriptors are used by the random item generation system.  Items&lt;br /&gt;
which are suitable for use as randomly generated content are registered&lt;br /&gt;
with the items daemon using item descriptors, and the descriptors are&lt;br /&gt;
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 items for use by the random item system, which is referred to&lt;br /&gt;
as &amp;quot;publishing&amp;quot; them.  Example of items being registered from a project&lt;br /&gt;
control daemon:&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;Project.h&amp;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;
    #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_item(Project_Weapon(&amp;quot;sword&amp;quot;), Rarity_Common);&lt;br /&gt;
        add_published_item(([&lt;br /&gt;
            Item_File       : Project_Misc(&amp;quot;boom_gem&amp;quot;),&lt;br /&gt;
            Item_Rarity     : Rarity_Very_Rare,&lt;br /&gt;
            Item_Dangers    : Item_Danger_Injure_Anyone,&lt;br /&gt;
        ]));&lt;br /&gt;
        add_published_item(Project_Weapon(&amp;quot;weird_ball&amp;quot;), Rarity_Exotic,&lt;br /&gt;
            Item_Category_Strange, Item_Danger_Force_Transport);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
===Public Fields===&lt;br /&gt;
&lt;br /&gt;
Item_File: Typically the string object name of the item blueprint.&lt;br /&gt;
Required.  This may also be specified as an array or mapping random&lt;br /&gt;
distribution list of string blueprint names, but it is not encouraged&lt;br /&gt;
to use this form; it is intended mainly for keeping large classes of&lt;br /&gt;
similar objects in lib content from flooding the distribution lists.&lt;br /&gt;
&lt;br /&gt;
Item_Rarity: The general rarity with which the object is expected to&lt;br /&gt;
appear.  This is an integer rarity value from rarity.h.  Required.&lt;br /&gt;
&lt;br /&gt;
Item_Categories: A bitmask field indicating which of various general&lt;br /&gt;
categories the item belongs to.  These categories are not exhaustive,&lt;br /&gt;
since there can only be 32 of them (as we have 32-bit integer values).&lt;br /&gt;
Often, this field does not need to be specified, since normally the&lt;br /&gt;
item will be automatically analyzed to determine which categories it&lt;br /&gt;
belongs to.  Some of the categories cannot be automatically assigned,&lt;br /&gt;
however, and others can only be assigned in some of the appropriate&lt;br /&gt;
cases; these will be noted in their individual descriptions.  Any item&lt;br /&gt;
categories which are automatically assigned are added to ones specified&lt;br /&gt;
manually.  The item categories are as follows, with indentation showing&lt;br /&gt;
categories which are normally part of one another (though this is not&lt;br /&gt;
automatically enforced -- if you specify Item_Category_Hand_Weapon,&lt;br /&gt;
Item_Category_Weapon is not automatically added, though automatic&lt;br /&gt;
analysis will add it if the item appears to be a weapon).&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Weapon: All weapons except shields.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Hand_Weapon: Ordinary close combat weapons; in&lt;br /&gt;
        automatic analysis, applied if no other weapon subcategories&lt;br /&gt;
        apply.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Throwing_Weapon: Weapon intended for use by being&lt;br /&gt;
        thrown, meaning its ranged performance is better than its close&lt;br /&gt;
        combat performance and it does not belong to any of the other&lt;br /&gt;
        ranged weapon categories below.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Launcher_Weapon: Weapon used to launch ammunition;&lt;br /&gt;
        bows, crossbows, slings, and so on.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Ammunition_Weapon: Weapon launched by a launcher;&lt;br /&gt;
        arrows, bolts, and so on.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Discharger_Weapon: Weapon which emits a ranged&lt;br /&gt;
        attack from a stationary position; e.g. wands and staves which&lt;br /&gt;
        discharge ranged attacks.&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Shield: Shields.&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Armour: All worn items, including accessories (that&lt;br /&gt;
    is, overarmour; rings, anklets, and so on).&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Head_Armour: Armour which covers the head only.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Chest_Armour: Armour which covers the chest only.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Full_Body_Armour: Armour which covers at least the&lt;br /&gt;
        ten limbs normally present in an anthropoid anatomy.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Upper_Body_Armour: Armour which covers the chest,&lt;br /&gt;
        right arm, and left arm.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Other_Armour: Locational armour (not overarmour)&lt;br /&gt;
        not in one of the previous categories.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Hand_Accessory: Overarmour worn on a hand (such as&lt;br /&gt;
        rings and bracelets).&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Foot_Accessory: Overarmour worn on a foot.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Head_Accessory: Overarmour worn on the head (such&lt;br /&gt;
        as amulets and necklaces).&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Other_Accessory: Other overarmour (such as cloaks,&lt;br /&gt;
        robes, and belts).&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Comestible: Comestible items.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Food: Food items.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Drink: Drink items.&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Literature: Items of literature.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Scroll: Scrolls.&lt;br /&gt;
&lt;br /&gt;
        Item_Category_Books: Books.&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Tool: Items whose primary intended purposes is as tools.&lt;br /&gt;
    Usually these items are also weapons, but not always.  This category is&lt;br /&gt;
    automatically set for weapons whose types are configured as tools.&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Container: Items intended for use as containers.  This&lt;br /&gt;
    category is automatically set for items which respond true to the&lt;br /&gt;
    function is_transactional_container().&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Miscellaneous: Items not belonging to the Weapon,&lt;br /&gt;
    Shield, Armour, Comestible, or Literature categories.&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Ordinary: Assigned to items that are not in the Magical,&lt;br /&gt;
    Psychic, Significant, or Strange categories.&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Magical: Assigned to items with Prop_Magical.&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Psychic: Assigned to items with Prop_Psychic.&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Enhancer: Items which are used to enhance the performance&lt;br /&gt;
    of of other items, usually specific classes of other items.  Examples&lt;br /&gt;
    are flux capacitors (which enhance flux weapons), lanmorathic (which&lt;br /&gt;
    enhances paraxoro), and ezithric (which enhances tarixai).  This&lt;br /&gt;
    category is not assigned automatically.&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Strange: An arbitrary category which should be given&lt;br /&gt;
    to particularly unusual and bizarre items.  This category is not&lt;br /&gt;
    assigned automatically.&lt;br /&gt;
&lt;br /&gt;
    Item_Category_Significant: Items which are particularly important&lt;br /&gt;
    or sought-after.  Examples include black skulls and coruscars.&lt;br /&gt;
    The main purpose of the category is so that these items can be&lt;br /&gt;
    excluded from more trivial random item generation instances.  This&lt;br /&gt;
    category is assigned automatically to unique items, items which&lt;br /&gt;
    respond true to query_indestructible() or which have the NR special&lt;br /&gt;
    ID, but it is best to assign it manually whenever applicable.&lt;br /&gt;
&lt;br /&gt;
Item_Dangers: A set of bitmasks flags indicating ways in which the item&lt;br /&gt;
    is dangerous to its user or bearer.  As with categories, the system&lt;br /&gt;
    will attempt to fill in this field by automatic analysis, though it&lt;br /&gt;
    is limited in its ability to do so.  The danger flags are:&lt;br /&gt;
&lt;br /&gt;
    Item_Danger_Force_Combat: The item may force users or bearers to&lt;br /&gt;
    initiate combat.  This danger flag is not set automatically.&lt;br /&gt;
&lt;br /&gt;
    Item_Danger_Force_Transport: The item may move users or bearers to&lt;br /&gt;
    other locations.  This danger flag is not set automatically.&lt;br /&gt;
&lt;br /&gt;
    Item_Danger_Impair_Anyone: The item may cause impairments, such as&lt;br /&gt;
    attribute, speed, or resistance penalties.  Injuries are considered&lt;br /&gt;
    separately.  This danger flag is only automatically set for comestibles&lt;br /&gt;
    which define negative attribute modifiers.&lt;br /&gt;
&lt;br /&gt;
    Item_Danger_Impair_Misuser: The item may cause impairments to those&lt;br /&gt;
    who use it improperly.  This danger flag is not set automatically.&lt;br /&gt;
&lt;br /&gt;
    Item_Danger_Impair_Some: The item may cause impairments to specific&lt;br /&gt;
    classes of individuals bearing or using it.  An example is those of a&lt;br /&gt;
    given alignment range.  This danger flag is not set automatically.&lt;br /&gt;
&lt;br /&gt;
    Item_Danger_Injure_Anyone: The item may cause injuries to its user or&lt;br /&gt;
    bearer.  This danger flag is not automatically set.&lt;br /&gt;
&lt;br /&gt;
    Item_Danger_Injure_Misuser: The item may cause injuries to those who&lt;br /&gt;
    use it improperly.  An example is the breath weapon potions, which are&lt;br /&gt;
    only dangerous if misused.  This danger flag is not set automatically.&lt;br /&gt;
&lt;br /&gt;
    Item_Danger_Injure_Some: The item may cause injuries to specific&lt;br /&gt;
    classes of individuals.  An example is those of a given alignment&lt;br /&gt;
    range.  This danger flag is not set automatically.&lt;br /&gt;
&lt;br /&gt;
    Item_Danger_Prevent_Drop: The item may prevent itself from being&lt;br /&gt;
    dropped.  This danger flag is set automatically if the object has&lt;br /&gt;
    a Can_Move hook or defines the function drop().&lt;br /&gt;
&lt;br /&gt;
    Item_Danger_Prevent_Equip: The item may prevent itself from being&lt;br /&gt;
    equipped.  This danger flag is set automatically if the object has&lt;br /&gt;
    a Can_Equip_Item hook.&lt;br /&gt;
&lt;br /&gt;
    Item_Danger_Prevent_Unequip: The item may prevent itself from being&lt;br /&gt;
    unequipped.  This danger flag is set automatically if the object has&lt;br /&gt;
    a Can_Unequip_Item hook.&lt;br /&gt;
&lt;br /&gt;
    Item_Danger_Severe_Effect: Designates that the dangers otherwise&lt;br /&gt;
    described are especially severe.  Examples include warpstones, which&lt;br /&gt;
    use the flags Item_Danger_Impair_Some and Item_Danger_Severe_Effect,&lt;br /&gt;
    and breath weapon potions, which use Item_Danger_Injure_Misuser and&lt;br /&gt;
    Item_Danger_Severe_Effect.&lt;br /&gt;
&lt;br /&gt;
Item_Flags: A set of bitmask flags for the item.  These are:&lt;br /&gt;
&lt;br /&gt;
    Item_Flag_Defined_Categories: If set, the normal analysis of the&lt;br /&gt;
    item to determine categories that should be applied to it is not&lt;br /&gt;
    performed, meaning the categories specified manually are relied on&lt;br /&gt;
    exclusively (and so should be specified carefully).&lt;br /&gt;
&lt;br /&gt;
    Item_Flag_Defined_Dangers: If set, the normal analysis of the&lt;br /&gt;
    item to determine danger flags that should be applied to it is not&lt;br /&gt;
    performed, meaning the dangers specified manually are relied on&lt;br /&gt;
    exclusively (and so should be specified carefully).&lt;br /&gt;
&lt;br /&gt;
    Item_Flag_Suppress_Adjustments: If set, known methods of items&lt;br /&gt;
    adjusting themselves to target users are suppressed.  Currently,&lt;br /&gt;
    this amounts to turning off autonomon_adapt in armour items.&lt;br /&gt;
&lt;br /&gt;
===Internal Fields===&lt;br /&gt;
&lt;br /&gt;
Item_Object: Query this field in order to request a pointer to the item&lt;br /&gt;
blueprint object (or a sample blueprint object, in the case of descriptors&lt;br /&gt;
that point to group of objects).  The object will be loaded if it is not&lt;br /&gt;
already.  Do not set this field.&lt;br /&gt;
&lt;br /&gt;
Item_Source: The string object name of the object that created the&lt;br /&gt;
descriptor.&lt;br /&gt;
&lt;br /&gt;
Item_Tag: The tag for the descriptor system.&lt;br /&gt;
&lt;br /&gt;
===Support Functions===&lt;br /&gt;
&lt;br /&gt;
'''object Item_Resolve(descriptor dxr)'''&lt;br /&gt;
&lt;br /&gt;
Returns the final object suitable for use as randomly generated content.&lt;br /&gt;
For non-unique objects, this will be a clone of the blueprint; for unique&lt;br /&gt;
objects, it will be the blueprint itself.  Groups of objects will be&lt;br /&gt;
resolved to a selected object.&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 location|location(descriptors)]], [[man character|character(descriptors)]]&lt;/div&gt;</summary>
		<author><name>Laine</name></author>	</entry>

	</feed>