Risk of Rain 2 Mod Development Tutorial - Basic Setup

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
good evening everyone this is deerslayer here and i'm going to be giving you a short tutorial on how to set up a project for creating a basic mod for risk of rain too there are a few things that i'm going to go over in this video it's going to be a little bit longer i'm going to try to do my best to go into depth on some of these things but i want to preface this video by saying that i am in no way an expert i myself am still learning how to write mods i'm learning as i go along and i'm just hoping to pass the knowledge that i've learned to this point on to you guys to make access to modding more available and easier to come by so one of the first things i'm going to talk about is the risk of thunder wiki which you can see i have a tab for here and i will also have a link to in the description now i will admit that a lot of information on this wiki is it's still a little out of date it hasn't been updated largely for the anniversary update that happened in march and it's certainly not updated for the patch that happened a couple days ago that being said it's still a very good tool to use because it does give you some basis like these little areas here will give you some basic idea of what you're doing and how to set up some stuff it's really good reference material particularly down here where you have references that tell you some things that you can look at particularly the resource paths these are the item and equipment ids scene names and style reference sheet are going to be incredibly useful for while you're setting up your mods and trying to get things to display correctly all right now that we have that out of the way we're going to move on to talking about some of the things that you're going to need for this so one thing you're going to need is visual studio you're going to need visual studio community right here and you're going to need to have that set up for dot and you're also going to need the net sdk to go along with that because this is we're going to be using net programming here and you're going to need i believe it is this dot net core 2.0 here yeah so you're gonna need the sdk for 2019 and it's gonna have to be whichever version you have if your computer if your operating system runs on 64-bit you need the buy 64. if you if you run on a 32-bit you need the i-86 sdk again you're going to want a visual studio 2019 make sure that you have net fully installed and visual studio fully installed i already have these so i'm not going to download them again but i want to make sure you guys can see where you need to get your references all right next thing we're going to go over a unity now i don't have i don't have a link to this on a browser because it's a very old version of unity and but i do have a download link directly to it the version that you're going to need is the 2018.4.16 version and it can be found on the unity web page under the archive downloads again i already have this set up you can see it right here so i'm not going to download it again but this link will take you directly to downloading the the dot exe that you need in order to set it up all right one other thing that we're going to be using for the purpose of these videos is this mod template that i'm working on now we're actually going to be using the beta branch because this is the branch i'm actively developing and this is what's going to have most of what we need on it now this i can actually give you a very in-depth explanation of because you know i am the one writing this template as you can see i've had updates as little as two days ago and currently i only have support for achievements and items but as time goes on i'm going to continue working on adding newer newer things to it and hopefully we'll have this as generic as possible for making a basic mod now this isn't going to cover everything this is mostly just going to cover things that are the most common items survivors skills those kinds of things i'm not looking to cover the more abstract aspects of the game such as interactables or those sorts of things i still haven't decided if i'm going to make support for monsters or anything like that now what you can do uh really all that you need is to look in this basic templates folder that's ready to download and then you want to download this here the rr2 genetic generic mod template.zip so you download it and you're going to what you're going to want to do is you're going to save this into your documents and then visual studio 2019 templates project templates you just gotta save it in here that's all you gotta do all right so now if we take this away and we go into visual studio 2019 we're going to go to create a new project and then somewhere in this list here we should see the template that we just added all right for me it's right down here at the bottom all right we're going to give it a name say where you want things to save and click create all right and once it loads up you're going to have all these folders over here and the only one that you're really going to need to worry about are the main.cs because this is where your basic functionality of the mod comes in now i'm going to say this template as of right now relies very heavily on r2 api as you can see right here so these are some of the basic things that you're going to need i have this set up to where all you do as you just saw is you download the template you set it up and it makes all of this stuff for you it has these using statements up here and i think it has a little bit more than what it needs on here uh it also has such comments that are going to go through and explain each and every step from this original here or from this uh main method so first we have the beeping dependency what this does is uh for the purpose of this it's going to add a dependency a hard dependency in the mods code to r2 api and it's going to call the id of r2 api and the version and that's going to be based off of your references that you have over here as you can see there are quite a lot of them they're already added into the project so if you don't know how to add project references you have to go up here to project and you add a project reference and you have to click browse find it all that all of these are stored in the project itself so you do not need to delete these that's why the folder says do not delete if you delete any of these something can screw up and if you delete the entire folder something will screw up all right another thing that you can notice over here we have the custom classes folder as i said earlier this i only have support for items and achievements also called unlockables so this is purely a customization like an organization thing you can delete this folder if you want and just have all of your classes loose you do not need this folder everything else leave alone keep it in here all right we have some base classes these are you know our basics for what our items are going to depend on we have a couple of examples here to look at but before i get into much of that i'm going to go back into this network compatibility just says everybody has to have the mod everybody has to have the same version now this is not truly necessary but it will save everybody a lot of time if you and your friends just use all the same mods i know it's frustrating to get them all together but if you use a mod manager it's incredibly easy and i'll be going over that shortly alright now what we have here is defining the plugin and you can see we have three variables here the mod guid mod name and mod version and you can see them down here we're going to get into that in a second this is the big thing here the r2 api sub module dependency and you see it has name of all these so these are the different apis provided by r2 api that we're going to be using to make our lives much easier they're going to save us a lot of time trying to add our content into the game because it will handle it for us all we have to do is make sure to define these and as i continue to develop onto the project this list will get longer and longer now we move on to our main class now for those of you who are not familiar with c sharp this right here means that our main class inherits base unity plug-in this is required in order to make your mod load into the game all right this string here is going to give the name of our mod for bepin and that is going to follow this format where you start with com username or whatever you want your name to be on here and then the mod name it does not have to follow this format but it's kind of a standard thing now this is the mod name this is more or less just for you and whoever's reading a log to understand where things are coming from if there's any errors or to make sure things are loaded correctly then you have your mod version this is very important because this will tell beckon in the console what version of the game or what version of the mod you are running or the user is running which will help with debugging and making sure that things are you know that things are on the proper version so it's a good idea in order to update that every time that you push a new update to your code all right uh asset bundles uh or an asset bundle is created and loaded here you're gonna need that in order to add anything to the game that was created in unity and we'll go over that later alright then we have our awake method this is what gets called when the game starts and our mod is loaded as you can see here the first thing we have is this using with a var stream and it's the assembly this is loading our assembly which is named right here and it's this file right here it's going to name or load it to stream and then we have an if that make sure that stream is not null and what this is is right here if one exists so if you have an asset bundle which you should if you use this template it will load it into data or load it into the game using assets which we defined up here this is important because we will call this throughout other classes in order to access our pre-made models objects anything like that then we run a method that runs our configs which we have right here we have an instantiate method which i'll go over later on and we have hooks all right uh we're going to start with hooks because they're the biggest thing here hooks are how you access everything into the game uh it's how you trigger effects happening with different things like say you want to have something happen whenever the player's inventory change you do on dot screen 2. so that's how you would do that there and then you have plus equals i think i forgot a parameter here oh yeah all right and we'll just say just that and then this will allow us to you know make a method off of that but we're not gonna use that here all right then we'll move to our configs configs allow you to [Music] as the name imply give configuration options to your mod you know turning something on turning something off changing values manipulating some of the stuff there's a lot that can be done configs and it's the way that your user will interact with your mod directly to change some of your stuff alright then we have the instantiate method and this is going to be one that's going to make sure that our items our achievements anything like that actually get loaded into the game as it is right now you do have to do them one by one but i'm hoping that i can make something that's going to make that a little bit easier alright so what we're going to have here is you can see it calls verify items and verify achievements so verify items takes in an item base which if you look in our base classes that's our item class and say now here achievement base for our achievements and it's going to generate a config file using config.bind and it's a boolean which is going to say to enable the item so you know you can turn it on or off and whether based on that it's going to say the item is allowed in the game the item is not allowed in the game and bait and if it is allowed then it calls the init function which will initialize the item and add it to our content pack from r2 api and the same thing happens with achievements exact same way we just replace item with achievement okay now that we have that let's say that even though it didn't change anything we'll go over our item bases and then our achievement base we'll start with item base okay i see what's going on there all right so item base you see we have uh a lot of different things here and comments that are going to explain everything uh we'll get more into this whenever we actually get into creating items but i just want to give a brief overlook so you can see uh what goes into this so our item base you usually will not need this you'll probably never open this file you shouldn't need to uh but i'm going to show you that it's here this is what happens in the back end just in case you want to look at this all right uh achievement base i was a little confused whenever i first saw these i hadn't opened this up like this before but if we go ahead and open all these again it's a lot of what you aren't going to be needing uh almost all of this is from r2 api that it inherited which you can see up here where it inherits from base achievement which is from the actual base game and i modded unlockable data provider which is from r2 api it makes our job a lot easier so again you're probably not going to need a whole lot in this itself but you can see all the comments that actually explain how to use each thing and if we look at our example classes here you see they don't have the comments but everything is pulled from our bases because they inherit from our bases as you can see in the top here all right that covers our basis for what we're going to be doing in visual studio so now we'll load up unity all right uh you can see where i had made a test template before so we're gonna go in and make a new project and we're gonna say to tutorial project all right and then we're gonna go create project okay so once unity loads up you'll see we have a sample scene loaded over here where it has a camera and a directional light we're gonna go ahead and delete these we don't need them same with the scenes folder we won't really need that for most applications here all right so what we can do is we can go over to the window we'll go to the package manager and give it a second to load and then we're going to install this asset bundle browser go ahead and install it to this version or to this project all right and then we're going to go over to assets and we're going to import a custom package now if you look over in your tutorial project folder you'll see that you have a generic mod template package.unity package this is packaged with the visual studio project it's part of the template and it's meant to make this easier so if you go ahead and click open on here and you just click import you'll see now you have a few folders here which have a lot of folders inside of them this is going to basically just have some organizational value none of these folders are really necessary they just help you to organize what goes where when so if you go into models you can see the folder says place raw models here and you can go into prefabs items equipments whatever i try to set up with everything that i thought was needed but i'm not entirely sure because all i've ever done was do items using this but if more is needed later i will add that so as of right now we're finished with unity and i'm gonna go ahead and preface now before i get into doing anything with unity i know very little about it i'm very much learning as i go and part of this tutorial series is for me to learn better and to help others learn as i am so now that unity is done we're going to go ahead and close out of it and go ahead and save everything it's just going to make sure that our things stay in all right next we're going to cover some helper mods so if you use risk of rain mods i highly recommend using a mod manager you can use r2 modman which i have here or you can use thunderstorm mod manager which is for the time being the same as this it's just operating through overwolf however i'm still using r2 mod man i've never updated it and if you look under my settings i'm under a dev helper profile and this is just some recommended mods that will make your job and development a lot easier because you can tell a lot of things happening in the back end i'm not sure for screen cheats has been updated from the patch the other day but r2 api hooked in patcher and weapon x-pack are basic needs for mods anyways so they they should be included in here hooked in patcher just make sure that you have an up-to-date m hook which you need for making your mods properly to be able to hook onto events in the game uh debug toolkit and risk green cheats are more or less just your helper mods that are really what this profile is for they're going to allow you to investigate what's going on in the scene in order to make sure things are spawning correctly things are popping up the way that they need to be riskering cheats will allow you to spawn in items instantly teleport through stages etc etc basically just going to really help you with basic levels of testing and debugging all right the last thing that i'm going to cover today is going to be the risk of rain to modded discord so if i go over here so this is just the intro channel as you can see there are a lot of different channels here you have rules and links uh development for if you need help tech support if you have trouble with some mods you know then we have some general stuff as well as some voice channels just in case you want to guys want to join in you know talk to some others play a few games and whatnot uh this is the central area that you want to go for you know joining in and staying up to date with mods as you can see very popular joining in you get active updates on whenever mods are releasing so you know right whenever mods are coming out and when they're being updated i will leave a link to joining this in the description of the video as well in case you aren't already there all right uh so i believe that covers everything in this video later on i will be making different videos in order to go step by step into creating items achievements equipment everything that i plan to cover in the template it's going to be some short going and like i said earlier i'm still learning just as you guys are i'm just hoping to be able to help some people out and make the learning process a little bit easier because currently i don't believe there are any video tutorials on how to make mods uh so much as there are just installing mods and most of those are already out of date so well i suppose that's it for today thank you guys for tuning in and i hope to see you guys back soon
Info
Channel: Assembly Included
Views: 10,298
Rating: undefined out of 5
Keywords: risk of rain 2, risk of rain 2 modding, risk of rain 2 mods, risk of rain 2 mod tutorial, risk of rain 2 modding tutorial, making risk of rain 2 mods, how to make mods for risk of rain 2, how to make risk of rain 2 mods, how to mod risk of rain 2, gaming, modding, mod development, risk of rain 2 mod, risk of rain 2 mod dev, risk of rain 2 mod development, risk of rain 2 mod making, risk of rain 2 mod making tutorial
Id: uGWsdFG39DQ
Channel Id: undefined
Length: 24min 45sec (1485 seconds)
Published: Wed Apr 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.