Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
GzStarWars

Trouble with Pistol and Code Pointers PRBOOM

Recommended Posts

For some reason if I use this DEH file:

Pointer 9 (Frame 14)
Codep Frame = 61


Missiles shoot out of the pistol like nothing.

On the other hand if I try to replace the Missile Code Pointer with the one for Plasma...

Pointer 9 (Frame 14)
Codep Frame = 77


The firing locks up and the pistol is covered with gfx from the shotgun. What's going on here and why? This makes no sence to me.

Share this post


Link to post

This is also what happens when you load such a patch with Doom2.exe and Dehacked.exe. So it is behaving "correctly".

Hopefully someone who knows more about dehacked than I do will be able to explain how you can avoid it doing this. But you might want to look in the dehacked documentation and in particular at the way the rapidfire BFG was made in suprwep8.deh (included in the dehacked package).

Share this post


Link to post

I'm guessing that's where it's supposed to randomly choose one of the two firing frames, but that it gets messed up because it's not using the plasma gun sprite (PLSF) for that. I believe the shotgun appears because it's the next sprite in the list. If you use choose frame (PLSFA) as the firing frame, it works.

So it seems that you can't have two (or more) weapons using plasma unless they use the same firing frames (PLSFA, that goes with PLSFB). One workaround would be to swap missile properties with the BFG blast or Rocket, and then use the plasma code for another (single) weapon.

Share this post


Link to post

The A_FirePlasma code pointer will set the flash states to the normal flash states + random offset between 0 and 1. The pistol only has one flash state, hence sometimes it goes beyond into the shotgun state.

I think DeHackEd files let you control the flashstate of a weapon, so you'll need to setup two identical frames somewhere, possibly using Boom's null sprite (TNT1). Setting the flash state to 0 will not work.

I don't know why the firing locks up.

Share this post


Link to post

Ah, I see now. The solution is to change the following frame into PISFB0, so that it selects it in the random sequence. You could do this to frame 18, or use other frames (by using some frame other than 17 as the Pistol's first firing frame). It's just that it needs the frame after the first firing frame (A) to be the next firing frame (B).

Share this post


Link to post

Ok, I think I can get it!
BTW, what is:


Boom's null sprite (TNT1)? Does BOOM have spare Sprites I can play with? I've read it has limited BEX support, but am not sure what it does for BOOM either.

Anyhow, thankx for the light!

Share this post


Link to post

The Plasma gun uses a flash pointer there, so maybe you would probably want to assign the same one to that second firing frame of your new weapon.

There are some spare frames (a sprite is a graphic thing in a map), such as an unused gray stalagmite and the Pain elemental respawn frames. There might be more but they aren't coming off the top of my head.

Share this post


Link to post

Boom has a built-in sprite TNT1A0 which is just nothing (invisible), it is used by some special things (kuje the point pusher/puller) that are not mean to be seen.

I'm not sure about extra frames, MBF has some for the DOG and some other things (grenade, mushroom), and I think PrBoom includes them but they are not in the original BOOM (v2.02).

Share this post


Link to post
myk said:

The Plasma gun uses a flash pointer there, so maybe you would probably want to assign the same one to that second firing frame of your new weapon.

There are some spare frames (a sprite is a graphic thing in a map), such as an unused gray stalagmite and the Pain elemental respawn frames. There might be more but they aren't coming off the top of my head.


In addition to 887 (the stalagmite) and 720-725 (pain elemental respawning), there is also frames 892 and 893, which depict the player gibbing. Funny, I pulled those numbers off the top of my head and I was correct. :P

Also, regarding the plasma rifle and it's muzzle flash, I jotted down some notes many months ago after I figured out how to get around the problem:

"Plasma muzzle flash randomization is affected by the codepointer of the frame that follows the frame referenced by the muzzle flash state parameter. To disable the random frame selection on the plasma rifle, for example, set the first frame in the state so that it goes to frame 1, and then set the codepointer to something other than "Light2".

It does not matter what frame you set the muzzle flash to nor how frames the state will cycle through. It will also look at the frame following the first, and look at what codepointer is set."

Good luck making sense of it though, I write stuff down like this when I'm trying out new things, and I'm only concerned about how I understand it. I'd have to go back and try experimenting with it some more before I could give you a straightforward explanation. :P

Might be a little irrelevant for what you're trying to do, but at least I said something about it...

Share this post


Link to post

GzStarWars said:
What is MBF again?

It's like Boom plus an extra bark or two.

Share this post


Link to post

MBF was Lee Killough's project immediately after leaving the Boom team. He initially started it as "Beta Doom", a project to emulate the DOOM Alphas and Betas, but that eventually largely gave way to continuing some work that was unfinished in Boom and adding quirky features that he wanted, such as the dogs (along with their awesome friendly AI).

Ports based on MBF include JDP, Fusion, and SMMU. PrBoom and Eternity both include near-100% MBF compatibility (Eternity lacks only the Doom alpha emulation mode, having been based on SMMU).

Share this post


Link to post

Ok, I've read the docs but still have no idea how to activate this or put a MBR in my own game. Got any info on this per chance or am I over looking something?

Share this post


Link to post

If you use Doom Builder, the new MBF line type (sky transfer) is already in the Boom CFG (though it shouldn't be), and you need to add the Dog among the things. The BEX stuff goes into your DEHACKED lump. The "mobj flags" may be confusing you since Lee Killough is using source code terminology instead of DeHackEd terms, and are part of that BEX stuff ("thing bit values"). I have the impression that OPTIONS is not supported by PrBoom (though it should be since it's critical in keeping the many options under a certain consistency while playing an addon).

There's also Quasar's WinMBF port, if you want to support MBF features fully.

Share this post


Link to post

Still not sure how to create a Friend for the game though, I know it required Bex and that there are spare sprites for use in the PrBOOM wad, but the docs didn't seem to have detailed instructions on how to even put the dog together, also the Sprite for the friend does not seem to be a DOOM Builder option.

Share this post


Link to post

You just have to specify the (total) bit value for a thing, or the equivalent BEX tags (that are easier to read and edit). See BOOMDEH.TXT, where it's explained at the beginning.

The Dog uses the same DeHackEd format as any other thing, but takes thing number 140 and ID 888 by default.

Share this post


Link to post

BOOMDEH.TXT can be found in the Boom engine package.

Share this post


Link to post

BTW, EE's docs are based on the BOOM docs and so they're still relevant to general BOOM editing, as long as you take heed of the various notices within them that indicate what features are specific to or have changed in BOOM, MBF, SMMU, or EE :)

