Editing Creating a pickup
From Eternity Wiki
Jump to navigationJump to search
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: | ||
Creating a pickup is effectively [[creating a simple decoration]], but with a few more steps. You should read that tutorial first before continuing on here. In this tutorial we will define several pickups, each with its own section. In addition, the multiple ways in which a pickup can be defined will also be explored. | Creating a pickup is effectively [[creating a simple decoration]], but with a few more steps. You should read that tutorial first before continuing on here. In this tutorial we will define several pickups, each with its own section. In addition, the multiple ways in which a pickup can be defined will also be explored. | ||
Much like creating a simple decoration, we will start by creating a text lump named EDFROOT, but for this tutorial each pickup will have its own unique lump which contains the necessary EDF. We will include these lumps in EDFROOT so that the relevant pickups defined in the files can be used. For this tutorial we will use [[DECORATE state syntax]] when defining the the thingtypes that our pickups require. | |||
Much like creating a simple decoration, we will start by creating a text lump named EDFROOT, but for this tutorial each pickup will have its own unique lump which contains the necessary EDF. We will include these lumps in EDFROOT so that the relevant pickups defined in the files can be used. For this tutorial we will use [[DECORATE state syntax]] when defining the thingtypes that our pickups require | |||
stdinclude("root.edf") // Includes the file base/root.edf, which in turns includes the other files | stdinclude("root.edf") // Includes the file base/root.edf, which in turns includes the other files | ||
// that are required for definition of all sprites, sounds, things etc. | // that are required for definition of all sprites, sounds, things etc. | ||
'''Please note that you can call the lumps whatever you want. The lump names used here (besides EDFROOT) are just example lump names.''' | '''Please note that you can call the lumps whatever you want. The lump names used here (besides EDFROOT) are just example lump names.''' | ||
Line 23: | Line 18: | ||
Now, start editing EHEALTH. | Now, start editing EHEALTH. | ||
thingtype UglyKit | |||
{ | { | ||
doomednum 30001 // This is the thing number used to place the object in a map. | |||
flags SPECIAL // Sets flags for item, which in this case means it's a collectable item. | flags SPECIAL // Sets flags for item, which in this case means it's a collectable item. | ||
Line 33: | Line 28: | ||
message "You got health, but you didn't like it..." // The message given when picked up. | message "You got health, but you didn't like it..." // The message given when picked up. | ||
sound itemup // The sound made when the item is picked up. | sound itemup // The sound made when the item is picked up. | ||
} | } | ||
states | states // This declares that the following block is the thingtype's states. | ||
@" | @" | ||
Spawn: | Spawn: | ||
Line 61: | Line 56: | ||
Now, start editing EARMOR. | Now, start editing EARMOR. | ||
thingtype RedArmor | |||
{ | { | ||
doomednum 30002 // This is the thing number used to place the object in a map. | |||
flags SPECIAL // Sets flags for item, which in this case means it's a collectable item. | flags SPECIAL // Sets flags for item, which in this case means it's a collectable item. | ||
pickupeffect // This defines what happens when the item is picked up. | pickupeffect // This defines what happens when the item is picked up. | ||
{ | { | ||
effects RedArmor // The actual effects that happen when the item is picked up (can be a comma separated list). | |||
message "Picked up the HyperArmor!" // The message given when picked up. | |||
sound itemup // The sound made when the item is picked up. | |||
} | } | ||
Line 85: | Line 80: | ||
{ | { | ||
saveamount 150 // The number the armor % is set to. | saveamount 150 // The number the armor % is set to. | ||
savefactor 2 // The numerator for the damage | savefactor 2 // The numerator for the damage absorption fraction (2/n). | ||
savedivisor 3 // The denominator for the damage | savedivisor 3 // The denominator for the damage absorption fraction (n/3). | ||
// These two properties combine to the | // These two properties combine to the armor absorbing 2/3 the damage the player would usually would take (66%). | ||
} | } | ||
Line 99: | Line 94: | ||
Now, start editing EAMMO. | Now, start editing EAMMO. | ||
thingtype RedAmmoBox | |||
{ | { | ||
doomednum 30003 // This is the thing number used to place the object in a map. | |||
flags SPECIAL // Sets flags for item, which in this case means it's a collectable item. | flags SPECIAL // Sets flags for item, which in this case means it's a collectable item. | ||
Line 128: | Line 123: | ||
Now either type "summon RedAmmoBox" (not case-sensitive) in the console, or place a thing with doomednum 30003 in the map. When you pick it up, it should give you 75 bullets, regardless of difficulty. | Now either type "summon RedAmmoBox" (not case-sensitive) in the console, or place a thing with doomednum 30003 in the map. When you pick it up, it should give you 75 bullets, regardless of difficulty. | ||
===Power-up=== | |||
===Weapon=== | ===Weapon=== | ||
Line 136: | Line 133: | ||
Now, start editing EWEAPON. | Now, start editing EWEAPON. | ||
thingtype BlueLauncher | |||
thingtype BlueLauncher | |||
{ | { | ||
doomednum 30005 // This is the thing number used to place the object in a map. | |||
flags SPECIAL // Sets flags for item, which in this case means it's a collectable item. | flags SPECIAL // Sets flags for item, which in this case means it's a collectable item. | ||
Line 158: | Line 155: | ||
weapongiver BlueLauncher | weapongiver BlueLauncher | ||
{ | { | ||
weapon MissileLauncher // The weaponinfo given by the | weapon MissileLauncher // The weaponinfo name given by the weapongiver. | ||
ammogiven AmmoMissile, 2, 1, 5, 2 // Ammo type given, and values in order, normal, dropped, | ammogiven AmmoMissile, 2, 1, 5, 2 // Ammo type given, and values in order, normal, dropped, | ||
// DM w/ weapons stay, coop w/ weapons stay | // DM w/ weapons stay, coop w/ weapons stay. | ||
ammogiven AmmoCell, 10 // You can define as many as you want. In this case, it gives 10 cells always | ammogiven AmmoCell, 10 // You can define as many as you want. In this case, it gives 10 cells always | ||
// (but is doubled for certain skill levels). | |||
} | } | ||
Now either type "summon BlueLauncher" (not case-sensitive) in the console, or place a thing with doomednum 30005 in the map. When you pick it up, it should give you a rocket launcher, some rockets, and cells. | Now either type "summon BlueLauncher" (not case-sensitive) in the console, or place a thing with doomednum 30005 in the map. When you pick it up, it should give you a rocket launcher, some rockets, and cells. | ||
===Artifact=== | ===Artifact=== | ||
Line 209: | Line 171: | ||
Now, start editing EKEY. | Now, start editing EKEY. | ||
thingtype GreyCard | |||
{ | { | ||
doomednum 30006 // This is the thing number used to place the object in a map. | |||
flags SPECIAL // Sets flags for item, which in this case means it's a collectable item. | flags SPECIAL // Sets flags for item, which in this case means it's a collectable item. | ||
Line 247: | Line 209: | ||
require GreyCard | require GreyCard | ||
mapcolor "#AAAAAA" // This is matched as closely as possible to the current palette | mapcolor "#AAAAAA" // This is matched as closely as possible to the current palette | ||
message "You need a grey card to activate this door" | message "You need a grey card to activate this door" | ||
remotemessage "You need a grey card to activate this object" | remotemessage "You need a grey card to activate this object" |