Jump to content

A few of the new codepointers for DeHackEd


Quasar

Recommended Posts

In response to user demand, since Eternity is The Port that Listens(tm), I've been busy putting in some new codepointers for use in BEX patches. These new pointers are parameterized, meaning they take arguments from values that you supply in the frame that they're used in. This allows a single pointer to provide a VAST array of differing effects. The new fields on the Frame work like this:

Frame 14
Args1 = 32

There's 5 such fields. Also, I've added an "Ammo per shot" field to weapons, which, when provided, makes ANY weapon use that amount of ammo per shot -- previously it was only customizable for the BFG, and the SSG always used 2 shells.

The codepointers come up with so far include:

*** FireCustomBullets

This codepointer for player gun frames lets you create your own custom bullet weapons. The arguments to it include sound (1 = dspistol, 2 = dsshotgn, 3 = dsdshtgn, 4 = dscstbul), accuracy (1 = always, 2 = except on refire, 3 = never, 4 = ssg), number of tracers to fire, damage factor, and damage modulus.

Two examples of weapons you can make with this are a Quad Shotgun and "The Bullet of Death", aka the Golden Gun.

*** FirePlayerMissile

This codepointer for player gun frames lets you make a weapon that can shoot ANY projectile. The only argument it takes is the DeHackEd number of the thing type to shoot (the thing type should always be a missile). An example of a weapon this can make is an imp fireball shooter.

*** CustomPlayerMelee

This codepointer for player gun frames lets you create a customized melee attack similar to the fist or chainsaw. The arguments to this pointer include damage factor, damage modulus, berserk multiplier, angle deflection type (1 = none, 2 = fist, 3 = chainsaw), and sound (1 = dspunch, 2 = dssawhit/dssawful, 3 = dscstpun)

In case this has you confused, here's a sample patch that turns the pistol into a Quad SSG:

Frame 14
Args1 = 3
Args2 = 4
Args3 = 40
Args4 = 5
Args5 = 3

Weapon 1 (Pistol)
Ammo per shot = 4

[CODEPTR]
Frame 14 = FireCustomBullets

See? Its very easy to use, but yet very powerful ^_^ I think this new set of pointers is gonna go well beyond what people were asking for, and give them stuff they haven't even thought of yet :)

Share this post


Link to post

Whee! Thanks Quasar! ^_^

One small question: can Args take the place of Unknown 1\2 from the older customizable pointers?

Share this post


Link to post

You'll still need to use Unknown 1 and Unknown 2 for the MBF parameterized pointers, although I could possibly add new parameters to them using the args fields. This is necessary for backwards compatibility. One reason that I HAD to add the args fields, besides that they are very useful, is that Unknown 1 and Unknown 2 are *NOT* "unknown" inside the game engine -- they act as sprite offsets for player gun sprites (aka psprites) -- so if you were to use Unknown 1 or Unknown 2 as args to a player gun pointer, it would mess up the weapon graphics for those frames.

And of course I can't just remove the original usage of Unknown 1/2, since some TCs and mods might have actually used them to adjust player gun sprite positioning :/

Share this post


Link to post

Ahh, I see...

Might I make a minor suggestion? Could you add -optional- support for Args in the MBF customizible pointers?
Like, if a Bex gives Args for a frame using an MBF customizible pointer, use the Args for the pointer's custom values instead of the 'Unknown' fields, otherwise get the values from 'Unknown' as it normaly does. This would be backwords-compatable, and allow for, imho, more cleanly coded BEX patches, because if the 'Unknowns' have normal use, that's all they should be. And since we have a new place to put our custom pointer values...

Oh, and another humble suggestion, for if you decide to do that: the option for Bex coders to use an Args field instead of an object's Missile Damage, when it comes to MBF pointers that use it for a value. Like, Args1 to set the explosion radius of Detonate, or Args3 for the number of fireballs created by Mushroom. Again, it should only try to use the Args field if it's used. If not, they should act as they did before by using the Missile Damage of the object that's running the frame.

Share this post


Link to post
  • 2 weeks later...
  • 1 year later...

Well at least he had something constructive to say. It's not like he bumped it just for postcount++...

Share this post


Link to post

... my god... this thread is from freakin 2002, and I've just recieved an email saying it's been posted to. I didn't even remember this conversation untill I re-read it. And, no offence, but I hardly think 'hey cool' is quite constructive enough to warrent ressurecting a long dead thread.

please, unless it's truely importent, just let ancient threads die...


On the other hand, thanks for reminding me about this forum.

Share this post


Link to post

Well, I didn't even know this pointer even existed! So what can I say, I certainly found this thread useful.

{edit} This also proves that posting a thread on irc is potentially hazardous. And funny. {/edit}

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
Reply to this topic...

×   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...