[ZScript] Generic Flamethrower Library

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!

[ZScript] Generic Flamethrower Library

Postby Boondorl » Sat Sep 14, 2019 9:29 am

I had some spare time and have been wanting to do this for a while, so I decided to throw together some class bases for making weapons like Flamethrowers. Flamethrowers in particular tend to be pretty popular and I wanted to touch them up and make them a bit more modern. Some of the features include:

  • Enhanced ripping projectiles. The option to have them only damage once is now available making them far more consistent
  • Projectiles that resize their collision box as they travel
  • New options for splash damage when a projectile explodes
  • A highly customizable damage over time effect that gives far more flexibility than GZDoom's default poison behavior
  • The ability to spawn ground area of effects with unique collision checking
The DOT is capable of stacking as separate instances instead of just resetting or adding to it (though these are available options) and enemies can have multiple DOTs of different types at the same time. Also included is built-in functionality for spawning particle effects while it's active.

The projectile itself is capable of scaling in size (that is, the actual radius and height) as it travels along. It can spawn ground effects and splash damage can be set to apply DOTs.

Damage types can be set separate between the DOT and projectile. If you wanted to you could have a flamethrower that freezes enemies or an ice thrower with a DOT that shocks.

I've included three test weapons that show off some of the features, although the options are essentially limitless. They are a flamethrower, an icethrower, and a line gun. Feel free to play around with them to get a feel for the different kind of projectiles you can make. All of them make use of the resizing properties included in this mod. You can view them in the zscript/examples directory to get a peak at their code. You'll notice that they mostly make use of the base features and not much else.

Spoiler: Screenshots


Documentation is included inside the zip file.

Q&A
Do I need to use ZScript to make use of this?

Nope! ZScript is loaded before Decorate meaning you only need to include the main file (set up instructions are included in the documentation). Tons of custom properties and functions have been added to help aid in its use in Decorate. All of these are included in the documentation. If you have any questions or suggestions, however, feel free to mention them. There might be something I didn't think was that important at the time that you'd like to customize.

How easy is this to edit in ZScript?

Very easy. In the included examples I've shown off some things you can do.

Do I need permission to use this in my mods?

No. Feel free to modify and distribute it as you'd please. The only thing I ask is that you don't take credit for any work you didn't do yourself.

I have a suggestion/bug report/etc.

Feel free to report all of it here. I'll be keeping an eye on the thread should anything go wrong. I can only test so extensively myself, so I might miss something. Given this is a mod designed to be used as a base for Flamethrower weapons, I'm also always open for new features.
You do not have the required permissions to view the files attached to this post.
Last edited by Boondorl on Fri Oct 23, 2020 2:18 am, edited 2 times in total.
User avatar
Boondorl
 
Joined: 12 Jul 2018

Re: [ZScript] Generic Flamethrower

Postby Boondorl » Wed Sep 18, 2019 10:02 am

Update day! I know it's pretty early for a major update, but I've put out v2. The first version is...a bit undercooked, to say the least. I 100% recommend you update to this version as it includes new features, a few important fixes, better documentation, and is much easier to navigate. The property names have been changed so I apologize for the inconvenience this causes if you've set up your own, but this will be the last time I ever need to do that.

Changes:
  • Generalized code better. Property names and internal variables have been normalized making them more sensible to access directly
  • Split up example from the main file to make readability better and to make it easier to port to your own mods
  • Added two new example weapons
  • Fixed an issue where the classes were not respecting time freezing
  • Added damage randomization option for all classes that deal damage
  • Fixed an error related to the calculation of the number of tics on a DOT
  • Fixed an issue with Instant DOTs calculating number of tics incorrectly
  • Added an Additive DOT StackType. This makes use of the ADDITIVEPOISONDURATION and ADDITIVEPOISONDAMAGE flags
  • DOTs can now make use of an actor's HowlSound
  • Added a ground AOE class for creating your own effects when a projectile hits the ground (see documentation for more details)
  • Added helper functions for the DOTEffect class and the ability to turn off warping
  • Added a bunch of properties related to the splash damage on the projectile; this is now far more customizable than before
  • Added the ability to turn off projectile penetration
  • Added the ability to set projectiles to shrink
  • Added helper functions for changing the scales and inverting the growth
  • Added a new function for spawning ground effects on the projectile
User avatar
Boondorl
 
Joined: 12 Jul 2018

Re: [ZScript] Generic Flamethrower

Postby Cherno » Wed Sep 18, 2019 11:40 am

I'd love to see a version of the flamethrower from Kingpin, which is one of the best-looking ones IMHO. Of course, the grpahic effect is more realistic and might not fit into the more cartoonish classic Doom environment.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: [ZScript] Generic Flamethrower

Postby Kinsie » Sun Oct 27, 2019 6:59 am

How has this not gotten more attention? This is great!
User avatar
Kinsie
Dog Days
 
Joined: 22 Oct 2004
Location: MAP33
Discord: Find Me...
Twitch ID: thekinsie

Re: [ZScript] Generic Flamethrower Library

Postby Boondorl » Fri Oct 23, 2020 2:37 am

It's been a while since I've updated this. I've been feeling inspired recently so I whipped up a v3 of this library which takes better advantage of GZDoom's features and fixes and tweaks some issues here and there. Included was a cleaning up of a lot of properties and functions so names will likely be different alongside properties. I apologize for any inconvenience that will cause but there were certain things I simply didn't want to support any further. The end result is, in my opinion, much easier to work with. With these changes comes an inevitable updating of the GZDoom version with it meaning 4.3 or newer is now required.

Spoiler: Changelog
User avatar
Boondorl
 
Joined: 12 Jul 2018

Re: [ZScript] Generic Flamethrower Library

Postby TheRailgunner » Fri Oct 23, 2020 11:19 pm

I'm gonna poke around and see how all of this works - this might help with some stuff I'm working on, and allow me to fix some discrepancies regarding ripper projectiles and explosions.
User avatar
TheRailgunner
Pour one out for Slax - one of ZDoom forum's finest.
 
Joined: 09 Jul 2013


Return to Resources

Who is online

Users browsing this forum: No registered users and 0 guests