Tweaking Brutal DooM's Flamethrower

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
mincartoon
Posts: 37
Joined: Sun May 19, 2013 3:20 pm

Tweaking Brutal DooM's Flamethrower

Post by mincartoon »

Image

Image

Image

Image

Image

Image

Image

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.
User avatar
Hellser
Global Moderator
Posts: 2705
Joined: Sun Jun 25, 2006 4:43 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Citadel Station

Re: Tweaking Brutal DooM's Flamethrower

Post by Hellser »

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 all

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.
Locked

Return to “Editing (Archive)”