forums | blogs | polls | tutorials | downloads | rules | help

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in remember_me_form_alter() (line 78 of /var/www/siegetheday.org/sites/all/modules/contrib/remember_me/remember_me.module).

Modding Basics: Templates (and components.gas)

Sharkull's picture

If you want to start reading how some things are done in DS2, the best place to start is to look in the gas files...
but what do all those codes and things mean? Well, SU is a helpful resource, especially the Concepts and Terminology section
and the Specialization section if you are interested in working with item / actor / object templates.

Also, here's a copy of components.gas, a very useful file that GPG has put comments in to help modders understand things
(I changed some of the spacing to make it a bit easier to read):

////////////////////////////////////////////////////////////////////////////// 
// 
// File     :  world:global:contentdb:rules:components.gas 
// Author(s):  Scott Bilas 
// 
// Summary  :  Contains the definitions (schemas) for all possible components. 
// 
// Copyright © 2000 Gas Powered Games, Inc.  All rights reserved. 
//---------------------------------------------------------------------------- 
//  $Revision:: $              $Date:$ 
//---------------------------------------------------------------------------- 
////////////////////////////////////////////////////////////////////////////// 

////////////////////////////////////////////////////////////////////////////// 
// Documentation 

/*   +++                                                   +++ 
     +++              COMPONENTS               +++ 
     +++                                                   +++ 

     *** Overview *** 

      A 'component' is a basic building block of a game object. Various 
      components are defined that implement certain tasks in the game engine. 
      For example, the 'physics' component contains parameters that tune the 
      physics engine for an object (fire parameters, gravity, etc.). 

      Components are combined in a template to build up a game object that may 
      be instantiated in the Siege Editor or from within C++/Skrit code. They 
      will typically closely mirror their equivalent C++/Skrit code object. 
      Data defined by components (directly or indirectly) will typically be 
      used only for initialization purposes. 

      A component specifies a set of parameters and attributes. For example, 
      the 'body' component has a parameter named 'model', which is specified 
      like this: 

      [t:component,n:body] 
      { 
         //... 

         [model] 
         { 
            type      = string; 
            default   = m_i_glb_placeholder; 
            doc       = "What Nema aspect to use for visual representation"; 
         } 

         // ... 
      } 

      Here the 'model' parameter is defined as type 'string', has a default 
      value of 'm_i_glb_placeholder', must be selected from one of the meshes 
      found that start with 'm_', and is documented as given. This parameter 
      definition is known as a 'schema' and serves several purposes. 

      First it documents the game's data structure. All possible parameters, 
      their types, and default values are given (with a few 'internal' 
      exceptions). Second, it enables Siege Editor to treat the data 
      generically by detecting types. 

   *** Format *** 

      [t:component,n:component_name] 
      { 
         // the type of 'component' is required. the name (replace 
         // 'component_name' with your component's name) must be unique 
         // across all components. it should be human-readable, as it's used 
         // for unique addressing and data transfer. 

         doc = "This component represents an object's ability to spew"; 

            // this is a string that describes the component. siege editor 
            // may use this to provide help in its dialogs where useful. 

         required_component* = other_component_name; 

            // this is a string or set of strings that defines a dependency. 
            // a template that uses the component being defined must also 
            // use the components in the required_component* set. 

         internal* = sound; 

            // this is a string or set of strings that says that a 
            // particular name is allowed to be used as a block or value. in 
            // order to maintain data integrity the content validator 
            // routines will give errors upon finding entries that are not 
            // part of the official schema. certain blocks and values will 
            // be used by the c++ code but not be exposable via standard 
            // schema, so tag those with "internal" and doc the format of 
            // the block/value in place of the schema. 

         internal_component = true; 

            // this is a bool that says that the entire current component is 
            // internal in the same way that internal* says that a 
            // particular element of a component is internal. 

         [parameter_name] 
         { 
            // this is the name of the parameter that is being added to this 
            // component's schema. 

            type = float; 

               // this is the type of the parameter. generally this will be 
               // a float, int, bool, or string. there are other special 
               // types supported: Vector, SiegePos, Quat, and a set of 
               // enums. 

            default = 1.234; 

               // (optional) this is the default value to use for the 
               // parameter if not overridden in a template or chosen in 
               // Siege Editor. always try to give a default value that 
               // will allow construction of a valid component. 

            flags = REQUIRED; 

               // (optional) this sets particular flags for the parameter. 
               // possible values are covered in a later section. 

            doc = "This parameter controls happiness"; 

               // this documents the parameter and is required. make it as 
               // descriptive as possible - Siege Editor and various other 
               // interfaces will use this attribute to give context and 
               // help when modifying/dumping parameters on game objects. 
         } 
      } 

      *** Parameter flags *** 

         These are possible flags to be used in a component's 'flags' 
         attribute. Combine flags together by using the '|' operator 
         (example: flags = REQUIRED | LOCALIZE). 

         REQUIRED 

            This is a 'required' parameter that cannot accept a default 
            value. For example, actors cannot be placed in the world without 
            a valid SiegePos, so that parameter is marked as REQUIRED. 
            Hopefully parameters flagged this way will be very rare. Try to 
            always allow a default value to work. 

         LOCALIZE 

            This is a flag on a parameter that says it refers to a string 
            that will potentially be printed on the screen. The parameter 
            name, by the way, should follow the convention where 'screen_' 
            is prefixed. This flag is used to tell the system to do a 
            translation on the string when it's read in. It will also be 
            scanned by an external tool to build the translation database 
            for localization efforts. 

         ADVANCED 

            Flag a parameter with this to tell Siege Editor or other editing 
            interfaces to put this parameter in an 'advanced' section of the 
            editing dialogs. This will help to reduce clutter for 
            infrequently-overridden parameters. This cannot be used with the 
            REQUIRED or HIDDEN flags. 

         HIDDEN 

            Put this on parameters that should normally be hidden from the 
            Siege Editor or other editing interfaces. This cannot be used 
            with the REQUIRED or ADVANCED flags. Hidden parameters are meant 
            to be tweaks that generally only engineers mess with during 
            testing. 
*/ 

////////////////////////////////////////////////////////////////////////////// 
// Component definitions 

[t:component,n:actor] 
{ 
   doc = "Interactive intelligent actor"; 
   required_component* = attack; 
   required_component* = body; 
   required_component* = defend; 
   required_component* = physics; 
   required_component* = inventory; 
   required_component* = placement; 

// Options. 

   [can_level_up]       {  type = bool;  default = false;  doc = "Can this object 'level up'?";  } 
   [is_hero]            {  type = bool;  default = false;  doc = "Can this actor be chosen from the character screen as a hero?";  } 
   [drops_spellbook]    {  type = bool;  default = true;   doc = "If killed with a spellbook in inventory, should we drop it or nuke it?";  } 
   [can_show_health]    {  type = bool;  default = false;  doc = "Does this actor show its health status on cursor rollover?"; } 
   [can_be_resurrected] {  type = bool;  default = true;   doc = "If killed, can this actor be resurrected?"; } 

// Traditional RPG attributes. 

   // inherent traits 
   [alignment]     {  type = eActorAlignment;  default = aa_neutral;  doc = "Moral alignment of actor";  } 
   [race]          {  type = string;           default = other;       doc = "Race of actor";  } 
   [is_male]       {  type = bool;             default = true;        doc = "True for male character ( or undetermined ), false for female."; } 
   [screen_class]  {  type = string;           flags = LOCALIZE;      doc = "Starting class for actor"; } 

// General. 

   [portrait_icon]          {  type = string;                   doc = "Bitmap displayed when dragging or in inventory";  } 
   [power_level]            {  type = float;   default = 1.0;   doc = "Power level of actor, used for tuning placement calculations."; } 
   [spot_request_wait_time] {  type = float;   default = 0.0;   doc = "How long this actor will set the spot request time after it successfully requests a go zone spot"; } 
   [bonus_skill_points]     {  type = int;     default = 0;     doc = "Number of bonus skill points this actor starts out with."; } 
   [can_save_member]        {  type = bool;    default = true;  doc = "If this actor is a party member, can we save their data out in the party save?"; } 
   [magic_find_chance]      {  type = float;   default = 0.0;   doc = "The default magic find chance this character starts with."; } 
   [bar_background_index]   {  type = int;     default = 1;     doc = "The status bar border used for enemies (can be 1-5, 5 being the strongest)."; } 

// Buff / Debuff Limitations 

   [max_buffs]    {  type = int;  default = 2.0;  doc = "How many buffs are allowed on this actor?"; } 
   [max_debuffs]  {  type = int;  default = 1.0;  doc = "How many debuffs are allowed on this actor?"; } 

// Skills 

   [current_active_skill]  {  type = string;   doc = "The skill the character will start out with (if any)."; } 

   internal* = skills; 
   /* 
      the "skills" block is a list of skills for this actor. 

      format: 
      [skills] 
      { 
         // skill_name= Experience level, experience points, starting level 
         // Calculations are based on the curve defined for the skill in formulas.gas 

         skill_name   = level, xp, optional starting level 

         strength       = 0,  0, 10;  // CAN BE FORMULA: actual level is 10, no experience points were awarded, 100 xp needed to get to level 11 
         intelligence   = 2,  0, 10;  // CAN BE FORMULA: actual level is 12, leveled up 2 times starting from 10, 480 xp need to get to level 13 
         dexterity      = 10, 0, 0;   // CAN BE FORMULA: actual level is 10, has leveled up 10 times starting from 0, 2000 xp needed to get to level 11 
         monster_level  = 0,  0, 0;   // CAN BE FORMULA: 

         [override] 
         { 
            skill_name   = level, xp, optional starting level 

            combat_magic   = 100, 0;  // level is 100, experience points are derived from level and awarded to strength, dexterity, and 
                                      // intelligence according to the influences defined by the skill 
          } 
      } 
   */ 

// Resistances 

   internal* = resistances; 
   /* 
      the "resistances" block contains all resistances/vulnerabilities a particular actor may possess.  Vulnerabilities 
      are essentially negative resistances. 

      Here are all the resistance "damage types" (DMT_) you may use to set resistances for: 

      // Specific types 
         dmt_melee 
         dmt_ranged 
         dmt_lightning 
         dmt_ice 
         dmt_fire 
         dmt_death 
         dmt_non_elemental 

      // General types 
         dmt_physical 
         dmt_elemental 
         dmt_magical 

      All resistances are in the range of 0.0 being 0% to however high you want to go ( 0.4 = 40%, 2.0 = 200%, -0.5 = -50% ) 
      You can use formulas to determine what the resistances are! example: dmt_physical = #is_easy ? 0.5 : 1; 

      format: 

      [resistances] 
      { 
         dmt_physical  = 0.5; 
         dmt_ice       = 1.0; 
         dmt_fire      = 1.5; 
         dmt_death     = -100.0; 
      } 

      So in the above example, this actor would: 
      + Absorb 50% of all physical damage 
      + Be immune to ice damage 
      + Fire damage would heal the actor +50% of what the damage was 
      + Death damage would totally kick this actor's butt. 
   */ 

   internal* = state_resistances; 
   /* 
      the "state_resistances" block contains all resistances/vulnerabilities a particular actor may possess when a particular 
      state is about to be applied to them.  For example, you can make a generic state called "freeze" and then set the resistance 
      to be 1.0, that actor can never be frozen (by any spell with the state name of "freeze"). 
      Vulnerabilities are essentially negative resistances. 

      All resistances are in the range of 0.0 being 0% to however high you want to go ( 0.4 = 40%, 2.0 = 200%, -0.5 = -50% ) 
      You can use formulas to determine what the resistances are! example: freeze = #is_easy ? 0.5 : 1; 

      format: 

      [state_resistances] 
      { 
         freeze       = 0.5;       // Resistance to anything that freezes the actor in place. ( Ice themed ) 
         ignite       = 1.0;       // Fire resistance to Ignite passive skill 
         immobilize   = 1.0;       // Root resistance 
         stun         = 1.0;       // Stun resistance 
         silence      = 1.0;       // Silence resistance 
         slow         = 1.0;       // Slow resistance. 
         knockback    = 1.0;       // Resistance to knockback 
         slide        = 1.0;       // Resistance to being slid 
         death_event  = 1.0;       // Resistance to the affects of the death event controller. 
         fear         = 1.0;       // Resistance to fear.    
         taunt        = 1.0;       // Resistance to being taunted. 
          
         power_damage      = 1.0;  // Reduction percentage multiplier of damage dealt via power damage. 
         corpse_transmute  = 0;    // Resistance to corpse transmutation. Either on or off, 1.0 equals resistant. 
      } 
   */ 

// Power slots 

   internal* = power_slots; 

   /* 
      The power slot definitions hold the power names that will appear in a character's power slots. 

      [power_slots] 
      { 
         power_slot_1 = power_name_1; 
         power_slot_2 = power_name_2; 
         power_slot_3 = power_name_3; 
         power_slot_4 = power_name_4; 
      } 
   */ 
} 


[t:component,n:aspect] 
{ 
   doc = "Runtime visual representation for an object"; 
   required_component* = placement; 

// Options. 

   // rendering 

   [is_visible]          {  type = bool;  default = true;   doc = "Is this object visible (does it render)?";  } 
   [draw_shadow]         {  type = bool;  default = false;  doc = "Should this object draw a shadow when rendered?";  } 
   [interest_only]       {  type = bool;  default = false;  doc = "Should this object draw only when it is in the sphere of interest?"; } 
   [rollover_highlight]  {  type = bool;  default = true;   doc = "Should this object highlight on rollover.";   } 

   // physics 

   [is_collidable]    {  type = bool;  default = false;  doc = "Is this object collidable with other objects like projectiles?";  } 
   [does_block_path]  {  type = bool;  default = false;  doc = "Does this object prevent another from walking through it?";  } 
   [is_invincible]    {  type = bool;  default = false;  doc = "Is this object immune to damage?";  } 

   // gui 

   [is_selectable]      {  type = bool;   default = false;  doc = "Is object selectable from the GUI?";  } 
   [does_block_camera]  {  type = bool;   default = false;  doc = "Does this object block the camera from moving through it?";  } 
   [is_usable]          {  type = bool;   default = false;  doc = "Can this item be 'used?'  i.e. opened, closed, turned on/off."; } 
   [is_door]            {  type = bool;   default = false;  doc = "If this is set and the is_usable is true, you will get a special door opening cursor."; } 
   [use_range]          {  type = float;  default = 0;      doc = "Range at which an actor must be to 'use' this object."; } 

   // other 

   [is_gagged]        {  type = bool;   default = false;  doc = "Is this object gagged from making sounds? Useful for quieting monsters until they activate.";  } 
   [dynamically_lit]  {  type = bool;   default = true;   doc = "Should this object be affected by dynamic light?";  } 
   [occludes_light]   {  type = bool;   default = false;  doc = "Should this object occlude light on the terrain?"; } 
   [terrain_shaded]   {  type = bool;   default = true;   doc = "Should this object use the terrain shading in its lighting calculations?"; } 
   [terrain_orient]   {  type = bool;   default = false;  doc = "Should this object orient to the terrain?"; } 

// General. 

   // rendering 

   [model]                      {  type = string;  default = m_i_glb_placeholder;  doc = "What Nema aspect to use for visual representation";  } 
   [draw_selection_indicator]   {  type = bool;    default = true;                 doc = "Specifies whether or not an indicator should be drawn"; } 
   [draw_exclamation]           {  type = bool;    default = false;                doc = "Specifies whether or not to draw the exclamation mark above the aspect"; } 
   [selection_indicator_scale]  {  type = float;   default = 1.0;                  doc = "Scalar for determining selection indicator radius";  } 
   [scale_base]                 {  type = float;   default = 1.0;                  doc = "Base scale to use for rendering - modify this in base template only";  } 
   [scale_multiplier]           {  type = float;   default = 1.0;                  doc = "Multiplier modifier to apply to the scale - modify this in instances only";  } 
   [bounding_volume_scale]      {  type = float;   default = 1.0;                  doc = "Scalar multiplier for adjusting the bounding volumes of objects";  } 
   [display_cost]               {  type = float;   default = 0;                    doc = "Cost to display this object, used for ingame HUDs";  } 
   [lodfi_upper]                {  type = float;   default = -1.0;                 doc = "Upper bound for level of detail for items - will always render if object detail level higher than this (set -1 for critical/global)";  } 
   [lodfi_lower]                {  type = float;   default = -1.0;                 doc = "Lower bound for level of detail for items - will not render at all if object detail level lower than this";  } 
   [material]                   {  type = string;                                  doc = "Material that this is made from - used for sound map";  } 
   [cam_fade_alpha]             {  type = int;     default = 65;                   doc = "When this object is faded by the camera, this indicates what alpha level is will fade to ( 0 - invisible, 255 - fully opaque ).";  } 


   // life 

   [life_state]                 {  type = eLifeState;  default = ls_ignore;  doc = "Living state of the object, or life_ignore if not applicable";  } 
   [max_life]                   {  type = float;       default = 0;          doc = "CAN BE FORMULA: Maximum life (hit points) the object has or the amount of damage it can take before breaking apart";  } 
   [life]                       {  type = float;       default = 0;          doc = "CAN BE FORMULA: Initial hit points";  } 
   [life_timed_restore_period]  {  type = float;       default = 0.1;        doc = "The restore period dictates how long until the next restore update takes place."; } 
   [life_recovery_unit]         {  type = float;       default = 0;          doc = "Life recovery units added per period (calculated continuously)";  } 
   [lru_bonus_percent]          {  type = float;       default = 0.0;        doc = "This will take whatever your life recovery unit is, multiply it by itself and then add it to your lru total."; } 
   [life_recovery_period]       {  type = float;       default = 0;          doc = "Life recovery period in seconds";  } 
   [expired_template_name]      {  type = string;                            doc = "Template to replace current object with when it expires";  } 
   [manages_own_damage]         {  type = bool;        default = false;      doc = "If this is set, damage is NOT applied through rules.skrit (the damage will be calculated and set in the aspect, but you must apply it at a time you choose)."; } 

   // $ max_mana is calculated for characters that can level up using the 
   //   formula:  (str-9 * str_percent * constant) 
   //           + (dex-9 * dex_percent * constant) 
   //           + (int-9 * int_percent * constant) 

   // mana 

   [max_mana]              {  type = float;  default = 0;      doc = "CAN BE FORMULA: Maximum mana that this actor may acquire";  } 
   [mana]                  {  type = float;  default = 0;      doc = "CAN BE FORMULA: Initial mana (defaults to max_mana)";  } 
   [mana_recovery_unit]    {  type = float;  default = 0;      doc = "Mana units added per period (calculated continuously)";  } 
   [mru_bonus_percent]     {  type = float;  default = 0.0;    doc = "This will take whatever your mana recovery unit is, multiply it by itself and then add it to your mru total."; } 
   [mana_recovery_period]  {  type = float;  default = 0;      doc = "Mana recovery period in seconds";  } 

   // lighting 

   [alive_light_scale_start]  {  type = float;  default = 1.0;   doc = "Start range to determine random lighting scalar when alive";  } 
   [alive_light_scale_end]    {  type = float;  default = 1.0;   doc = "End range to determine random lighting scalar when alive";  } 
   [dead_light_scale]         {  type = float;  default = 1.0;   doc = "Scalar value (0.0 - 1.0) used to scale lighting when dead";  } 
   [light_scale_trans_time]   {  type = float;  default = 0.75;  doc = "Time (in seconds) to blend between light scales when killed/resurrected";  } 

   // tracer 

   [tracer_texture]  {  type = string;   doc = "If this aspect draws tracers then this texture name will be the texture used"; } 

   // misc 

   [experience_value]         {  type = float;  default = 0;      doc = "CAN BE FORMULA: Number of experience points awarded if destroyed/killed";  } 
   [gold_value]               {  type = int;    default = 0;      doc = "CAN BE FORMULA: Value of object in gold pieces";  } 
   [use_pcontent_gold_value]  {  type = bool;   default = true;   doc = "If this is set to false, then the PContent system will not use its formulas to add to the existing gold value."; } 
   [force_no_render]          {  type = bool;   default = false;  doc = "Force this object not to render, but do everything else"; } 
   [is_transmutable]          {  type = bool;   default = false;  doc = "Can this item be transmuted with the transmute spell?";   } 

   internal* = textures; 
   /* 
      the "textures" block is for texture replacement, where the number 
      must match up with what nema is expecting. 

      format: 

      [textures] 
      { 
         0 = b_c_gah_fb_skin_01; 
         1 = b_c_pos_a2_m_lthr-stud-grn; 
      } 
   */ 

   internal* = voice; 
   /* 
      $ see docs in world/global/sounds/sounddb.gas. 
   */ 

   internal* = ornaments; 
   /* 
      DS 2.0 feature 

      The "ornaments" component allows additional ornament meshes to be attached to an underlying mesh 

      format: 
      [ornaments] 
      { 
         attachmesh = spikes001,b_i_spikes; 
         attachmesh = fins001,b_w_swords; 
      } 
   */ 
    
   internal* = armor_ornaments; 
   /* 
      DS 2.0 feature 

      The "armor_ornaments" component allows additional ornament meshes FOR ARMOR ONLY.  The name is built 
      from the information about the armor (armor_version and armor_race). 

      format: 
      [armor_ornaments] 
      { 
         * = type02_shoulder_02;  // m_c_[armor_version]_orn_[armor_race]_type02_shoulder_02 
      } 
   */    
} 


[t:component,n:attack] 
{ 
   doc = "Parameters related to attacking"; 

   required_component* = common; 

// Options. 

   [requires_line_of_sight]  { type = bool;  default = false;  doc = "Must have a line of sight on the target in order to attack it";  } 
   [is_melee]                { type = bool;  default = false;  doc = "Attack available in close combat";  } 
   [is_projectile]           { type = bool;  default = false;  doc = "Attack available to ranged combat";  } 
   [is_one_shot]             { type = bool;  default = false;  doc = "Attacks once and then is done - subsequent attacks must be explicit";  } 
   [is_two_handed]           { type = bool;  default = false;  doc = "Requires two hands to operate";  } 
   [is_dual_wield]           { type = bool;  default = false;  doc = "Can this weapon be wielded in both hands?"; } 
   [is_thrown]               { type = bool;  default = false;  doc = "Is this a weapon that is thrown (like throwing knives or javelins?)"; } 
   [is_wielded_weapon]       { type = bool;  default = true;   doc = "Is this weapon weilded in the hand? If false then weapon will not appear on the character."; } 

// General. 

   [ammo_template]            { type = string;                        doc = "Go clone source to spawn from for ammo";  } 
   [ammo_attaches_to_weapon]  { type = bool;    default = false;      doc = "True if attaching to projectile launcher, false if held in hand"; } 
   [ammo_attach_bone]         { type = string;  default = "ap_grip";  doc = "Name of bone to use when attaching relative to ammo or projectile launcher"; } 
   [ammo_appears_jit]         { type = bool;    default = false;      doc = "True if ammo is created right before the instant that it is shot"; } 
   [ammo_always_attached]     { type = bool;    default = true;       doc = "Always keep ammo attached to this weapon instead of waiting for the attach ammo event in the attack."; } 

   [area_damage_radius]  { type = float;         default = 0.0;     doc = "Spherical collateral damage radius";  } 
   [attack_class]        { type = eAttackClass;  flags = REQUIRED;  doc = "Classification of attack";  } 
   [attack_range]        { type = float;         default = 1.0;     doc = "CAN BE FORMULA: Minimum range the GO must be to target in order to gamage it";  } 
   [reload_delay]        { type = float;         default = 0.0;     doc = "CAN BE FORMULA: Duration of each attack iteration, i.e. a single blow";  } 
   [damage_min]          { type = float;         default = 1.0;     doc = "CAN BE FORMULA: Minimum damage amount this object can do before modifiers";  } 
   [damage_max]          { type = float;         default = 1.0;     doc = "CAN BE FORMULA: Maximum damage amount this object can do before modifiers";  } 

   // damage bonuses 

   [damage_bonus_min_melee]   { type = float;  default = 0;  doc = "CAN BE FORMULA: Additional damage to add to melee combat"; } 
   [damage_bonus_max_melee]   { type = float;  default = 0;  doc = "CAN BE FORMULA: Additional damage to add to melee combat"; } 
   [damage_bonus_min_ranged]  { type = float;  default = 0;  doc = "CAN BE FORMULA: Additional damage to add to ranged combat"; } 
   [damage_bonus_max_ranged]  { type = float;  default = 0;  doc = "CAN BE FORMULA: Additional damage to add to ranged combat"; } 
   [damage_bonus_min_cmagic]  { type = float;  default = 0;  doc = "CAN BE FORMULA: Additional damage to add to combat magic combat"; } 
   [damage_bonus_max_cmagic]  { type = float;  default = 0;  doc = "CAN BE FORMULA: Additional damage to add to combat magic combat"; } 
   [damage_bonus_min_nmagic]  { type = float;  default = 0;  doc = "CAN BE FORMULA: Additional damage to add to nature magic combat"; } 
   [damage_bonus_max_nmagic]  { type = float;  default = 0;  doc = "CAN BE FORMULA: Additional damage to add to nature magic combat"; } 


   // $ skill_class is defined in the attack component as well! values that 
   //   may go here are defined in formulas.gas 
   [skill_class]  {  type = string;   doc = "What skill to award experience to for usage";  } 

   [use_aiming_error]    {  type = bool;   default = false;  doc = "Attack will use aditional Error specified by aming_error_range_[x|y]";  } 
   [aiming_error_range]  {  type = float;  default = 0.0;    doc = "Random range (-x,x)/(-y,y) in degrees to perturb aim by to make less accurate"; } 
    
   [no_random_attack_sounds]  {  type = bool;  default = false;  doc = "Set this to true if attack sounds for this object should always play"; } 
} 


