Spoiler: Beginning: Basics - Day 1
1 - Setting Things Up.
In order to even start making your item, you have to have an idea in your head. You should think to yourself:
"What do I want my Thing to be?"
"How do I want it to act?"
"Will the player find this to be entertaining, interesting or annoying?"
If 2 out of 3 make you think of a postive answer, you're good to go.
Now, first, to start making your DECORATE lump, simply open up your favorite Notepad or code editor. (Duh.)
Since this is the beginner tutorial, I will make this quite simple. First, type this.
What does this do? Well, lemme explain. The first word, Actor. This tells ZDoom that it indeed is an object of sorts. (Cause computers rely on us as we rely on them!) The name, "SkinnyFatso" is the name of your object. The " : DoomImp 10001" part simply inherits - or copies - whatever the ordinary doom imp has and gives it a number of 10001. Save the file as "DECORATE". You can put ".txt" or ".lmp" at the end, it doesnt matter. If you stuck this inside a wad and ran it, press the console-down (~) key and type "Summon SkinnyFatso". You'd see an imp. (Provided you're on a Doom IWAD.) But now, We're going to "change" the imp's behavior a bit. Copy down what is below.Code: Select all
Actor SkinnyFatso : DoomImp 10001 { }
Ok, this doubles your imp's health and speed, as well as shaming the player once he dies from one of it's attacks. Simple, right? Lets make this guy actually do what WE want it to do.Code: Select all
Actor SkinnyFatso : DoomImp 10001 { Health 120 Speed 16 Obituary "You got killed by a tutorial! Shame!!" }
Ok, explanation time! The "states" keyword means the "actions" that your object does. All objects in the Doomworld (heh), animated or inanimated, have states. Period. The Missile word is obvious, gives your object a far attack action (if your object is a monster, of course.) Now, see those TROO E-G 5 frames? These are the standard DoomImps firing frames. The TROO is the first 4 charaters in the sprites. the 5th is what frame to show when the action is called. The number is how many tics per second it should last. See the last "TROO G 5"? Notice how it has A_FatAttack3? Contrary to popular belief, it tells ZDoom that on that frame, to shoot a Mancubus Fireball. Save your file.Code: Select all
Actor SkinnyFatso : DoomImp 10001 { Health 120 Speed 16 Obituary "You got killed by a tutorial! Shame!!" states { Missile: TROO E 5 TROO F 5 TROO G 5 A_FatAttack3 Goto See } }
Spoiler: Tip!Load up your WAD file and type in "Summon SkinnyFatso" in the console. He should shoot the one mancubus fireball and require at least 12 bullets to kill or 2 shotgun blasts. Tomorrow, I'll go a bit more indepth on Actor and its states.
You can compress the DECORATE lump into a ZIP and rename the ".zip" to ".pk3" instead of opening up Slade 3 or XWE. I find this easier and ironically quicker.
Spoiler: Beginning: Basics - Day 2
Ok, so yesterday, we made a pretty basic monster. Not bad for a beginner! But, the things explained yesterday only scratched the surface with DECORATE. Today, we'll go a bit more indepth with Actor, as well as explain how all the states work.
If you recall (or reread), we simply inherited a DoomImp, slapped on a new attack sequence and doubled it's health and speed, but I forgot to mention you can inherit it from anything! Heres the list of things you can inherit monster-wise.Spoiler:You can replace the DoomImp inheritance to pretty much anything, but remember, when they do a far attack, they will switch to the imp's frames, then back to it's own frames. So, lets say you replacedCode: Select all
DoomImp //The standard brown thing that shoots red fireballs ZombieMan //The weak pistol zombies that are no threat ShotgunGuy //Shotgunner, probably from the countryside. Demon //Its either a bull, a dog or bulldog. Either way, it's bite is worse than its bark. ChaingunGuy //Holds a chaingun. He's also a guy. LostSoul //This poor skull is on fire and attemps a friendly headbump. Revenant //Heat-seeking missile-launching skeleton. Archvile //Burns your soul. PainElemental //The grownup stage of a Lost Soul. Cacodemon //A red floating ball of gas that shoots balls of gas. Fatso //Mancubus. Fat, slow, hungry for a cheeseburger and dangerous in packs. Arachnotron //A spider that shoots plasma. Cyberdemon //A robot\cyborg that shoots out 3 rockets. SpiderMastermind //Big spider that has a super chaingun attached.
withCode: Select all
Actor SkinnyFatso: DoomImp 10001
When you place this inside a wad then type in the console "Summon SkinnyFatso", you'd see a shotgunner, but instead of shooting his shotgun, he'll shoot the manc fireball with the Imp's frames, then revert back to ShotgunGuy. Why?Code: Select all
Actor SkinnyFatso: ShotgunGuy 10001
Do you see that Goto See? This is kinda like a GPS for ZDoom. It tells ZDoom to go to a certain state. In this case, the See state tells your actor to use a sprite or a set of sprites for something. For instance, take a look at some code I did before.I cut out the rest with the (...). As you can see, the See state tells the actor to use my sprites ABCD frames to chase the player (or whatever it's aiming for.) Every monster has a See frame. If it didn't, it would only "Spawn" and not move at all.Code: Select all
Actor HardHat 10001 { ... states { ... See: METT ABCD 5 A_Chase Loop } }
This is called when you either summon your actor or when an enemy doesn't notice you. The A_Look just makes it look for the player, or waits till it's injured.Code: Select all
... Spawn: METT A 5 A_Look Loop
Then we have Missile and Melee:
The A_FaceTarget faces the target it intends to hit. The A_TroopAttack makes the actor shoot out an imp fireball. Whenever Melee and Missile are on top of each other (like above.) it tells ZDoom that the protocal for both is the same. More indepth tomorrow.Code: Select all
Melee: Missile: TROO E 5 TROO F 5 A_FaceTarget TROO G 5 A_TroopAttack Goto See
Spoiler: Static Objects : Basics - Day 3If something dont work, lemme know. I'll fix it! Hope this kinda helps out a bit!
Wow, I forgot I had this up! Anyway, now that you have a basic knowledge of enemies, you may want to know about static objects. Objects in any Doom game or games that are powered by the Doom Engine (iDTech 1, FYI) has static objects, from those lamps that light the base up, to the bell that calls the gargoyles down from the heavens. Today you shall learn about these objects.
If you want to contuine this under the SkinnyFatso, go right ahead! If you want to do it in a new file, also ok! This tutorial doesn't matter what you do filewise.
First, take a look (and type) the following.Now, so far we made this object solid via the +SOLID flag. This ensures that we can't pass through it. Feel free to omit that if this isn't what you want. We also made it the size of an imp. Since we're coding something entirely new, we don't need to inherit anything.Code: Select all
Actor StaticObject 10002 { +SOLID Height 56 Radius 16 }
We have to decide what our object will be. I'll leave the custom sprites up to you guys, though, and I'll use the Imp.This makes a very lifelike Doomimp statue which will be in its attack pose. It is NOT an enemy, so it will NOT move. It'll probably catch a player offguard if placed and timed right, thoughCode: Select all
Actor StaticObject 10002 { +SOLID Height 56 Radius 16 States { Spawn: TROO G 1 Loop } }
That's all that there is to making static objects! That simple!
If you want the object to animate, then that's just as simple as breathing.Now, you COULD be a troll and make it shoot deadly missiles (y u do dat?), but that will be saved for tomorrow. Have fun with your Imp statue!Code: Select all
(...) Spawn: TROO E 5 TROO F 7 TROO G 7 Loop