Обучение моддингу в игре Prison Architect — как создавать и настраивать моды - Prison Architect гайд

Автор: Phraxas

Description of the video guide «Training modding in the game Prison Architect — how to create and customize mods»

I go over the basics of how to mod for Prison Architect alpha 24.

Not sure why the quality is so low. It should definitely appear clearer…

Text version of the guide (automatically created subtitles)

Hey guys this is praxis here to show you how to do some basic modding on Prison architect this is for alpha 24 so some things may be out of date but I’m only showing you the basics so hopefully it’ll stay the same the first thing to start with is how to download a mod and you want to get this mostly through the workshop.

So the original is Garry’s amazing vegetable patch that’s the developers made that themselves so we’re gonna just go into that and all you need to do is hit subscribe.

I’m already subscribed so it shows that and when you start the game it’ll be there so we’re gonna start a game right now and we just need to go into the extras give it a second load go and when we go to the menu there’s extras right here and BOTS so I have a couple mods right here and I’m going to keep the vegetable mod here on you can turn on and off by selecting this little button here and then hitting apply so vending machines is what I will be basically creating again to show off how to do this so if we go to right here there’s open mods folder and that’ll bring up the directory right on your computer which is your user name app data local introversion prison architect mods so but the easiest way to get to it is basically just through the game so this is all so it holds all of your saves and campaign files and preferences and stuff so that’s good storage you’ll see first that there’s a bunch of numbers and that’s basically generated by steam when you go into the workshop what you’ll want to do is create a new folder and name it I’m going to name this ven you know we’ll just name this tutorial one and inside there’s nothing of course but we’ll want to copy at least the general structure of the other mods 307 to 793 8 is the potato farm mod thing and you can see that there’s the thumbnail kenji if you name exactly that this is what shows up right in the game right there and you’ll need a manifest text which includes this information you can copy this directly into your new folder and we’ll do that in a second but one thing I want to mention right now RAF about is you do need a space right here this empty space for some reason it can’t get the first line and I believe an empty space at the end is just good practice so you’ll have your own author name right here you’ll name it within the quotes under name description you know this is all fairly self-explanatory so description the only thing to note is that if you do are an n backslash R backslash n that’ll basically make a new line returning newline is translation I believe will generally be false that’s for like language mods and file ID and update timing they’ll be and steam authors they’ll all be added in for you when you make the mod on Steam Workshop so you don’t have to worry about them if you do care for whatever reason the update time is actually just a standard unix time so if you go to units timestamp com it’ll show that it’s not important though it’ll already be generated by Steam Workshop so let’s just copy these files over just to have a base into tutorial one you know what just make things easy I’m going to use vending machines already and it’s a real one there we go so you can see I’ve already changed for this one my the name is vending machines my authors practice its main description etc and I for whatever reason just to run up that update time and I made up my own thumbnail you can use like any any typical program to like Photoshop to make the PNG and just make sure it’s name thumbnail dot PNG you also need a folder called data so make sure it’s lowercase in all exactly like that and inside of here is where all your main information for your mod will be one of the things you’ll need for sure is sprite stop Kenji you can guard the PSD that’s for my own for editing in Photoshop that’s not actually going to show up later well remove it later but for now let’s actually open that so sprites is basically everything they’ll show up in your game that you’ll be adding and for now for alpha 24 you have to basically include this whole area if you want it to be compatible with the original farming mod Chris and them already explained that this will be changed later in the next update so whatever them talking about probably doesn’t even relate to you at this point but for now you want to basically put everything beyond the 320th pixel y3 on 20 because this is as far as prison architect is concerned ten spaces across and one space is considered 32 pixels I’ll explain to you in a minute what that means but here I have a little snack which is just like a bag potato chips sort of horribly drawn and I have it right here at basically at the tenth slot and you can use guides and change this if you have Photoshop to go by pixels that makes it a lot easier and for view you can put like a new guide and say 32 pixels wherever so that you can put it and see this little blue line and that makes it easier to line up where everything is going so yeah I have the snack and this box and that’s right here.

So the first thing will one I guess is to add those materials you have these different text files right here jobs materials needs production reform programs and research perform underscore programs all lower case needs is not mentioned in the original mod but that is also one of the files that can be added these are specific the name has to be exactly that and it will the system will be looking for those files directly to find out information about like jobs and materials etc so again remember the space here and we start with the first object you start with the term begin and you say object and I believe you can tab it out however you want but good practice is to tab so that you can see that begin and end line up so end would be the end of this object so we have the name is a snack just made that with one light one toughness one Max tech 20 etcetera you can basically just put in all this information now sprite is wrong because we are going to set it to ten remember it’s at the three and twentieth pixel but zero said should still be okay so X is how far over in your file this far over and then zero is at the top for y so we’re saying that we’re starting here and we have a width of one and a height of one so it’s gonna end like right right here so it encompasses that whole thing see W means width and height means one I mean H means one they’re both one yes.