[t:component,n:body] 
{ 
   doc = "More complex representation for an object, typically used on actors"; 
   required_component* = aspect; 

// General. 

   [armor_version]             {  type = string;                             doc = "Modifier for shape of armor to use";  } 
   [armor_race]                {  type = string;                             doc = "Race modifier used for generating suits/gauntlets/boots";  } 
   [helmet_race]               {  type = string;                             doc = "Race modifier used for generating helmets";  } 
   [angular_turning_velocity]  {  type = float;       default = 360;         doc = "Turning velocity of creature in degrees per second";  } 
   [initial_chore]             {  type = eAnimChore;  default = chore_none;  doc = "Initial chore to run when the object is constructed";  } 
   [initial_anim]              {  type = string;                             doc = "FOURCC code of initial animation";  } 

   [min_move_velocity]  {  type = float;  default = 1.0;  doc = "Minimum movement velocity for this actor."; } 
   [avg_move_velocity]  {  type = float;  default = 1.0;  doc = "Average movement velocity for this actor."; } 
   [max_move_velocity]  {  type = float;  default = 1.0;  doc = "Maximum movement velocity for this actor."; } 

   [terrain_movement_permissions]  {  type = eLogicalNodeFlags;  default = lf_size1_mover | lf_size2_mover | lf_size3_mover | lf_size4_mover | lf_dirt;  doc = "Walk-mask permissions for path-finding."; } 

   internal* = bone_translator; 
   /* 
      the "bone_translator" block is a map of 3ds max bone names to the 
      reserved names expected by the simulation. current possible names 
      are (these are defined in the BoneTranslator::eBone enum): 

         kill_bone 
         weapon_bone 
         shield_bone 
         body_anterior 
         body_mid 
         body_posterior 
         tip 
         middle 
         handle 
         misc1 
         misc2 
         misc3 

      format: 

      [bone_translator] 
      { 
         kill_bone      = bip01_spine2;  // native name = 3ds max name 
         weapon_bone    = weapon_grip; 
         shield_bone    = shield_grip; 
         body_anterior  = bip01_head; 
         body_mid       = bip01_spine2; 
         body_posterior = bip01; 
      } 
   */ 

   internal* = chore_dictionary; 
   /* 
      the "chore_dictionary" block is a set of subblocks that describe the 
      set of available chores that this body can run and the parameters that 
      define those chores. current possible names for the chores are (these 
      are defined in the nema::eAnimChore enum): 

         chore_default (this is required by all body components) 
         chore_walk 
         chore_die 
         chore_defend 
         chore_attack 
         chore_magic 
         chore_fidget 
         chore_rotate 
         chore_open 
         chore_close 

      format: 

      [chore_dictionary] 
      { 
         chore_prefix = a_c_gah_fg_fs;  // prefix (for convenience) on anim files 

         [chore_default]                // name of the chore 
         { 
            skrit = basic_default;      // name of skrit to run the chore 
            chore_stances = 2, 3;       // comma-delimited list of stances that the set of anim files supports 

            [anim_files] 
            { 
               00 = rl;   // name of prs file which prefix is prepended to (the key name is used only to order the anim names which is dependent upon the skrit that uses them) 
               10 = dfs; 
            } 
         } 

         [chore_walk] 
         { 
            // ... 
         } 
      } 
   */ 

   internal* = weapon_scales; 
   /* 
      The "weapon_scales" component allows weapon meshes to be scaled to 
      fit the characters that equip them 

      In order to accomodate this, the characters need to have a lookup 
      table that lists the scale values 

      This is an OPTIONAL component, if it is missing all scales are 
      assumed to be 1,1,1 (x,y,z). 

      format: 

      [weapon_scales] 
      { 
         as_single_melee      = 0.8, 0.8, 0.8; 
         as_two_handed_melee  = 0.8, 0.8, 0.8; 
         as_two_handed_sword  = 0.8, 0.8, 0.8; 
         as_staff             = 1.0, 1.0, 1.0; 
         as_bow_and_arrow     = 0.8, 0.8, 0.8; 
         as_minigun           = 0.8, 0.8, 0.8; 
         as_shield_only       = 0.9, 0.9, 0.9; 
      } 
   */ 

} 

[t:component,n:coach] 
{ 
   doc = "A coach contains a group of actors and gives them high level AI goals."; 

   [max_member_count]  {  type = int;  default = 8;  doc = "Maximum number of members that can join this coach.";  } 

   required_component* = mind; 
   required_component* = placement; 
} 

[t:component,n:common] 
{ 
   doc = "Common attributes for all game objects"; 

   [screen_name]              {  type = string;                         flags = LOCALIZE;  doc = "Text seen in-game upon mouse over";  } 
   [base_screen_name]         {  type = string;                         flags = LOCALIZE;  doc = "Text seen in-game in the item labels";  } 
   [description]              {  type = string;                         flags = LOCALIZE;  doc = "Text seen in-game on some tooltips"; } 
   [dev_instance_text]        {  type = qstring;                        flags = DEV;       doc = "Extra instance-specific descriptive text that can be used for debug HUD, etc";  } 
   [forced_expiration_class]  {  type = string;   default = immediate;  flags = ADVANCED;  doc = "Forced expiration class (such as when killed) of this object for scheduled deletion";  } 
   [auto_expiration_class]    {  type = string;   default = immediate;  flags = ADVANCED;  doc = "Automatic expiration class (when cached out of world) of this object for scheduled deletion";  } 
   [membership]               {  type = string;                                            doc = "Comma-deliniated list of groups of which this Go is a member."; } 
   [is_pcontent_allowed]      {  type = bool;     default = true;       flags = ADVANCED;  doc = "Should this template be considered in a pcontent query?";  } 
   [allow_modifiers]          {  type = bool;     default = true;       flags = ADVANCED;  doc = "Allow modifiers to be attached to this when generating content?";  } 
   [rollover_display]         {  type = bool;     default = true;                          doc = "Will this object display its screenname in game on rollover?";  } 
   [rollover_life]            {  type = bool;     default = false;                         doc = "Will this object display its life stats on rollover?"; } 
   [is_single_player]         {  type = bool;     default = true;                          doc = "Whether or not this object is allowed in a single player game";  } 
   [is_multi_player]          {  type = bool;     default = true;                          doc = "Whether or not this object is allowed in a multi player game";  } 
   [rollover_help_key]        {  type = string;                                            doc = "Key value for user education tooltip to use, if any."; } 
   [rarity]                   {  type = ePClass;  default = normal;                        doc = "What rarity class is this object? (unique, rare, set, normal)"; } 
   [preserve_vitals]          {  type = bool;     default = false;                         doc = "Should this object preserve its vital information in save games."; } 

   internal* = template_triggers; 
   internal* = instance_triggers; 
   /* 
      $$ FINISH 
      condition*      =   ; // Condition such as, receive_world_message 
      action*         =   ; // When activated do, such as call_sfx_script 
      delay           =   ; // amount of time in seconds before trigger will activate 
      poll_frequency  =   ; // amount of time in seoncds to elapsed before performing conditional evaluations 
      reset_duration  =   ; // Duration in seconds before auto-reseting 
      single_shot     =   ; // Should this trigger fire once only 
      flip_flop       =   ; // boolean value true if flip_flop trigger type 

      format: 

      [template_triggers] 
      { 
         [*] 
         { 
            condition*   = receive_world_message("WE_ENTERED_WORLD"); 
            single_shot  = true; 
            action*      = call_ffx_script("sight_light"); 
         } 

         [*] 
         { 
            condition*  = receive_world_message("we_damaged"); 
            action*     = call_ffx_script("melee_hit_2"); 
         } 
      } 

      instance_triggers is the same except it will appear in instances, 
      not in templates and vice versa. 
   */ 

   [t:constraint,n:expiration_class] 
   { 
      // docs: 
      // 
      // delay_seconds - seconds to count down before expiring. 
      // 
      // range_seconds - this is a plus-or-minus modifier on the duration so 
      //                 we can vary the expiration time a little. useful for 
      //                 ammo and death & decay. 

      [choose] 
      { 
         [normal]          {  delay_seconds = 600;                      doc = "Normal delay - non-magic items, monsters";  } 
         [dead]            {  delay_seconds = 15;   range_seconds = 1;  doc = "Object that has died but not started decaying yet";  } 
         [decay_fresh]     {  delay_seconds = 5;    range_seconds = 1;  doc = "Delay for freshly decaying object";  } 
         [decay_bones]     {  delay_seconds = 5;    range_seconds = 1;  doc = "Delay for bones object";  } 
         [decay_dust]      {  delay_seconds = 5;    range_seconds = 1;  doc = "Delay for dust object";  } 
         [decay_thief]     {  delay_seconds = 5;                        doc = "Delay for loot thief";  } 
         [siegefx_target]  {  delay_seconds = 60;                       doc = "Delay for reference points for SiegeFx static targets";  } 
         [magic]           {  delay_seconds = 1800;                     doc = "Long delay - magic items";  } 
         [never]           {  delay_seconds = -1;                       doc = "Permanent object - uniques, heroes, etc.";  } 
         [immediate]       {  delay_seconds = 1;                        doc = "(Mostly) immediate expiration for non-interactive content - give it a couple seconds actually to stabilize though";  } 
         [tombstone]       {  delay_seconds = 60;                       doc = "Delay for tombstone expiration.";  } 
         [shop]            {  delay_seconds = 900;  /* 15 minutes */    doc = "Delay for shop expiration."; } 
      } 
   } 
} 


[t:component,n:conversation] 
{ 
   doc = "Conversation data to use when talking to this object"; 

   [can_talk]    { type = bool;    default = true;  doc = "This says whether or not a person with a conversation is allowed to speak."; } 
   [talk_flick]  { type = string;                   doc = "Flick name to run instead of running the standard conversation code."; } 
   internal* = conversations; 
   /* 
      format: 

      // This block contains all the possible conversations an object can discuss 
      [conversations] 
      { 
         // List all possible conversation names here.  The body of the conversations 
         // are located in the the region in which the go itself resides. 
         * = ...; 
      } 
   */ 
} 


[t:component,n:corpse] 
{ 
   doc = "Corpse data to use when re-outfitting a character with his goodies"; 

   required_component* = placement; 
   required_component* = aspect; 

   [disable_inventory]  { type = bool;   default = false;  doc = "Do we also want to disable the inventory when this corpse is created?"; } 
   [gold_percentage]    { type = float;  default = 0.25;   doc = "Percentage of gold that is left with the corpse when you die."; } 
} 


[t:component,n:defend] 
{ 
   doc = "Parameters related to defending"; 

   required_component* = common; 

   [damage_threshold]  {  type = float;         default = 0;       doc = "Any damage below the specified amount has no effect";  } 
   [defend_class]      {  type = eDefendClass;  flags = REQUIRED;  doc = "Classification of defense";  } 
   [defense]           {  type = float;         default = 0;       doc = "CAN BE FORMULA: General toughness of this object to absorb damage from an attack";  } 
   [armor_type]        {  type = string;                           doc = "Specific armor modifier type (for mesh) - a1, a7, etc.";  } 
   [armor_style]       {  type = string;                           doc = "Texture modifier to use for armor";  } 
} 


[t:component,n:edit] 
{ 
   doc = "Special edit component only used by tools"; 
} 


[t:component,n:fader] 
{ 
   doc = "A component that takes an aspect and fades it"; 

   required_component* = placement; 
} 


[t:component,n:follower] 
{ 
   doc = "A component that can follow (carry out) an MCP plan"; 

   required_component* = aspect; 
} 


[t:component,n:gizmo] 
{ 
   doc = "Development gizmo for representing/manipulating an object in non-retail modes"; 

   required_component* = placement; 

   [model]              {  type = string;  default = m_i_glb_waypoint-10;  doc = "What Nema aspect to use for visual representation of this gizmo";  } 
   [texture]            {  type = string;  default = ;                     doc = "What texture to map onto the gizmo model (only 1 allowed! blank for no texture)";  } 
   [is_visible]         {  type = bool;    default = true;                 doc = "Is this gizmo visible (does it render)?";  } 
   [scale]              {  type = float;   default = 1.0;                  doc = "Scale factor for rendering";  } 
   [alpha]              {  type = float;   default = 1.0;                  doc = "Global alpha level for this object";  } 
   [diffuse_color]      {  type = Vector;  default = 1.0, 1.0, 1.0;        doc = "R/G/B diffuse color to use for rendering";  } 
   [use_diffuse_color]  {  type = bool;    default = true;                 doc = "Set this to render using diffuse color";  } 
} 


[t:component,n:gold] 
{ 
   doc = "Gold that may change its appearance based on count"; 

   required_component* = aspect; 

   internal* = ranges; 
   /* 
      the "ranges" block is a *required* set of ranges to use when defining 
      the appearance of gold based on its quantity. the quantity is the 
      minimum amount of gold required to show that aspect. 

      note that the format is min = model, texture; where model is always 
      required and is the aspect to use, and texture is the optional texture 
      to use for slot 0. texture can be left out. 

      format: 

      [ranges] 
      { 
         0    = m_i_glb_gold_small;                       // 0-99 (use default texture) 
         100  = m_i_glb_gold_medium;                      // 100-999 (use default texture) 
         1000 = m_i_glb_gold_big;                         // 1000-4999 (use default texture) 
         5000 = m_i_glb_gold_big, b_i_glb_gold_extrabig;  // 5000+ note that we're overriding the texture here 
      } 

   */ 
} 


[t:component,n:gui] 
{ 
   doc = "Objects with GUI may be placed in inventory"; 
   required_component* = aspect; 

   [inventory_icon]           {  type = string;          default = b_gui_ig_i_it_def;  doc = "Bitmap displayed when dragging or in inventory";  } 
   [active_icon]              {  type = string;          default = b_gui_ig_i_ic_def;  doc = "Bitmap displayed in quick-select window";  } 
   [mini_icon]                {  type = string;          default = b_gui_ig_i_ic_def;  doc = "Bitmap displayed on the AWP chiclets";  } 
   [inventory_max_stackable]  {  type = int;             default = 1;                  doc = "Maximum items of this type that may be stacked in an inventory slot";  } 
   [inventory_width]          {  type = int;             default = 1;                  doc = "Width in boxes inside inventory";  } 
   [inventory_height]         {  type = int;             default = 1;                  doc = "Height in boxes inside inventory";  } 
   [equip_requirements]       {  type = string;                                        doc = "Minimum skill requirements in order to equip this item";  } 
   [equip_slot]               {  type = eEquipSlot;      default = es_none;            doc = "Equipment slot this object uses";  } 
   [is_droppable]             {  type = bool;            default = true;               doc = "Can this item be dropped on the ground?"; } 
   [is_lorebook]              {  type = bool;            default = false;              doc = "Is this a lore book?  ( Right-click on to use )"; } 
   [lore_key]                 {  type = string;                                        doc = "Name of lore that this lore book refers to. ( stored in the map )"; } 
   [is_identified]            {  type = bool;            default = true;               doc = "Is this object identified."; } 
   [tooltip_color]            {  type = string;                                        doc = "Color of the tooltip for this object, leave empty to use default. Color is looked up at config:global_settings:tooltip_colors."; } 
   [can_sell]                 {  type = bool;            default = true;               doc = "Is this item able to be sold in stores?"; } 
   [use_class]                {  type = eItemSkillType;  default = ist_none;           doc = "Allows you to specify if this particular item is meant for a certain skill type ( ist_fighter, ist_ranger, ist_mage )."; } 
   [set]                      {  type = string;                                        doc = "What set does this item belong to (if any)?"; } 
   [is_pet_consumable]        {  type = bool;            default = true;               doc = "Can this item be consumed by a pet?"; } 
   [item_level]               {  type = float;           default = 0.0;                doc = "What is the item level of this object?"; } 
   [is_reagent]               {  type = bool;            default = false;              doc = "Can this item be used as a reagent (for an item enchanter store)?"; } 
   [can_save_in_inventory]    {  type = bool;            default = true;               doc = "If this is set to false, it will not be saved out if it is inside someone's inventory."; } 

   /* 
      docs for equip_requirements: 

         use a comma-delimited format, where each entry is of the form 
         skill:number where skill is the name of the skill required, and 
         number is the minimum level of that skill required in order to equip 
         the item. 

         sample: 

         equip_requirements = strength:10,nature magic:5; 

         note that the requirement levels can be negative for modifiers if 
         you want to have a modifier decrease the requirements for an item. 
   */ 
} 

