 Okay, this video is part of a series I recommend watching in the previous video, especially the last one. We're kind of reviewing some stuff here, but working with the Video Game Doom and the first few videos we worked on, the source code, today we're looking at the WOD file which has a package which is all the graphics and sounds and all that stuff. And last video, hopefully this one's better than that. That was kind of late in the day. I was a little tired. Hopefully we do better with this one. To kind of review, I'm just going to go over some issues you might come across when you're working with this. So I'm going to go kind of fast, but it's mostly review. First thing I'm going to do is I'm going to extract my Doom file, whatever Doom WOD file you have. So you're using do-text, which you should have installed. In the last video, I'm saying dash-doom, because it's not Doom 2, it's Doom 1 WOD, and I'm telling it where the WOD is, and I'm telling it to extract it. So now if we look at this in the file manager, you can see we have a bunch of folders here containing images and sounds and level data data. And you can also see that we have a log file here and a WOD info file, which I talked about a little bit in the last video. We're going to look at that again this video. But the next thing I'm going to do is I'm going to use the find command, and I'm going to find it with this, and we want to edit a sky texture, which I know is called sky. So I'm going to find and look at all the files in the subfolders here for anyone that has the word sky in it, and right here we can see under the patches folder we have one called sky1. So what I'm going to do is I'm going to open up GIMP with that, which is image editing software. And here we have the sky texture from the first couple levels of Doom. And what I'm going to do here is I'm just going to make some changes to it so we can quickly see some changes. So I'm going to say colorize, colors, colorize, hues, and then I'm going to make it kind of a red color saturation up, and probably turn up the contrast a little bit. There we go. So I can hit control E or go to file export, and I'm just going to overwrite the file that already exists. Yes, overwrite, raw when it asks. Come back in here now. What I can do is I can say do text dash make, and I'll call my wad file wad1. I'll hit enter. It packages everything we extracted out from the original wad file into a new wad file. And again there's iwad files and then regular wad files, which like the one we're creating now is supposed to be an add-on to the original wad file. So what I'm going to do next is I'm going to run that. I'm going to run PR boom, that's the version of Doom we're running, tell it which iwad we're using. So Doom 1, and again this particular wad we just created could be its own iwad at this point. And then file and what wad file we want to run. So go in here, and now if I run over to the window instead of gray mountains we have red mountains, same if I go over it this way. So we know that changing those work, changing that file. Let's do something else. I'm going to use gimp again and I've already downloaded a sky texture. So here's our sky texture and you know it's a much larger resolution than the original sky texture. The original sky texture is 256 by 128. This one is over 3000 by 1800. So why don't we just try to overwrite the file and we'll get a higher resolution sky texture. So I'm going to say export as and I'm going to go to where the file is which is under patches and it's called sky 1. So there it is. I'm going to say export, replace, raw, export when it asks. And what I'm going to do now is I'm going to again tell well first we have to remove it won't override a wad file that exists so I'll just delete the one we just created and then I'll say do text, make one wad and it's going to try here you see it's making patches take a while because this file is this one image file is probably larger than the original dune wad but here we get an error that's saying that the pictures height and that's the one that we're working with says the name right there is greater than 509 okay. So the textures can't be higher than 509 at least not this texture. So let's just go back in our image here and we'll say scale image we'll go to height and we'll say 509 scale control e to export and again we'll try to make our wad. Hey it made it so let's go ahead and run PR boom and load up that wad we just created and if I go here well it changed the image but we have a couple of issues one as you can see it's not blue it's actually kind of gray all gray and white and there's definitely a seam in image let's work on the color portion well yeah let's work on the color portion of that now let's work on the seam first sorry need to make up my mind well one thing you might try is you might go well GIMP has a seamless feature built in we'll go filters and we'll go to map and we'll go to make seamless and it just kind of just copied and pasted some stuff and made the image seamless so I'll control e to export that again we'll remove the wad file that we've created and then we'll recreate it repack everything no errors so now we will run PR boom and load up that wad file and let's see well definitely changed it it's not as drastic of a seam but there's still a seam there the reason for that is that the doom wad file has if I go back into our file manager here you'll see there's a folder called textures you might think that the image textures are in there but when we go in there there's just actually two text files and if you look in here it's just a text file that lists textures and then what they're made of and it also has the offsets for them and heights and widths so theoretically you can go in here and adjust that image to be the new resolution I have not tried that but theoretically it should work but what I'm just going to do because it's not going to really make a difference in the quality of the image because the sky texture such a low quality anyway is I'm going to copy our sky texture and just paste it over the sky texture we have I can then resize it if I want like so I'm going to purposely leave some of the texture outside the bounds of the box and what I'm going to do next so we're scaling it down right now it's back the image if we save it will be 256 by 128 but it's not seamless anymore because there are image portions that are outside of this so what I'm going to do is I'm going to go to layer and I'm going to go layer to image scale and that just trims off all the excess now I can go filter and I can go map seamless control e to export that and if we go back into our shell here we can again remove our wad repackage our wad and run our wad and if we go here there we go we have a seamless texture now so it's seamless but we still have the issue of the colors and the problem here is just Doom doesn't have the range of colors that are in this image and they're so close they're kind of just being all merged together so there's a few ways to fix this but a quick and dirty way to do it is going to contrast here and just turn up the contrast a little bit control e to export that and again now we'll remove repack and run our wad and if we go over here we now have a blue sky looks kind of horrible but that's just the image I'm using you can touch it up a little bit but there's how to fix those seamless issues and the coloring issues if your images come up all gray at least one way of fixing that issue okay so another issue we have again if I list this out you can see our wad file here is 12 megabytes and all we did was change one image and as I mentioned in the last tutorial we have this wad info text and if we open that up you can see that it's a text file that lists the different categories and what files do text should repackage into the wad file now we could erase everything out and type this by hand but I've created a function that will take care of all of that for us so first thing I do is I'm going to go open up our file manager and I'm going to delete everything but patches and our do text log and our wad text our wad info text so I'll delete all that and if I go into patches and search for sky there's our sky file I'm going to delete everything but that sky file now if we go back here and we remove our wad one file which it looks like I already did if we oh right when we just delete everything I did it if we try to make the wad file it's going to give us an error saying their files missing because we have to update the the wad info text so again as I said I have a script that wrote check out the description in the video for the link for the notes and within that there's this wad pack function that I created we'll just copy and paste that into our shell and hit enter and now if I type in wad pack and hit enter you can see it outputs the folders the category and what file is available so all we have to do is redirect that into our wad info text so now if we cat out our wad info text you can see it's just that it's saying the category patches and skies so now when we make our wad and we list it out instead of being 12 megabytes it's only 35 kilobytes and we can now run our wad file just like we did before but without all the excess because all the graphics and stuff are still in the original iWad file again if you're gonna be changing every graphic sound and everything you'll be creating iWad files but if you're just making modifications for the original game you're gonna just create a wad file and you just want in there what you've changed in this case just our sky texture so I hope that all made sense there was a lot of info it went through it kind of fast but a lot of it's repeat and I hope you enjoy these tutorials next week I think we're gonna look at audio files so thanks for watching I hope that you have a great day