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 3: | Line 3: | ||
Before starting out you should grab the resources for this tutorial from [[File:Pickup Assets.7z]], and make sure to either rename or delete all the EDF files currently present (as it's already completed). | Before starting out you should grab the resources for this tutorial from [[File:Pickup Assets.7z]], and make sure to either rename or delete all the EDF files currently present (as it's already completed). | ||
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 | 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. | ||
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 20: | ||
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 30: | ||
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 58: | ||
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 82: | ||
{ | { | ||
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 96: | ||
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 129: | Line 126: | ||
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=== | ||
Create a new lump, called | Create a new lump, called EPOWER. Add the following to EDFROOT, on a line after the stdinclude. | ||
lumpinclude(" | lumpinclude("EPOWER") // A new ammo pickup | ||
Now, start editing | Now, start editing EPOWER. | ||
thingtype Torch | |||
thingtype | |||
{ | { | ||
doomednum 30005 // This is the thing number used to place the object in a map. | |||
addflags SPECIAL|COUNTITEM|FLOATBOB // Sets flags for item, which in this case means it's a collectable item, counts in the items end tally, and floats. | |||
pickupeffect // This defines what happens when the item is picked up. | pickupeffect // This defines what happens when the item is picked up. | ||
{ | { | ||
effects | effects Torch // The actual effects that happen when the item is picked up (can be a comma separated list). | ||
message "You got | message "You got a hideous torch." // The message given when picked up. | ||
sound | sound getpow // The sound made when the item is picked up. | ||
} | } | ||
states | states | ||
@" | @" | ||
Spawn: | Spawn: | ||
TRCH ABC 3 bright | |||
loop | |||
"@ | "@ | ||
} | } | ||
powereffect Torch | |||
{ | { | ||
duration 120 // How long the power lasts in seconds. | |||
type PowerTorch // The type of power given, in this case Heretic's flickering torch. | |||
} | } | ||
Now either type "summon | Now either type "summon Torch" (not case-sensitive) in the console, or place a thing with doomednum 30005 in the map. When you pick it up, it should provide you with the Heretic-style | ||
=== | ===Weapon=== | ||
Create a new lump, called | Create a new lump, called EWEAPON. Add the following to EDFROOT, on a line after the stdinclude. | ||
lumpinclude(" | lumpinclude("EWEAPON") // A new ammo pickup | ||
Now, start editing | Now, start editing EWEAPON. | ||
thingtype BlueLauncher | |||
{ | { | ||
doomednum | 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. | |||
pickupeffect // This defines what happens when the item is picked up. | pickupeffect // This defines what happens when the item is picked up. | ||
{ | { | ||
effects | effects BlueLauncher // The actual effects that happen when the item is picked up (can be a comma separated list). | ||
message "You got | message "You got an offensively blue missile launcher." // The message given when picked up. | ||
sound | sound wpnup // The sound made when the item is picked up. | ||
} | } | ||
states | states | ||
@" | @" | ||
Spawn: | Spawn: | ||
BLUL A -1 | |||
stop | |||
"@ | "@ | ||
} | } | ||
weapongiver BlueLauncher | |||
{ | { | ||
weapon MissileLauncher // The weaponinfo name given by the weapongiver. | |||
ammogiven AmmoMissile, 2, 1, 5, 2 // Ammo type given, and values in order, normal, dropped, | |||
// 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 | |||
// (but is doubled for certain skill levels). | |||
} | } | ||
Now either type "summon | 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 205: | ||
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 243: | ||
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" |