[t:component,n:hire] 
{ 
   doc = "Allows the owner to generate and sell npcs."; 
   required_component* = aspect; 
   required_component* = store; 

   [screen_name]  {  type = string;   doc = "Name that you want the NPC store to display in the UI."; } 
} 

[t:component,n:inventory] 
{ 
   doc = "Defines contents and size of inventory"; 

   required_component* = common; 

   [custom_head]  {  type = string;   doc = "Different characters can have different heads - h1, h2, etc. (or blank)";  } 

   [grid_width]                {  type = int;                 default = 1;    flags = ADVANCED;  doc = "Width of object's inventory in grid squares";  } 
   [grid_height]               {  type = int;                 default = 1;    flags = ADVANCED;  doc = "Height of object's inventory in grid squares";  } 
   [is_pack_only]              {  type = bool;                default = false;                   doc = "Set to true if this object cannot equip anything";  } 
   [inventory_pages]           {  type = int;                 default = 1;                       doc = "Specifies how many pages of inventory this character can have.  Currently only used for pets.  No UI support for humans."; } 
   [gold]                      {  type = int;                 default = 0;                       doc = "How many gold pieces in this inventory";  } 
   [selected_active_location]  {  type = eInventoryLocation;  default = il_hand_1;               doc = "Which active slot has been selected (by the user from the active box)";  } 
   [spew_equipped_kill_count]  {  type = string;              default = 1,5;                     doc = "Comma-delimited list of kill counts for this template that will result in an equipped item spew (rather than simple inventory spew)";  } 
   [drop_at_use_point]         {  type = bool;                default = false;                   doc = "When this object drops its contents, will it use a use point ( if any ) for the drop position?"; } 
   [create_pcontent_on_drop]   {  type = bool;                default = true;                    doc = "When this object is killed/opened, it will create its pcontent at that point instead of when it streams into the world if this is set to true."; } 
   [render_equipment]          {  type = bool;                default = true;                    doc = "Does this object render its equipment?"; } 
   [is_container]              {  type = bool;                default = false;                   doc = "Is this object made to be a container that can be opened/broken?"; } 

   internal* = equipment; 
   /* 
      the "equipment" block is a set of equipped items mapped from equipment 
      slot to item template name. 

      format: 

      [equipment] 
      { 
         es_weapon_hand = ax_1h1b_low; 
         es_ring_0      = super_ring; 
      } 
   */ 

   internal* = other; 
   /* 
      the "other" block is a set of non-equipped items that are just in the 
      inventory. just a set of template names. 

      format: 

      [other] 
      { 
         il_main = a_potion; 
         il_active_melee_weapon = sd_1h_ss; 
      } 
   */ 



   internal* = ranges; 
   /* 
      the "ranges" block is a *required* set of ranges to use when defining 
      the appearance of a go's aspect based on the fullness of its inventory 
      (il_main). the ratio is from 0.0 to 1.0 and each level defines the 
      maximum fullness required to use that aspect/texture. 

      note that the format is min = model, texture; where model is always 
      required and is the aspect to use, and texture is the optional texture 
      to use for slot 0. texture can be left out. 

      format: 

      [ranges] 
      { 
         0.25 = m_c_na_pm_pos_1;   // empty pack mule 
         0.50 = m_c_na_pm_pos_2;   // pack mule with some stuff 
         0.75 = m_c_na_pm_pos_3;   // mid-full pack mule 
         1.00 = m_c_na_pm_pos_4;   // full pack mule 
      } 
   */ 

   internal* = pcontent; 
   /* 
      the "pcontent" block is an additional set of parameterized content that 
      is randomly generated, guided by these rules. pcontent is added to an 
      inventory by selecting from groups, where we will either select all of 
      the groups' entries as candidates for inclusion or will choose one from 
      the list. entries in a group may either be an item for individual 
      template choice (assigned to an inventory location or equip slot), or 
      may be subgroups for recursive fun. note that the inventory locations 
      are the "preferred" locations, and if a slot is already full then it 
      will end up unequipped, sitting in il_main if a weapon, and 
      il_all_spells if a spell. 

      if an "all" group is selected, then all of its items and groups are 
      available as candidates for adding to inventory. if a subgroup has a 
      "chance" defined, then that will be evaluated to decide whether or not 
      to include the group. 

      if a "oneof" group is selected, then one of its items or groups is 
      selected based on probability. by default, all have the same chance of 
      being selected (a group with 3 items would give each item a 33% chance 
      of selection) but by assigning "chance" values to the subgroups you can 
      change this. the total chance for a group must be <= 1.0. note that a 
      total chance of < 1.0 means that it's possible none of the items will be 
      selected and the group will be ignored. 

      if a "gold" group is selected, then you get gold. umm, yeah. it pays 
      attention to min, max and chance for whether or not you get gold, and 
      how much. no items or subgroups within the gold group will get any 
      attention from the pcontent system. 

      if a group is selected, then min/max is used to multiply the group's 
      final subselections for addition to the inventory. 

      note that the top-level group (called pcontent) is treated as an "all". 

      format: 

      [pcontent]
      {
         [all*|oneof*]
         {
            il_main = template_name;
            es_weapon_hand = pcontent_name;
            [all*]  {  ... }

            min = 20;
            max = 20;
            chance = 0.2;
         }

         [gold*]
         {
            min = 100;
            max = 1000;
            chance = 0.5;
         }
      }
   */

   internal* = delayed_pcontent;
   /*
      this is exactly the same as the "pcontent" block except that it is not
      automatically executed when the object it's part of is created. instead,
      the delayed pcontent is created and added to inventory when
      AddDelayedPcontent() is called on the GoInventory component.
   */

   internal* = store_pcontent;
   /*
      this is exactly the same as the "pcontent" block except that it is used
      for stores. just take the contents of the [pcontent] block above and
      put it all into subblocks, one for each tab, where the name can be
      anything, but it probably will make more sense to name them after the
      actual tabs.

      each block can have one extra field "full_ratio", which is a 0.0-1.0 
      float that determines how full the tab may be. it defaults to the 
      setting in the store_pcontent block, which itself defaults to 1.0. upon 
      adding content, the store will repeatedly query its pcontent system, 
      adding items until it reaches the full_ratio. set the full_ratio to 0 to 
      disable this repeated-add feature.

      format:

      [store_pcontent]
      {
         full_ratio = 0.8;

         [armor]
         {
            [all*]
            {
               ...
            }
         }

         [weapons]
         {
            ...
         }

         [magic]
         {
            ...
         }

         [shields]
         {
            ...
         }
      }
   */
}

// (continued in next two posts) 

Sharkull's picture

components.gas, part 2 of 3:

