Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Mechanos

Negative damage with dehacked

Recommended Posts

I've recently learned that you can use dehacked to have projectiles inflict negative damage, meaning that a player "thing" or even monsters can be "healed". I was wondering if this can also be done with blast damage from barrels or even rockets? Probably not.

Share this post


Link to post

Doing this can cause very bad side effects, though, such as having a psychedelic palette effect.

Share this post


Link to post

What do these psycedelic effects look like? Could they be fixed with Inkworks? Also, can negative damage be applied to blast radius with DeHackEd or is the blast radius damage hardcoded?

Share this post


Link to post
Quasar said:

Doing this can cause very bad side effects, though, such as having a psychedelic palette effect.


I assume this wouldn't happen in Boom-compatible ports, though, but I could be wrong.

Share this post


Link to post
Mechanos said:

What do these psycedelic effects look like?

Imagine yourself playing a semi-old Windows game on Windows Vista or 7, without compatibility emulation.

Share this post


Link to post
Megamur said:

I assume this wouldn't happen in Boom-compatible ports, though, but I could be wrong.

That would be incorrect then. Because this even happened in Eternity until recently, although Eternity would generally crash from it because of changes to how the playpal is declared and handled.

The psychedelic palette glitch is caused by two factors working together:

  • P_DamageMobj can set player->damagecount, which controls the red palette flash, to a negative value
  • ST_doPaletteStuff doesn't bother to rangecheck the value it gets by fiddling with player->damagecount before indexing into the playpal.
Also it appears like this, though the appearance changes constantly due to the fact that once player->damagecount is ngative, the game will continue to decrement it forever, causing it to become more and more negative forever:

Share this post


Link to post

Negative damage does not work in gzdoom.

http://prboom-plus.sf.net/test189.wad.zip

Btw, why it does not? It could be used in doom/boom wads for creating friendly healing monsters (they can be invisible / hidden / inaccessible / other effects) and these deh mods will not work with zdoom. Any serious reasons?

Share this post


Link to post

@ Quasar, Okay thank you. I was really hoping to use negative damage blast radius for a pseudo scripting trick for Vanilla. Guess I'll have to stick with exploding barrels with Invulnerability sphere to get the job done W/Out damage.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×