(And hey, if someone knows the French, German, Klingon and Spanish for "Front Door" feel free to update this tutorial!)įinally, we want to make a way for the players to craft the doors. We only need these for the v1 doors because the player won't be crafting the reinforced doors directly. HouseFrontDoor2_v1,blocks,Door,Front Door,Eingangstür, HouseFrontDoor1_v1,blocks,Door,Front Door,Eingangstür, Key,Source,Context,Changes,English,French,German,Klingon,Spanish So in your Localization.txt file, we should have these lines: We need to provide the text for the item as it appears in the crafting menus. We won't worry about the v2 and v3 sections, since we don't plan on players being able to remove the reinforced doors without first demolishing them down to the base door.Īlso, for the CustomIcon, I found the picture I wanted in the /data/ItemIcons folder within the 7D install folder, and used the name of the picture that was appropriate. We'll use the Xpath directive "setattribute" to insert new attributes into those blocks (in the config/blocks.xml file): So what we need to do is insert those attributes into the definitions for the Front Doors. EconomicBundleSize - How many of them can we stack?.EconomicValue - What is it worth to a vendor?.Group - (I can't actually remember what this does! Someone help! :D ).TakeDelay - How long it takes to pick one up.CustomIcon - What does it look like in your inventory.FuelValue - How long will it fuel a campfire or a forge?.MaxDamage - How much damage can it take?.Now, looking at the two block groups, I noted several attributes that appear on the secureDoorWooden set that are missing from the houseFrontDoor set: v1 is the unreinforced door, v2 is the wood reinforced door, and v3 is the metal reinforced door. So this tells us that those three versions are the three possible upgrades for the door. I also noted that there's several versions of each of these two things:Īnd also there's a houseFrontDoor2 set with the same three versions.ĭigging into those sections, I see this interesting section: So now I have two important things: What a craftable door looks like, and what the uncraftable door that I want to make craftable looks like. I also located a section for the doors that players can already craft in the game: To do so, I searched for "Door" in the file blocks.xml that I found in my 7D installation directory. To start with, we're going to first look at the configuration of the doors in the base game. You can put whatever you want in there, to be honest. (NOTE: There is actually an extra line that needs to be at the beginning of the file, but the editor thinks that this is a "Link in Non-wiki Syntax" so it won't let me put it in here.) It's easiest to simply show you an example, which is the one I created for my MoreDoors mod: This file is required by the game to even load your mod at all, and contains just some basic parameters. You can easily google for more assistance on using Xpath. Xpath uses that sort of syntax for finding, adding, removing, and changing attributes of things in the game. For example, a item can have a bunch of attributes under it, which you could think of like: You can have items that contain subitems, and value assignments. (See: XPath Explained) But to help understand it, think of an XML file as almost being like a folder structure in your computer's file system. Xpath uses a very specific syntax, which I'm not going to document here. In the context of our 7 Days to Die mod, it will allow us to change some of the parameters set by the main game, when the game loads up. Xpath is a way of finding information in xml files, and modifying values in those xml files. Your folder structure should look like this:īefore we go further, I want to talk a little bit about xpath. I'll explain the use of each file as we continue. Create three (3) text files in the config folder, called: blocks.xml, Localization.xml, and recipes.xml. Now create a new text file called "ModInfo.xml" in the root of MoreDoors.Ĥ. This is the only subfolder we need, because for this mod we are not adding any new assets to the game, just modifying existing assets.ģ. This is where the actual configuration files will go. Within that folder, create a subfolder called "config". I'm just going to create a folder called "MoreDoors".Ģ. First we need the root folder of the mod. To begin with, we will need some very specific folders and files for our mod.ġ. Specifically, we will make the nice wooden doors found on prefabs available as craftable items for the player. It will be the simplest type of mod, which just modifies some of the parameters of existing game objects. In this section we will go over creating a very basic mod for 7 Days to Die (Alpha 19).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |