Jump to content

(RESOLVED) Problem with the custom tab


Recommended Posts

Hello, everyone. I'm working on a mod and recently in the modmain.lua I've put some codes for the custom tab and recipe. This causes the game to close by itself when I create a new world. I don't know why this is happening I've tried different alternatives and the same thing always happen.

I will put the modmain.lua here so you guys can see what was exactly the error.
I will be waiting for any awnser for the problem!

modmain.lua

Edited by Kumazinn
Link to comment
Share on other sites

Oh. It's quite clear why it's not working.

Custom recipe tabs are deprecated since the March QoL update.

If you plan on making craftable items for your character, you'll need to update the code.

AddCharacterRecipe("prefab",  { Ingredient("ingredient", 1), Ingredient("ingredient", 4), Ingredient("ingredient", 2) }, GLOBAL.TECH.SCIENCE_ONE,  {builder_tag = "charactertag"})

This makes the crafting recipes go to the Survivor Items tab in the new crafting UI.

Also, theĀ "TECH" variable is not accessed by default. To use it, you must use "GLOBAL.TECH" (without the quotation marks).

Edited by HarryPPP
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
 Share

×
  • Create New...