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

How to convince ZDooM to use more frames for barrel explosions

Recommended Posts

The animation for barrel explosions can be replaced by making new sprite entries and naming them BEXP?0 where ? is a letter from A-E (since the original barrel explosion has 5 frames). Simply adding extra frames and naming them appropriately (e.g. BEXPF0) doesn't work, these frames are ignored. DeHackEd only seems to specify the starting frame (BEXPA), but not the number of frames.

Is it possible to use more frames? How? Also, is it possible to change the speed of the animation?

Share this post


Link to post

Hey there, try my site for the info you need.

http://www.btinternet.com/~Enjay001/

There are quite a few dehacked tutorials there, and in the "Doom general" section there is actually a discussion on how to extend sprite ranges both to add frames on to the end of an existing sequence and how to increase or limit the number of angles a frame needs to be drawn from.

However, to answer your question. Zdoom (or any other port AFAIK) will not extend the barrel animation just because you add appropriately named frames. You CAN add frames or sprites to the sequence just as you suggest, and they can then be used by doom, but they also need to be allocated to frames in the doom frame table before they will be used (which is where dehacked comes in). Ports like EDGE could do this via their internal scripting, but I'm not the one to ask about that.

But for your barrel, yes you can create extra graphics and name them as you suggested. Do not leave gaps in the name sequence (eg don’t skip from BEXPF0 to BEXPZ0). Find some extra/unused frames in the doom frame table. The Pain elemental has some never used respawn frames (never used because the archvile should not ressurect him). They start at frame 720. If you make the last frame of the barrel explosion have a "next frame" of 720, it will skip to that frame. You can use dehacked to make frame 720 onwards use your new graphics just by entering the appropriate sprite number. The BEXP.. series is sprite 58. You then enter the correct sprite sub number for your added graphics. Sprite sub numbers start at 0 for sprite A, 1 for B, 2 for C…

That is very brief. It is explained more fully on my site, or give me an e-mail if you want something specific done/explained, I'll try and help out. And that is of course not even slightly related to me asking if you have made any progress on adding support for graphic extraction from the Alien Trilogy game to XWE. ;-)


Edit:

Oh yeah, it is probably worth adding that DEHACKED will not "see" your additional graphics because they are not in the IWAD. If you type in the sprite numbers, however, you will see that DEHACKED does put the correct sprite names into the frame table. So long as you load your WAD and DEH patch, Zdoom (and other ports) will use your new graphics. If I am doing a lot of stuff like this, I create a temporary IWAD with all my additional stuff in it, and then point DEHACKED at it in the ini file so that the new graphics show up in DEHACKED.

Share this post


Link to post

Hi Enjay,

Thanks for the reply. First of all, partial AT support has been added to XWE more than a month ago. The 'easy' stuff can be viewed (intro screens etc). Unfortunately the good stuff (sprites) is not yet done, it's in some compressed format, I have no idea what to do with it. At least XWE displays them as hexdump.

I haven't updated XWE since last December, since no-one seemed to care about it. That is until recently, now I'm getting some emails again. By now, XWE supports ZDooM maps, plus the level editor actually works (sucks though). Maybe I will release an update in the coming weeks. XWE is also one year old :-) Wow... (92 posts in a year?!)

After Fredrik's suggestion, I found your site, so I visited the link already. I also figured out the sprites and the 'chain'. What you described above is really helpful, I'm sure now I can get this thing working. Thanks again.

Share this post


Link to post

Is it possible to use more frames? How? Also, is it possible to change the speed of the animation?


Yes, that's possible even in vanilla Doom... and you don't even have to sacrifice existing frames for that. Go to our tutorials section and find the Doomworld Editing Tutorials. In the regular doom section you find a chapter on "sprites/flats", which contains the information you seek.

Share this post


Link to post

Hi Mordeth,