[t:component,n:magic] 
{ 
   doc = "Parameters controlling magic"; 

   [magic_class]               {  type = eMagicClass;  flags = REQUIRED;       doc = "Classification of magic object";  } 
   [mana_cost]                 {  type = float;        default = 0;            doc = "This object costs this much mana to use";  } 
   [mana_cost_modifier]        {  type = string;                               doc = "Result of this formula is added to mana_cost"; } 
   [mana_cost_ui]              {  type = string;                               doc = "Result of this formula is used for the UI to display when there is only the caster an spell - no target"; } 
   [mana_cost_ui_modifier]     {  type = string;                               doc = "Result of this formula is used for the UI to display when there is only the caster an spell - no target"; } 
   [mana_cost_varies]          {  type = bool;         default = false;        doc = "If the mana cost formula varies by the target, set this to true so the tooltip will say that the mana cost varies."; } 
   [cast_experience]           {  type = string;                               doc = "Amount of experience to award upon successful cast"; } 
   [speed_bias]                {  type = float;        default = 1.0;          doc = "Speed bias to apply to an actor's animations when cast on it";  } 
   [cast_range]                {  type = float;        default = 1.0;          doc = "Max range at which the spell can be cast."; } 
   [cast_reload_delay]         {  type = float;        default = 0.0;          doc = "Period of one iteration of casting this if it's a spell."; } 
   [requires_line_of_sight]    {  type = bool;         default = false;        doc = "Does this spell require line of sight to target in order to be cast";  } 
   [is_one_shot]               {  type = bool;         default = false;        doc = "Cast only once per cast request";  } 
   [one_use]                   {  type = bool;         default = false;        doc = "For spells - Is it a one-use scroll?"; } 
   [command_cast]              {  type = bool;         default = false;        doc = "For spells - Can this spell only be cast explicitly by the user; actor will not auto-cast spell."; } 
   [effect_duration]           {  type = string;                               doc = "Formula specifying how long a spell effect will last"; } 
   [state_name]                {  type = string;                               doc = "For spells - the name of the state the target will be in if the spell is a success"; } 
   [caster_state_name]         {  type = string;                               doc = "For spells - the name of the state the caster will be in if the spell is a success"; } 
   [require_state_check]       {  type = bool;         default = false;        doc = "For spells - checks to see if the target actor is already in state_name";  } 
   [require_membership_check]  {  type = bool;         default = false;        doc = "For spells - checks to see if the target actor has at least one membership that matches the caster's membership ( in this way we can have skeletons only cast spells on skeletons )";  } 
   [does_damage_per_second]    {  type = bool;         default = false;        doc = "For spells - does this spell do damage per second?"; } 
   [can_autocast]              {  type = bool;         default = false;        doc = "For spells/AI - if true heros and monsters will attempt to cast this spell when its not selected."; } 
   [autocast_chance]           {  type = float;        default = 0.5;          doc = "For spells/AI - if secondary spell, how often does ai attempt to cast? 1 - 0"; } 
   [damage_type]               {  type = eDamageType;  default = dmt_magical;  doc = "For spells - what is the damage type of this spell: dmt_magical, dmt_lightning, dmt_ice, dmt_fire, dmt_death, dmt_non_elemental"; } 
   [reagent_definition]        {  type = string;                               doc = "For reagents - specifies the definition name that stores the enchantments to pull from."; } 

   // $ skill_class is defined in the attack component as well! Values that may go here are defined in formulas.gas 
   [skill_class]            {  type = string;                                     doc = "What skill to award experience to for usage";  } 
   [required_level]         {  type = float;               default = 0;           doc = "Minimum skill level required to cast this spell"; } 
   [pcontent_level]         {  type = float;               default = 0;           doc = "Level to use for pcontent choosing if required_level does not apply (like for potions)"; } 
   [max_level]              {  type = float;               default = 10;          doc = "Maximum skill level this spell can ever be cast at"; } 
   [max_intel]              {  type = float;               default = 0;           doc = "Maximum intelligence level this spell can ever be cast at"; } 
   [target_type_flags]      {  type = eTargetTypeFlags;    default = TT_ACTOR;    doc = "What type of target this magic is cast on"; } 
   [target_type_flags_not]  {  type = eTargetTypeFlags;    default = TT_NONE;     doc = "target_type_flags AND target_type_flags != 0 then cast ok"; } 
   [usage_context_flags]    {  type = eUsageContextFlags;  default = UC_PASSIVE;  doc = "Attitude of spell as relates to combat, also determines whether or not damage value is show on the spells tooltip."; } 
   [apply_enchantments]     {  type = bool;                default = true;        doc = "If false the skrit component applys the enchantments"; } 
   [use_intel_level]        {  type = bool;                default = true;        doc = "When this is set, the ui tooltips will use the intelligence value to show what happens at next intelligence level, as opposed to next magic class level."; } 
   [awp_visible]            {  type = bool;                default = true;        doc = "Can we see this spell in the AWP when it is equipped?"; } 
   [is_buff]                {  type = bool;                default = false;       doc = "Used to see if this spell's payload counts towards our max_buffs limit."; } 
   [is_debuff]              {  type = bool;                default = false;       doc = "Used to see if this spell's payload counts towards our max_debuffs limit."; } 
   [is_power]               {  type = bool;                default = false;       doc = "General query to see if a spell template is a power spell template."; } 

   [attack_damage_modifier_min]  {  type = string;                doc = "Result of this formula is added to the attack damage min";  } 
   [attack_damage_modifier_max]  {  type = string;                doc = "Result of this formula is added to the attack damage max";  } 

   [cast_sub_animation]          {  type = int;     default = 0;  doc = "Storage for what cast animation to use to cast this spell"; } 

   internal* = enchantments; 
   /* 
      $$ i just noticed that these docs are really out of date. look at the 
      code and fix them. -sb 

      the "enchantment" block describes enchantments that will be applied to 
      go's when the go that owns this component is used. 

      format: 

      [enchantments] 
      { 
         [*] 
         { 
            alteration     = alter_life; 
            value          = 50; 
            max_value      = 50; 
            description    = heal spell; 

            duration       = 0; 
            frequency      = 0; 
            initial_delay  = 0; 

            is_enhancement      = true; 
            is_permanent        = true; 
            is_transmissible    = false; 
            is_single_instance  = false; 
            is_active           = false; 
         } 

         [*] 
         { 
            // ... 
         } 
      } 

      alteration =  ; // ALTER_MAX_LIFE,                      - Adds <value> to actor's max_life 
                    ; // ALTER_LIFE,                          - Adds <value> to actor's current life, cannot go higher than max_life 
                    ; // ALTER_LIFE_RECOVERY_UNIT,            - Actor recovers an additional <value> percent of actor's max health every second, 1.0 == 100% ( won't recover is recover_pierod == 0 ) 
                    ; // ALTER_MAX_MANA,                      - Adds <value> to actor's max_mana 
                    ; // ALTER_MANA,                          - Adds <value> to actor's current mana, cannot go higher than max_mana 
                    ; // ALTER_MANA_RECOVERY_UNIT,            - Actor recovers an additional <value> percent of actor's max mana every second, 1.0 == 100% 
                    ; // ALTER_STRENGTH,                      - Adds <value> to actor's strength 
                    ; // ALTER_INTELLIGENCE,                  - Adds <value> to actor's dexterity 
                    ; // ALTER_DEXTERITY,                     - Adds <value> to actor's intelligence 
                    ; // ALTER_MELEE_DAMAGE_MIN               - Adds <value> to minimum melee damage dealt by monster or item 
                    ; // ALTER_MELEE_DAMAGE_MAX               - Adds <value> to maximum melee damage dealt by monster or item 
                    ; // ALTER_RANGED_DAMAGE_MIN              - Adds <value> to minimum ranged damage dealt by monster or item 
                    ; // ALTER_RANGED_DAMAGE_MAX              - Adds <value> to maximum ranged damage dealt by monster or item 
                    ; // ALTER_NMAGIC_DAMAGE_MIN              - Adds <value> to minimum nature magic damage dealt by monster or item - NOT USED IN DS2 
                    ; // ALTER_NMAGIC_DAMAGE_MAX              - Adds <value> to maximum nature magic damage dealt by monster or item - NOT USED IN DS2 
                    ; // ALTER_CMAGIC_DAMAGE_MIN              - Adds <value> to minimum combat magic damage dealt by monster or item 
                    ; // ALTER_CMAGIC_DAMAGE_MAX              - Adds <value> to maximum combat magic damage dealt by monster or item 
                    ; // ALTER_CUSTOM_DAMAGE                  - Adds <value> to damage of each attack (currently no way to deal extra percentage) 
                    ; // ALTER_CUSTOM_DAMAGE_MELEE            - Adds <value> to damage of each melee attack (currently no way to deal extra percentage) 
                    ; // ALTER_CUSTOM_DAMAGE_RANGED           - Adds <value> to damage of each ranged attack (currently no way to deal extra percentage) 
                    ; // ALTER_CUSTOM_DAMAGE_ICE              - Adds <value> ice damage to each attack 
                    ; // ALTER_CUSTOM_DAMAGE_FIRE             - Adds <value> fire damage to each attack 
                    ; // ALTER_CUSTOM_DAMAGE_LIGHTNING        - Adds <value> lightning damage to each attack 
                    ; // ALTER_CUSTOM_DAMAGE_DEATH            - Adds <value> death damage to each attack 
                    ; // ALTER_LIFE_STEAL                     - Adds <value> percent of melee or ranged damage dealt (before armor) to attacker's health.  100.0 == 100% 
                    ; // ALTER_MANA_STEAL                     - Adds <value> percent of melee or ranged damage dealt (before armor) to attacker's mana.  100.0 == 100% 
                    ; // ALTER_LIFE_BONUS                     - Adds <value> to attacker's health for each melee or ranged hit 
                    ; // ALTER_MANA_BONUS                     - Adds <value> to attacker's mana for each melee or ranged hit 
                    ; // ALTER_ARMOR,                         - Adds <value> to defense 
                    ; // ALTER_INVINCIBILITY,                 - Makes actor invincible 
                    ; // ALTER_MONSTER_LEVEL,                 - Alter's monster_level (necessary for summoned creatures) 
                    ; // ALTER_MELEE_CHANCE_TO_HIT            - Actors with negative values have a chance to miss with melee attacks (see "Blind").  -1.0 == -100% 
                    ; // ALTER_CHANCE_FOR_AIMING_ERROR        - Chance to apply "alter_aiming_error" value, 1.0 == 100% 
                    ; // ALTER_AIMING_ERROR                   - Projectiles fired by actors with a positive value will be off by up to <value> degrees in any direction 
                    ; // ALTER_CHANCE_TO_BLOCK_MELEE_DAMAGE   - Chance to block melee attack if shield equipped, 100.0 == 100% 
                    ; // ALTER_CHANCE_TO_BLOCK_RANGED_DAMAGE  - Chance to block ranged attack if shield equipped, 100.0 == 100% 
                    ; // ALTER_CHANCE_TO_DODGE_HIT            - Chance to dodge melee or ranged attack, 1.0 == 100% 
                    ; // ALTER_CHANCE_TO_DODGE_HIT_MELEE      - Chance to dodge melee attack, 1.0 == 100% 
                    ; // ALTER_CHANCE_TO_DODGE_HIT_RANGED     - Chance to dodge ranged attack, 1.0 == 100% 
                    ; // ALTER_CHANCE_TO_BLOCK_RANGED_DAMAGE  - Chance to block ranged attack if shield equipped, 100.0 == 100% 
                    ; // ALTER_REFLECT_DAMAGE                 - Percentage of melee or ranged damage received reflected back to attacker, 100.0 == 100% 
                    ; // ALTER_REFLECT_DAMAGE_CHANCE          - Chance that damage from ALTER_REFLECT_DAMAGE will be reflected, 100.0 == 100% 
                    ; // ALTER_MELEE_RESISTANCE               - Modifies resistance / vulnerability to melee damage, effect of values described under "resistances" above 
                    ; // ALTER_RANGED_RESISTANCE              - Modifies resistance / vulnerability to ranged damage, effect of values described under "resistances" above 
                    ; // ALTER_ICE_RESISTANCE                 - Modifies resistance / vulnerability to ice damage, effect of values described under "resistances" above 
                    ; // ALTER_FIRE_RESISTANCE                - Modifies resistance / vulnerability to fire damage, effect of values described under "resistances" above 
                    ; // ALTER_LIGHTNING_RESISTANCE           - Modifies resistance / vulnerability to lightning damage, effect of values described under "resistances" above 
                    ; // ALTER_DEATH_RESISTANCE               - Modifies resistance / vulnerability to death damage, effect of values described under "resistances" above 
                    ; // ALTER_NON_ELEMENTAL_RESISTANCE       - Modifies resistance / vulnerability to non-elemental damage, effect of values described under "resistances" above 
                    ; // ALTER_PHYSICAL_RESISTANCE            - Modifies resistance / vulnerability to physical damage, effect of values described under "resistances" above 
                    ; // ALTER_ELEMENTAL_RESISTANCE           - Modifies resistance / vulnerability to elemental damage, effect of values described under "resistances" above 
                    ; // ALTER_MAGICAL_RESISTANCE             - Modifies resistance / vulnerability to magical damage, effect of values described under "resistances" above 
                    ; // ALTER_ALL_PASSIVE_SKILLS             - Adds value to all passive skills 
                    ; // ALTER_MELEE_PASSIVE_SKILLS           - Adds value to all melee passive skills 
                    ; // ALTER_RANGED_PASSIVE_SKILLS          - Adds value to all ranged passive skills 
                    ; // ALTER_NATURE_MAGIC_PASSIVE_SKILLS    - Adds value to all nature magic passive skills 
                    ; // ALTER_COMBAT_MAGIC_PASSIVE_SKILLS    - Adds value to all combat magic passive skills 
                    ; // ALTER_MELEE_DAMAGE_PERCENT           - Multiplies melee damage by 1.0 + <value> after bonuses (STR, skills, +min/max damage modifiers) but before elemental damage.  1.0 == 100% 
                    ; // ALTER_MELEE_DAMAGE_SOURCE_PERCENT    - Multiplies melee weapon by 1.0 + <value> damage before all bonuses.  1.0 == 100% 
                    ; // ALTER_RANGED_DAMAGE_PERCENT          - Multiplies ranged damage by 1.0 + <value> after bonuses (DEX, skills, +min/max damage modifiers) but before elemental damage.  1.0 == 100% 
                    ; // ALTER_RANGED_DAMAGE_SOURCE_PERCENT   - Multiplies ranged weapon damage by 1.0 + <value> before all bonuses.  1.0 == 100% 
                    ; // ALTER_NMAGIC_DAMAGE_PERCENT          - Multiplies nature magic damage by 1.0 + <value>.  1.0 == 100% 
                    ; // ALTER_NMAGIC_DAMAGE_SOURCE_PERCENT   - Multiplies nature magic spell damage by 1.0 + <value> before all bonuses.  1.0 == 100%.  NOT USED. 
                    ; // ALTER_CMAGIC_DAMAGE_PERCENT          - Multiplies combat magic damage by 1.0 + <value>.  1.0 == 100% 
                    ; // ALTER_CMAGIC_DAMAGE_SOURCE_PERCENT   - Multiplies combat magic spell damage by 1.0 + <value> before all bonuses.  1.0 == 100%.  NOT USED. 
                    ; // ALTER_ARMOR_PERCENT                  - Multiplies armor defense by 1.0 + <value> after bonuses (skills, +defense modifiers).  1.0 == 100% 
                    ; // ALTER_ARMOR_SOURCE_PERCENT           - Multiplies armor defense by 1.0 + <value> before bonuses.  1.0 == 100% 
                    ; // ALTER_GOLD_DROPPED                   - Multiplies value of gold drops by 1.0 + <value>.  1.0 == 100% 
                    ; // ALTER_MAGIC_FIND_CHANCE              - Increases chances of finding magical, rare, unique, and set items.  100.0 == 100% 
                    ; // ALTER_STATE_RESISTANCE               - Grants percentage immunity to a state.  States include freeze, stun, ignite, immobilize, knockback, taunt, [curse, silence, slow, reanimate NOT IMPLEMENTED].  1.0 == 100% 
                    ; // ALTER_CRITICAL_DAMAGE_BONUS_PERCENT  - Grants a percentage bonus to your totalcritical damage 1.0 == 100% 
                    ; // ALTER_MANA_COST                      - Alters the percentage of mana required by a particular percentage new_mana_cost = base_mana_cost * ( 1.0 + <alter_mana_cost value> ) ) 
                    ; // ALTER_MELEE_RELOAD_DELAY             - Alters the reload delay of the equipped melee weapon. weapon_reload_delay * ( 1.0 + <alter_melee_reload_delay value> ) 
                    ; // ALTER_RANGED_RELOAD_DELAY            - Alters the reload delay of the equipped ranged weapon. weapon_reload_delay * ( 1.0 + <alter_ranged_reload_delay value> ) 
                    ; // ALTER_CAST_RELOAD_DELAY              - Alters the reload delay of the equipped spell. spell_reload_delay * ( 1.0 + <alter_cast_reload_delay value> ) 
                    ; // ALTER_MELEE_SPEED                    - Alters the animation speed of the melee attack.  speed = 1.0 + <alter_melee_speed value>; 1.0 = 100% faster. 
                    ; // ALTER_RANGED_SPEED                   - Alters the animation speed of the ranged attack.  speed = 1.0 + <alter_ranged_speed value>; 1.0 = 100% faster. 
                    ; // ALTER_CAST_SPEED                     - Alters the animation speed of the cast anim.  speed = 1.0 + <alter_cast_speed value>; 1.0 = 100% faster. 

      description  =               ; // Unique description - used for filtering out similar enchantment types 
      effect_script  =             ; // Name of effect script to execute upon each alteration - NOT USED IN DS2 
      effect_script_equip  =       ; // Name of effect script to execute upon initial application like equipping - NOT USED IN DS2 
      effect_script_hit         =  ; // Name of effect script to execute when a hit is scored by the weapon - NOT USED IN DS2 
      effect_script_hit_params  =  ; // script params to accompany the effect_script_hit - NOT USED IN DS2 
      value  =                     ; // Context sensitive value - like a scalar or a constant 
      multiply_value  =            ; // Boolean value, if set to true then the value is multiplied instead of being added to what it modifies 
      min_value_ceiling  =         ; // Causes enchantment to choose a value between "value" and "min_value_ceiling".  Must be greater than "value", does not work for all enchantments 
      max_value  =                 ; // The max value can be in a given context - value <= max_value 
      max_value_ceiling  =         ; // Causes enchantment to choose a max_value between "max_value" and "max_value_ceiling".  Must be greater than "max_value", does not work for all enchantments 
      duration  =                  ; // Duration in seconds (#infinite is infinite) 
      frequency  =                 ; // How much duration in between each alteration 
      transfer_efficiency  =       ; // How efficient a transfer is (MANA alteration only) 
      initial_delay  =             ; // Initial delay in seconds before alteration actually starts 
      is_enhancement  =            ; // (def: true)  false if it is an affliction - like poison, true if it's a good alteration 
      is_permanent  =              ; // (def: false) Effects are permanent and won't be undone 
      is_transmissible  =          ; // (def: false) Can be transmitted to another game object if comes in contact 
      is_single_instance  =        ; // (def: true)  Only one instance of this type of alteration at a time, the rest 
                                   ; // are queued up and activate after the current one expires. 
      is_active  =                 ; // (UNIMPLEMENTED) Should this alteration be activated immediately upon it's hosts 
                                   ; // instantiation? 
      is_value_limited  =          ; // This flag is for fractional usage - sipping healing potions 

      is_source_transfer  =        ; // For mana transference - transfers from the caster to the target 
      is_target_transfer  =        ; // For mana transference - transfers from the target to the caster 
      is_offensive_transfer  =     ; // For life/mana transference - trys to transfer more than the supply 

      *Note: Numeric items can have emebedded formulas evaluated at runtime using the following macros: 
      (example: max_value = (#combat_magic+1.0)*#int/(3+2*#dex) 

      #infinite  ; // * for use with duration - defines an infinite amount of time 


      // --- Target 

      #life                  ; // How much life the object has 
      #maxlife               ; // Max life the object can have 
      #life_recovery_unit    ; // Unit of life to recover per life_recovery_period 
      #life_recovery_period  ; // The amount of time before a life_recovery_unit is regenerated 
      #mana                  ; // How much mana the object has 
      #maxmana               ; // Max mana the object can have 
      #mana_recovery_unit    ; // Unit of mana to recover per mana_recovery_period 
      #mana_recovery_period  ; // The amount of time before a mana_recovery_unit is regenerated 

      #str                   ; // What the strength is for the object with bonuses 
      #int                   ; // What the intelligences is of the object, with bonuses 
      #dex                   ; // What the dexterity is of the object with bonuses 
      #ranged                ; // The ranged skill level of the object 
      #melee                 ; // The melee skill level of the object 
      #combat_magic_level    ; // The combat magic skill level of the object 
      #nature_magic_level    ; // The nature magic skill level of the object 
      #character_level       ; // The character level of the object ( equal to what was known as the 'uber' level ) 
      #monster_level         ; // The monster level of the object ( defined by designers ) 
      #item_level            ; // The item level of the object ( defined by designers ) 

      #base_damage           ; // The base damage the object has with bonuses 
      #base_defense          ; // The base defense the object has with bonuses 
      #highest_skill         ; // The highest skill level of any known skill for the target 

      #melee_damage_min      ; // min melee damage of the object 
      #melee_damage_max      ; // max melee damage of the object 
      #ranged_damage_min     ; // min ranged damage of the object 
      #ranged_damage_max     ; // max ranged damage of the object 
      #cmagic_damage_min     ; // min combat magic damage of the object 
      #cmagic_damage_max     ; // max combat magic damage of the object 
      #nmagic_damage_min     ; // min nature magic damage of the object 
      #nmagic_damage_max     ; // max nature magic damage of the object 

      // --- Caster 

      #src_life                  ; // How much life the caster has 
      #src_maxlife               ; // Max life the caster can have 
      #src_life_recovery_unit    ; // Unit of life to recover per life_recovery_period 
      #src_life_recovery_period  ; // The amount of time before a life_recovery_unit is regenerated 
      #src_mana                  ; // How much mana the caster has 
      #src_maxmana               ; // Max mana the caster can have 
      #src_mana_recovery_unit    ; // Unit of mana to recover per mana_recovery_period 
      #src_mana_recovery_period  ; // The amount of time before a mana_recovery_unit is regenerated 
      #src_str                   ; // What the strength is for the caster with bonuses 
      #src_int                   ; // What the intelligences is of the caster, with bonuses 
      #src_dex                   ; // What the dexterity is of the caster with bonuses 
      #src_ranged                ; // The ranged skill level of the caster 
      #src_melee                 ; // The melee skill level of the caster 
      #src_combat_magic_level    ; // The combat magic skill level of the caster 
      #src_nature_magic_level    ; // The nature magic skill level of the caster 
      #src_character_level       ; // The character level of the caster 
      #src_monster_level         ; // The monster level of the caster 

      #src_base_damage           ; // The base damage of the caster 
      #src_base_defese           ; // The base defense of the caster 
      #src_highest_skill         ; // The highest skill level of any known skill for the caster 

      #src_melee_damage_min      ; // min melee damage of the caster 
      #src_melee_damage_max      ; // max melee damage of the caster 
      #src_ranged_damage_min     ; // min ranged damage of the caster 
      #src_ranged_damage_max     ; // max ranged damage of the caster 
      #src_cmagic_damage_min     ; // min combat magic damage of the caster 
      #src_cmagic_damage_max     ; // max combat magic damage of the caster 
      #src_nmagic_damage_min     ; // min nature magic damage of the caster 
      #src_nmagic_damage_max     ; // max nature magic damage of the caster 

      // --- Spell 

      #spell_req_level   ; // The required spell level for this spell 
      #spell_max_level   ; // The maximum level the spell can be 

      #src_combat_magic  ; // Combat magic level clamped to max level for the spell being cast 
      #src_nature_magic  ; // Nature magic level clamped to max level for the spell being cast 
      #magic             ; // Resolves to clamped combat or nature magic for the spell being cast 
      #clamped_intel     ; // Resolves to either the max_int or the intelligence of the caster (whichever is less). 

      // --- Difficulty 

      #difficulty  ; // Difficulty float value where (0 - 0.3333) == easy, (0.3333 - 0.6666) == medium, (0.666 - 1 or greater) == hard 
      #is_easy     ; // returns a float value, 1.0 if difficulty is easy,    0.0 otherwise. 
      #is_medium   ; // returns a float value, 1.0 if difficulty is medium,  0.0 otherwise. 
      #is_hard     ; // returns a float value, 1.0 if difficulty is hard,    0.0 otherwise. 

      // --- World Mode 

      #is_normal   ; // returns a float value, 1.0 if world mode is normal,  0.0 otherwise. 
      #is_veteran  ; // returns a float value, 1.0 if world mode is veteran, 0.0 otherwise. 
      #is_elite    ; // returns a float value, 1.0 if world mode is elite,   0.0 otherwise. 

      */ 
} 


