Tweaking Brutal DooM's Flamethrower

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Tweaking Brutal DooM's Flamethrower

Postby mincartoon » Fri Aug 09, 2013 2:21 pm








I tested the latest beta of Brutal DooM, and the new alternative mode of Plasmagun is just fascinating.
Call me an arsonist, pyromaniac, whatever you want to. Everything BURNS.

However, I didn't like few points of the weapon and tweaked them myself.
I'm a todddler coder, and still reading wiki about GZDoom scripting, so my methods may not be very brilliant, nor new to most people.

This post is not intended to harass Sarge's work, and I won't upload nor distribute modified pk3. It's a completly educational, coding related article.

1. Changing the damage type to "Fire"

The plasma shots originally toast demons into char like normal shots do, but I wanted to see zombies, imps and pinky demons running around... It creates a massive confusion to enemies since they keep damaging each other, which I like.

At first I didn't know how to backtrack damagetype (i.e. looking at the monster profile and check "Death" section). So I looked into the Mancubus flame thrower and copied "damagetype Flames". It worked well to zombies, but for imps or demons not too well. Later I realised the actually damagetype is "Fire" by looking at monster codes. I guess there's an intermediate phase that connects "Flames" to trigger "Death.Fire", but it's still a mystery to me.

Anyway, the code:



took the liberty of chaing the flag to +RIPPER, to enable flames to penetrate foes

2. Removing reload

Simply I don't like reloading weapons... I enjoy Rambo, Massacre, not pussy FPS shoooting, but it'll be considered as cheating for most of you. To do this just remove "goto Reload" lines from weapon codes.

3. Adding dynamic lights to Flamethrower

It really took a lot of time, I'm almost completly new to the programming (I slightly studied C++ and Java in secondary school, but my major in university was life science) and it was a very slow process to understand the classes, flags, actors, etc...

-Added following to GLDEFS


At first I bound light to the Actor HotPlasmaGas, but the flamethrower fires projectiles too fast and the excessive number of lights caused lag.
So I planned to add a duplicate of the Actor HotPlasmaGas, and insert it between origianal Actor HotPlasmaGas, so the lights occur less.



I laugh at how much time I spend to just know what "FIR5 BCDEFGHIJKLMNOP 1 Bright A_CustomMissile ("BluePlasmaFireMove", 0, 0, random (0, 360), 2, random (0, 360))" means. In fact, I still don't fully know! I think FIR5 is the sprite name, the alphabet next to it is frame number, and the number is duration. Still don't know what numbers in the bracket are - ("BluePlasmaFireMove", 0, 0, random (0, 360), 2, random (0, 360)); I'm guessing it's some sort of offset.


Added the underline somewhere bewteen (which I thought was suitable) the events of firing and reloading. After countless adjustments and failures, the result was a satisfaction.

4. Replacing the sound.

This is for normal shots. I wanna replace the current sound to DooM 3 plasmagun sound. It's relaxing to ear and more Sci-Fi like. I'm still trying to figure out how to write SNDINFO and stuff.

Learning how to code is pretty fun. If you guys post tips it will greatly boost my study, although reading the context myself is the most valuable thing to do.
User avatar
Joined: 19 May 2013

Re: Tweaking Brutal DooM's Flamethrower

Postby Hellser » Sat Aug 10, 2013 5:49 am

From the Magic School Bus, this does take effect for coding: Take chances, make mistakes and get messy.

You won't learn how to code unless you essentially tear apart what he created and study it line by line. Going from bottom up:
4) - A_PlaySound is your friend here, also look into using SNDINFO - this is rather needed to make sure the correct sound is being played. ZDooM will take WAV, OGG, MP3s and what not - the preferable standard is OGG.

SNDINFO isn't that hard; the name of the sound would be, an example:
Code: Select allExpand view
mincartoon/myawesomeflamethrower/pewpewfromdoom3     DSD3PLS

Again, if you need examples, look at other SNDINFO, they should tell you!

3) This is why OpenGL effects aren't in many mods. They're too much of a pain in the ass to setup. But it seems you got it!

2) Or deleting the RELOAD line should work, just make sure to replace anything that checks the inventory for the "magazine" ammo actor with the "pool" ammo actor. (like, does this weapon have enough ammo to keep firing? No? Play clicking noises! But don't go to reload)

1) Thus, why you should always take a mental note on what DamageType does what. If needed, narrow it down to only three or four. Fire, Acid, Ion, Explosive.. you get the idea.
User avatar
Remember Citadel
Joined: 25 Jun 2006
Location: Citadel Station
Discord: Hellser#8156

Return to Editing (Archive)

Who is online

Users browsing this forum: Yandex [Bot] and 2 guests