Thanks for the suggestion. I have found the page you mentioned ( http://www.doomworld.com/tutorials/fx2.shtml ), but I can't say I fully understand what the trick is.

All my barrel explosion frames are already between SS_START and S_END markers. They are all named BEXP?0. I did get it to work, here's my DeHackEd Entry:
__________

Frame 808 # --- Make barrel frames duration 3 tics
Duration = 3

Frame 809
Duration = 3

Frame 810
Duration = 3

Frame 811
Duration = 3

Frame 812
Duration = 3
Next frame = 720 # --- point to Pain Elemental respawn

Frame 720
Sprite number = 58 # = BEXP sprite
Sprite subnumber = 32773 # --- $8000 + 5
Duration = 3

Frame 721
Sprite number = 58
Sprite subnumber = 32774
Duration = 3

Frame 722
Sprite number = 58
Sprite subnumber = 32775
Duration = 3

Frame 723
Sprite number = 58
Sprite subnumber = 32776
Duration = 3

Frame 724
Sprite number = 58
Sprite subnumber = 32777
Duration = 3

Frame 725
Sprite number = 58
Sprite subnumber = 32778
Duration = 3
Next frame = 0 # --- stop animation

__________

Could explain in a bit more detail how to achieve the same thing without re-using extra frames? Thanks.

Share this post


Link to post

Well, that's certainly how I would have done it. I too am intrigued to find out how you can add more sprite animation frames without using up frames from elsewhere. I couldn't see anything in the editing reference that covered that.

I understand the sprite renaming thing, but it is perhaps worth pointing out that the area of dehacked support that some ports are weak on is text replacement, which includes sprite renaming.

Additional stuff re the above patch:

I take it you have noticed the sprite sub numbers are not as you entered them. This is because you have put them in as bright sprites. In dehacked this is a simple matter of checking a box, but what it does in the background is add 32768 to the sprite sub number. This means doom will draw the sprite at full brightness.

As a safety precaution, I usually add this near the start of my patch:

Thing 23 (Pain Elemental)
Respawn frame = 0

to make doubly sure the pain elemental does not respawn.

Apparently if a pain elemental gets caught under a door as it dies, but before the body goes, a blood pool can be left which may be resurrected by an archvile. This really shouldn't happen, but can apparently lead to the very rare occurrence of a Pain Elemental ghost. Never seen it myself, and I believe some ports have made this impossible anyway, but I usually stick the line in to be sure. I guess in this case all it would mean is the archvile would temporarily create the tail end of an extended barrel explosion if the rare scenario above actually happened.

Share this post


Link to post

I can't say I fully understand what the trick is. (...) They are all named BEXP?0. (...)
Could explain in a bit more detail how to achieve the same thing without re-using extra frames?


Well, the trick is to -rename- the frame entries. Fire up Dehacked and change the text (F7, scroll down) from BEXP to eg. BLAM. Now you can make frames from BLAMA1 all the way up to BLAMZ8. Of course, you'll need to name your new frames BLAM* too.

Share this post


Link to post

Surely that would just make doom ignore BEXP.. and use BLAM.. instead. Whilst that does mean you wouldn't have to replace any of the original doom graphics, the effect is much the same as doom would ignore the originals, and use the BLAM.. series instead (assuming the port used properly supported sprite renaming - and some do not). What it wouldn't do (as far as I can tell) is make the explosion any longer until you found some actual frames in the frame table to use any extra graphics you have included. Which is what I think Loser wanted.

At the moment, the barrel explosion is 5 frames long. Frames 808, 809, 810, 811 and 812 use the sprites BEXPA-E. Replacing BEXP with BLAM in dehacked would mean that those frames used BLAMA-E, but the explosion would still only be 5 frames long. To make it longer you would surely have to find extra frames in the frame table (such as suggested above) to use any new graphics (be they BEXPF... or BLAMF...)

Perhaps we are trying to answer slightly different parts of the question, or perhaps I have misunderstood something?

Share this post


Link to post

I think theres another way with dehacked though. But it is confusing and you must do it manualy (i dont think i spelled this right). Go into DHE and find out what the last frame is...sum 1000 sumthing i think. Now when you save the edited patch, open it with da text editor. Go to the LAST frame of the BARREL and set its next frame to wut ever is 1 frame number larger the the last framed in Doom/Doom2. Name those frames BEXF,G,H, etc. Than now the confusing part (even more than this post). Editing the code pointers. Set all the codes to "0" or "null" for the extra barrel frames.

I think this works because i was able to add a completely new monster into my wad. I think S.T.R.A.I.N. TC did this too.

Well give it a try. Tell me ifit works.

Share this post


Link to post

Some clarification here ...

I think that it's important here to distinguish between frames, and the sprites that the frames show.

Each frame in the frame table contains information about actions that the Doom engine must perform. This covers things like the sprite to display, the brightness of the sprite, the duration of the frame, what code pointer (if any) to run, and the next frame to move to.
You can't actually re-name a frame. The engine only identifies frames by the frame number. You CAN re-name a sprite.

The Doomworld Editing Tutorial mentioned above does not, in fact, deal with adding new frames to the frame table. Instead, it discusses adding new sprites, and replacing some of the old id sprites that got mirrored with new ones which don't need mirroring.

(To clarify, here's an example. The standard trooper only has five frames for each non-death action: front, back, and three for side-on views. These side-on views are mirrored by the engine for when the trooper faces right and the sprite faces left. In contrast, the Cyberdemon has eight frames for each action, because it is highly as-symmetrical, and mirroring the sprites would look pretty bad. This was a space-saving decision back in 1993, when hard-disk real-estate was more expensive than now.)

It also discusses changing the walking sequences for some enemies that had, say, six walking frames, so that they now require four or eight.

As far as S.T.R.A.I.N. is concerned, after reading through the .deh file, I can't find any reference to a frame number beyond the standard DoomII numbers.

So, what does it mean? It means that no, there's no way to use frame numbers above 967 or so. Doom, DoomII and the various source ports simply won't play ball. You must take frames away from something else, instead.

Share this post


Link to post

That's what I thought.

I figured there may be some confusion in terminology, which I may or may not have contributed to.

As I was trying to say above, adding extra sprites is easy, just use the naming convention and add them to the end of an existing series, or as Mordeth suggested, use DEH to rename a sprite series and add the entire new name series right from the beginning.

Finding frames to display any extra sprites is still necessary, and will involve finding, or "pinching" frames from elsewhere.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×