[t:component,n:messages] 
{ 
   internal_component = true; 

   /* 
      the "messages" component is a set of localized messages that can be used 
      to draw screen messages for players. 

      format: 

      [messages] 
      { 
         [happy] 
         { 
            screen_text = "I am so happy!!"; 
         } 

         [sad] 
         { 
            screen_text = "I am so sad :("; 
         } 
      } 

      to retrieve the text, use: 

         owner.go.getmessage( "happy" ) 

      and to print it onscreen, use the report.screen series of functions. 
   */ 
} 

[t:component,n:mind] 
{ 
   //////////////////////////////////////////////////////////////////////////////// 
   //   if you need to change any of this, talk to me first -Bartosz 
    
   doc = "The mind will make the actor act."; 
    
   //////////////////////////////////////// 
   //   Aggro support ( at_* == aggro scalars, if the total aggro amount >= 100 then the monster will be angry at target, can use formulas ) 
    
   [angry_duration]           {  type = string;  default = 10.0;   doc = "The time this actor will be angry at a target due to non damge type aggro."; }    
   [angry_damage_duration]    {  type = string;  default = 2.0;    doc = "The time this actor will be angry at a target due to damage type aggro."; }    
   [at_global_scalar]         {  type = string;  default = 1.0;    doc = "The aggro global scalar is how much to scale ALL aggro before its added."; } 
   [at_damage_melee]          {  type = string;  default = 33.4;   doc = "aggro = 1 melee hit     * at_damage_melee;         Scales melee damage aggro amount";                           } 
   [at_damage_ranged]         {  type = string;  default = 25.0;   doc = "aggro = 1 ranged hit    * at_damage_ranged;        Scales ranged damage aggro amount";                           } 
   [at_damage_combat_magic]   {  type = string;  default = 25.0;   doc = "aggro = 1 cmagic hit    * at_damage_combat_magic;  Scales combat damage aggro amount";                           } 
   [at_damage_nature_magic]   {  type = string;  default = 25.0;   doc = "aggro = 1 nmagic hit    * at_damage_nature_magic;  Scales nature magic damage aggro amount";                        } 
   [at_enemy_use_magic]       {  type = string;  default = 0.0;    doc = "aggro = 1 magic cast    * at_enemy_use_magic;      Scales aggro amount when player uses magic";                     } 
   [at_enemy_cast_heal]       {  type = string;  default = 0.0;    doc = "aggro = 1 heal cast     * at_enemy_cast_heal;      Scales aggro amount when player casts heal aggro amount";            } 
   [at_enemy_looted_item]     {  type = string;  default = 0.0;    doc = "aggro = 1 item looted   * at_enemy_looted_item;    Scales aggro amount when player loots an item aggro amount";         } 
   [at_enemy_use_power]       {  type = string;  default = 0.0;    doc = "aggro = 1 power cast    * at_enemy_use_power;      Scales aggro amount when player uses power";                     } 
   [at_enemy_use_potion]      {  type = string;  default = 0.0;    doc = "aggro = 1 potion use    * at_enemy_use_potion;     Scales aggro amount when player uses potion";                     } 
   [at_enemy_killed_friend]   {  type = string;  default = 0.0;    doc = "aggro = 1 friend killed * at_enemy_killed_friend;  Scales aggro amount when player kills a monster ( revenge! )";      } 
   [at_enemy_damaged_leader]  {  type = string;  default = 0.0;    doc = "aggro = 1 leader hit    * at_enemy_damaged_leader; Scales aggro amount when player damages this monster's ai leader.";   } 
   [at_enemy_taunt]           {  type = string;  default = 100.0;  doc = "aggro = 1 enemy taunt   * at_enemy_taunt;          Scales aggro amount when player taunts a monster";               } 
    
   //////////////////////////////////////// 
   //   sensor params 

   [actor_life_ratio_low_threshold]     {  type = float;   default = 0;                       doc = "Sets ratio threshold for considering life 'low'";  } 
   [actor_life_ratio_high_threshold]    {  type = float;   default = 0;                       doc = "Sets ratio threshold for considering life 'high'"; } 
   [actor_mana_ratio_low_threshold]     {  type = float;   default = 0;                       doc = "Sets ratio threshold for considering life 'low'";  } 
   [actor_mana_ratio_high_threshold]    {  type = float;   default = 0;                       doc = "Sets ratio threshold for considering life 'high'"; } 
   [com_channels]                       {  type = string;                                     doc = "Comma-deliniated list of Membership members this Go will open a com-channel to, i.e. to call for help."; } 
   [com_range]                          {  type = float;   default = 0;                       doc = "Range up to which actor can talk to other actors i.e. call for help."; } 
   [flee_count]                         {  type = int;     default = 0;                       doc = "How many iterations of fleeing can this actor perform."; } 
   [melee_slot_usage]                   {  type = int;     default = 1;                       doc = "Number of slots this monster takes up when attacking."; } 
   [initial_command]                    {  type = scid;    default = 0;                       doc = "Points to static content skrit command to be given to actor after creation."; } 
   [sensor_scan_period]                 {  type = float;   default = 1.0;  flags = REQUIRED;  doc = "Period of actor min'd scan/process/react thinkg cycle.  In seconds."; } 
   [sight_range]                        {  type = float;   default = 0;    flags = REQUIRED;  doc = "Sight distance";  } 
   [sight_origin_height]                {  type = float;   default = 0;                       doc = "Actors's sight usually originates at the head bone.  This overrides that and LOS will originate from actor's terrain-snapped position plus this height."; } 
   [visibility_memory_duration]         {  type = float;   default = 0;                       doc = "How long will the actor remember the engaged target -after- it's no longer in his line-of-sight."; } 
   [flee_distance]                      {  type = float;   default = 0;                       doc = "How far will the actor flee, per flee instance."; } 
   [inner_comfort_zone_range]           {  type = float;   default = 0;                       doc = "Inner comfort zone"; } 
   [job_travel_distance_limit]          {  type = float;   default = 0;                       doc = "When any job moves an actor this distance, a WE_JOB_TRAVEL_DISTANCE_REACHED event will be sent."; } 
   [melee_engage_range]                 {  type = float;   default = 0;                       doc = "Max distance at which actor will engage enemy with melee weapon or unarmed";  } 
   [outer_comfort_zone_range]           {  type = float;   default = 0;                       doc = "Outer comfort zone"; } 
   [personal_space_range]               {  type = float;   default = 0.5;  flags = REQUIRED;  doc = "Defines a constant volume which is an abstract of the actor's body volume."; } 
   [ranged_engage_range]                {  type = float;   default = 0;                       doc = "Max distance at which actor will engage enemy with renged weapon";  } 
   [limited_movement_range]             {  type = float;   default = 0;                       doc = "When an movement orders are 'limited', actor will try to stay within this range of the last user-assigned command.  For human-controlled actors only."; } 
   [loot_range]                         {  type = float;   default = 0;                       doc = "The loot distance is mainly used by heros, this value is capped by visible range."; } 
   [jump_range]                         {  type = float;   default = 0;                       doc = "The farthest distance this actor can jump. 0 means this actor cannot jump and should be the default."; } 
   [jump_speed]                         {  type = float;   default = 0;                       doc = "The jump speed for this actor in meters per second. If zero the jump job will try to use avg move velocity for jump speed."; } 
   [teleport_range]                     {  type = float;   default = 0;                       doc = "The farthest distance this actor can teleport. 0 means this actor cannot teleport and should be the default."; } 
   [engaged_enemy_intensity_threshold]  {  type = int;     default = 3;                       doc = "When more than this number of enemies have engaged this actor, he will switch to intense battle sounds."; } 

   //////////////////////////////////////// 
   //   job definitions 

   [jat_brain]                   {  type = string;  default = jat_none;  doc = "Defines the brain, which is a supervisor job that is always running independently of action jobs.";    } 
   [jat_attack_object_melee]     {  type = string;  default = jat_none;  doc = "Attack an object with a melee weapon";    } 
   [jat_attack_object_ranged]    {  type = string;  default = jat_none;  doc = "Attack an object with a ranged weapon";    } 
   [jat_attack_position_melee]   {  type = string;  default = jat_none;  doc = "Attack a position with a melee weapon";   } 
   [jat_attack_position_ranged]  {  type = string;  default = jat_none;  doc = "Attack a position with a ranged weapon";   } 
   [jat_cast]                    {  type = string;  default = jat_none;  doc = "Cast a spell on an object";    } 
   [jat_cast_position]           {  type = string;  default = jat_none;  doc = "Cast a spell on a position";    } 
   [jat_cast_power]              {  type = string;  default = jat_none;  doc = "Cast a a power on an object"; } 
   [jat_cast_power_position]     {  type = string;  default = jat_none;  doc = "Cast a a power on an position"; } 
   [jat_charge_object]           {  type = string;  default = jat_none;  doc = "Charge attack an object! (like a bull)";    } 
   [jat_collect_loot]            {  type = string;  default = jat_none;  doc = "Collect all the loot around you.";    } 
   [jat_die]                     {  type = string;  default = jat_none;  doc = "Actors' last job.  They automatically do this when they die."; } 
   [jat_drink]                   {  type = string;  default = jat_none;  doc = "Drink.  Usually a potion."; } 
   [jat_do_se_command]           {  type = string;  default = jat_none;  doc = "The actor will run this job in order to execute a SE command.";    } 
   [jat_drop]                    {  type = string;  default = jat_none;  doc = "Drop an item";    } 
   [jat_equip]                   {  type = string;  default = jat_none;  doc = "Equip an item";    } 
   [jat_engage]                  {  type = string;  default = jat_none;  doc = "Move into a position where one can perform a melee attack";    } 
   [jat_face]                    {  type = string;  default = jat_none;  doc = "Face an object or a position."; } 
   [jat_fidget]                  {  type = string;  default = jat_none;  doc = "Fidget action";    } 
   [jat_flee_from_object]        {  type = string;  default = jat_none;  doc = "Flee from an object... run for your life."; } 
   [jat_follow]                  {  type = string;  default = jat_none;  doc = "Follow an actor";    } 
   [jat_gain_consciousness]      {  type = string;  default = jat_none;  doc = "Actor gains consciousness.  Gets up.  Considers himself lucky."; } 
   [jat_get]                     {  type = string;  default = jat_none;  doc = "Get/collect an item";    } 
   [jat_give]                    {  type = string;  default = jat_none;  doc = "Give an item";    } 
   [jat_guard]                   {  type = string;  default = jat_none;  doc = "Guard an actor";    } 
   [jat_hide]                    {  type = string;  default = jat_none;  doc = "Attempt to hide at a specified location.";    } 
   [jat_jump]                    {  type = string;  default = jat_none;  doc = "Jump from one valid siegePos to another.";    } 
   [jat_knockback]               {  type = string;  default = jat_none;  doc = "This job will have its owning actor slide away from the goal object as if the actor was knocked back by it.";    } 
   [jat_listen]                  {  type = string;  default = jat_none;  doc = "Walk over to someone, ask them to talk, listen until they finish"; } 
   [jat_move]                    {  type = string;  default = jat_none;  doc = "Move to a position";    } 
   [jat_patrol]                  {  type = string;  default = jat_none;  doc = "Patrol to a posision";    } 
   [jat_pause]                   {  type = string;  default = jat_none;  doc = "Pause for a specifed ammount of time.";    } 
   [jat_play_anim]               {  type = string;  default = jat_none;  doc = "Play a specific chore/anim."; } 
   [jat_set_combat_orders]       {  type = string;  default = jat_none;  doc = "Set the standing combat orders."; } 
   [jat_set_movement_orders]     {  type = string;  default = jat_none;  doc = "Set the standing movement orders."; } 
   [jat_slide]                   {  type = string;  default = jat_none;  doc = "This job will have its owning actor slide away from the goal object as if the actor was knocked back by it.";    } 
   [jat_startup]                 {  type = string;  default = jat_none;  doc = "Some actors may want to have a startup job that runs once before any other actions can take place.";   } 
   [jat_stop]                    {  type = string;  default = jat_none;  doc = "Stop doing anything";    } 
   [jat_talk]                    {  type = string;  default = jat_none;  doc = "Just stand there and talk AT someone."; } 
   [jat_teleport]                {  type = string;  default = jat_none;  doc = "Teleport to a specific location."; } 
   [jat_unconscious]             {  type = string;  default = jat_none;  doc = "Loose consciousness, and stay in this job until it's time to gain consciousness."; } 
   [jat_use]                     {  type = string;  default = jat_none;  doc = "Use an item";    } 

   //////////////////////////////////////// 
   //   Plays 

   [jat_play_battle_yell]             {  type = string;  default = jat_none;  doc = "Play Where idle memebers play a battle yelling animation and sound";    } 
   [jat_play_cautious_attack]         {  type = string;  default = jat_none;  doc = "Play with member attacking cautiously";    } 
   [jat_play_cautious_ranged_attack]  {  type = string;  default = jat_none;  doc = "Play with member attacking cautiously";    } 
   [jat_play_ranged_flee]             {  type = string;  default = jat_none;  doc = "Play where ranged members try to keep their distance";    } 
   [jat_play_charge]                  {  type = string;  default = jat_none;  doc = "Play where the members will charge the character when they get too close";    } 
   [jat_play_leader_guard]            {  type = string;  default = jat_none;  doc = "Play where the members will guard a leader";    } 
   [jat_play_mob_attack]              {  type = string;  default = jat_none;  doc = "Members attack as a mob";    } 
   [jat_play_hide_flank]              {  type = string;  default = jat_none;  doc = "Members hide around the enemy then flank attack when all members are in place."; } 
   [jat_play_thief]                   {  type = string;  default = jat_none;  doc = "Thief AI, this play only works with 1 member."; } 

   //////////////////////////////////////// 
   //   Party Jobs 

   [jat_party_follow]         {  type = string;    default = jat_none;   doc = "Have the party members follow the leader.";    } 

   //////////////////////////////////////// 
   //   job params 

   [disposition_orders]  {  type = eActorDisposition;  default = ad_defensive;  doc = "Influence actor general mood";  } 
   [combat_orders]       {  type = eCombatOrders;      default = co_free;       doc = "Influence actor auto combat actions";  } 
   [movement_orders]     {  type = eMovementOrders;    default = mo_free;       doc = "Influence actor auto movement actions";  } 
   [focus_orders]        {  type = eFocusOrders;       default = fo_closest;    doc = "Influence actor auto targeting actions";  } 

   //////////////////////////////////////// 
   //   Coach override 

   [coach_override]  {  type = string;  doc = "Can optionally override coach, rather than rely on the monster tuning grid."; } 

   //////////////////////////////////////// 
   //   job permissions 

   [attributes]  {  type = string;  doc = "Attributes of this actor, used in job coach choice placement thingies (ask Eric)"; } 

   [actor_auto_fidgets]  {  type = bool;  default = false;  doc = "Actor will automatically run his fidget job if not doing anything."; } 

   [actor_may_process_ai]             {  type = bool;  default = true;  doc = "If false a charater will behave as if monsterAI was off."; } 
   [actor_may_process_sensors]        {  type = bool;  default = true;  doc = "If false a charater will not process sensors ( it will not see anything when calling visible queries."; } 
   [actor_may_attack]                 {  type = bool;  default = true;  doc = "Basic dynamic permission for performing any offensive acts."; } 
   [actor_may_attack_heroes]          {  type = bool;  default = true;  doc = "Basic dynamic permission for performing any offensive acts on heroes."; } 
   [actor_may_be_attacked]            {  type = bool;  default = true;  doc = "Basic dynamic permission being the object of any offensive acts."; } 
   [actor_may_be_attacked_by_heroes]  {  type = bool;  default = true;  doc = "Basic dynamic permission being the object of any offensive acts from heroes."; } 

   [actor_auto_defends_others]       {  type = bool;  default = false;  doc = "Actor has permission to auto-defend others."; } 
   [actor_auto_heals_others_life]    {  type = bool;  default = false;  doc = "Actor has permission to auto-heal others"; } 
//  [actor_auto_heals_others_mana]   {  type = bool;  default = false;  doc = "Actor has permission to auto-heal others"; } 
   [actor_auto_heals_self_life]      {  type = bool;  default = false;  doc = "Actor has permission to heal self"; } 
   [actor_auto_heals_self_mana]      {  type = bool;  default = false;  doc = "Actor has permission to heal self"; } 
//  [actor_auto_picks_up_items]      {  type = bool;  default = false;  doc = "Self exp."; } 

   [actor_weapon_preference]  {  type = eWeaponPreference;  default = wp_invalid;  doc = "When possible, the actor will prefer to use this type of weapon."; } 

   [actor_auto_switches_to_karate]  {  type = bool;  default = false;  doc = "Self exp."; } 
   [actor_auto_switches_to_melee]   {  type = bool;  default = false;  doc = "Self exp."; } 
   [actor_auto_switches_to_ranged]  {  type = bool;  default = false;  doc = "Self exp."; } 
   [actor_auto_switches_to_magic]   {  type = bool;  default = false;  doc = "Self exp."; } 

//  [actor_auto_uses_stored_items]  {  type = bool;  default = false;  doc = "Self exp."; } 

   [actor_auto_xfers_mana]                        {  type = bool;  default = false;  doc = "Actor has permission to auto xfer mana to others"; } 
//  [actor_auto_reanimates_friends]               {  type = bool;  default = false;  doc = "Actor has permission to reanimate dead friends if he has the appropriate spell."; } 
   [on_enemy_entered_icz_attack]                  {  type = bool;  default = false;  doc = "Actor will attack enemies in his inner comfort zone"; } 
   [on_enemy_entered_icz_flee]                    {  type = bool;  default = false;  doc = "Actor will flee from enemies in his inner comfort zone"; } 
   [on_enemy_entered_icz_switch_to_melee]         {  type = bool;  default = false;  doc = "Actor will switch to melee weapon if not already using one when an enemy enters his ICZ"; } 
   [on_enemy_entered_ocz_attack]                  {  type = bool;  default = false;  doc = "Actor will attack enemies in his outer comfort zone"; } 
   [on_enemy_entered_ocz_flee]                    {  type = bool;  default = false;  doc = "Actor will flee from enemies in his outer comfort zone"; } 
   [on_enemy_entered_weapon_engage_range_attack]  {  type = bool;  default = true;   doc = "Actor will attack enemies once they are in weapon engage range."; } 
   [on_enemy_spotted_alert_friends]               {  type = bool;  default = false;  doc = "Actor will alert friends when he sees an enemy";  } 
//  [on_enemy_spotted_attack]                     {  type = bool;  default = true;   doc = "Actor can attack enemy if sightet - depending on standing orders"; } 
   [on_engaged_fled_abort_attack]                 {  type = bool;  default = false;  doc = "Actor will continue to attack a fleeing victim."; } 
   [on_engaged_lost_consciousness_abort_attack]   {  type = bool;  default = false;  doc = "Actor will stop his attack when the engaged looses consciousness."; } 
//  [on_engaged_lost_loiter]                      {  type = bool;  default = false;  doc = "Self exp."; } 
//  [on_engaged_lost_return_to_job_origin]        {  type = bool;  default = false;  doc = "Self exp."; } 
//  [on_friend_entered_icz_attack]                {  type = bool;  default = false;  doc = "Actor will attack friends in his inner comfort zone"; } 
//  [on_friend_entered_icz_flee]                  {  type = bool;  default = false;  doc = "Actor will flee from friends in his inner comfort zone"; } 
//  [on_friend_entered_ocz_attack]                {  type = bool;  default = false;  doc = "Actor will attack friends in his outer comfort zone"; } 
   [on_friend_entered_ocz_flee]                   {  type = bool;  default = false;  doc = "Actor will flee from friends in his outer comfort zone"; } 
   [on_job_reached_travel_distance_abort_attack]  {  type = bool;  default = false;  doc = "Self exp."; } 
//  [on_life_ratio_low_flee]                      {  type = bool;  default = false;  doc = "Actor will run away when life ratio is low";  } 
//  [on_mana_ratio_low_flee]                      {  type = bool;  default = false;  doc = "Self exp."; } 
   [on_alert_projectile_near_missed_flee]         {  type = bool;  default = false;  doc = "When someone shoots at actor and misses, the actor will flee"; } 
   [on_alert_projectile_near_missed_attack]       {  type = bool;  default = false;  doc = "When someone shoots at actor and misses, the actor will attack the shooter"; } 
} 


