peoplethought Posted September 12, 2008 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. 0 Share this post Link to post
TomoAlien Posted September 12, 2008 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. 0 Share this post Link to post
peoplethought Posted September 12, 2008 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. 0 Share this post Link to post
Enjay Posted September 12, 2008 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? 0 Share this post Link to post
peoplethought Posted September 12, 2008 I exported the chainsaw graphic from doom2.wad and reimported it as a custom graphic and even that causes a crash. The graphic is a BMP. http://www.sendspace.com/file/ix84uk Crashes right when you fire Also I have missing textures because I can't figure out how to clear them from the texture list. 0 Share this post Link to post
TomoAlien Posted September 12, 2008 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. 0 Share this post Link to post
peoplethought Posted September 12, 2008 Ok, I don't have a problem with that. If I just use the rock launcher MISG textures it doesn't crash. You're using GZDOOM right? 0 Share this post Link to post
Enjay Posted September 12, 2008 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 ReadyMerely 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. 0 Share this post Link to post
Enjay Posted September 12, 2008 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 0 Share this post Link to post
Enjay Posted September 12, 2008 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 0 Share this post Link to post
peoplethought Posted September 12, 2008 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. 0 Share this post Link to post
peoplethought Posted September 13, 2008 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? 0 Share this post Link to post
Patrick Posted September 13, 2008 are you loading said texture as raw data (assuming that you are using XWE) ? 0 Share this post Link to post
Enjay Posted September 13, 2008 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. 0 Share this post Link to post
peoplethought Posted September 14, 2008 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. 0 Share this post Link to post
Enjay Posted September 14, 2008 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 0 Share this post Link to post
peoplethought Posted September 14, 2008 How would I use hi res textures using a zip? Put them in the hi res directory, then what? 0 Share this post Link to post
Enjay Posted September 14, 2008 Well, traditionally, people have used hires tex to map them to graphics of the correct size and offset (ie non-hi-res ones) but I got the impression from a recent post by Graf that method may now be superceeded. http://forum.zdoom.org/viewtopic.php?f=3&t=19025&p=370465#p370465 0 Share this post Link to post
peoplethought Posted September 14, 2008 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. 0 Share this post Link to post
Enjay Posted September 14, 2008 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. 0 Share this post Link to post
peoplethought Posted September 14, 2008 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. 0 Share this post Link to post
Enjay Posted September 14, 2008 If the whole monster is hi-res, and to the same extent, could you not just scale the monster using its DECORATE code? 0 Share this post Link to post
peoplethought Posted September 14, 2008 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. 0 Share this post Link to post
Enjay Posted September 14, 2008 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. 0 Share this post Link to post
Enjay Posted September 14, 2008 By way of a proof of concept, I just threw this together very quickly. http://www.zshare.net/download/18779485882c3e83/ Load up the file and type "summon 40k" at the console. 0 Share this post Link to post
peoplethought Posted September 15, 2008 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. 0 Share this post Link to post
Enjay Posted September 15, 2008 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. 0 Share this post Link to post
peoplethought Posted September 15, 2008 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. 0 Share this post Link to post
Enjay Posted September 16, 2008 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? 0 Share this post Link to post
peoplethought Posted September 16, 2008 I had the Texture Format setting (Under OpenGL settings) set to the wrong thing. What a massive waste of time that was. Thanks for helping me. 0 Share this post Link to post