Warlance Posted January 5, 2016 Share Posted January 5, 2016 So I'd like a mod that makes the recipe for boards cheaper like 2 instead of 4 logs, It seems simple so I'd like to code it myself but I could be wrong and it be alot more complicated than I think, I'd like it to be compatible with both DLC, if anyone can show me the basics so I can do this myself or just make it themselves I'd be very grateful, thanks for reading! Link to comment Share on other sites More sharing options...
Mobbstar Posted January 5, 2016 Share Posted January 5, 2016 Use Recipe() to make a new recipe (it will override the old one). I scratched out what does not interest you at all, the rest you can look up in data/scripts/recipes.lua (where the original recipe is): Recipe("boards", t_ingredients, tab, tech_level, placer, min_spacing, nounlock, numtogive) Alternatively, the nicer, but more complicated way to do it would be to edit the existing recipe. Here's my suggestion, I quickly sketched it using data/scripts/recipe.lua (the source code for recipes): Recipes.boards.ingredients[1].amount = Recipes.boards.ingredients[1].amount / 2 I guess it's best to double-check everything is alright, as well as to round the number up: if GLOBAL.Recipes and GLOBAL.Recipes.boards and GLOBAL.Recipes.boards.ingredients[1] then GLOBAL.Recipes.boards.ingredients[1].amount = math.ceil(GLOBAL.Recipes.boards.ingredients[1].amount / 2)end EDIT: added "GLOBAL" to the sketchEDIT2: That truly hurt, this is one of the few times I actually help, even now, when I'd have the time to. I don't deserve to be entitled the "good side of internet", I'm not doing any good. At best, the things I do, I do as good as I can (aka passively good). At best. But who am I talking to, you won't read this. You shouldn't read this. I don't want you to feel bad for what you did just there. Videlicet, shine friendship and respect onto those who do good, letting everybody who comes by know that they can thrive without consuming others and others' efforts. ...I admit it, I listened to Undertale's "Hopes and Dreams" again. Link to comment Share on other sites More sharing options...
Vivalavie Posted January 5, 2016 Share Posted January 5, 2016 @mobbstar so nice that u care to answer good side of the net Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.