[ZScript] ZScript Weapons Library - v0.3.0

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm
Contact:

[ZScript] ZScript Weapons Library - v0.3.0

Post by dodopod »



Here's something I've been working on for a little while. The ZScript Weapons Library attempts to ease the creation of weapons with features beyond those present in the original Doom engine games. This is only version 0.1.0, so several important features are missing (i.e. those related to non-hitscan weapons), but it should give you an idea of what will be possible in the final version. I haven't created a tutorial (yet), but there are several example weapons in the demo, and the ZWeapon class is fairly well documented.

Here are some features:
  • Conical bullet spread. It even stays conical when looking up (an improvement over Snarboo's implementation).
  • Automatic weapons can be set to fire at a fixed rate, even one not divisible by a whole number of tics.
  • Shotguns have both accuracy, which determines the general direction pellets will go, and spread, which determines how widely they spread apart.
  • A bullet casing class and eject function.
  • A class for decals that appear on floors/ceilings, and a bullet puff class that spawns them.
  • A flexible reloading system.
  • Automatic weapons can also have a looping attack sound with an attack, sustain, and release.
  • Semi-automatic fire.
  • Laser and proximity mines.
  • HitOwner flag (for explosives) doesn't activate until explosive is no longer touching player.
  • Hitscan and projectile shrapnel.
  • Mines can stick to floors, walls, ceilings, and actors.
  • Laser-guided missiles.
GitLab page

Downloads: Old versions:
Last edited by dodopod on Thu Jun 13, 2019 6:31 pm, edited 3 times in total.
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [ZScript] ZScript Weapons Library

Post by Nash »

Good stuff! Thanks for sharing.
User avatar
Ahpiox
Posts: 98
Joined: Fri Dec 22, 2017 1:52 am

Re: [ZScript] ZScript Weapons Library

Post by Ahpiox »

Interesting thing. I hope this will be famous
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm
Contact:

Re: [ZScript] ZScript Weapons Library - v0.2.0

Post by dodopod »

I've just finished v0.2.0, which focuses on projectile weapons.

Here's an updated demo: Download

And here's a quick rundown of the new features:

User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [ZScript] ZScript Weapons Library - v0.2.0

Post by Nash »

Hey dodopod, any chance to add an optional model version of the tracer? I can provide the mesh and texture if needed.
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm
Contact:

Re: [ZScript] ZScript Weapons Library - v0.2.0

Post by dodopod »

Sure. Send me the model, and I'll see what I can do.
MrJohnny
Posts: 212
Joined: Fri Aug 05, 2016 8:41 am

Re: [ZScript] ZScript Weapons Library - v0.2.0

Post by MrJohnny »

The weapon casings/tracers don't take crouching/standing in liquid into account. Any chance of this being addressed?
https://imgur.com/a/65U1lDL
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm
Contact:

Re: [ZScript] ZScript Weapons Library - v0.2.0

Post by dodopod »

Ah, I hadn't noticed that. I'll make sure to fix it in v0.2.1. Edit: It's fixed on GitLab, now.
MrJohnny
Posts: 212
Joined: Fri Aug 05, 2016 8:41 am

Re: [ZScript] ZScript Weapons Library - v0.2.0

Post by MrJohnny »

Awesome. And thanks for this, by the way. Lots of nifty stuff here.

EDIT: Alright, crouching works fine, but it looks like standing in liquid still jacks it up. Also, firing weapons while jumping yields some weird results.
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm
Contact:

Re: [ZScript] ZScript Weapons Library - v0.2.0

Post by dodopod »

Okay, standing in liquid should be fixed, now. I was positioning casings using pos.z + player.viewHeight, instead of player.viewZ. I didn't see any problem with tracers, while standing in liquid, though I might have missed something. As for jumping, if you mean that casings seem to fly off in odd directions, I don't think that's a bug. It's just the effect of gravity.
MrJohnny
Posts: 212
Joined: Fri Aug 05, 2016 8:41 am

Re: [ZScript] ZScript Weapons Library - v0.2.0

Post by MrJohnny »

dodopod wrote:As for jumping, if you mean that casings seem to fly off in odd directions, I don't think that's a bug. It's just the effect of gravity.
On second thought, you're probably right.
dodopod wrote:Okay, standing in liquid should be fixed, now.
Much appreciated. I think this has reached a point where I can use it now. I haven't quite delved into the technicalities of zscript yet, though. So expect a question or two if I hit any bumps.
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm
Contact:

Re: [ZScript] ZScript Weapons Library - v0.2.0

Post by dodopod »

Pompous Seed wrote: Much appreciated. I think this has reached a point where I can use it now. I haven't quite delved into the technicalities of zscript yet, though. So expect a question or two if I hit any bumps.
Sure. If you find any more bugs, feel free to open a new issue on GitLab.
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [ZScript] ZScript Weapons Library - v0.2.0

Post by Nash »

dodopod wrote:Sure. Send me the model, and I'll see what I can do.
Hey! Sorry I took 10 billion years to get back to this. Here's a custom bullet tracer mesh I made for you.

It has been pre-scaled such so that the Actor's "Scale" property and the model's scale in map units is synchronized, for example: Scale 100 would make the mesh 100 map units long. The origin is in the center of the mesh. Feel free to further tweak the scale, and maybe texture colour, to whatever you feel suits this SDK's aesthetics better. :)
Attachments
BulletTracer.pk3
(8.68 KiB) Downloaded 160 times
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm
Contact:

Re: [ZScript] ZScript Weapons Library - v0.2.0

Post by dodopod »



ZWL v0.3 is out! This release adds a new base class for explosives. Downloads are at the top of the thread and on the GitLab release page.
Nash wrote:Hey! Sorry I took 10 billion years to get back to this. Here's a custom bullet tracer mesh I made for you.
No need to apologize. Especially not when it takes me 20 billion years to actually put it in. :lol:
User avatar
TiberiumSoul
Posts: 1065
Joined: Fri Jan 20, 2012 11:29 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: My Computer...

Re: [ZScript] ZScript Weapons Library - v0.3.0

Post by TiberiumSoul »

OwO? I may actaully try to ZScript convert my weapons using this... provided i have your permission to do so Dodopod
Post Reply

Return to “Script Library”