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:
-PARTICLE
Spoiler: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
Spoiler: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.
-PARTICLES
Spoiler: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.
Spoiler: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.