Optional Parameter for A_BFGSpray

Moderator: GZDoom Developers

User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Location: WATR HQ

Optional Parameter for A_BFGSpray

Post by DoomRater »

I heard something about optional parameters being in the works. So, I was wondering if an optional parameter for BFGSpray that would allow us to use our own BFG hit sprite, for special effects, as well as perhaps more or less hitscans and more or less reach? Those would be awesome. And nukes that kill Cyberdemons when they blow up would be possible (if anyone would want to do that...)
User avatar
Daniel
Posts: 811
Joined: Sun Jul 04, 2004 3:21 pm

Post by Daniel »

I think you could also choose the Spray actor, like this:

A_Spray("Spray actor", range, damage, number)

where number could be: 0 for the default Doom BFG effect; and 1 for the Quake 2 style BFG radiation, it would be cool! The default BFG spray should look like this:

A_Spray("BFGSpray", 1024, 3000, 0)

But I think that Randy must fix something that isn't fixed in ZDoom and Legacy, for make this action work: when the player is hiy by a projectile that causes more than 1000 points of damage, it kills the player even in invulnerable mode. (EDGE seems to have this problem fixed)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48538
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Daniel wrote:I think you could also choose the Spray actor, like this:

A_Spray("Spray actor", range, damage, number)

where number could be: 0 for the default Doom BFG effect; and 1 for the Quake 2 style BFG radiation, it would be cool! The default BFG spray should look like this:

A_Spray("BFGSpray", 1024, 3000, 0)
What do your numbers mean? I can't associate any of them to the original functioning of A_BFGSpray.

As for the Q2 BFG, that can't be done with this code pointer because the effect doesn't happen on impact. It happens while the projectile is flying and it additionally has the problem that it is hard to render in software mode.
But I think that Randy must fix something that isn't fixed in ZDoom and Legacy, for make this action work: when the player is hiy by a projectile that causes more than 1000 points of damage, it kills the player even in invulnerable mode. (EDGE seems to have this problem fixed)
There are no 1000 damage projectiles. Even the BFG ball stays below that (at most 800 damage points per impact.) But it still needs to be fixed!
User avatar
Daniel
Posts: 811
Joined: Sun Jul 04, 2004 3:21 pm

Post by Daniel »

I thought like the optional parameters also in customizeable EDGE BFG spray:

A_Spray("Spray Actor", range, damage, bfg-style)

Spray Actor => the actor that will be draw in front of the damaged monsters (the default is the BFG Spray)

range => distance (or radius) to kill monsters; a distance of 128 means that any monster in a radius of 128 points from the player will be damaged;

damage=> quantity of health impact caused by the damage; like ExplosionRadius, a far object will receive less charge;

bfg-style=> like Graf said that the Quake 2 style coudn't be added, how about this:

