Editing EDF item effects and inventory

From Eternity Wiki
Jump to navigationJump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
Define what happens when an item is picked up and used (and eventually, dropped from the inventory - this is not complete yet). A tutorial on defining each of these can be found at [[Creating a pickup]].
Define what happens when an item is picked up and used (and eventually, dropped from the inventory - this is not complete yet). A tutorial on defining each of these can be found at [[Creating a pickup]].


==Thing type based pick-up==
==Sprite-triggered pick-ups==
The recommended way to define pick-up effects is by adding the '''pickupeffect''' section in the [[thingtype]] definition of a class.
 
The fields are as such:
 
thingtype <name>
{
  ...
  pickupeffect
  {
  effects      <name>, ...
  flags        <flags>
  changeweapon <name>
  message      <text>
  sound        <name>
  }
  ...
}
For explanation of the fields, see the sprite-based block definition's corresponding fields.
 
==Sprite based pick-ups==
===pickupeffect===
===pickupeffect===
Defines what happens when player picks up an item with the '''SPECIAL''' [[Thing type flags|flag]]. Commonly in DOOM and Heretic, pick-up effects are associated with the visual sprites of the things, instead of being mapped directly to the thing class.
Defines what happens when player picks up an item with the '''SPECIAL''' [[Thing type flags|flag]]. Commonly in DOOM and Heretic, pick-up effects are associated with the visual sprites of the things, instead of being mapped directly to the thing class.
Line 29: Line 9:
  {
  {
   sprite      <name>
   sprite      <name>
   effects      <name>, ...
   effects      <effect1>, ...
   flags        <flags>
   flags        <flags>
   changeweapon <name>
   changeweapon <name>
Line 37: Line 17:
====Explanation of fields====
====Explanation of fields====
*'''sprite'''
*'''sprite'''
:Default: no sprite.
:Default: do not use sprite.
:If set as a four-character sprite name, this will associate any [[thingtype]] with the '''SPECIAL''' [[Thing type flags|flag]] whose current sprite shows as this value to trigger this '''pickupeffect'''.
:If set as a four-character sprite name, this will associate any [[thingtype]] with the '''SPECIAL''' [[Thing type flags|flag]] whose current sprite shows as this value to trigger this '''pickupeffect'''.
:Example: <code>sprite BON1</code>
:Example: <code>sprite BON1</code>
Line 55: Line 35:
*'''changeweapon'''
*'''changeweapon'''
:Default: nothing.
:Default: nothing.
:If set, causes the item to change player's current weapon to the designated one whenever picked up. Expects a [[weaponinfo]] definition. This is based on how the [[Doom Wiki:Berserk|Berserk pack]] acts in DOOM.
:If set, causes the item to change player's current weapon to the designated one whenever picked up. This is based on how the [[Doom Wiki:Berserk|Berserk pack]] acts in DOOM.
:Example: <code>changeweapon Fist</code>
:Example: <code>changeweapon Fist</code>
*'''message'''
*'''message'''
Line 143: Line 123:
  }
  }
====powereffect====
====powereffect====
Power givers buff the player with a temporary or level-permanent effect. They're typical of artifacts such as the radiation suit or the blur sphere.
Power givers give a power to the player.
  powereffect <name>
  powereffect <name>
  {
  {
Line 153: Line 133:
   [+-]overridesself // if +, getting the power again while still under its influence is allowed
   [+-]overridesself // if +, getting the power again while still under its influence is allowed
  }
  }
'''Type''' can be any of the following:
*'''PowerAllmap''': Doom computer area map, Heretic map scroll
*'''PowerFlight''': Heretic wings of wrath
*'''PowerGhost''': Heretic shadow sphere
*'''PowerInvulnerable''': Doom invulnerability artifact, Heretic ring of invulnerability
*'''PowerIronFeet''': Doom radiation shielding suit
*'''PowerLightAmp''': Doom light amplification visor
*'''PowerPartialInvisibility''': Doom blur artifact
*'''PowerSilent''': Eternity silencer
*'''PowerStrength''': Doom berserk pack
*'''PowerTorch''': Heretic torch
*'''PowerTotalInvisibility''': Eternity total invisibility
*'''PowerWeaponLevel2''': Heretic tome of power
====weapongiver====
====weapongiver====
Weapon givers give a Weapon type artifact to the player, and optionally any number of Ammo artifact types.
Weapon givers give a Weapon type artifact to the player, and optionally any number of Ammo artifact types.
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see Eternity Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)