Difference between revisions of "DSB/Archetypes/Properties"
From DmWiki
Jump to navigationJump to search (→Things) |
|||
(20 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
This is the full list of properties that can be used by all the archetypes. The list is broken down into groups for easier searching. | This is the full list of properties that can be used by all the archetypes. The list is broken down into groups for easier searching. | ||
− | + | While it's possible to assign all the properties to all of the Types, many properties won't do anything for Types that don't support them. For example, you can assign the '''mass''' property to a DOOR type, but it won't do anything as mass is reserved for THINGs. | |
==Basic Properties== | ==Basic Properties== | ||
Line 22: | Line 22: | ||
:"String" is a short piece of extra text that's displayed in the subrenderer area when this item is held up to a champion's eye. | :"String" is a short piece of extra text that's displayed in the subrenderer area when this item is held up to a champion's eye. | ||
+ | [[File:Icongrid.png|thumb|DSB default icongrid]] | ||
;icon = gfx.icons[integer] | ;icon = gfx.icons[integer] | ||
− | :The icon of a Thing is the image displayed when picked up by the mouse cursor, when placed anywhere in the inventory, and when held in the champion's hand. By default, DSB creates icons from a pre-defined grid of images and the number specified selects the relevant icon. You can of course override this grid with your own images, or even specify single bitmaps. | + | :The icon of a Thing is the image displayed when picked up by the mouse cursor, when placed anywhere in the inventory, and when held in the champion's hand. By default, DSB creates icons from a pre-defined grid of images and the number specified selects the relevant icon. You can of course override this grid with your own images, or even specify single bitmaps. Explore the function '''setup_icons()''' in DSBs base/graphics.lua and look at the image to the right to understand how it works: |
+ | |||
+ | ;alt_icon = gfx.icons[integer] | ||
+ | Most items don't have an alt_icon set. If you set one, then when the item is placed in the character's action hand, the alternate icon is displayed instead of the usual icon. This is used for Things like burning torches, open scrolls, etc. | ||
;dungeon = gfx.name | ;dungeon = gfx.name | ||
Line 70: | Line 74: | ||
:The value in <code>stat_up</code> is used to increase the statistic in <code>stat</code>. Choose one from the list shown here. | :The value in <code>stat_up</code> is used to increase the statistic in <code>stat</code>. Choose one from the list shown here. | ||
− | == | + | ;impact = integer |
+ | ;base_range = integer | ||
+ | ;base_tpower = integer | ||
+ | ;bonus_damage = integer | ||
+ | ;max_throw_power = integer | ||
+ | ;spell_power = integer | ||
+ | :<span style="background:yellow; color:red; font-weight:bold;">All the above need details</span> | ||
+ | |||
+ | ;foodval = integer | ||
+ | :<span style="background:yellow; color:red; font-weight:bold;">To be completed</span> | ||
+ | |||
+ | ;convert_burn = "string" | ||
+ | :<span style="background:yellow; color:red; font-weight:bold;">To be completed</span> | ||
+ | |||
+ | ;convert_deplete = "string" | ||
+ | :You can set this property to change the Thing into something else when its charges are used up. Generally used with magic items. Investigate DSB base/objects.lua and search for '''obj.flamitt''' for an example. | ||
+ | |||
+ | ;missile_type = MISSILE_TYPE | ||
+ | :Can be one of the following values: MISSILE_MISC | MISSILE_ARROW | MISSILE_ROCK | MISSILE_DART | MISSILE_STAR | MISSILE_DAGGER | MISSILE_MAGIC. [Need more detail here] | ||
+ | |||
+ | ;methods = methods | ||
+ | :<span style="background:yellow; color:red; font-weight:bold;">To be completed</span> | ||
+ | ;msg_handler = message handler | ||
+ | :<span style="background:yellow; color:red; font-weight:bold;">To be completed</span> | ||
+ | |||
+ | ;to_l_hand = function | ||
+ | ;to_r_hand = function | ||
+ | ;to_anywhere = function | ||
+ | ;from_l_hand = function | ||
+ | ;from_r_hand = function | ||
+ | ;from_anywhere = function | ||
+ | ;after_to_l_hand = function | ||
+ | ;after_to_r_hand = function | ||
+ | ;after_from_l_hand = function | ||
+ | ;after_from_r_hand = function | ||
+ | :<span style="background:yellow; color:red; font-weight:bold;">To be completed</span> | ||
+ | |||
+ | ;min_light = integer | ||
+ | ;diff_light = integer | ||
+ | ;def_charge = integer | ||
+ | :<span style="background:yellow; color:red; font-weight:bold;">Need details</span> | ||
+ | |||
+ | ;subrenderer = function | ||
+ | :A subrenderer is the panel shown in the inventory that swaps between displaying the food/water bars, champion statistics and the contents of chests, containers and scrolls. (See [[DSB/Subrenderers|Subrenderers]] for more details). If you want this Thing to invoke a different subrenderer, add your own function using this property. | ||
+ | |||
+ | ;inside_gfx = gfx.name | ||
+ | :Things can display a unique image in the subrenderer area when the Thing is held in the champion's action hand. Chests display the chest graphic with the 8 slots, scrolls display a scroll graphic over which the scroll's text is drawn. To specify your own bitmap, use this property. ''Note that the subrenderer size is hardcoded at 246 x 146.'' | ||
+ | |||
+ | ;capacity = integer | ||
+ | :If this Thing is a container that can contain other items (such as a chest), use this property to specify the maximum number of items it can carry. | ||
+ | |||
+ | ;no_fit_inventory = false [true] | ||
+ | :Set this to true to prevent an item from being placed anywhere in the backpack. In the base code, only the magical plasma ZoKathRa has this set. You could use it to prevent large chests being carried by the player, for example. | ||
+ | |||
+ | ;flying_only = false [true] | ||
+ | :This property is used to give an item velocity and prevent it from being spawned on the ground. Generally used only in flying magic spells. | ||
+ | |||
+ | ;flying_hits_nonmat = false [true] | ||
+ | :Setting this to true allows the Thing to hit non-material enemies. Ordinarily a flying Thing would pass right through non-material beings. By default, this is only used in the Des Ew spell. | ||
+ | |||
+ | ;renderer_hack = "POWERSCALE" | ||
+ | :This property is only used on flying magic spells, and will affect the size of the image drawn depending on the power of the magic spell. For example, a level 1 fireball will be drawn quite small, while a level 6 fireball will be drawn at full size. | ||
+ | |||
+ | ;impact_success = true [false] | ||
+ | :<span style="background:yellow; color:red; font-weight:bold;">Need details</span> | ||
+ | |||
+ | ;explosion_power_modifier = float | ||
+ | :<span style="background:yellow; color:red; font-weight:bold;">Need details</span> | ||
+ | |||
+ | ;explode_into = "string" | ||
+ | :This is the named string for a gfx entry to display when the spell explodes. A good example is the Fireball spell, which will display the "explosion" graphic when the spell explodes. Note that this must be a simple string, and not a graphics pointer (i.e., using '''gfx.explosion''' here won't work.) | ||
+ | |||
+ | ;explode_sound = snd.name | ||
+ | :The sound to play when this spell explodes. Only relevant on flying magic spells. | ||
+ | |||
+ | ;zo_spell = false [true] | ||
+ | :This informs the engine that this flying spell is of the special type Zo, a door opener. If this spell explodes on a "normal" door tile (one with a door and doorbutton) then it will open/close the door dependng on the door's current state. | ||
+ | |||
+ | ;no_shade = false [true] | ||
+ | :Setting this to true will make this Thing permanently bright; ie, it will not be affected by distance shading or the dungeon getting darker. It's usually used on flying magic spells to make them stay bright during travel, but you could make special tracking items on the floor using this property. | ||
+ | |||
+ | ;on_consume = eatdrink [function] | ||
+ | ;on_impact = function | ||
+ | ;on_location_explode = function | ||
+ | ;on_target_explode = function | ||
+ | :<span style="background:yellow; color:red; font-weight:bold;">To be completed</span> | ||
− | == | + | ==Monsters== |
− | == | + | ==Wallitems== |
+ | ;multidraw = true/false | ||
+ | :A special property added in DSB 0.70 that allows multiple items to be drawn on a wall when using the DM or CSB dungeons. These dungeons don't normally allow multiple wallitems. | ||
− | == | + | ==Doors== |
− | == | + | ==Floorflats== |
− | == | + | ==Flooruprights== |
Latest revision as of 19:25, 26 November 2020
Overview
This is the full list of properties that can be used by all the archetypes. The list is broken down into groups for easier searching.
While it's possible to assign all the properties to all of the Types, many properties won't do anything for Types that don't support them. For example, you can assign the mass property to a DOOR type, but it won't do anything as mass is reserved for THINGs.
Basic Properties
- type
- Every archetype must have a type as it defines the core behaviour for that archetype. Types are one of UNDEFINED, FLOORFLAT, FLOORUPRIGHT, DOOR, HAZE, CLOUD, WALLITEM, THING or MONSTER. See Archetypes for more information about types.
- class
- Classes are used to group archetypes together in the ESB editor. See Archetypes for more information about classes.
- name
- Types of Thing or Monster always need a name property. The name is used in-game to show information to the player. For example, the name of a Thing is shown when the champion picks up that Thing. You do not need to define a name for other archetypes.
Things
- mass = integer
- All Things have a mass which affects the load a champion can carry. Mass also affects the distance objects can be thrown. Mass is specified as a whole number: each increment represents 100g, so
mass=2
would be 200grams, whilemass=72
would be 7.2 kilograms.
- shortdesc = "string"
- "String" is a short piece of extra text that's displayed in the subrenderer area when this item is held up to a champion's eye.
- icon = gfx.icons[integer]
- The icon of a Thing is the image displayed when picked up by the mouse cursor, when placed anywhere in the inventory, and when held in the champion's hand. By default, DSB creates icons from a pre-defined grid of images and the number specified selects the relevant icon. You can of course override this grid with your own images, or even specify single bitmaps. Explore the function setup_icons() in DSBs base/graphics.lua and look at the image to the right to understand how it works:
- alt_icon = gfx.icons[integer]
Most items don't have an alt_icon set. If you set one, then when the item is placed in the character's action hand, the alternate icon is displayed instead of the usual icon. This is used for Things like burning torches, open scrolls, etc.
- dungeon = gfx.name
- The dungeon property specifies the image displayed when the Thing is placed on the ground, in an alcove or on a table. It's also used when the Thing is thrown, although thrown items can have their own unique images too (see next).
- flying_away = gfx.name
- flying_toward = gfx.name
- flying_side = gfx.name
- The flying_ properties are used to specify bitmaps for thrown weapons such as swords, clubs and spells. Either static images or animations can be used here. This is used in the standard code for making the wooden club appear to rotate as its thrown, and for swords to have their sharp point face away from the player when thrown.
- hit_sound = snd.sound
- This is the noise the item will make when it's thrown against a wall or door. By default this is snd.dink but you could asisgn any sound here to create more interesting or realistic sound effects.
- armor_str = integer
- This value is the armour rating for the thing, and usually only applies to wearable items such as clothes and armour. Fabric clothes have low values around 5-15 while heavy armour has high values of 80 or more.
- sharp_resist = integer
- The higher this value, the more resistance the champion has against attacks from sharp weapons.
- fit_head = false [true]
- fit_torso = false [true]
- fit_legs = false [true]
- fit_pouch = false [true]
- fit_neck = false [true]
- If you want this Thing to be wearable in the given location, set the value to true. For example, to make something function like a hat that can be worn on the head, you'd set
fit_head = true
. The default value for these properties is always false, so if you don't want an item to be wearable, you won't need to set any of them (unless you've cloned an item that already has some set to true). Note that all normal DM items can be held in either the champion's hands, except for ZoKathRa.
- fit_quiver = false [true]
- The quiver is the the four item container shown in a champion's inventory. This is usually set to true for small thrown or shot items, such as darts, arrows and throwing stars.
- fit_sheath = false [true]
- The sheath is the first slot in the quiver. Swords and other weapons usually have this set to true so that a secondary weapon can be kept handy by the champion.
- fit_chest = false [true]
- For this item to be placeable inside a chest, set to true. If false, then the item won't fit inside.
- can_stick = false [true]
- If set to true, this property allows thrown items to "stick" to monsters. This is for simulating arrows being shot into a creature for example, and the items will effectively vanish until the creature is killed and the items are then dropped.
- go_thru_bars = false [true]
- Set this to true if you want the item to potentially go through the bars of a portcullis when thrown. Make sure you don't set this on crucial campaign items or the player may be unable to complete their quest!
- stat_up = integer
- Things can increase champion's statistics. This figure controls by how much to increase a stat: it's ten times the stat, so to increase the stat by 10 points you'd set
stat_up = 100
- stat= STAT_DEX | STAT_STR | STAT_WIS | STAT_VIT | STAT_AMA | STAT_AFI | STAT_LUC
- The value in
stat_up
is used to increase the statistic instat
. Choose one from the list shown here.
- impact = integer
- base_range = integer
- base_tpower = integer
- bonus_damage = integer
- max_throw_power = integer
- spell_power = integer
- All the above need details
- foodval = integer
- To be completed
- convert_burn = "string"
- To be completed
- convert_deplete = "string"
- You can set this property to change the Thing into something else when its charges are used up. Generally used with magic items. Investigate DSB base/objects.lua and search for obj.flamitt for an example.
- missile_type = MISSILE_TYPE
- Can be one of the following values: MISSILE_MISC | MISSILE_ARROW | MISSILE_ROCK | MISSILE_DART | MISSILE_STAR | MISSILE_DAGGER | MISSILE_MAGIC. [Need more detail here]
- methods = methods
- To be completed
- msg_handler = message handler
- To be completed
- to_l_hand = function
- to_r_hand = function
- to_anywhere = function
- from_l_hand = function
- from_r_hand = function
- from_anywhere = function
- after_to_l_hand = function
- after_to_r_hand = function
- after_from_l_hand = function
- after_from_r_hand = function
- To be completed
- min_light = integer
- diff_light = integer
- def_charge = integer
- Need details
- subrenderer = function
- A subrenderer is the panel shown in the inventory that swaps between displaying the food/water bars, champion statistics and the contents of chests, containers and scrolls. (See Subrenderers for more details). If you want this Thing to invoke a different subrenderer, add your own function using this property.
- inside_gfx = gfx.name
- Things can display a unique image in the subrenderer area when the Thing is held in the champion's action hand. Chests display the chest graphic with the 8 slots, scrolls display a scroll graphic over which the scroll's text is drawn. To specify your own bitmap, use this property. Note that the subrenderer size is hardcoded at 246 x 146.
- capacity = integer
- If this Thing is a container that can contain other items (such as a chest), use this property to specify the maximum number of items it can carry.
- no_fit_inventory = false [true]
- Set this to true to prevent an item from being placed anywhere in the backpack. In the base code, only the magical plasma ZoKathRa has this set. You could use it to prevent large chests being carried by the player, for example.
- flying_only = false [true]
- This property is used to give an item velocity and prevent it from being spawned on the ground. Generally used only in flying magic spells.
- flying_hits_nonmat = false [true]
- Setting this to true allows the Thing to hit non-material enemies. Ordinarily a flying Thing would pass right through non-material beings. By default, this is only used in the Des Ew spell.
- renderer_hack = "POWERSCALE"
- This property is only used on flying magic spells, and will affect the size of the image drawn depending on the power of the magic spell. For example, a level 1 fireball will be drawn quite small, while a level 6 fireball will be drawn at full size.
- impact_success = true [false]
- Need details
- explosion_power_modifier = float
- Need details
- explode_into = "string"
- This is the named string for a gfx entry to display when the spell explodes. A good example is the Fireball spell, which will display the "explosion" graphic when the spell explodes. Note that this must be a simple string, and not a graphics pointer (i.e., using gfx.explosion here won't work.)
- explode_sound = snd.name
- The sound to play when this spell explodes. Only relevant on flying magic spells.
- zo_spell = false [true]
- This informs the engine that this flying spell is of the special type Zo, a door opener. If this spell explodes on a "normal" door tile (one with a door and doorbutton) then it will open/close the door dependng on the door's current state.
- no_shade = false [true]
- Setting this to true will make this Thing permanently bright; ie, it will not be affected by distance shading or the dungeon getting darker. It's usually used on flying magic spells to make them stay bright during travel, but you could make special tracking items on the floor using this property.
- on_consume = eatdrink [function]
- on_impact = function
- on_location_explode = function
- on_target_explode = function
- To be completed
Monsters
Wallitems
- multidraw = true/false
- A special property added in DSB 0.70 that allows multiple items to be drawn on a wall when using the DM or CSB dungeons. These dungeons don't normally allow multiple wallitems.