[ZScript] ZScript Weapons Library - v0.2.0

Post your example zscripts/ACS scripts/etc here.

[ZScript] ZScript Weapons Library - v0.2.0

Postby dodopod » Tue Jul 03, 2018 4:53 pm



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.

Source code
Demo
Last edited by dodopod on Thu Jul 19, 2018 4:53 pm, edited 1 time in total.
dodopod
 
Joined: 04 Oct 2017

Re: [ZScript] ZScript Weapons Library

Postby Nash » Tue Jul 03, 2018 11:04 pm

Good stuff! Thanks for sharing.
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: [ZScript] ZScript Weapons Library

Postby Ahpiox » Fri Jul 06, 2018 6:17 am

Interesting thing. I hope this will be famous
User avatar
Ahpiox
THIS IS A BRAND NEW HIP-HOP MIX STRAIGHT FROM THE STREETS! HOT 97 TO YOU!
 
Joined: 22 Dec 2017
Location: Cheeseburger factory

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

Postby dodopod » Thu Jul 19, 2018 4:57 pm

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:

dodopod
 
Joined: 04 Oct 2017

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

Postby Nash » Thu Jul 19, 2018 10:27 pm

Hey dodopod, any chance to add an optional model version of the tracer? I can provide the mesh and texture if needed.
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

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

Postby dodopod » Fri Jul 20, 2018 3:07 pm

Sure. Send me the model, and I'll see what I can do.
dodopod
 
Joined: 04 Oct 2017

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

Postby Pompous Seed » Tue Jul 24, 2018 7:18 pm

The weapon casings/tracers don't take crouching/standing in liquid into account. Any chance of this being addressed?
https://imgur.com/a/65U1lDL
Pompous Seed
 
Joined: 05 Aug 2016

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

Postby dodopod » Wed Jul 25, 2018 1:42 pm

Ah, I hadn't noticed that. I'll make sure to fix it in v0.2.1. Edit: It's fixed on GitLab, now.
dodopod
 
Joined: 04 Oct 2017

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

Postby Pompous Seed » Wed Jul 25, 2018 7:16 pm

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.
Pompous Seed
 
Joined: 05 Aug 2016

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

Postby dodopod » Sat Jul 28, 2018 11:48 am

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.
dodopod
 
Joined: 04 Oct 2017

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

Postby Pompous Seed » Sat Jul 28, 2018 1:09 pm

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.
Pompous Seed
 
Joined: 05 Aug 2016

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

Postby dodopod » Sat Jul 28, 2018 2:05 pm

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.
dodopod
 
Joined: 04 Oct 2017

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

Postby Nash » Thu Sep 20, 2018 4:47 am

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 8 times
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia


Return to Script Library

Who is online

Users browsing this forum: No registered users and 1 guest