[t:component,n:party] 
{ 
   doc = "A party groups a set of Go's together and applies intelligence on a higher level"; 

   required_component* = mind; 
   required_component* = placement; 

   [max_melee_slots_per_char]  {  type = int;  default = 8;  doc = "Maximum melee slots that can be used on a particular character.";  } 
    
    
   [hot_radius]                {  type = float;  default = 8.0;         doc = "Radius around focus character to pull in hot group";  } 
   [regroup_formation_radius]  {  type = float;  default = 4.0;         doc = "On Regroup, if the focus party member is outside this radius to the formation then the formation will update to focus go position.";  } 
   [light_iradius]             {  type = float;  default = 4.0;         doc = "Inner radius of party light";  } 
   [light_oradius]             {  type = float;  default = 7.0;         doc = "Outer radius of party light";  } 
   [light_vertoffset]          {  type = float;  default = 1.0;         doc = "Amount, in meters, to vertically offset the party light";  } 
   [light_color]               {  type = int;    default = 0xFFFFFFFF;  doc = "Color of the party light";  } 

   // $$ doc this!! 
   internal* = add_members; 
} 


[t:component,n:pet] 
{ 
   doc = "A pet component is for pet creatures that may be part of your party."; 

   required_component* = actor; 

   [pet_specification]  {  type = string;   doc = "Name of the pet specification to use when determining equipment/spells/active skills/bonuses"; } 
} 

