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

Weapon Sprites

Recommended Posts

I'm trying to use custom graphics for weapons.

I put my sprite between SS_START and SS_END.

I called it HRWAA0.

I have a custom weapon that works fine using the default doom weapon graphics.

Once I try to make it use HRWA A 0 the game crashes. I'm running GZDoom in Opengl.

Share this post


Link to post

You should select Sprite type in XWE(It's over the status bar at bottom), and then add sprites. It added these graphics as graphics file, not sprite.

Share this post


Link to post

When you place them between SS_START and SS_END it automatically makes them sprites. Also, they have the sprite icon and type 33.

Regardless, when I click the sprite tab they show up in there.

Share this post


Link to post

From your description, it is in the WAD correctly and your weapon code seems to work with default graphics, so perhaps there is something unusual about the new graphic itself? What format is it in? Is it unusual in any way? Are you able to upload it anywhere for people to check?

Share this post


Link to post

I've changed what sprite to in DECORATE to these ones from IWAD and... it still crashes! It's a problem with weapon, not sprites.

Share this post


Link to post

I think both the fire state having 0 duration and the refire being first might be the problem. Changing the code to this worked:

Fire:
    HRWA A 0 ACS_ExecuteAlways(828, 0, 0, 0, 0)
    HRWA A 1 A_TakeInventory("Charge", 16)
    HRWA A 0 A_Refire
    goto Ready
Merely moving the refire pointer didn't work, nor did only giving a frame a duration >0. However, changing both to the code above avoided the crash. Whether this code suits your needs or not is another matter, but hopefully it's a starting point.

Share this post


Link to post

Also, you mentioned texture problems. I don't know if this helps or not but the texture verifier in DeePsea reported this:

** Checking 471 PNAMES to the all WADS loaded **

Pname=   HDSW2 Graphic lump for texture not found
Pname=    PPL1 Graphic lump for texture not found

** Use EXPORT tool to check ALL graphics **

Total Palette Pixels not used by any TEXTURE graphic = 12
168,192,195,196,197,208,249,250,251,252,253,255,


Total Texture lumps not found=2

== Checking 430 Textures ==

         256x512 patch0 pname HDSW2    not found
         256x512 (1 patches) not completely covered at 0
PPL1     64x128 patch0 pname PPL1     not found
PPL1     64x128 (1 patches) not completely covered at 0

*** 2 Textures not completely covered by patches ***


== Checking 430 Textures for duplicates ==

There are no duplicate TEXTURE names

== Checking 471 PNAMES for duplicates ==

There are no duplicate PNAMES names

Share this post


Link to post

Yay! triple post. :/

As for the missing textures that the map reports, these are no longer in your texture definitions so they should just be able to be changed to a valid texture using your map editor.

SD 00000 SideDef 0, normal        
SD 00000 texture RDDP01 not found        
SD 00009 SideDef 9, normal        
SD 00009 texture RDDP01 not found        
SD 00010 SideDef 10, normal        
SD 00010 texture RDDP01 not found        
SD 00011 SideDef 11, normal        
SD 00011 texture RDDP01 not found

Share this post


Link to post

Ya I wasn't having a problem with it in the editor, it was just kind of annoying that every time I loaded the map it told me the textures were missing. As for the code change, that doesn't make any sense to me because it worked fine with one graphic but not with another. I can't see how a duration would care which graphic I was using.

EDIT: Ok I see what is wrong now. I'm sorry but I thought I understood Decorate but apparently not. I see what you mean by the duration now. I had the numbers mixed up. Thanks.

BTW, the refire does go first because this weapon is charged into the ammo by holding down fire, then fires when fire is released.

Share this post


Link to post

Now I'm trying to use true color sprites for my weapons in GZDoom. The transparency doesn't work when I try to use the hi res version of my image. It works fine if I load it as a doom sprite. I'm using the correct cyan color in both and I even set the transparency using IRfanview.

How do I get transparency to work with Hi Res textures?

Share this post


Link to post

are you loading said texture as raw data (assuming that you are using XWE) ?

Share this post


Link to post
peoplethought said:

I'm using the correct cyan color in both and I even set the transparency using IRfanview.

Forgive me if I'm telling you something you already know here...

It's a common misconception that cyan=transparent in Doom. It doesn't. Doom graphics can have areas that are genuinely transparent - ie they have no colour. However, many other formats (eg BMP) do not have a transparency ability so an editing tool needs some way of marking areas that should be transparent when in Doom. Note, the Doom graphics format is not BMP. It is its own format.

Cyan is the colour used by many, but not all, editing tools to mark areas which will be converted to transparent when the graphic is changed to the Doom format. Equally, such tools will convert transparent areas on a Doom graphic when extracting them from a WAD to cyan when the graphic is saved as a BMP (etc). The reason for using cyan is primarily a historic one - the earliest tools used it, and because the colour cyan does not appear in the Doom palette at all. So you will never have an area that is meant to be cyan in game accidentally getting converted to transparent.

So, if you are using one of the common editing tools to import a BMP and convert it a Doom graphics, the convention is to use cyan. However, if you are using another format (eg PNG) and you do not want it to be converted to Doom format, you need to set transparency in the image itself using your image editing software. I'm not sure how to do this with irfanview because I don't use it, but I'm pretty sure I have seen people saying that it can be done.

Share this post


Link to post

With the wad editors I used, they didn't recognize any color as transparent, even if I set it in IRfanview. So what I had to do was actualy cut out the transparent areas in photoshop (so the checker pattern is showing through). Then I had to load it through SlumpEd. I was using XWE but I couldn't get it to load my images without converting them to what I assume was the doom palette. This sucked because I wanted them in true color. And I couldn't find any load RAW data feature that I've read so much about, so I just used SlumpEd.

Share this post


Link to post

I don't use XWE for those kind of operations, but I assume this is the function:



Maybe it's only available in the beta versions? (You can get them from the XWE page.)

Remember, if this project is for (G)Zdoom, you can use the zip file support and directory structure and not have to worry about WAD specific tools at all.

http://www.zdoom.org/wiki/Using_ZIPs_as_WAD_replacement

Share this post


Link to post

I am using HIRESTEX. Which is why I'm confused as to how I would use the zip method with this.

From the ZDoom wiki on Hi Res Textures:

"Hi-Res texture lumps must not be placed between TX markers. When using Zips the lumps must be in the patches/ folder"

From the ZDoom wiki on Zips:

"hires\ contains hi-res textures normally found between HI_START and HI_END"

So one thing says to put them in hires\ and another says to put them in patches\

And if I still have to define and remap every texture or sprite, then I'm not really seeing any advantage to using zips.

Share this post


Link to post

The only reason that I suggested using zips was because you were having difficulty importing the files in the format that you wanted them in. If you have that problem solved, it's pretty immaterial whether you use a ZIP or a WAD I'd say.

As for which way they are meant to be set up, I've only ever used hirestex to define new textures. I've not used it for sprites, though I know it can be done. Hopefully someone with a bit more experience in this area can weigh-in to the discussion.

Share this post


Link to post

I'm making a Hi Res monster and just for the walking animations I have to import 20 images, then import 20 dummy images, then define all the hi res ones and replace each dummy image with the high res one.

Share this post


Link to post

If the whole monster is hi-res, and to the same extent, could you not just scale the monster using its DECORATE code?

Share this post


Link to post

How would I do that. Isn't it required that sprites used in the Decorate for a monster be of the Doom Sprite type? If so, this means I can't have my images in true color, as it converts them to the doom palette.

EDIT: It appears that my High Res sprites are converted into the Doom palette through the remapping anyway. This doesn't happen with texture or weapon sprites though.

Share this post


Link to post

Sprites do not have to be the Doom type. For example, look at the ones used in KDiZD or many of the ones from Tormentors beastiary. Lots of them use PNGs. Paletted PNGs are common, but hi-color ones can also be used. To scale them, all you should need is to use a line like this in your decorate

scale 0.25

And every sprite for the monster should gat reduced to 1/4 its original size.

I don't know why yours are getting remapped to the Doom palette. That shouldn't happen in GZdoom in OpenGL mode so I'm still thinking that something is going wrong when they are being put into your WAD.

Share this post


Link to post

Ok I put all my PNGS between the sprite markers and they work fine, but even though they display in full color in SlumpEd, they show up as doom colors in game.

Share this post


Link to post

Is there somewhere you could put the file up for me to look at? (PM me if you don't want to make it public yet) Even if it's just a frame or two because I'm running out of ideas now. If you've tried the file I posted, you should see a 40K space marine standing there in hi-res full colour glory so why your sprites don't work, I don't know.

Share this post


Link to post

I downloaded your example and it worked. I tried to copy the exact same formula in my wad and it refuses to stay in true color.

http://www.sendspace.com/file/iapwjh

This monster is in a VERY rough state but you can see that in game his palette is a lot more limited then it appears in the WAD.

The monster is at the bottom of the Decorate.

Share this post


Link to post

Ummm... well I don't know what to tell you. As far as I can see, it seems to be working. I've extracted the graphics and looked at them in paint shop pro, I've resaved them, I've compared them side by side with my own saves and... it looks OK.

Here's a comparison screen shot (which, to be fair, doesn't show things as clearly as they are in game).

The one on the left is my own save of one of your graphics. Beside it is your original, completely unedited. According to Paint Shop Pro, these pictures have 23622 colours in them and they are certainly showing with more than 256 colours. As far as I can tell, they look identical in game. The third one along is a paletted png. According to PSP it has exactly 255 different colours. It looks reasonable but you can clearly see evidence of it not having such good colour definition as the first two. The last one, purely out of interest, is in the Doom graphics format and has been forced into the Doom palette. So, obviously, it really doesn't look as pretty.

So, am I missing something here? As far as I can tell, the graphic is showing in full colour on my machine. In game, it looks almost identical to what it does in my graphics editing program. Maybe it's just my eyes, but it looks OK to me.

Does the screenshot look like how you see it on your machine? Do you see more colours on your original source image?

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
×