Jump to content

Three Simple Questions.

Recommended Posts

Hello everyone, today I have three simple questions. I have an item that has no purpose at the moment, just sits in inventory and looks cool, however, it doesn't stack. I would like them to stack up to 10 items each. Is there a tag or something I'm missing?

I also have this same item drop from Bee Queen. However, I would like it to replace another one of her drops, the normal stinger. Is there code to remove something from her loot table or replace it with something different?

Finally, I would like to ask how to make a crafting recipe. In the Tools tab, costing 3 Gears, 2 Electrical Doodads, and 1 of the mod item. I have the item that is being made in the code already.

Thanks in advance.

Edited by thegreatJash
Link to comment
Share on other sites

In order to add stackability to an item you have to add the stackable component:

inst.components.stackable.maxsize = TUNING.STACK_SIZE_MEDITEM -- The exact values of these can be found in truning.lua
-- You can change this to simply 10


You can replace Bee Queen's loot table to a table that you created using SetSharedLootTable. Copy the original from beequeen.lua and change stinger to your item, then set it up with 'inst.components.lootdropper:SetChanceLootTable('beequeen')'


You can create recipes with AddRecipe:

AddRecipe("your_item", {Ingredient("gears", 3), Ingredient("transistor", 2), Ingredient("your_item_2", 1, "images/your_item_2.xml", "your_item_2.tex")}, RECIPETABS.TOOLS, TECH.SCIENCE_ONE, nil, nil, nil, nil, nil, "images/your_item.xml", "your_item.tex")


  • Like 1
Link to comment
Share on other sites

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