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

Zscript Overwriting Standard Functions

Question

Ive been using decorate for a long time and there's a few things id like to do with zscript.

Mainly, overwrite existing action functions.

Maybe also the damage code too (as in, damage 5 usually goes 1d8RNG * 5)

I dont wanna reference the wiki to pull up example functions to name specifically right now.
 

The intention is to make mods that tweak things while being compatible with other mods.

For example being compatable with Smooth Doom or any of the dehacked mods that used standard codepointers.

But without replacing the monsters that would be getting modified.

So that way stuff like A_PosAttack does different stuff. Maybe because bullets are blaster bolts now, or bullets are supposed to do more damage, or they shouldn't be as crap with their shots.

Or for the shotgun sergeant, making him face a random direction within his usual attack cone and fire a tighter group of pellets.

 

Another example id give is to make the SSG reloading sounds play on a different channel so they dont clip the firing sound which is still active.

Or changing the basic plasma gun attack so it fires a different projectile, which included, would do other fancy things but without having to replace the plasma gun.

Or making the archvile attack start buzzing you with electricity instead of fire, and when it finishes you get struck by lightning vertically.

The idea for changing the damage function is to reduce the high variability that some people hate with it.

 

Im trying to be nice here and make stuff that doesnt step on everyone's toes.

Instead of making "Here is this version of my mod, now for XYZ" and having 50 or 100 different copies of it for other people's mods.

Like for example with smooth doom changing the SSG sound issue would mean replacing a bunch of different instances of it, and then if the mod was ever updated id have to make sure my tweak to it still worked.

Share this post


Link to post

1 answer to this question

Recommended Posts

  • 0

Short answer: no, this does not and will never work. Action function names need to be unique and once a name has been given, it cannot be redefined.

 

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
×