This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorials:modding:dehacked [2024/09/10 06:15] – A User Not Logged in | tutorials:modding:dehacked [2025/04/14 04:51] (current) – A User Not Logged in | ||
---|---|---|---|
Line 4: | Line 4: | ||
The gist is this - Doom monsters, weapons, and items (" | The gist is this - Doom monsters, weapons, and items (" | ||
- | With dehacked you can tell the thing what order to run it's states in, and for how long, and you can attach " | + | With dehacked you can tell the thing what order to run it's states in, and for how long, and you can attach " |
+ | You are limited in what you can do by Doom's available actions, the various flags for the things, and how you order the states, but if you're tricky you can accomplish more than you may think. | ||
The info you need to specify for each state would be:\\ | The info you need to specify for each state would be:\\ | ||
Line 12: | Line 13: | ||
Duration of this state in tics (35 per second)\\ | Duration of this state in tics (35 per second)\\ | ||
Action this state will execute (fireball, chase, die, etc)\\ | Action this state will execute (fireball, chase, die, etc)\\ | ||
+ | Additionally there are flags for objects that control things like collisions, whether the thing flies, some palette swapping, etc. | ||
Only certain states can have actions, and once you've used those up that's it. You can't add more with vanilla DeHackEd. Also if you try to use an action state with no action it crashes in vanilla. | Only certain states can have actions, and once you've used those up that's it. You can't add more with vanilla DeHackEd. Also if you try to use an action state with no action it crashes in vanilla. | ||
Line 22: | Line 24: | ||
The only thing you can change in regard to ammo pickups really is how much it gives you and what your total ammo capacity is. Same with health. I'm sure there are limitations on this, but I don't have much experience with it. | The only thing you can change in regard to ammo pickups really is how much it gives you and what your total ammo capacity is. Same with health. I'm sure there are limitations on this, but I don't have much experience with it. | ||
- | WIP - more later. | + | OKAY. Now that the overview is done and expectations are tempered... Onto the program we're using for editing a dehacked file (.deh): **WhackEd**. |
+ | |||
+ | Whacked is a windowed program, so you have windows for the various areas of control dehacked gives you.\\ | ||
+ | **Things** | ||
+ | **States** - Where you manage the ordering of states, choose the action for each state, sprites and so on.\\ | ||
+ | **Sounds** - Lets you change some sound settings.\\ | ||
+ | **Weapons** - Change the raise/ | ||
+ | **Ammo** - Where you choose the amount of ammo pickups give you and max possible ammo.\\ | ||
+ | **Strings** - Level names, intermission texts, etc.\\ | ||
+ | **Cheats** - Change cheat codes. Some ports don't like this, and some people don't either.\\ | ||
+ | **Misc** - Max health, armor classes, other things.\\ | ||
+ | **Par Times** - I have no idea.\\ | ||
+ | |||
+ | ;#; | ||
+ | {{: | ||
+ | ;#; | ||
+ | |||
+ | OKAY. So that's the program. What do we make then... Something simple, but illustrative of the utility of DeHackEd... | ||
+ | |||
+ | Let's make former humans shoot plasma and when they die they explode... into mancubus fireballs maybe. This should illustrate strengths and weaknesses in dehacked. | ||
+ | |||
+ | First we're going to select our version of Doom, and our IWAD. Doom 1.9 (use this for doom 2 also), doom2.wad. | ||
+ | |||
+ | ;#; | ||
+ | {{: | ||
+ | ;#; | ||
+ | |||
+ | Next we check out the trooper using the filters in the state window. Here we hit our first limitation already. You can't use player projectiles for enemies. But, what we can do is change an enemy projectile to act the same as a player projectile. The Arachnotron' | ||
+ | Go to the " | ||
+ | |||
+ | ;#; | ||
+ | {{: | ||
+ | ;#; | ||
+ | |||
+ | At this point you already have a former human firing an arachnotron' | ||
+ | |||
+ | So we'll filter for the Plasma Rifle (at the top of the states window), and take note of the sprite it uses. Remember that the first 4 characters in a sprite name determine what it does when you pick it up. | ||
+ | |||
+ | ;#; | ||
+ | {{: | ||
+ | ;#; | ||
+ | |||
+ | It's sprite " | ||
+ | Now they will drop Plasma Rifles when they die and fire arachnotron shots. | ||
+ | |||
+ | ;#; | ||
+ | {{: | ||
+ | \\ tested in chocolate doom by creating a shortcut with a target field that looks like: " | ||
+ | ;#; | ||
+ | |||
+ | |||
+ | The pickup ammo for the Plasma Rifle is twice that of the cell ammo, so obviously this is pretty unbalanced if the weakest enemy is dropping absurd amounts of plasma ammo. Let's try to balance this a little bit... Go to the Ammo window and change the pickup amount to 2. Now cells will give you 2 ammo, and rifles will give you 4. | ||
+ | |||
+ | ;#; | ||
+ | {{: | ||
+ | ;#; | ||
+ | |||
+ | Alright. Now let's get complicated. We want him to explode when he dies and shoot mancubus fireballs at the same time. I'm not going to make any new sprites, so we'll swipe some exploding sprites from barrels. That would be BEXPC, BEXPD, and BEXPE. We'll head over to his entry in the " | ||
+ | We'll also need 4 actions for this, scream, fall, fatattack3, explode. In his typical death he already has scream and fall, so we need two actionable states. We'll swipe those from the "SS Nazi" chase states. No one will notice.\\ | ||
+ | The states we're stealing are 734 and 735, but we can't just take them, we need to shift the SS Nazi's states around a little to free them up. Otherwise the SS will just explode when they chase you since they' | ||
+ | |||
+ | ;#; | ||
+ | {{: | ||
+ | ;#; | ||
+ | |||
+ | So select state 733, after filtering for the SS Nazi, and change it's "Next state" to the first SS Nazi chase state (728). Then change it's sprite to the next walking sprite of the SS Nazi (SSVD) and the duration of states 732 and 733 to 6. It's a little hacky, but now when the SS nazi goes through it's chase cycle it'll at least cycle properly. Though the last two frames of animation will be chunkier in motion since they' | ||
+ | We're also going to change state 735's next state to 192. You can now find the stolen SS Nazis states in the filter under " | ||
+ | It's often much easier to steal entire enemies and redistribute their states as you see fit. The SS Nazi is a go-to because it's only used in the secret maps, and rarely used in custom maps. | ||
+ | |||
+ | Now we redirect the Former Human (remember it's called " | ||
+ | |||
+ | OKAY. So we're going to change the sprites for the states. | ||
+ | 191 will be BEXPC, 734 will be BEXPD, and 735 will be BEXPE, and 192 will also be BEXPE.\\ | ||
+ | |||
+ | OKAY OKAY. Now we change the actions. 734 gets " | ||
+ | |||
+ | OKAY OKAY OKAY. That's it! Now they fire plasma, drop plasma rifles, explode when they die (which tends to kill the other former humans around them), and fire off fireballs as they explode. LAST THING. Go to the " | ||
+ | |||
+ | That's really it now. If you want to see the .deh file I ended up with here you go:\\ | ||
+ | \\ | ||
+ | |||
+ | <WRAP button centeralign> | ||
+ | {{: | ||
+ | </ | ||
+ | |||
+ | Hope this helped. |