Expose A_SpawnProjectile/A_CustomComboAttack/etc to ZSC

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Lord Misfit
Posts: 221
Joined: Wed Dec 27, 2006 8:13 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: Canton, OH
Contact:

Expose A_SpawnProjectile/A_CustomComboAttack/etc to ZSC

Post by Lord Misfit »

I noticed recently that apparently A_CustomBulletAttack is available in ZScript for editing, yet multiple similar monster attack functions like A_SpawnProjectile, A_Custom A_CustomComboAttack, A_CustomMeleeAttack, A_CustomRailgun and such are still native only and can't really be modified. [I was able to RECREATE A_CustomMeleeAttack, and A_CustomComboAttack as different named functions, but they are likely not 100% perfect recreations and having the originals exposed would help a lot instead of relying on trying to "reconstructing" the actions/functions].

Why am I asking about these, besides "consistancy" w/ A_CustomBulletAttack? Basically, it would be a big help to optimizing a mechanic of sorts in my mod for spawned monster projectiles if I can directly edit the properties of a just-spawned projectile from within those actions instead of needing to do other possibly hacky workarounds [i.e. using PostBeginPlay() in the projectiles themselves, etc], and I could delete what are essentially slightly modified copies of those projectile attacks.

I can't "reconstruct" more complex actions like A_SpawnProjectile [the one that I'd REALLY need exposed for my optimization idea] unfortunately, so I felt it was worth a try to make a request for those actions here, since AActor was appearantly having more functions and native actions opened up recently.

Sorry if this sounds like a big request, but I figured I'd ask anyways. x.x
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Expose A_SpawnProjectile/A_CustomComboAttack/etc to ZSC

Post by Graf Zahl »

Can you help? The long term plan is to scriptify the entirety of p_actionfunctions.cpp (minus a few where performance really matters) but this is a time consuming and mainly unproductive task that always comes with the risk of introducing new regressions.
User avatar
Lord Misfit
Posts: 221
Joined: Wed Dec 27, 2006 8:13 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: Canton, OH
Contact:

Re: Expose A_SpawnProjectile/A_CustomComboAttack/etc to ZSC

Post by Lord Misfit »

I really am sorry, but messing directly with the main code of GZDoom itself is something I'm not good at, and to be frank, I don't like dealing with the process of getting programs set up to compile it. I've tried to do this in the past just to get certain versions compiled ahead of time because of various reasons, and my results were mixed, I've gotten them to work before, but other times I've failed, and it's a headache I don't want to deal with, right now anyways.

At the same time though, I can understand it's time consuming and it might take quite a while, so I'm not going to try to rush you guys on this. I mostly brought this up originally due to the "inconsistancy" thing, even though these are things that I'd like to see exposed for modding reasons. If it takes a while for them to get added, of course I can accept that, but unfortunately I don't currently have the drive to deal with compiling tools right now, and I also don't have experience in the actual compling language of the port itself, just DECORATE/ACS/ZScript (and my ZScript is the least learned of the three, and I'm not sure how much knowing how to ZScript for mods would help with the process). x.x

That's not to say maybe I won't eventually try, but this is also a bit of a busy time away from the computer for me as well with the new year season right now, so I'll think about if I can really do anything to help directly, but most likely I'd have to settle on waiting for you guys to get to this, or somehow helping in a more indirect fashion.

EDIT: Actually, I suppose I should ask if "helping" could also mean to reference what I did to "recreate" A_CustomMeleeAttack/A_CustomComboAttack (what I mentioned back in the first post) in the ZScript language as well and if that kind of thing would help if I gave that code to someone to add or not? If so, yeah I could do that, but again, I had no luck diciphering various parts of A_SpawnProjectile, so I don't know if I could help "recreate" that one or certain others or not.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Expose A_SpawnProjectile/A_CustomComboAttack/etc to ZSC

Post by Major Cooke »

Graf Zahl wrote:Can you help? The long term plan is to scriptify the entirety of p_actionfunctions.cpp (minus a few where performance really matters) but this is a time consuming and mainly unproductive task that always comes with the risk of introducing new regressions.
I could try. However, some of them rely upon matrices so those I'll skip.

Which ones in particular should remain native though? That way I know which ones not to attempt.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Expose A_SpawnProjectile/A_CustomComboAttack/etc to ZSC

Post by Graf Zahl »

A_RadiusGive for sure. In general, anything that looks like it is expensive.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Expose A_SpawnProjectile/A_CustomComboAttack/etc to ZSC

Post by Major Cooke »

A_CheckLOF too?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Expose A_SpawnProjectile/A_CustomComboAttack/etc to ZSC

Post by Graf Zahl »

Most likely. If you want to take a shot, pick the simpler stuff first.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Expose A_SpawnProjectile/A_CustomComboAttack/etc to ZSC

Post by Major Cooke »

Agreed, I will do everything that is simpler first. I'm not ready to take on the bigger stuff.
Post Reply

Return to “Feature Suggestions [GZDoom]”