Jump to content

Recommended Posts

Hi modders!

I've been trying to port my standalone mod, Mush Garden, to shipwrecked. I first added shipwrecked_compatible = true in the modinfo.lua. The game is not crashing at all but I can't even see the custom recipe in the tab. (used RECIPETABS.FARM, TECH.NONE)

I also tried my character mod, The Korrigans, which already has a custom recipe in it (all codes of the recipes are in the character prefab); they are ALL working exept for the Mush Garden that requires Prefabutil and uses the Makeplacer thing. I see all the potions and even the hunting knife, but the mush garden won't show up.

I might be wrong, but since this is the only recipe that requires prefabutil and makeplacer, I believe this is a part of the problem.

Can anyone help me understand what's going wrong with that kind of custom recipe?

Thanx!

D4rkh0bb1T

Modmain Recipe:

Spoiler

local mushgarden = GLOBAL.Recipe("mushgarden",
{ 
        
        Ingredient("cutgrass", 6),
        Ingredient("green_cap", 3),
		Ingredient("red_cap", 3),
		Ingredient("blue_cap", 3),
		Ingredient("boards", 4),
        Ingredient("poop", 4)
},
        RECIPETABS.FARM, TECH.NONE,"mushgarden_placer" )
        mushgarden.atlas = "images/inventoryimages/mushgarden.xml"	

 

Prefab :

Spoiler

--HEADLINE
require "prefabutil"

[bunch of codes here]

--BOTTOMLINE
return	Prefab("common/objects/mushgarden", fn, assets, prefabs),
	MakePlacer("common/mushgarden_placer", "mushgarden", "mushgarden", "idle")

 

 

if  (GLOBAL.IsDLCEnabled(GLOBAL.CAPY_DLC)) then
    local mushgarden = GLOBAL.Recipe("mushgarden",
{ 
        
        Ingredient("cutgrass", 6),
        Ingredient("green_cap", 3),
		Ingredient("red_cap", 3),
		Ingredient("blue_cap", 3),
		Ingredient("boards", 4),
        Ingredient("poop", 4)
},
        RECIPETABS.FARM, TECH.NONE,GLOBAL.RECIPE_GAME_TYPE.COMMON,"mushgarden_placer" )
        mushgarden.atlas = "images/inventoryimages/mushgarden.xml"	
else
    local mushgarden = GLOBAL.Recipe("mushgarden",
{ 
        
        Ingredient("cutgrass", 6),
        Ingredient("green_cap", 3),
		Ingredient("red_cap", 3),
		Ingredient("blue_cap", 3),
		Ingredient("boards", 4),
        Ingredient("poop", 4)
},
        RECIPETABS.FARM, TECH.NONE,"mushgarden_placer" )
        mushgarden.atlas = "images/inventoryimages/mushgarden.xml"	

end

The difference is GLOBAL.RECIPE_GAME_TYPE.COMMON

21 minutes ago, KingZed said:

The difference is GLOBAL.RECIPE_GAME_TYPE.COMMON

Thanx KingZed! Works like a charm!

Is there any topic that points many differences like that between DS and SW? I wonder where you pick that.

 

42 minutes ago, D4rkh0bb1T said:

Thanx KingZed! Works like a charm!

Is there any topic that points many differences like that between DS and SW? I wonder where you pick that.

 

data/DLC0002

data/DLC0001

recipes

you will find the differences

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