Jump to content

Add new tech tree problem can access recipe without new tech tree level requirement


Recommended Posts

When I add a new recipe with new tech tree it turn out player can build without needing of prototype or any structure that provide PROTOTYPER_TREES

Example
First I create a new tab call SHOP

RECIPETABS["SHOP"]  = {str = "SHOP", sort=11,   icon = "tab_crafting_table.tex"}

Then I add my WEAPONSHOP to PROTOTYPER_TREES
(Note my intend is create a new Structure then add "prototyper" Component with prototyper.trees = TUNING.PROTOTYPER_TREES.WEAPONSHOP in my prefab)

GLOBAL.TUNING.PROTOTYPER_TREES.WEAPONSHOP = 
		    {
		    	SCIENCE = ,
		    	MAGIC = , 
		    	ANCIENT = ,
		    	SHOP = 1
			}

MYITEM Recipe

GLOBAL.Recipe("MYITEM", { Ingredient("log", 1),}, RECIPETABS.SHOP, {SHOP = 1}, nil, nil, true)

It turn out when I start a game the recipe can access without needing of {SHOP = 1}

Link to comment
Share on other sites

35 minutes ago, Mobbstar said:

Please consider using the branchadder from Endoxin API. It's essentially the same code "Elenor" and "Soulful Alchemy" use.

Thanks you

If it is too complicate then maybe I change the method how my mod work.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...