0 -> default BFG effect (monsters in player sight will die)
1 -> BFG effect 1: monsters in the BFGBall sight will die (it won't deppend of the player position)
2 -> BFG effect 2: monsters in a radius of [range] will be affected, from the player reference;
3 -> BFG effect 2: monsters in a radius of [range] will be affected, from the BFGBall reference;

Confused? I'll try to describe it better later...
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

I'd have it like this (A lot more pratical to implement):

A_Spray("Actor", Damage, Number)

"Actor" == The actor displayed when a hit is detected
Damage == The damage per tracer
Number == The number of tracers called.

BFG in this case is:

A_Spray("BFGExtra", 50, 40)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48538
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Don't be surprised, but mode 0 doesn't exist! The default is 2 with a range of 2048.

Considering what this function does it should be:

A_BFGSpray(effect, number_of_traces (default is 40), damage_factor (tricky due to the calculation), spray_angle, origin (player/blast), max_distance)

I think that EDGE's parameters are far too abstact in this case.


But as with a lot of other stuff: Before this can be implemented the entire DECORATE system must be modified to allow passing optional parameter lists to standard functions. For that the state structure must be changed a little to make the parameter storage less hack-ish. And if that is done one could finally make all of Heretic's, Hexen's and Strife's code pointers available. But first Randy must finish his floating point conversion.
User avatar
Daniel
Posts: 811
Joined: Sun Jul 04, 2004 3:21 pm

Post by Daniel »

Ah, and unlocking the other game codepointers, a lot of new effects can be explored!
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Location: WATR HQ

Post by DoomRater »

Graf Zahl wrote:But as with a lot of other stuff: Before this can be implemented the entire DECORATE system must be modified to allow passing optional parameter lists to standard functions. For that the state structure must be changed a little to make the parameter storage less hack-ish. And if that is done one could finally make all of Heretic's, Hexen's and Strife's code pointers available. But first Randy must finish his floating point conversion.
Exactly what I heard before. However, would all of the pointers you mention be implemented when all the necessary code is written? Also, what about leaving an alternate tracer mark on the player? I can already see people exploiting the new Puff actor to perform things such as explosive shells, and I imagine that people would want to do that with a custom BFG blast as well. EDIT: Unless that's what the 'effect' value is for...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48538
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

If you can customize the blast effect sprite you can do all the same stuff as with the bullet puff.
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Location: WATR HQ

Post by DoomRater »

My question is if the blast effect sprite will be one of the optional parameters, so that we can make custom ones.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48538
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

What do you think the "Actor" or 'effect' is? Without a chance to alter this the rest is pointless.
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Location: WATR HQ

Post by DoomRater »

I wasn't sure what 'effect' stood for. o_O I think actor would be a better name for it...
User avatar
Daniel
Posts: 811
Joined: Sun Jul 04, 2004 3:21 pm

Post by Daniel »

I think just not the Spray can be customizeable actions, but a lot of another ones that requires "different actors" for its function, for example:

A_PainDie("LostSoul", 3) -> it spawns 3 Lost Souls, so it also can be personalizated;

A_VileTarget("Fire") -> it allows you to change the Fire sprite, so you can create new monsters that uses this kind of attack. With the actual Decorate, you can't customize this attack without replacing the ArchVile;

A_Tracer("puff") -> Revenant's personalized missile puff - you can use this action to make new rocket puffs (but this also can be made with usual Decorate)

A_BrainExplode("Missile", 10, 512, 180) -> just a guess, this action is so complex; it spawns a bunch of missiles(10) at 512 points at south of the object (180 - the angle);


Well, these are some ideas... what do you think?
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Location: WATR HQ

Post by DoomRater »

Most of them were discussed already, and all of them are good ideas. I didn't see the A_BrainDie one discussed though.... intersting.
User avatar
Daniel
Posts: 811
Joined: Sun Jul 04, 2004 3:21 pm

Post by Daniel »

DoomRater wrote:I didn't see the A_BrainDie one discussed though.... intersting.
Maybe it's because of the complexity of this action. Also, it spawns not only Exploding Missiles (codep 127 in DeHackEd), but another exploding missile that is placed on pointer 799, and has the codepointer 801, that tells to spawn more Exploding Missiles from codep 127. It involves a lot of actors here (but the pointer 799 isn't an "oficial actor", you can't find it in DeHackEd basic sprites list). I discovered that trying to make the NeoDoom BFG; I use this action into its explode, but I had to make a trick to avoid the "exploding loops" - in default code pointers, it goes increasing the number of explosions until it crashes. Weird

What I did on NeoDoom's BFG: I used this 801 code pointer in BFG Spray, but to avoid this looping problem, I made the 799 pointer jump to 127, to prevent this looping bug. Further, I made an explosion that drops 3 Lost Souls (transformed into the Fire in NeoDoom), and directioned pointer 799 to it. The effect became this: when the BFG Spray appears, it runs the action 801, and randomized to generate rocket explosions (127) or spawn fire (the pointer that 799 goes to).

Return to “Closed Feature Suggestions [GZDoom]”