Right rotate tight so this basically says that it’s rotated up this is how it’s normally going to start is zero zero means facing back one means to the left two means forward and three means to the right and then four means it doesn’t get rotated so four would be used for like entities so staff and stuff like that or just anything that doesn’t rotate so we have that’s the snack that’s all done we have another object which is drink machine which already exists what we’re doing here is actually over writing an existing part and let me show you real quick how to get to there if you go to steam go to your properties on Prison Architects local files browse local files and bring that up.

And there’s a main thought that that will not appear there but a main dot dad if you rename that to dot R R where they are and extract it with WinRAR hopefully you have WinRAR if you don’t please go get it.

So it’ll extract to a main and then that it will be there and inside data is a bunch of information about the game so you can look at this Lua function list for scripting it tells you all all of the folders I’m sorry the functions that Lua can use which I won’t get into great detail on this because it will probably be changing soon anyway you can see like all the needs here’s where they explain the bladder need and its priority everything about it so if you want you can actually go through and find information that already exists in the game like here’s here’s the rule that says ingredient should be stored at the fridge mac slot ID 1 so it’s 0 or 1 so the first or second numbers usually start with 0 and technical things so that’s some useful information about the already existing parts and so the Drake machine I basically copied from the materials dot text and replaced one thing I believe it is only one thing now I removed the requirement that has to be in a certain room and I added in the properties of scripted because that means that I can add a script later so let’s just go down here to equipment before I continue on to the other stuff a snack box this is a piece of equipment this is something that is used when doing a job so it’ll show up and I have to change that again to 13 and y21 because if you notice I placed it down here right there so we’ll just say if that Oh.

You also need markers what these are are basically slots they can tell like basically where it attaches what when things go into it stuff like that so that’s materials for jobs you just say begin job name.

I had load bending machine as a job and it’ll take 5 SEC thats in seconds normally it’s like 15 but I made that nice and quick and you can say which workers go here and what tool remember I said the equipment the snack box so here’s where I am defining that tool for that job.

So it’ll basically just show up in his hand when he’s using it so the cook the janitor and the prisoner can do this they they can load the vending machine needs here’s where I’m establishing that a provider which is a snack if they eat the snack which currently I have to say use if you’d say consume it just disappears if you say eat they get fused I’m sure that’ll be something that’ll be changed later and we’ll have much more control on that but that’s the simple need production here is where I say to store all snack boxes and vending machines but I’m actually not using that he says equipment originally I had a plan that snack boxes would be imported and brought to the vending machines and then the vending machine would essentially dispense out snacks but for simplicity I’m not doing it that way reform programs so here’s a program that I made it’s very silly it’s not meant to really be part of the mob but I just wanted to show you what it is here’s a program that I called munching cost me a hundred dollars and last for a while only one session one difficulty it’s very easy to complete theoretically someone could fail munching which is terrible but they could that’s hilarious research spending it does require to have the vending research completed which we’ll show in a second room common room so that means that that’s the room that it’ll be placed it and teacher is going to be the warden so the warden is just gonna gather up people and start eating snacks with them and of course this equipment snack it’s gonna need snack and the intake is voluntary and properties is repeatable they can do it over it over and over and get really bad and no they can’t actually get that research so here’s that research I was talking about we’re naming it bending and it allows for an ability requires the warden research and the administrator is a warden so the warden is the one that will research he’s got to figure out what kind of candies and and chips that he’s gonna want and so this is how long it’ll take usually things take 360 and X&Y placement is where it appears on the screen of the research tab and simply having all these text files in here makes it just all of these things appear in the game it’s very easy very simple you don’t have to really know a whole lot about programming or anything language will want to you’ll want to have a folder called language this makes it easy to have multiple languages in the game and the Mase the bay style is based — language dot text make sure it’s not an underscore I know reform programs was underscored but based languages was not based language.

Nope not plural so open this and you have a couple of phrases basically any object that you have you’re gonna want to have the object underscore and then what it was called so I I renamed the drink machine so here’s where I establish what’s called over here drink machine that’s what’s going to appear in in-game and object snack here we go we have snack and for vending it works for research and the and the tooltip so this is what it will show up in game and allows you to place a vending machine to feed your prisoners that’s not exactly correct because I didn’t care about placing it but allows you to create a reform program to munch on snacks law reform program munching here we go munching equipment snack box box of snacks yeah I didn’t want to call it a snack box I wanted to call a box of snacks it’s a little bit more user friendly I guess so we’ll tip any tool tips that you might be including you want to call it tool tip and then bending in an underscore loading in this case needs to be stocked with snacks so this will pop up any time that it needs to be stocked which will establish in a script and job custom anytime you have a job that you want to create it has to start with job custom underscore and then the name of that job that you’re creating and then it just this is the status that the worker will show is loading vending machine so let me show you the scripts this is a little bit more complicated it’s just a folder called scripts and it’s this is programmed with Lua you can open this with notepad plus plus that’s what I prefer to use but one thing to note is that the name of the script has to be the name of the object that said just drank machine if you remember before we established that the drink machine was had a scripted scripted property so that means it knows to look into scripts and look at for drink machine Lua and we’ll open that up so this is very simple program I’m not going to go into great details but some things that you need to know our stuff like set property and that’s essentially to establish a variable some sort of piece of data that you might need later and if a property already exists it will store into that property if it doesn’t exist it won’t make it exist.

