Optional Parameter for A_BFGSpray

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Optional Parameter for A_BFGSpray

by DoomRater » Thu May 12, 2005 10:23 am

Graf Zahl wrote:
Daniel wrote: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;
Why not, although I haven't seen a decent fire sprite replacement yet.
1. To be honest, I had thought of replacing it with a triple target cursor when I was using this in conjuntion with monsters that used homing missles. Can you imagine a player that has a missile lock following him around?

2. What about the player being able to use a function like this? (thinks about how it would work) Okay, maybe THAT's why... I can't think of a simple uniform way of implementing it. o_O;;

by Graf Zahl » Thu May 12, 2005 2:35 am

Daniel wrote: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;
Most definitely. Also don't forget A_PainAttack!
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;
Why not, although I haven't seen a decent fire sprite replacement yet.
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)
It'd be more complex to change this one. It's a little too messy.
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);
That's A_BrainScream, not A_BrainExplode. A_BrainExplode is making the recursive explosions. But to be honest, I don't see much of a chance here to get good results. The code pointer as it is is a little to limited.

by Daniel » Wed May 11, 2005 6:53 pm

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

by DoomRater » Wed May 11, 2005 6:43 pm

Most of them were discussed already, and all of them are good ideas. I didn't see the A_BrainDie one discussed though.... intersting.

by Daniel » Wed May 11, 2005 6:41 pm

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?

by DoomRater » Wed May 11, 2005 2:54 pm

I wasn't sure what 'effect' stood for. o_O I think actor would be a better name for it...

by Graf Zahl » Wed May 11, 2005 2:46 pm

What do you think the "Actor" or 'effect' is? Without a chance to alter this the rest is pointless.

by DoomRater » Wed May 11, 2005 2:37 pm

My question is if the blast effect sprite will be one of the optional parameters, so that we can make custom ones.

by Graf Zahl » Wed May 11, 2005 1:42 pm

If you can customize the blast effect sprite you can do all the same stuff as with the bullet puff.

by DoomRater » Wed May 11, 2005 12:51 pm

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

by Daniel » Wed May 11, 2005 11:11 am

Ah, and unlocking the other game codepointers, a lot of new effects can be explored!

by Graf Zahl » Wed May 11, 2005 10:47 am

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.

by TheDarkArchon » Wed May 11, 2005 10:39 am

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)

by Daniel » Wed May 11, 2005 10:30 am

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

by Graf Zahl » Wed May 11, 2005 10:08 am

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!

Top