Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Lazer

Zdoom's .deh support...

Recommended Posts

When my zdoom loads .deh files all the weapon changes work but monster modifications(frames going to other frames, codepointers, etc...) don't work right. Why is this?

Share this post


Link to post

Which version of Zdoom are you using?

I have tried some very complex deh files (one 4069 lines long, just checked) and they all work very well.

Dehacked support was solid in ver 1.22, took a little bit of a dive with some of the 1.23 betas, but I have had no real problems with 1.23 beta 20, and I have tried a lot of mods with it.

Another possibility. Is the deh file of the correct format? If it is, you should be able to open it with a text editor and it will be readable. Earlier versions of dehacked saved files in some sort of data format. If you have a file of that type, you need to load it into the final version of dehacked (available on doomworld) and save it again. This will convert it to the new format that Zdoom (and other ports) need.

Just had another thought. You wouldn't be running a wad with an included DEHACKED lump as well as the deh file would you? That could cause problems too. It should mean that only the dehacked info from one or the other is used (depending on which order you load them), but I have had ocasions where the two sort of interfere with each other and give unexpected results.

Share this post


Link to post

I was using 1.22 and I just tried the 1.23 20 and it was still the same. I am using Dehacked 3.1 as well.

Share this post


Link to post

Did you make sure there was no DEHACKED lump in any of the loaded wads?

If you have an example that isn't huge, ie doesn't require some massive resource wad to make it work, you could send it to me. I'll take a look and see if it works for me, or why it might not be working.

Or you could simply cut and paste it here (assuming it is relatively short) and have the combined wisdom ;-) of the Doom community look at it.

Share this post


Link to post

I also have the problem with Allhell. But here is the enemies section of the text file:

Patch File for DeHackEd v3.0

# Note: Use the pound sign ('#') to start comment lines.

Doom version = 19
Patch format = 6


Thing 6 (Revenant)
Hit points = 500
Injury frame = 337
Pain chance = 200
Pain sound = 105
Close attack frame = 325
Far attack frame = 325
Death frame = 766
Speed = 8
Action sound = 106
Bits = 4211206
Respawn frame = 0

Thing 8 (Fireball Trail)
Initial frame = 123
Mass = 1000
Bits = 16

Thing 22 (Cyberdemon)
Bits = 205520902

Thing 25 (Commander Keen)
Bits = 4195072

Thing 34 (Rocket (in air))
Initial frame = 127
Reaction time = 1
Death frame = 318
Death sound = 17
Speed = 1966080
Width = 458752
Height = 458752
Missile damage = 10

Thing 36 (BFG Shot)
Initial frame = 667
Death frame = 669
Missile damage = 10

Thing 110 (Hanging Leg 2)
Initial frame = 442
Hit points = 100
First moving frame = 444
Alert sound = 39
Injury frame = 455
Pain chance = 200
Pain sound = 27
Close attack frame = 452
Far attack frame = 452
Death frame = 457
Exploding frame = 462
Death sound = 62
Speed = 10
Height = 3670016
Action sound = 76
Bits = 4456454
Respawn frame = 270

Frame 60
Duration = 4

Frame 61
Duration = 4

Frame 63
Duration = 2

Frame 64
Duration = 2

Frame 65
Duration = 2

Frame 66
Duration = 2

Frame 78
Duration = 5

Frame 84
Duration = 1

Frame 85
Duration = 1

Frame 86
Duration = 1

Frame 87
Duration = 1

Frame 88
Duration = 1

Frame 119
Duration = 1
Next frame = 127

Frame 123
Duration = 6

Frame 124
Duration = 6

Frame 125
Duration = 6

Frame 126
Duration = 6

Frame 127
Duration = 1
Next frame = 119

Frame 311
Duration = 8

Frame 312
Duration = 8

Frame 313
Duration = 8

Frame 314
Duration = 8

Frame 315
Duration = 8

Frame 321
Next frame = 321

Frame 323
Next frame = 323

Frame 325
Sprite subnumber = 32769
Duration = 4
Next frame = 327

Frame 326
Next frame = 0

Frame 327
Sprite subnumber = 32770
Duration = 8
Next frame = 336

Frame 328
Next frame = 0

Frame 329
Duration = 10
Next frame = 323

Frame 330
Next frame = 0

Frame 331
Duration = 10
Next frame = 323

Frame 336
Sprite subnumber = 32774
Duration = 10
Next frame = 323

Frame 337
Duration = 10
Next frame = 323

Frame 667
Duration = 3

Frame 668
Duration = 3
Next frame = 669

Frame 669
Duration = 2

Frame 670
Duration = 2

Frame 671
Duration = 1

Frame 672
Duration = 1

Frame 673
Duration = 1

Frame 770
Duration = -1

Frame 771
Duration = -1
Next frame = 771

Share this post


Link to post

Okay, I've had a look at the file. Without seeing what else goes with it (graphics wise) it looks a little odd, but I will go through what I think should be happening, and what is happening.

First off, the revenant is modified to behave quite differently. He glides around, only using one frame of animation when moving. This is how it is set, and what happens. His pain and death are modified, and seem to work reasonably ok. He uses frames from the commander keen death but because the death animation has been shortened he never gets to the code pointer to set dead body mode. Therefore, he never "officially" dies, and leaves a solid corpse lying around that could block things.

The big problem comes, however, with his attack frames. This is set as a simple sequence to go through 2 walking frames, play the SKESWG sound and then go back to walking (having done no damage). Like I said, this seems bizarre without it being in the context of the rest of the modification, but that is how the deh patch is written. If the revenant is attacking from a distance, he stops briefly, makes the SKESWG noise and carries on. If he comes into contact with you, Zdoom, Boom and Legacy all crash instantly. I think the problem is the lack of a "turn to face target" pointer within the attack. If you add the following to the end of the deh patch

