Jump to content

Recommended Posts

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.

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 by Lumina

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...