Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
mrthejoshmon

Turning the Pistol into a Rifle via .bex?

Recommended Posts

I want to turn the pistol into something more accurate and much more powerful (making it supposedly more useful than the original pistol) for PrBoom, I have been messing around with WhackEd2 and I have no idea what to do to the pistol to make it into the more effective rifle.

What would I need to change to make it be:

- More powerful

- More accurate

- Slower firing

- Use different sprites (I am Going to use one of the overused Alpha rifle sprite sets)

Or would it be better to just not bother?

Share this post


Link to post

-You can't increase the damage of hitscan attacks in WhackEd unfortunately: you could layer firing frames on top of one another, but that'd have the adverse effect of using more ammo per shot.

-Not really sure what you can do about accuracy.

-If you want the weapon to fire slower then go into the Frames table and alter the time on the firing frames so the gun takes longer to fire.

-Replacing sprites is relatively simple: copy the sprites you want to use into the wad and rename them after the pistol sprites: PISG## for the gun and PISF## for the muzzleflash.

Hope that helps. Oh, and download WhackEd4 when you can, it's a new and improved version.

Share this post


Link to post
mrthejoshmon said:

Or would it be better to just not bother?

No, it wouldn't, the pistol sucks as-is and DEHACKED/BEX editing can be interesting. :P

I will assume that your project is going to be for -complevel 9, otherwise you wouldn't use BEX and some vanilla tricks would become more tricky to make (but not impossible).

-Replacing sprites: Find some suitable rifle sprites, put them in your wad and rename them to PISGA0, PISGB0 etc. Unlike vanilla, Boom ports support sprite replacements directly. Feel free to use as many sprites (letters) as you want, you don't need to be limited just because the original pistol had 5 sprites.

-Slower firing: Open "State editor" in Whacked. Find out states 13 to 17 - these states define pistol's firing animation by default. But now, you're the creator! Do whatever you want with them. Feel free to change state durations, sprites themselves, brightness, actions etc., you can even lead the animation to whatever other states you want (via changing "Next state"). You can check "Weapon editor" for reference, to see what's the number of first animation frame of Pistol's firing, reloading animation etc., and change them too!

-More accurate: Aim randomization factor is constant and cannot be altered via DEHACKED or BEX. However, there is a nice vanilla-compatible trick to make a perfectly accurate hitscan weapon. Just don't call Refire action during the weapon's firing. Change it to NULL. The weapon's aim will never be randomized, then. Like the "pistol/chaingun tapping" technique without actually having to tap. ;)

-More powerful: Again, hitscan damage is constant and cannot be altered. But you can stack multiple firing actions into one firing animation. FirePistol fires a bullet. Put 2 FirePistol actions right behind each other, with a duration of 0 between them. Beware of side effects, though. Firstly, the weapon will consume 2 ammo units per shot now. Secondly, if the player had 1 ammo, it would go below 0. To prevent that, put an additional CheckReload action between the weapon firing actions. ;)

This should be enough to help you. But since you're apparently a beginner, I'm not sure if you get what I say right now. Just go to Whacked and experiment with it. I can provide you further help if needed. :)

Share this post


Link to post

That helped me out in extreme ammounts, the rifle works perfectly!

100% accurate and slower firing, I'm thinking about upping the bullet count to 300 (Backpack 600) to compensate for the extra bullets used by it (probably smarter to put it up to 275 or 250, having clips give you 10 or 20 bullets as well).

I am also going to mess around with the regular weapons a bit, see if I can't do these following things and see how they play with the difficulty:

    - Slower rockets with more power (If it can be done, if so I can also see what I can do about increased blast radius and put max rockets down to 25/50 with backpack)

    - regular pump shotgun fires half the shells the SSG does for an attempt at balance.

    - faster chaingun (Possibly using alpha SMG? Don't know about how odd the chaingunners will look though)

    - BFG costs less to use (20 cell) but max cells half damn it.


I'm also going to use it to do some monster changes:
    - Arachnotron: Lower pain state and speed up weapon firing but at the cost of slightly lower health.

    - Faster Barron and Knight projectiles (if possible)

    - Weaker SS guards but increased speed

    - Weaker Revenant projectiles but more of a heavy hitter with the punches

    - Demons with less health but are much faster (And hopefully actually a threat with that increased speed)

    - Possibly going to decrease lost soul health to 1 shotgun blast


Hopefully I can figure out this Dehacked stuff and make some awesome things with it.

...and again thanks for the help :)

Share this post


Link to post

Let's see...

-Speed, damage and ammo capacity can be altered, but not blast radius. Use the Things table to alter the Speed and damage and the Weapons table to alter the ammo. Remember though, the Cyberdemon uses the exact same rockets.

-You can't alter the amount of ammo the SSG uses.

-Same as the pistol: just alter the duration of the firing frames, only make the numbers smaller instead of bigger.

-You can alter the amount of ammo the BFG uses in the Misc table but I don't know what you mean by "max cells hard".

-Alter the pain chance and health using the Things table and the firing duration using the Frames table.

-Alter speed using the Things table.

-Things table.

-You can alter the damage of the projectiles but not the melee attack.

-Things table.

-Also Things table.

Didn't know about the accuracy trick Scifista, thanks for that. Maybe it's because I screw around with monsters more than weapons. :P

Share this post


Link to post
Obsidian said:

Speed, damage and ammo capacity can be altered, but not blast radius.

Unless you're working with MBF. Unfortunately, MBF's variable explosion action uses thing's damage field for blast radius, which is very inconvenient.

Share this post


Link to post

I will get to those modifications and see how they effect the game.

Also cell amount half is what I meant to say, that was a hilarious mistake none the less.

Share this post


Link to post

Faster projectiles: Keep in mind that the maximum Speed you can give to a projectile is 35, it starts to glitch with higher speeds. Also keep in mind that projectile's Speed should preferably be lesser than projectile's perimeter (=2*Radius), otherwise the projectile might clip through thin walls, like the Mancubus's shot does.

Share this post


Link to post

I believe the Imp, Barron and Cacodemon fireball speeds are hardcoded in Vanilla Doom by code related to the Nightmare skill speed adjustments. In that you can change their speeds in their mobj defs, but the mentioned Nightmare skill code will overrule.

The BFG re-release appeared to miss that block of code though, perhaps as it is attached to the skill information, rather than the mobj defs or similar.

Share this post


Link to post
Vermil said:

I believe the Imp, Barron and Cacodemon fireball speeds are hardcoded in Vanilla Doom by code related to the Nightmare skill speed adjustments. In that you can change their speeds in their mobj defs, but the mentioned Nightmare skill code will overrule.

You can change their Speed to whatever value you want, and it will work on standard skill levels. Only when playing on NM or with -fast, the Speeds will always change to 20.

Share this post


Link to post

I've just checked the released source code (which as we all know wasn't the exact version of the code used in the game) and here is what is my understanding, is the overriding code from g_game.c (I know nothing about coding):

if (fastparm || (skill == sk_nightmare && gameskill != sk_nightmare) )
{
for (i=S_SARG_RUN1 ; i<=S_SARG_PAIN2 ; i++)
states[i].tics >>= 1;
mobjinfo[MT_BRUISERSHOT].speed = 20*FRACUNIT;
mobjinfo[MT_HEADSHOT].speed = 20*FRACUNIT;
mobjinfo[MT_TROOPSHOT].speed = 20*FRACUNIT;
}
else if (skill != sk_nightmare && gameskill == sk_nightmare)
{
for (i=S_SARG_RUN1 ; i<=S_SARG_PAIN2 ; i++)
states[i].tics <<= 1;
mobjinfo[MT_BRUISERSHOT].speed = 15*FRACUNIT;
mobjinfo[MT_HEADSHOT].speed = 10*FRACUNIT;
mobjinfo[MT_TROOPSHOT].speed = 10*FRACUNIT;
}

Share this post


Link to post

IIRC, that's code that patches the mobj and state table when you change skill settings between nightmare and others. So dehacked values will get overridden if a player starts a nightmare game, and then start a normal game, but I think if the player start a normal game directly the dehacked values will survive.

Share this post


Link to post

Indeed you are right; though I wrote the Linux Doom source code above, I was describing an old bugged version of Doomsday's source code (it's been fixed in modern Dday) that accidently only wrote 'else' for the second part.

This meant that old Dday was incorrectly applying the second part to all skills below Nightmare.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×