• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Request - mod that prohibits crafting except for the bare necessities, adjusts loot table accordingly

geengaween

New member
I'm too stupid to learn how to make a bug-free mod so I'm pathetically begging on here instead.

Idea: Prevent the player from crafting everything, except stuff that the average person could actually craft. Such as a wooden club, a campfire, things of that nature. Everything else, including building materials, tools, and food, the player has to loot. Loot tables probably need to be adjusted accordingly, according to gamestage, so the player can find stuff like grass fibre flipflops and spears in garbage piles early on, and metal baseball bats, armor, and guns later.

I'll have a go at making the mod myself but I'm an idiot and have no experience coding, so it would be way better if someone smart and experienced could make it.

 
Does anyone know if there's a way to create an .xml code to make everything uncraftable except a specific list of items? Going through every single item in the game and pasting it into <recipe name="" craftable="false" /> seems extremely inefficient

 
Does anyone know if there's a way to create an .xml code to make everything uncraftable except a specific list of items? Going through every single item in the game and pasting it into <recipe name="" craftable="false" /> seems extremely inefficient
XML would require you to use set xpath for every item to change that value so it cannot be crafted.  There isn't a way to code that and still have it be XML only.  You would then have to update all of the loot tables in the same, or similar, way.  Definitely time consuming.

 
I guess this is why nobody's done it before

I just want to check whether I'm correct here: in order to make this mod I'm going through items.xml and seperating it into two lists, craftable and uncraftable. After I've done that I'll have to create a modlet .xml, then go through the "uncraftable" list and create a line for each item saying it's uncraftable, for example: <recipe name="itemNameHere" craftable="false" />

Is this right?

 
All you need to do is remove recipes from recipes.xml for items you don't want craftable. If running just vanilla you could just use set on the entire file and just add back the ones you wanna keep. But if you have other mods it potentially gets a bit more complicated. 

 
Yeah I want it to be as compatible as possible, as I like to use mods like Izayo's Guns

Do I have to put a list of <recipe name="itemNameHere" craftable="true" /> for recipes like stone axe that I want to be craftable, or is it enough to make a list of uncraftable items and mark them false?

 
If you only want a few items craftable I think I'd try this:

<setattribute xpath="recipes/recipe" name="craft_area">disabled</setattribute>

to make everything uncraftable and then re-enable the specific items you want. That way no recipes are removed.

That's from an old mod I did, haven't checked to see if it's still working

 
Back
Top