[t:component,n:pcontent] 
{ 
   internal_component = true; 

   /* 
      the "pcontent" component is a set of rules to modify content further 
      once it has been generated. 

      pcontent is a set of blocks, each of which defines a potential candidate 
      for further customizing the generated content. note that the optional 
      items below will take their defaults from the object's existing 
      component fields. also note that the block names are arbitrary, but the 
      name may match a rule, which is used to further tune either the block 
      choice or modifications applied. 

      format: 

      [pcontent] 
      { 
         [base]                     // $ special "base" rule that adds modifier_min/max and/or force_item_power to the base type 
         { 
            modifier_min = 1;       // (optional) 
            modifier_max = 4;       // (optional) 
            force_item_power = 10;  // (optional) 
         } 

         [c_fine] 
         { 
            modifier_min     = 1;                      // minimum modifier power to choose this item 
            modifier_max     = 2;                      // maximum modifier power to choose this item 
            force_item_power = 15;                     // force this power level to be assigned to this item (optional) 
            inventory_icon   = b_gui_ig_i_w_swd_fine;  // icon to use for this item (optional) 
            inventory_width  = 1;                      // width of icon (optional) 
            inventory_height = 3;                      // height of icon (optional) 
            model            = m_w_swd_fine;           // model override to use for this item (optional) 
            texture          = b_w_swd_fine;           // texture override to use for this item (optional) 

            // for weapons only 
            damage_min = 10;  // (weapons only) modifies the damage_min if choose this variation 
            damage_max = 20;  // (weapons only) modifies the damage_max if choose this variation 

            // for armor only 
            defense = 5;  // (armor only) modifies defense if choose this variationn 
         } 

         [o_fun] 
         { 
            modifier_min   = 2; 
            modifier_max   = 10; 
            inventory_icon = b_gui_ig_i_w_swd_ornate; 
         } 
      } 
   */ 
} 

// continued in next post

Sharkull's picture

components.gas, part 3 of 3:

[t:component,n:physics] 
{ 
   doc = "Variables to tune the physics engine for an object"; 
   required_component* = aspect; 

   // AI 

   [impact_alert_distance]  {  type = float;  default = 4.0;  doc = "If the intended target's distance from impact is within this range send a world message to it from the shooter"; } 

   // physics 

   [sim_duration]          {  type = float;  default = 45;     doc = "The max amount of time that will elapse before removing this object from simulation"; } 
   [damage_all]            {  type = bool;   default = false;  doc = "Explosion from this object will damage all if true and stop damage filtration from initiator";  } 
   [break_dependents]      {  type = bool;   default = false;  doc = "Causes any object that is within the bounding volume of this object to break when it starts to simulate or break";  } 
   [explosion_magnitude]   {  type = float;  default = 0.0;    doc = "Magnitude used to determine initial velocity of exploding particles";  } 
   [angular_magnitude]     {  type = float;  default = 3.0;    doc = "Magnitude used to determine random angular velocity of exploding particles";  } 
   [deflection_angle]      {  type = float;  default = 1.0;    doc = "Radian angle - 0 sticks (perpendicular), 1 glances (parallel)";  } 
   [elasticity]            {  type = float;  default = 0.45;   doc = "Coefficient of restitution";  } 
   [friction]              {  type = float;  default = 0.45;   doc = "Coefficient of friction";  } 
   [mass]                  {  type = float;  default = 0.0;    doc = "Mass in kg";  } 
   [explode_when_killed]   {  type = bool;   default = false;  doc = "Explodes when killed"; } 
   [explode_when_expired]  {  type = bool;   default = false;  doc = "Explodes when timeout is reached"; } 
   [is_breakable]          {  type = bool;   default = false;  doc = "Is this object breakable? if so you can attack this object until it breaks, which will send a we_explode event"; } 
   [bone_box_collision]    {  type = bool;   default = false;  doc = "True to check collision against smaller bone bounding boxes for more accurate collision results"; } 

   // ammo 

   [velocity]                {  type = float;   default = 0.0;            doc = "Initial velocity of ammo when fired"; } 
   [angular_velocity]        {  type = vector;  default = 0.0, 0.0, 0.0;  doc = "Angular velocity"; } 
   [randomize_velocity]      {  type = bool;    default = false;          doc = "Randomizes initial angular velocity in a +/- range when being fired as a projectile";  } 
   [gravity]                 {  type = float;   default = 6.864655;       doc = "Gravity constant to be used with this object"; } 
   [explode_if_hit_go]       {  type = bool;    default = false;          doc = "Explodes if collision with game object occurs"; } 
   [explode_if_hit_terrain]  {  type = bool;    default = false;          doc = "Explodes if collision with ground occurs"; } 
   [orient_to_trajectory]    {  type = bool;    default = false;          doc = "Make this object point in the direction that it travels"; } 
   [pass_through]            {  type = bool;    default = false;          doc = "Collision with other gos occur but won't stick or glance, passes through"; } 

   // dropping 

   [toss_velocity]  {  type = float;   default = 3.0;            doc = "How hard to toss the item into the air upwards"; } 
   [toss_spin]      {  type = vector;  default = 1.0, 0.0, 1.0;  doc = "Random range to use to spin item"; } 

   // gib 

   [gib_min_damage]  {  type = float;  default = 10000000000.0;  doc = "Minimum amount of damage that must be done before doing gib_threshold calculation"; } 
   [gib_threshold]   {  type = float;  default = 10000000000.0;  doc = "If damage done is > (max_life*gib_threshold) then gibbing will occur"; } 

   internal* = break_particulate; 
   /* 
      The "break_particulate" block is a list of templates and instance 
      counts of those templates that will be spawned when the object is 
      'sploded. 

      format: 

      [break_particulate] 
      { 
         // wood 
         frag_wood_1 = 2;  // spawn 2 frag_wood_1 templates 
         frag_wood_2 = 2;  // ... 

         // metal 
         frag_steel_0   = 2; 
         frag_steel_big = 2; 

         // other 
         frag_donkey_doo = 4; 
      } 
   */ 
} 


[t:component,n:placement] 
{ 
   doc = "Placement (position and orientation) of the object in the world"; 
   required_component* = common; 

   [position]            {  type = SiegePos;  flags = REQUIRED;      doc = "Current world position: +X = east, +Y = up, +Z = north, Node = Siege database GUID";  } 
   [orientation]         {  type = Quat;      default = 0, 0, 0, 1;  doc = "Current orientation: X, Y, Z, W";  } 
   [use_point_scids]     {  type = String;                           doc = "Comma delimited list of use point scids"; } 
   [drop_point_scids]    {  type = String;                           doc = "Comma delimited list of drop point scids"; } 
   [gather_point_scids]  {  type = String;                           doc = "Comma delimited list of gather point scids"; } 
   [attack_point_scids]  {  type = String;                           doc = "Comma delimited list of attack point scids"; } 
   [is_gui_go]           {  type = bool;      default = false;       doc = "Flag so that .cpp code ignores the node that this go is in for effects on UI gos"; } 
} 


[t:component,n:potion] 
{ 
   doc = "Represents a potion that may change its visual appearance based on 'fullness'"; 

   required_component* = aspect; 
   required_component* = magic; 

   [inventory_icon_2]  {  type = string;  doc = "Secondary bitmap used as an overlay when filling potions";  } 
   [restore_duration]  {  type = float;   doc = "Amount of time it takes to restore the max number of points in the potion."; } 
   [is_health_potion]  {  type = bool;    doc = "Is this potion considered a health potion?"; } 
   [is_mana_potion]    {  type = bool;    doc = "Is this potion considered a mana potion?"; } 

   internal* = ranges; 
   /* 
      the "ranges" block is a *required* set of ranges to use when defining 
      the appearance of a potion's fullness based on its quantity. each number 
      is a ratio (0.0-1.0) of fullness and defines the maximum fullness 
      required to use that aspect/texture. 

      note that the format is max = texture; where texture is the texture 
      to use for slot 0 (it is required). 

      format: 

      [ranges] 
      { 
         0.25 = b_i_glb_empty;  // empty texture 
         0.50 = b_i_glb_low;    // 33% full texture 
         0.75 = b_i_glb_mid;    // 66% full texture 
         1.00 = b_i_glb_full;   // 100% full texture 
      } 
   */ 
} 


[t:component,n:proxy] 
{ 
   doc = "Render proxy that provides a hook to another node when rendering, allowing an object to 'exist' in multiple nodes"; 

   required_component* = placement; 

   [object_proxy_scid] 
   { 
      type     = scid; 
      default  = 0; 
      flags    = REQUIRED; 
      doc      = "Scid of the object that this proxy represents"; 
   } 
} 


[t:component,n:store] 
{ 
   doc = "Store that buys and sells goods"; 

   [can_sell_self]            {  type = bool;    default = false;  doc = "If you choose to sell yourself, people can hire you as well as any party members.  You cannot be a regular store if this is true, however.";  } 
   [can_sell_members]         {  type = bool;    default = false;  doc = "Lets the store know that this store can hire out party members."; } 
   [activate_range]           {  type = float;   default = 20.0;   doc = "If the character other than the one who initiated the store is selected, how close must they be to the store in order for it to remain active?"; } 
   [item_markup]              {  type = float;   default = 0.0;    doc = "Amount the store marks up its price on items"; } 
   [local_spec]               {  type = string;                    doc = "Name of the item generation specification that is located in the info directory of the map the object exists in."; } 
   [level_range_min]          {  type = int;     default = 0.0;    doc = "Minimum pcontent level range that this store can generate (only works when level based pcontent requests are made)."; } 
   [level_range_max]          {  type = int;     default = 0.0;    doc = "Maximum pcontent level range that this store can generate (only works when level based pcontent requests are made)."; } 
   [is_party_reserve_store]   {  type = bool;    default = false;  doc = "Set this if you wish this store to behave like a party reserve store."; } 
   [is_pet_store]             {  type = bool;    default = false;  doc = "Set this if you wish this store to behave like a pet store."; } 
   [is_item_enchanter_store]  {  type = bool;    default = false;  doc = "Set this if you wish this store to be able to enchant your items."; } 
   [is_skill_trainer_store]   {  type = bool;    default = false;  doc = "Set this if you wish this store to be a store that you can purchase skills from"; } 
   [skill_trainer_type]       {  type = string;                    doc = "What skill trainer type is this?  (melee, ranged, combat, nature)"; } 
   [store_portrait]           {  type = string;                    doc = "Texture name for the portrait to use in the store interface."; } 

   internal* = item_restock; 
   /* 
      the "item_regen" block contains template names of items that should 
      auto-regen in the store and the amount of them that should regenerate 

      note that the format is regen_template_name = number_to_regen; where 
      number_to_regen is how many to regenerate and and regen_template_name 
      is the name of the template 

      format: 

      [item_restock] 
      { 
         potion_health  = 5; 
         potion_mana    = 10; 
      } 
   */ 

   internal* = pet_stock; 
   /* 
      The "pet_stock" block outlines which pets you can buy at this store ( if "is_pet_store = true" ). 
      The store will always list the pets that are labeled as unlocked.  If a pet is locked, a trigger 
      somewhere in the world must have set it so you can access the locked pet.  Locked pets that you 
      haven't unlocked will not even appear in the store. 
      If a pet is not listed in this definition and it has been "unlocked", then it will still not be 
      available for purchase.  It must be listed here if you ever wish to purchase it from this store. 

      [pet_stock] 
      { 
         naldrun_pet = locked; 
         default_pet = unlocked; 
      } 
   */ 

   required_component* = placement; 
} 


[t:component,n:stash] 
{ 
   doc = "Stash that holds a player's belongings"; 

   [activate_range]  {  type = float;  default = 20.0;  doc = "If the character other than the one who initiated the stash is selected, how close must they be to the stash in order for it to remain active?"; } 

   required_component* = inventory; 
} 

[t:component,n:zone] 
{ 
   doc = "A go zone"; 

   required_component* = mind; 
   required_component* = placement; 

} 

[t:component,n:rail] 
{ 
   doc = "Rails provide a sequence of Siege Positions. They are used for complex character movement"; 

   [data]  { type = string;   doc = "The rail data, converted to multi line string format"; } 

   required_component* = placement; 
} 


////////////////////////////////////////////////////////////////////////////// 
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

Sorry about the wide page... but it reads easier without the word wrap.

firebat's picture

Why is this needed here?

Everyone can look in the original components.gas.

Sharkull's picture

I'm thinking of three reasons:
1. Not everyone knows about components.gas (especially newbie's).
2. Helps StheD.org be found by modders using search engines... Laughing out loud
3. The original has poor spacing / alignment, making things difficult to read (unless you are looking up something specific, in which case this doesn't really matter).

Hmm, I think it would be nice as an article. It is a wealth of information. Harder to read in forums. Hard to read in skritpad too. Html also shows up better in google Wink . I'm not sure how much of this is translated into html.

Sharkull's picture

/me shrugs... perhaps as part of the knowledge base, once that is set up.

BTW, I checked Google yesterday and there was no match on something that should have linked to this thread. :?

What program did you use to get it in that type of format, Atm I am using Wordpad, and mine dont come out as good as yours,
thats almost like Ds1 type of format.

Sharkull's picture

I used Notepad (with word wrap turned off), and manually edited the spacing before posting it...

Oh okay :P

Is it possible to add my own component to this list and have ds2 "now" about it? Like, say I wanted to add a counter type variable to the [aspect] block, whould I need to write my own functions to access that variable, or does ds2 have some build in general function to access stuff like that?

eg:

[mycomponent] { type int, default = 0; } (or whatever the format is)

and then in skrit

go.aspect.setgenericcomponent("mycomponent", value);
go.aspect.getgenericcomponent("mycomponent");

Does that make sense?

you can't add variables to existing go components like goaspect (without a dsdll that is :p) but you can create your own (skrit) components and add variables to them, and then access those variables.

to create your own (skrit) component just:
1. create a skrit file called something like mycomponent.skrit
2. have the proper headers a normal skrit file does (owner=GoSkritComponent; or whatever, i forget, just read any skrit file)
3. create your properties via "property vartype varname = defaultvalue" (for example; property bool has_j00ky$ = false;)

to access your variables just use the getcomponentvariable functions, check the exact syntax in the fubi.log or some such, but its gonna be something like bool has_jooky$ = someGo$.GetComponentBool ( "mycomponent", "has_j00ky" ); or something

thats the jist, just check fubi.log and other skrit files for the exact details on syntax Smile