Jump to content

Recommended Posts

So I tried allowing a custom character to craft manure. I only want that specific character to be able to do that. However, I'm missing something that will probably be obvious to anyone but me.

 

I have this code in the character mod's modmain:

local Ingredient = GLOBAL.IngredientAddRecipe("poop", {Ingredient("monstermeat", 3), Ingredient("log", 1)}, GLOBAL.RECIPETABS.SURVIVAL, GLOBAL.TECH.NONE, nil, nil, nil, nil, nil, "poop_builder")

And this code in the character's lua file:

local common_postinit = function(inst) -- Minimap iconinst.MiniMapEntity:SetIcon( "mimi.tex" )inst:AddTag("poop_builder")end

Also, this is the log:

 

[00:00:12]: Mod: Mimi for DST (Mimi)  Error loading mod!
[string "scripts/util.lua"]:384: Could not find an asset matching poop_builder in any of the search paths.
LUA ERROR stack traceback:
        =[C] in function 'assert'
        scripts/util.lua(384,1) in function 'resolvefilepath'
        scripts/recipe.lua(26,1) in function '_ctor'
        scripts/class.lua(181,1) in function 'Recipe'
        scripts/modutil.lua(359,1) in function 'AddRecipe'
        ../mods/Mimi for DST/modmain.lua(61,1) in main chunk
        =[C] in function 'xpcall'
        scripts/util.lua(548,1) in function 'RunInEnvironment'
        scripts/mods.lua(382,1) in function 'InitializeModMain'
        scripts/mods.lua(363,1) in function 'LoadMods'
        scripts/main.lua(246,1) in function 'ModSafeStartup'
        scripts/main.lua(294,1)
        =[C] in function 'SetPersistentString'
        scripts/mainfunctions.lua(25,1) in function 'SavePersistentString'
        scripts/modindex.lua(82,1)
        =[C] in function 'GetPersistentString'
        scripts/modindex.lua(69,1) in function 'BeginStartupSequence'
        scripts/main.lua(293,1) in function 'callback'
        scripts/modindex.lua(475,1)
        =[C] in function 'GetPersistentString'
        scripts/modindex.lua(455,1) in function 'Load'
        scripts/main.lua(292,1) in main chunk
 
Any help/advice maybe? Thank you!  :joyous:
 
Edit: Also, how do you add a string for the craft? Do you put it right below in the modmain?
Edited by Thibooms

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