So the one thing that you need to note is that function create is required that’s it that’s when the item is placed what will it do and in this case I’m saying it will have 120 stock it has snacks inside it doesn’t need to be loaded because it already starts with 120 and I have a counter and this is for deleting things later I’ll show you update is the next function you’ll need and you have to include time passed and the what this all is doing is basically saying to get the existing variables and put them into a local variable that only this function can see if you don’t know programming that’s fine again you can still do a whole lot without scripting but if you do then this will help so I have a a boolean variable that’s just a little flag true or false needs loading if it’s true then I’m going to create a job called load bending machine and if you remember from the other text file I had tool tip bending loading so I can set the property of this object and what I’m setting is the tooltip and I’m setting it not to the phrase I want but to the tooltip bending loading so it’ll output that so if it’s in another language then that’s great then it’s easy you don’t have to have like a thousand things referring to what it is return just basically means get out of here we’re done because if it needs to be loaded we’re not going to do anything but assuming that’s false and were going to just continue on we’re going to clear the tooltip out so it doesn’t say anything and if it counted after 20 seconds then we’re going to basically drop out a piece of the snack we’re gonna get a get a snack out there that’s what objects spawn means and the reason why I’m doing this current snack — essentially delete it you see that I deleted right here first then I make the snack then I set it into a sort of storage for later so and then this will restart the timer so if the current stock is less than one this is where it’s more important if it actually ran out then it’s going to set that it needs to be loaded so that’s a very next frame it’s going to go ahead and do that I liked it too this beforehand before doing all of this so I set it up here and I could probably organize it better but whatever function job complete if you have a job you have to start with a function called job complete and then the name of that job right here load betting machine so if something creates the finishes that job it’ll go straight to there and what this is saying is essentially say stock is 120 it’s back up to maximum and it doesn’t need to be loaded anymore.

And I set the count to 10 to make it output it should be 20 so basically the mod is complete so now we can actually look at it however I want to show you a little bit more information about what options you have available to you and that can be found at this website right here at the introversion website and on the wiki mod schema this shows you every every kind of input that you can give and what’s available to you so for objects.

There’s move speed factor when there’s teleport all you know things I may not have included in some of the some of the parts I’ve included yeah so you can see like what’s sprite you can have rooms here’s all the information about the rooms and all the different research that’s in the game materials etc etc you can basically just look through this and see everything that you need some things I found that we’re interesting was that the teacher is just pretty much any kind of entity so I mean box is listed here I’m pretty sure that means that this your program could be taught by box I’m not sure how to get there I probably have some issues with being tardy but kind of funny everyone’s just gonna stare at a light maybe so you’ll have to be very specific with that even though it’ll accept it it might not be smart this website can also probably found anywhere on the forms I mean some people like to reference it which by the way the forms are a good idea to go to all right so let’s go back to the game.

And we’re gonna load up well let’s make sure that our mod is actually on or showing up in the first place let’s see what happened we have tutorial one manifest oh you see I probably I named it the same thing I’m gonna have to close that out so to bring it back up yeah I’m pretty sure that’s that’s the issue here you named it the same exact thing.

Yep and of course that one that was the issue we’re going to turn off the old one so you can see all this information just as we had it before and hit apply make sure that stays in there I think and I’m going to attempt to load up one of my prisons I had for testing just a jail really far with this but basically I have a drink machine and there’s a snack right there and they’re sleeping right now but I do assure you when it comes feeding time not even feeding time because the whole point of this is actually to keep them from from caring if it’s eat time.

See he’s running he’s eating and he now no longer has to eat so I technically don’t need a kitchen seems a little overpowered but whatever so that’s the basics of how to mod how to get things into the game and I will hopefully be going over some more complicated stuff later but for now this will do so see you have a good time.

Комментарии (0)

Оставить комментарий

Ваш email не будет опубликован. Обязательные поля помечены символом *.
Зарегистрируйтесь, чтобы при следующем комментировании повторно не вводить имя и email.

Нажимая на кнопку «Оставить комментарий», я даю согласие на обработку персональных данных.

Другие гайды автора - Phraxas

Другие гайды, похожие на "Обучение моддингу в игре Prison Architect — как создавать и настраивать моды"

При каждом нажатии на ниже представленную кнопку, будут выводиться похожие гайды на "Обучение моддингу в игре Prison Architect — как создавать и настраивать моды". Также для удобства поиска используйте ссылки на теги, которые расположены выше (в конце описания гайда).

Чтобы приступить к поиску, введите ваш запрос и нажмите клавишу «ENTER»