Jump to content
  • 0

Changing Drops in DeHackEd?


Mengo

Question

I'm making a mod that uses DeHackEd patches, and I was wondering if i could make it so the shotgunguys and chaingunguys don't drop their weapon, and if possible, make them just drop ammuniton instead?

Share this post


Link to post

7 answers to this question

Recommended Posts

  • 0

Actually you can, there is this old quirk with pickup sprite names which seems to be barely documented anywhere, but may require some swapping of items for best effect:

On 1/5/2003 at 8:32 PM, Enjay said:

2: You can change the way a pickup behaves using dehacked. eg, if you make the ammo clip use the frames of the soul sphere, every time you pick up an ammo clip, you get a soul sphere instead. The advantage is that it makes a global change for all enemies that drop the item concerned, but it also removes the item as a placeable item in the game (although you can probably give the soul sphere (for example) the ammo clip frames and get soul spheres to behave like clips, thereby effectivley swapping the items. I don't know how well this trick is supported by the various source ports. It wasn't supported for a while in Zdoom, but has now been restored.

Share this post


Link to post
  • 2

Unfortunately, what ammo is dropped is dependant on thing type. If you wanted to make a chai gunner who drops clips, you’d have to swap him with the SS Nazi (who will then drop chainguns)

Share this post


Link to post
  • 0

+1 to what Worst said, if you dehack the shotgun to use the shells sprite, and the shells use the shotgun sprite, you should end up with shotgunners that drop shells.  If you dehack the map editor numbers to swap those too, you shouldn't even need to adjust your maps.  For the chaingunner you could do the swap with the SS, since you're probably not using him as-is anyway and wouldn't want zombiemen to drop chainguns.

 

You can do a bunch of funky stuff with the fact that item pickups are decided by the pickup sprite, like making a "randomized" powerup by having it cycle quickly between different sprites each frame.  Just never make a pickup use a sprite name that isn't one of the pickups or the game will crash if it's taken during that frame.

Share this post


Link to post
  • 0

Just note that the method Worst mentioned does not work in ZDaemon (or didn’t as of early 2019 anyway, I haven’t checked it again since then). I may be wrong but it seems to determine which objects have what behaviour based on their thing ID rather than their sprite name as in vanilla Doom. I haven’t tried actually modifying the map editor numbers though, that might do it.

Edited by Doomkid

Share this post


Link to post
  • 0
11 minutes ago, Doomkid said:

....

 

 

5 hours ago, ETTiNGRiNDER said:

You can do a bunch of funky stuff with the fact that item pickups are decided by the pickup sprite, like making a "randomized" powerup by having it cycle quickly between different sprites each frame. 

Here's a quick example btw (source)

Share this post


Link to post
  • 0

If I want to change drops, I go to the source of the port I'm using (e.g. Boom202) and find the part of code that defines drops from enemies. That way I made rocket guys(previously nazis) drop rockets, fast shotguys (previously hangtbody, editor number 75) to drop shotguns and fuzzy zombiemans(another gore thing, editor number 76) to drop clips. Oh it was a long way that I did to find all the compilator things (like proper djgpp2 setup)

And that was the first time I've ever compiled a C program :)

Edited by SilverMiner

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...