 Okay, this video is the third in a series. Hopefully there's an annotation on the screen that we're bringing to the full playlist There's also a link in the description to notes on everything that we're doing. So just to review. I've Deleted the folder that we were working on just to start from scratch because we've made lots of change to the code But these are a few things you want to have GCC installed as well as these things and if you go to compile it And it says you're missing a library search your repositories for that library and install it But on my system these are all I had to install that doesn't mean that I didn't already have libraries installed from another project that it needed Also, you'll need a wad file the shareware wad file. Whoops The shareware wad file is in the repositories for Debian and Debian based systems and PR boom doesn't hurt to install the game from the Prosperities make sure it works first before we start going with the code. So once you have those things installed next you'll want to Download the source code. It's on source forge again. This is in the link in the description to the notes We'll untar that we'll move into the PR boom folder Next we'll do configure And it will configure it for my system and We will also type in make and the initial make takes a little longer than all the makes after that because it has a lot more to make So today once this is done Making our initial make we're gonna go in and we're gonna take we're gonna make a rapid-fire shotgun and so basically We're gonna make the shotgun shoot as fast as the Basically the Gatlin gun the machine gun so so be that fast, but with a spray of bullets instead of single bullet each time And the way we're going to do this is by modifying the animation frames that it uses so let's go ahead and I'm going to Figure the screen here again. I'm using Vim as my text editor use whatever text editor you prefer I just make sure it's not a word editor Or word processor you want it to be a text editor I'm using them. I'm jumping straight to line 129 of this file in our source folder called info dot see because that's where we need to be and right here This is this is all the animations for All our different weapons So you can see right here. We start with our shotgun. There's a little bit of a notes here It's you know the shotgun the shotgun moving up the shotgun moving down so what we want to do is is Modify some of these numbers so that it skips frames so Here we want to go to this line right here and We're going to change this so the these this column right here My cursor is on That's the delay how long each of those frames are up on the screen for So if we change those for most of these we're going to say 1 1 so higher the number the slower the animation So I've changed them all to that so now I can do that I can say make I Can go and run PR boom which would have been faster to type at this point there we go And I'm going to type in a cheat code IDK FA to get all my weapons. I'm going to bring up the shotgun Hope that's the double barrel. I want the single barrel And look how fast I'm shooting now. It's not quite as fast as a chain gun, but you can see it's quite a bit faster So let's go ahead and modify it a little bit more so let's go back into our source code here and And we're going to change a few more things. We're going to come down here to Let me check my notes because I don't have all this memorized but We want to change most of these Yes, oops I do that We're going to change this to Zero zero zero zero zero Zero zero zero zero let's go ahead and Make that if I did that properly and run that IDK FA three three There we go So we set those animation for all those frames to zero So basically it's just skipping over all the frames of it, you know, basically cocking the gun So that is modifying the shotgun into a Rapid fire shotgun Now you might say well, I'm going to run out of ammo really fast I mean I have max ammo right now because I did the ID IDK FA Cheat but you're still going to run out of ammo pretty fast So why don't we modify the code and change how much ammo we have or that we can get as well so Now I'm going to use Vim plus 84. It's jumped line 84 of the file inside our source folder called P int inter see and Right here We have our max ammo clips and how much the ammo clips are worth so, um, I Have to remember I want to say I have to remember the order of our ammo here But really why don't we just set them all to? nine hundred nine hundred So one of these in this little array here It's been probably in the store. This is probably your bullets for your pistol and your machine gun I'm gonna guess this is probably shotgun shells rockets and plasma And so let's go ahead and just save that make that run that Go into the game and now if I type in IDK FA you can see my ammo is nine hundred nine hundred nine hundred 98 and So now if I go to my shotgun here I'm good because I've got play ammo. I'd never have to let off the trigger So if you're going to increase the rate of your weapon, you might want to increase the rate of your Ammo or the amount of your ammo. Sorry. I'm I'm I love this game. I'm just getting sidetracked by the game So now that we Have created our own shotgun here Why don't we create some landmines? So let's go ahead and I'm going to use Vim and I'm going to jump to this line 2,129 inside info info.c and Here again inside this file is where all our items are are labeled Are defined and here you can see that rockets are defined so these are all the settings for rockets and As you can see right here. This is speed now. It's doing a math here frack unit Which is defined somewhere else, but basically if we set this number really low The item the rocket will move very slow now You might think I'll set that to zero and that will keep it in one place, but I've noticed well Let's just do that. Let's say it's a zero. So we're multiplying zero times where the frack unit is Let's go make and let's run doom IDK FA five rocket Look, so I'm placing these rockets, but you notice that they're not exploding Because I guess and I haven't looked at the code exactly for this but rockets Have to have some sort of movement for them or they won't explode So what we can do here is go back into our source code here instead of zero. We can set it to 0.1 You probably go even slower if you wanted so now that we've done that we compiled it We can go into the game type in my cheat code to get all my weapons bring up the rocket and I can shoot that So I can set basically little landmines So I can make up a little barricade so they are moving as You can see extremely slow, so it's kind of like placing landmines Luckily, I don't think your rockets hurt yourself unless someone else blows them up. They won't blow up when you touch them So I can place a whole lot there and just wait for him to come and boom so I can go I Know let's see. Let's go in here Drop that down drop that down And I'm going to just Say come and get me guys If they don't kill each other first, there we go So yeah, that's how you kind of can make landmines very they will they are moving But they're basically and once again, I did point zero you might be able to do a lower number may point zero zero I'm sorry. I did point one you could probably do point zero zero one and they might even move slower I haven't really tried that. I thought this was slow enough. So that's how you can make landmines Using your rocket launcher in doom by editing the source code to change their speed so Yeah, and you can probably do the same thing with a plasma rifle or a BFG although BFG would be kind of weird but you could do it on The other note, let's go back into our source code here and So 20 was what it was before let's say it's 50. I haven't tried this Let's see what happens. It's always fun just to change the the numeric values of variables and see what happens IDKFA now See, that's probably flying a little bit faster Let's make it a bigger number Let's set it to a hundred. So it should be twice that speed. We'll make that and We'll run that I do KFA IDKFA Yeah, I think it's moving faster so Let's just have fun. Let's set it really high. This could this could end badly Luckily, it's not a real rocket launcher. So make that Run that Again, I don't know what that frack number is. It's oh It's moving so fast now. I don't even see it. It's moving so fast that it's not even detecting when it's hitting some Well, I hit that guy back there But it's moving so fast. It's it's probably jumping such a distance with each frame that it's passing by people So yeah, the only reason I hit that guy is because it hit that wall there. So it's going so fast now I can't even see it. So I don't know you can create a game and say, oh, yeah This is a a weapon you have a magical weapon that you can make things explode off in the distance or something So yeah Changing numbers like that. So that's another option for customizing weapons. So I'm gonna stop there for this tutorial I hope that you're enjoying this series on modifying the source code of doom But hopefully it encourages you to look at the source code for other projects again It's fun If you ever just want to especially games go in if you find where variables are set changing the value of these variables can Kind of have fun effects Again the speed of pretty much everything in the game is defined by those frack units So if you go and change the value of that, you're gonna change the value of the speed of everything in the game which couldn't be Interesting So as always I thank you for watching. Please check out films by Chris calm. That's Chris with a K There's a link in the description. There's also a link in the description to my notes on this project So you can click on that you can see everything we did today As well as the previous weeks and there's a few other notes in there. Let's go ahead check that out Have fun. I hope that you're enjoying the series. I hope that you have a great day Okay, this is an introduction to Filmsbychris.com I'm Chris. That's Chris the K That's me right there my daughter ember and my wife Jennifer We pretty much live in the swamps of Florida I'm a firefighter by day as well as by night. We work long hours But that's not why you're here. You're here about the videos. I put up on YouTube These videos are mainly about computers and Programming which means most of my videos look something like this and If that's what you're interested in great If not, that's all right I do videos on other topics too such as video editing special effects photo editing 3d design and music creation If you are one of my viewers and you enjoy my videos my patreon page is a place where you can go to help support my videos So I asked that you take the time to go to my patreon page and look at different levels of rewards You can receive for different levels of backing There should be a link in the description of this video if you were watching it on YouTube Otherwise you can visit patreon.com forward slash metal x1000 and I thank you for your time and your support Have a great day