Yakuzashi Posted May 27, 2018 Share Posted May 27, 2018 Hi guys. I need something to multiply amount of crafted item. For example: 1 flint + 1 nitre + 1 coal will give you 5 items. I want to use it for ammo crafting. I am using these codelines: --AMMO Data GLOBAL.STRINGS.NAMES.AMMO = "Type 7.62×54mmR ammo" GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.AMMO = "Straight from factory" GLOBAL.STRINGS.RECIPE_DESC.AMMO = "One shot, one kill" local ammo = Ingredient( "ammo", 5 ) ammo.atlas = "images/inventoryimages/ammo.xml" local ammo_recipe = AddRecipe("ammo", { Ingredient("charcoal", 1), Ingredient("nitre", 1), Ingredient("flint", 1)}, RECIPETABS.WAR, TECH.NONE, nil, nil, nil, nil, "stalingradman", "images/inventoryimages/ammo.xml") ---------------- Here: local ammo = Ingredient( "ammo", 5 ) I add value 5 and nothing changed at all. Thanks in advance and have a nice day/night. Link to comment https://forums.kleientertainment.com/forums/topic/91142-dst-custom-item-multiplier-on-crafting/ Share on other sites More sharing options...
Lumina Posted May 27, 2018 Share Posted May 27, 2018 (edited) Try something like this : (Just an example, follow the template, but replace with your own recipe) AddRecipe("gears", {Ingredient("steelwool", 1), Ingredient("transistor", 1), Ingredient("purplegem", 1) }, RECIPETABS.SCIENCE, TECH.SCIENCE_TWO, nil, nil, nil, 2) The number after the three "nil" should be the amount of the item you'll obtain when doing the recipe. So try changing your fourth "nil" to 5 and test it. Be cautious to have the right value of argument, you want to keep your custom tag too. Edited May 27, 2018 by Lumina Link to comment https://forums.kleientertainment.com/forums/topic/91142-dst-custom-item-multiplier-on-crafting/#findComment-1039024 Share on other sites More sharing options...
Yakuzashi Posted May 28, 2018 Author Share Posted May 28, 2018 Thank you. It worked very well ! Link to comment https://forums.kleientertainment.com/forums/topic/91142-dst-custom-item-multiplier-on-crafting/#findComment-1039050 Share on other sites More sharing options...
Lumina Posted May 28, 2018 Share Posted May 28, 2018 Nice Good luck with your mod ! Link to comment https://forums.kleientertainment.com/forums/topic/91142-dst-custom-item-multiplier-on-crafting/#findComment-1039131 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now