BulletZ: Proof-of-concept universal hitscan replacement

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are ONLY for YOUR 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.

Re: BulletZ: Proof-of-concept universal hitscan replacement

Postby dawnbreez » Sat Feb 17, 2018 1:57 am

I found a better way to solve the chainsaw bug. Probably.
Now, if a puff doesn't hit anything--not even the sky--then it simply won't appear! Thus, the chainsaw only fires bullets if the limited-range hitscan would have hit something anyway--that is, if something would be right on top of where the bullet would go.

EDIT: Unfortunately this marks the return of the sky bullet bug.
dawnbreez
 
Joined: 08 Jul 2015

Re: BulletZ: Proof-of-concept universal hitscan replacement

Postby wildweasel » Fri Feb 23, 2018 7:59 pm

I've had a look at this to implement a variation of it into Cola3, but discovered a very strange side-effect: although the mod does not alter Chaingunners at all, Chaingunners absolutely refuse to rapid-fire. They fire a single shot and then resume wandering. I can't figure out why their fire sequence is getting short-circuited, because they're not entering the pain state at all.
User avatar
wildweasel
May or may not have a pumpernickel addiction
Moderator Team Lead
 
Joined: 15 Jul 2003
Location: avatar by kurashiki

Re: BulletZ: Proof-of-concept universal hitscan replacement

Postby AFADoomer » Fri Feb 23, 2018 8:56 pm

It's because the A_CPosRefire function checks to see if the target is in sight before refiring, but the BulletZPuff actor is setting the actor's target to itself (the puff), which has a spawn state duration of 0 tics, so is gone by the time the A_CPosRefire call happens (so isn't found, so no refire).

EDIT: Upping the frame duration and doing something like this (saving the shooter's real target, and restoring it after the projectile is spawned) seems to work:
Code: Select allExpand view
            Actor aimtarget = target.target; // Remember the real actor that is being aimed at
            target.target = self;
            target.A_SpawnProjectile("BulletZRound");
            target.target = aimtarget; // Restore the real target
Otherwise, with just upping the state duration, you get some weird effects as the chaingunner continuously faces whatever puff was last set as his target, and he fires wildly.
User avatar
AFADoomer
 
Joined: 15 Jul 2003

Re: BulletZ: Proof-of-concept universal hitscan replacement

Postby dawnbreez » Fri Feb 23, 2018 11:33 pm

AFADoomer wrote:It's because the A_CPosRefire function checks to see if the target is in sight before refiring, but the BulletZPuff actor is setting the actor's target to itself (the puff), which has a spawn state duration of 0 tics, so is gone by the time the A_CPosRefire call happens (so isn't found, so no refire).

EDIT: Upping the frame duration and doing something like this (saving the shooter's real target, and restoring it after the projectile is spawned) seems to work:
Code: Select allExpand view
            Actor aimtarget = target.target; // Remember the real actor that is being aimed at
            target.target = self;
            target.A_SpawnProjectile("BulletZRound");
            target.target = aimtarget; // Restore the real target
Otherwise, with just upping the state duration, you get some weird effects as the chaingunner continuously faces whatever puff was last set as his target, and he fires wildly.


Noted! I'll add this to the mod ASAP.
dawnbreez
 
Joined: 08 Jul 2015

Re: BulletZ: Proof-of-concept universal hitscan replacement

Postby XASSASSINX » Wed Mar 07, 2018 6:12 pm

Wow! This is really good! My only complain, really, is how ugly these bullets look when firing weapons such as the SSG. Now, i think most of the people that download this mod know how to decorate and edit they bullet as they wish. But i think the bullet should be smaller (so it doens't make a barricade of bullets that block your vision) and maybe add a better trail? of course, this is just my mere opinion. But i think that making the bullet something like a 3D tracer of maybe a smaller projectile with more trail would look better.
XASSASSINX
 
Joined: 20 Dec 2016
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: BulletZ: Proof-of-concept universal hitscan replacement

Postby simpletonnn » Thu Mar 08, 2018 1:12 am

oh wow nice job
User avatar
simpletonnn
uh
 
Joined: 13 Nov 2014
Location: across the street

Re: BulletZ: Proof-of-concept universal hitscan replacement

Postby dawnbreez » Fri Jun 15, 2018 3:22 pm

New update, finally. I fixed the melee problem, and added the ability to adjust bullet speed!
dawnbreez
 
Joined: 08 Jul 2015

Re: BulletZ: Proof-of-concept universal hitscan replacement

Postby EddieMann » Fri Jun 15, 2018 9:26 pm

The bullet puffs are way behind the actual shot when set on 150, don't know why.
Image

also, shooting from an alcove or whatever's practically impossible.
Image
User avatar
EddieMann
 
Joined: 18 May 2014
Location: Arizona

Re: BulletZ: Proof-of-concept universal hitscan replacement

Postby dawnbreez » Sat Jun 16, 2018 12:21 am

The alcove issue is a problem, I'll have to figure out something to work around that. Probably has to do with the z-offset of the hitscan versus the z-offset of the projectile.
As for the puffs being way behind the actual projectile...that *might* be the puff trail effect. I should probably get around to implementing the fancy tracers that one guy suggested instead of my ugly trail effect.
dawnbreez
 
Joined: 08 Jul 2015

Re: BulletZ: Proof-of-concept universal hitscan replacement

Postby EddieMann » Sat Jun 16, 2018 1:05 pm

dawnbreez wrote:The alcove issue is a problem, I'll have to figure out something to work around that. Probably has to do with the z-offset of the hitscan versus the z-offset of the projectile.
As for the puffs being way behind the actual projectile...that *might* be the puff trail effect. I should probably get around to implementing the fancy tracers that one guy suggested instead of my ugly trail effect.

It follows the "autoaim" issue, as if I moved back a bit and fired at the same position, the puffs would hit the ceiling.
User avatar
EddieMann
 
Joined: 18 May 2014
Location: Arizona

Re: BulletZ: Proof-of-concept universal hitscan replacement

Postby Shadez12 » Sat Jun 16, 2018 4:36 pm

Found this in Operation Body Count, when using railguns, this mod likes to spawn a tracer along with it.

EDIT: Found that the racer system also affects the MDK cheat, turning it into a tracer that does little damage.
User avatar
Shadez12
Wow
 
Joined: 03 Aug 2013
Location: Wow

Re: BulletZ: Proof-of-concept universal hitscan replacement

Postby dawnbreez » Sun Jun 17, 2018 12:14 am

Shadez12 wrote:EDIT: Found that the racer system also affects the MDK cheat, turning it into a tracer that does little damage.

I need to figure out how GZDoom changes the damage on bullet puffs. If I'm right, it works by modifying the "damage" property of the puff...which *should* mean I can pass that to the projectile. If I'm wrong then I dunno how to fix it--to my knowledge there's no way to get the parameters of a function called by something outside of my mod. Gonna do some testing.

EDIT: Reading the "damage" variable of a puff doesn't work, but WorldThingDamaged exists. The only problem is, WorldThingDamaged only gets called when something is damaged. Which means if I read damage from WorldThingDamaged, then when you lead targets your bullets will not have a set damage amount! More work needs to be done. I should ask someone who works on the engine how exactly hitscan attacks set damage.
dawnbreez
 
Joined: 08 Jul 2015

Previous

Return to Gameplay Mods

Who is online

Users browsing this forum: No registered users and 6 guests