Skip to content

Add commonly GZDoom-specific properties to DEHACKED #3062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

XaserAcheron
Copy link
Contributor

Closes #3060 -- see linked issue for justification, but the gist is that folks making MBF21/DSDHacked mods find themselves needing to set a few GZDoom-specific fields for compatibility, but are forced to reimplement the entire actor in ZScript in order to achieve that. This sucks, naturally. :P

This PR adds the following properties to DEHACKED:

  • Tag
  • Obituary
  • HitObituary ("Melee obituary")
  • SelfObituary ("Self obituary")
  • ProjectilePassHeight ("Projectile pass height")
  • A new alias for Height named "Physical height" -- if this is specified, then the "Height" field in the patch is ignored. More on this in a bit.

The obituary definitions were previously doable via LANGUAGE, but this makes it so modders don't have to dip into GZDoom-specific lumps at all to make things work nicely.

"Physical height" is just an alias for the Height field, but it's necessary in order to work around a fundamental difference in how the Height variable is treated across ports: in GZDoom, if you want to make a 56-unit-tall actor with an effective projectile collision height of 16, you'd set Height to 56 and ProjectilePassHeight to 16, but in other ports (e.g. dsda-doom and others that stick to vanilla), Height is effectively the projectille collision value -- i.e. a Height value of 56 will cause projectiles fired by the player on level ground to collide with it. Oopsie.

To fix this, with this PR you can set the following properties on a thing in DEHACKED:

  • Height 16
  • ProjectilePassHeight 16
  • PhysicalHeight 56

GZDoom will set Height to 56, while other ports will set Height to 16, making everything work consistently.

As an additional sanity check, trying to specify either ProjectilePassHeight or PhysicalHeight without also including the other will throw an error -- the patch must specify both, or neither.

@RicardoLuis0 RicardoLuis0 merged commit 80c36d4 into ZDoom:master Apr 29, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Allow DEHACKED lumps to pass in GZDoom-only thing attributes via DEHACKED extension
2 participants