Pointer 174 (Frame 325)
Codep Frame = 184

The revenant walks up to you, makes the SKESWG noise and then stands right beside you until you move off. Still no damage done as no actual attack code pointer has been used.

The line above simply gives the first attack frame the "turn to face" code pointer.

It's a little hard to work out exactly what else is supposed to be going on. There is a modification to the revenant fireball trail. On a quick check, nothing is set to fire that fireball, nor does anything use the fireball trail generating code pointers, or the revenant fireball frames (316 and 317 unless I missed it) so that modification will never be seen.

The cyber demon has had his "bits" changed to appear a different colour. Presumably in the mod he uses green pixels somewhere in his appearance or this will have no effect.

Commander Keen has had his bits changed to be un shootable, presumably because something else (revenant) is using his death frames. However, his "counts for kill" bit is still set. If you have one of these on a map, you wont be able to kill it, and so will probably not get a full kill count even if everything else is dead.

The rocket in air and BFG shot have been modified. These definitely do something. The rocket has a helluva kick and the bfg shot seems like a more powerful plasma gun type weapon.

The hanging leg 2 has been converted into a semi visible imp. This seems to work fine, but I noticed its repawn frame is set to be part of the Archvile pain sequence. Don't know if that is intentional or not.

Anyway, the short version of this is there are one or two minor mistakes in this dehacked patch that are enough to give a number of source ports a problem, particularly with the revenant close attack. Once that is sorted, everything that the file is set to do happens. Whether that is what you (or the author if you are not the author) wanted it to do is another matter.

Share this post


Link to post

Explanation:

Revanent - Changed into a Dark Bishop that is a quick attacking Archvile. It does not crash Zdoom, although in Legacy I get a message saying to many sprite replacements but that is not part of the Dehacked patch. If you want an example of what it is like try playing d2xgold.

Commander Keen - Not really set up to be anything right now. I made him walk throughable(is that a word?) so that when the Dark Bishop dies you can go through him, but now I realize I just need to give it the dead body code pointer.

BFG - Flamethrower

Rocket Launcher - Interesting new version of the Pentagram weapon.

Leg - I made a mistake I guess with the respawn frame of the Nightmare imp.

Cyberdemon - I made a "Chaos Dragon" that just looks better with that slight change. I use a Spawn toy to make it :)

Share this post


Link to post

Sounds like an interesting mod. I presume the section of the deh you posted above is missing a code pointers section or something. The way the Revenant is set up with the part of the deh file you posted, he has no attack other than making the SKESWG noise. If you have him using the archvile attack, then you must have some modified code pointers too, which may be why the version you have doesn't crash Zdoom. BTW, I noticed the Revenant is set to use the same attack frames for both distant and close attacks. If the actual attack he uses only has one possibility (like the archvile attack, and unlike the imp attack which uses the same code pointer to "claw" at close range and launch a fireball at a distance), you will probably be as well to set him to have a distant attack frame and no close attack frame. That should still get the effect you are after.

"I made him walk throughable(is that a word?)"

Heh, it is now. :-)

The other comments all make sense now. How easy was it to use the Spawn toy? I am pretty sure the queen in Aliens TC was a photographed toy as well. The reason I am pretty sure is I have a toy, ahem - uh - my son has a toy, that looks a lot like it.

BTW, your pentagram weapon does a lot of damage to the player when you fire it. I presume this is the desired effect, and it works very well. I typically got hit for about 30-40 points of damage every time. If you wanted to reduce that, you may want to try this (dunno if it will work, but you could try it).

I think the damage comes from the rocket using frame 127, the frame that gives the rocket explosion damage and possibly from the next frame (119) which gives BFG blast damage. If you gave the rocket a chance to get a little further away from the player before it used those frames for the first time, it might do a little less damage. Something like this:

Frame 1 - Inert missile frame with a longish duration
goto frame 2 (currently 127)
Frame 2 Do rocket area damage (duration etc as currently set)
Goto frame 3
Frame 3 As currently set (currently using frame 119 which also has the BFG blast effect)
Goto frame 2

This should mean the initial frame is used once at the launch of the rocket, doing no damage, but from that point on, the frames you have used for the rocket in flight will be cycled through. Well, it might work anyway. That is of course if you want to reduce the damage done to the guy firing, and I'm not trying to say you should. I know one thing, when you get hit by a cyberdemon rocket it spells instant death, even the Spiderdemon died after being hit once.

Anyway, I hope the mod goes well. I look forward to trying it when/if you release it. Let me guess, it'll be released when it's done, right? :-)

Share this post


Link to post

Well, I've released a beta on my website some time ago but it isn't really up to date (no new monsters and missing many things it has now). I am going to release beta 3 as soon as I can get a few things done. If you would like a copy of beta 3 so far just email me (found on my website).
BTW, since the code pointers section isn't posted I'll explain the Pentegram/Rocket Launcher:
-There is now blast radius
-it leaves a trail of sparks using the fireball trail codepointer.
-the cyberdemon uses it.

Share this post


Link to post

Ah, despite mentioning earlier that there was no code pointers section, I didn't make the mental leap that you may have done something there to alter the rocket behaviour. Sounds cool.

Just nipped over to your site and saw the question about disabling jumping. Dunno if you got a reply on this yet, but if you include the word nojump in your MAPINFO lump, jumping is disabled. Don't remember if it works as a global statement or if you have to put it in for every map. Don't know if there is a way to stop MLooking though.

I will give you a shout via E-mail. I'm always looking for new wads to try out and so would like a look at the next beta version. Don't use the hotmail account that shows up on these forums, it can only receive tiny files.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×