EDF item effects and inventory/Weapons-branch: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(Make subpage to contain in-dev stuff, so that it's ready to be made the official documentation as soon as necessary.)
 
(Update all item effects to reflect current item effects and inventory properties. Remove warning.)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''REMOVE THIS WARNING AT A LATER DATE: Much of this page is in-development features, from inventory-branch-2016, and its successor weapons-branch. This exists solely for the purpose of easily moving this article back over when weapons-branch is to be merged back into master, and should under no circumstances be used as a reference.'''
Define what happens when an item is picked up and used (and eventually, dropped from the inventory - this is not complete yet).


Define what happens when an item is picked up (and eventually, used or dropped from the inventory - this is not complete yet).
There are many different types of item effect definitions:


There are many different types of item effect definitions:
{{Backto|EDF item effects and inventory}}
===artifact===
===artifact===
An artifact is an item which, when collected, goes into the player's inventory.
An artifact is an item which, when collected, goes into the player's inventory.
Line 14: Line 14:
                       // -1 if this field should not apply at all
                       // -1 if this field should not apply at all
   sortorder      <int> // key used for sorting the player's inventory
   sortorder      <int> // key used for sorting the player's inventory
   icon          <str> // name of icon graphic for invbar (currently unused)
   icon          <str> // name of icon graphic for invbar
   usesound      <str> // sound made when item is used (currently unused)
   usesound      <str> // sound made when item is used
   useeffect      <str> // name of item effect to use for activation (unused)
   useeffect      <str> // name of item effect to use for activation
  useaction      <action function> // codepointer and arguments called e.g. A_GauntletAttack(1)
    
    
   [+-]undroppable      // if +, cannot be dropped from inventory
   [+-]undroppable      // if +, cannot be dropped from inventory
Line 22: Line 23:
   [+-]keepdepleted    // if +, will remain in inventory with amount of zero
   [+-]keepdepleted    // if +, will remain in inventory with amount of zero
   [+-]fullamountonly  // if +, cannot pickup unless full amount is needed
   [+-]fullamountonly  // if +, cannot pickup unless full amount is needed
  [+-]noshareware      // if +, non-shareware
    
    
   // artifacttype determines what sort of artifact this is.   
   // artifacttype determines what sort of artifact this is.   
Line 57: Line 59:
                       // armor, the item cannot be picked up at all
                       // armor, the item cannot be picked up at all
                        
                        
   [+-]alwayspickup    // item is picked up even when unneeded (ie Armor Bonus)
   [+-]alwayspickup    // item is picked up even when unneeded (e.g. Armor Bonus)
   [+-]bonus          // if +, is a bonus (adds to current armor type without
   [+-]additive        // if +, adds to the current amount of armor
                      // changing the protective qualities)
  [+-]setabsorption  // if +, sets absorption values (savefactor & savedivisor)
  }
  }
===ammoeffect===
===ammoeffect===
Line 86: Line 88:
  weapongiver <name>
  weapongiver <name>
  {
  {
   weapon    <str> // Name of a weaponinfo to give to the player
   weapon    <str> // Name of a weaponinfo to give to the player
  // Note that you can specify as many ammogiven properties as you want in a single weapongiver
   ammogiven  <ammo>, <amount> [, <dropammount> [, <dmammount> [, <coopweaponsstay>]]] // Ammo type artifact given, and the amounts
   ammogiven  <ammo>, <amount> [, <dropammount> [, <dmammount> [, <coopweaponsstay>]]] // Ammo type artifact given, and the amounts
                                                                                       // given based on how it was picked up. If the
                                                                                       // given based on how it was picked up. If the
                                                                                       // last three are left blank, only "amount" is used.
                                                                                       // last three are left blank, only "amount" is used.
  }
  }

Latest revision as of 10:59, 10 April 2018

Define what happens when an item is picked up and used (and eventually, dropped from the inventory - this is not complete yet).

There are many different types of item effect definitions:

Back to EDF item effects and inventory

artifact[edit]

An artifact is an item which, when collected, goes into the player's inventory.

artifact <name>
{
 amount         <int> // amount gained with one pickup
 maxamount      <int> // max amount that can be carried in inventory
 interhubamount <int> // max amount carryable between levels in different hubs;
                      // -1 if this field should not apply at all
 sortorder      <int> // key used for sorting the player's inventory
 icon           <str> // name of icon graphic for invbar
 usesound       <str> // sound made when item is used
 useeffect      <str> // name of item effect to use for activation
 useaction      <action function> // codepointer and arguments called e.g. A_GauntletAttack(1)
 
 [+-]undroppable      // if +, cannot be dropped from inventory
 [+-]invbar           // if +, appears in invbar; otherwise, invisible
 [+-]keepdepleted     // if +, will remain in inventory with amount of zero
 [+-]fullamountonly   // if +, cannot pickup unless full amount is needed
 [+-]noshareware      // if +, non-shareware
 
 // artifacttype determines what sort of artifact this is.  
 artifacttype   <str> // "Normal", "Ammo", "Key", "Puzzle", "Power", "Weapon",
                      // or "Quest"
                      
 // The following fields apply only to certain artifact types. They have no
 // effect if specified on other types.
 
 // Ammo
 ammo.backpackamount    <int> // amount of this ammo type given by a Backpack
 ammo.backpackmaxamount <int> // max amount after collecting a Backpack
}

healtheffect[edit]

A health effect gives the player health in one of many possible ways.

healtheffect <name>
{
 amount     <int> // amount of health to give
 maxamount  <int> // max amount this item can health to; if player has greater
                  // health, the item cannot be picked up at all.
 lowmessage <str> // alternate message to give instead of pickupfx message when
                  // health is < amount; if starts with $, is a BEX mnemonic.
 
 [+-]alwayspickup  // if +, item is picked up even when unneeded (ie Health Bonus)
 [+-]sethealth     // if +, item SETS health rather than adding to it (ie Megasphere)
}

armoreffect[edit]

An armor effect defines the properties of player armor

armoreffect <name>
{
 saveamount    <int> // amount of armor given
 savefactor    <int> // numerator of fraction determining save percentage
 savedivisor   <int> // denominator of fraction determining save percentage
 maxsaveamount <int> // max amount his item can give; if player has greater
                     // armor, the item cannot be picked up at all
                     
 [+-]alwayspickup    // item is picked up even when unneeded (e.g. Armor Bonus)
 [+-]additive        // if +, adds to the current amount of armor
 [+-]setabsorption   // if +, sets absorption values (savefactor & savedivisor)
}

ammoeffect[edit]

Ammo givers give an Ammo type artifact to the player.

ammoeffect <name>
{
 ammo       <str> // Name of an Ammo-type artifact definition
 amount     <int> // Amount to give for an ordinary pickup
 dropamount <int> // Amount to give if dropped by an enemy
 
 [+-]ignoreskill  // if +, does not double on skills that give double ammo  
}

powereffect[edit]

Power givers give a power to the player.

powereffect <name>
{
 duration   <int>  // Length of time to last in tics
 type       <str>  // Name of power to give
 
 [+-]additivetime  // if +, adds to current duration
 [+-]permanent     // if +, lasts forever  
 [+-]overridesself // if +, getting the power again while still under its influence is allowed
}

weapongiver[edit]

Weapon givers give a Weapon type artifact to the player, and optionally any number of Ammo artifact types.

weapongiver <name>
{
 weapon     <str> // Name of a weaponinfo to give to the player
 // Note that you can specify as many ammogiven properties as you want in a single weapongiver
 ammogiven  <ammo>, <amount> [, <dropammount> [, <dmammount> [, <coopweaponsstay>]]] // Ammo type artifact given, and the amounts
                                                                                     // given based on how it was picked up. If the
                                                                                     // last three are left blank, only "amount" is used.
}