Jump to content

Recommended Posts

In modmain.lua put:

AddRecipe(name, ingredients, tab, level, placer_or_more_data, min_spacing, nounlock, numtogive, builder_tag, atlas, image)

name - name of the prefab/item to craft
ingredients - ingredients, has to be a table
tab - tab in the crafting menu
level/tech - levels of the tech required, for example, SCIENCE_ONE, SCIENCE_TWO, MAGIC_TWO, basically for SCIENCE_ONE you need a research table
placer_or_more_data - if your item is a structure set a placer (item's silhouette when placing, you need to create it with MakePlacer from prefabutil.lua)
min_spacing - don't exactly know, couldn't find any concrete explanation
nounlock - makes the item only craftable near a crafting station
numtogive - number of items crafted at once
builder_tag - i think this one is the tag required to craft the item
atlas - xml image
image - tex image

Not every variable has to be filled, some can just be 'nil'.

Edited by -t-
  • Like 1

The name definitly sounds like it, but since I couldn't decipher exactly how the game uses this variable I just wasn't sure. The only mention of this variable (I think) is in the table_winters_feast.lua file and even there, it's commented out. I used Notepad++ 'find in files' function to find every instance of min_spacing and found nothing, although there is something that might be related to min_spacing in the map.lua at line 191 but I think it uses the DEPLOYSPACING_RADIUS table from constants.lua.

  • Like 1

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...