shotts91 Posted December 26, 2019 Share Posted December 26, 2019 Got a question and hopefully someone can walk me through this. Ive noticed that if you want to "mod" settings server side you have to add it in the "Mods" folder or it seems to break the game. What im wanting to do is change the recipes.xml bullet casings to use one brass instead of 2. Im afraid to change it there and it break the game from being able to log in. Any help or a link to doing this myself would be appriciated. Link to comment Share on other sites More sharing options...
shotts91 Posted December 27, 2019 Author Share Posted December 27, 2019 Got a question and hopefully someone can walk me through this. Ive noticed that if you want to "mod" settings server side you have to add it in the "Mods" folder or it seems to break the game. What im wanting to do is change the recipes.xml bullet casings to use one brass instead of 2. Im afraid to change it there and it break the game from being able to log in. Any help or a link to doing this myself would be appriciated. This is what ive gotten so far and it doesnt work although the server loads it..... <?xml version="1.0" encoding="UTF-8"?> <configs> <set xpath="/recipes"/recipe[@name=resourceBulletCasing]/property[@name=unit_brass]/@count">1</set> <configs> Link to comment Share on other sites More sharing options...
Milkshakes Posted December 27, 2019 Share Posted December 27, 2019 Changing the original files doesn't break the game, the only problem is MP Servers with EAC on, which will likely ban you. So at most turn EAC off thru the launcher and steer clear from that, then you're fine to experiment. Though the simpler and cleaner way to do this is making a Modlet, same thing only the changes are read entirely in memory and don't mess with original files. For that you want to create a folder in the 7daystodie/mods folder with the name of what your mod will be, and within in a file called mod.xml. <?xml version="1.0" encoding="UTF-8" ?> <xml> <ModInfo> <Name value="[color="#FFA500"]Here goes the name of the mod[/color]" /> <Description value="[color="#FFA500"]What it does[/color]" /> <Author value="[color="#FFA500"]aauthor name, you'll use this later[/color]" /> <Version value="[color="#FFA500"]1.0 or whatever version[/color]" /> </ModInfo> </xml> Something like this is the most basic content you can put in the mod.xml, then you can start modding itself. Modlets need you to follow the structure pathing of the Data folder, you want to change a recipe so create a new folder inside your Modname folder called config (to mimic where recipes.xml is located) and within it, a brand new recipes.xml The thing you wanna change is: <ingredient name="unit_brass" count="2"/> Compared to what you wrote: <set xpath="/recipes"/recipe[@name=resourceBulletCasing]/property[@name="unit_brass"]/@count">1</set> I'm showing you this in matching color to give you an idea of how the game likes to read things, what you're looking for here isn't a property but an ingredient. That said there's a few things on how you wrote that whole thing. First, recipes is quoted "recipes", it shouldn't be, the quotes are from start to end for the entire line. Second, resourceBulletCasing and unit_brass are also quoted, that breaks the code too, you have to use single quotes like this 'resourceBulletCasing' The finished recipe.xml file would look like. <author name> <set xpath="/recipes/recipe[@name='resourceBulletCasing']/ingredient[@name='unit_brass']/@count">1</set> </author name> You do that and save and bam, got yourself a modlet! Link to comment Share on other sites More sharing options...
HAL9000 Posted December 27, 2019 Share Posted December 27, 2019 Try removing the xml declaration on the first line, just start with the configs element Link to comment Share on other sites More sharing options...
Milkshakes Posted December 28, 2019 Share Posted December 28, 2019 I posted a detailed explanation but I don't know if it's waiting for mod approval or it just vanished, if this goes thru I'll edit a TLDR in. Edit: Ok I knew I wasn't crazy, removed this cause my previous post explains things better. Cheers! Link to comment Share on other sites More sharing options...
shotts91 Posted December 31, 2019 Author Share Posted December 31, 2019 Changing the original files doesn't break the game, the only problem is MP Servers with EAC on, which will likely ban you. So at most turn EAC off thru the launcher and steer clear from that, then you're fine to experiment. Though the simpler and cleaner way to do this is making a Modlet, same thing only the changes are read entirely in memory and don't mess with original files. For that you want to create a folder in the 7daystodie/mods folder with the name of what your mod will be, and within in a file called mod.xml. <?xml version="1.0" encoding="UTF-8" ?> <xml> <ModInfo> <Name value="[color="#FFA500"]Here goes the name of the mod[/color]" /> <Description value="[color="#FFA500"]What it does[/color]" /> <Author value="[color="#FFA500"]aauthor name, you'll use this later[/color]" /> <Version value="[color="#FFA500"]1.0 or whatever version[/color]" /> </ModInfo> </xml> Something like this is the most basic content you can put in the mod.xml, then you can start modding itself. Modlets need you to follow the structure pathing of the Data folder, you want to change a recipe so create a new folder inside your Modname folder called config (to mimic where recipes.xml is located) and within it, a brand new recipes.xml The thing you wanna change is: <ingredient name="unit_brass" count="2"/> Compared to what you wrote: <set xpath="/recipes"/recipe[@name=resourceBulletCasing]/property[@name="unit_brass"]/@count">1</set> I'm showing you this in matching color to give you an idea of how the game likes to read things, what you're looking for here isn't a property but an ingredient. That said there's a few things on how you wrote that whole thing. First, recipes is quoted "recipes", it shouldn't be, the quotes are from start to end for the entire line. Second, resourceBulletCasing and unit_brass are also quoted, that breaks the code too, you have to use single quotes like this 'resourceBulletCasing' The finished recipe.xml file would look like. <author name> <set xpath="/recipes/recipe[@name='resourceBulletCasing']/ingredient[@name='unit_brass']/@count">1</set> </author name> You do that and save and bam, got yourself a modlet! [ATTACH=CONFIG]31050[/ATTACH] Thanks man. I appriciate someone correcting my mistakes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.