They're also handier because I've converted them to HTML :P

Share this post


Link to post

PrBOOM is a lot cooler than I imagined! It's too bad the port of PrBOOM for the Nitendo DS has a lot of un-adressed issues which prevent my TC from working 100% correctly. :(

Share this post


Link to post

Well I figured out how to make enemies into Friends, but when trying to manifest Thing 140, I failed.

Here is the Friend bit of my DehackED/Bex code.

#Friend
Thing 140 (Friend)
Initial frame = 726
Hit points = 700
First moving frame = 728
Alert sound = 101
Injury frame = 742
Pain chance = 170
Pain sound = 27
Far attack frame = 736
Death frame = 744
Exploding frame = 749
Death sound = 102
Speed = 8
Width = 1310720
Height = 3670016
Action sound = 75
Bits = SOLID + FRIEND | SHOOTABLE
Respawn frame = 758

Share this post


Link to post

Are you using 888 in Doom Builder (or whatever level editor), to place it in the level?

Share this post


Link to post

No I had to use 140, guess I'll go change my DOOM Builder config again. Thankx again! :)

I see that if you don't assign it any special values in the DEH file that the dog automatically appears!

-EDIT-

Speaking of Man's Best Friend. Does anyone have a BEX or DEH lay out of his configuration? What I'd like to do is change his sprites to a Rebel Soldier. Then duplicate him with the spare gory decorations left over from DOOM and assign each of them an original voice by dividing up the left over sounds from DOOM.


Also how would I get the Friend to drop an item?

Share this post


Link to post

GzStarWars said:
Does anyone have a BEX or DEH lay out of his configuration? What I'd like to do is change his sprites to a Rebel Soldier.

I never tried but I'm guessing a lot of the stuff that would appear in DeHackEd's thing editor (F2) should be easy to assign. The only thing I've no idea about is the frames. It's not clear whether the dog's frames can be rearranged or its code pointers changed, since there are no frame numbers for it.

Also how would I get the Friend to drop an item?

To make a thing drop another, you use the A_Spawn pointer on a frame. See MBFEDIT.TXT's "DEH/BEX Code Pointers" section.

Share this post


Link to post

I don't understand how to make A_Spawn work (can you show me an example), so I took a slight diversion...


--------

Patch File for DeHackEd v3.0
# Created with WhackEd2 0.60 build 214

# General version information
Doom version = 21
Patch format = 6

# Info for WhackEd2
Engine config = boom.cfg
IWAD = c:\arcade\doom\dev\xwe\doom2.wad


Thing 34 (Rocket in flight)
Hit points = 100
Bits = SHOOTABLE + BOUNCES + MISSILE


---

This is a grenade that will explode upon hitting a wall or enemy. I would like it to bounce off walls, so to do so I must remove the MISSILE option and replace it with TOUCHY so that the grenade still explodes upon contact. Only problem is that it has to come to a full stop and the enemy has to walk into it like a mine. Is there a way to still make it bounce off walls, yet explode when it hits an enemy?

Share this post


Link to post

Look in the USAGE part of CODE PINTERS in BOOMDEH.TXT, you'll see it tells you how to add pointer mnemonics, that is use the names or tags instead of numbers like DeHackEd does.

I'm no expert at using the bouncy pointer so someone else (or experimentation) will have to help there.

Also, maybe by looking at the frames list in MBF's source it might be possible to edit dog frames, but I'm just guessing, since I'm not familiar with exactly how DeHackEd stuff was implemented in Boom engines in this respect. I mean, look at the list and determine what "frame number" would correspond to each of the dog frames.

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
Sign in to follow this  
×