thiosk Posted April 29, 2018 Share Posted April 29, 2018 (edited) Hello All, I'm using ItemZED to work on an item mod. The idea is that an unopened bottle of mayo is shelf stable and found on grocery shelves, and can then be opened to give a full, perishable bottle of standard mayo. this enables good sammies later in the game. First, heres the candypackage and recipe i'm imitating ' However, the LuaCode for the candy package using the OnCreate (string) line does not seem to correspond to what happens in game. In game, you create the lollipops. However, the luacode called by oncreate shows the following, and does not create mint candy. function OpenCandyPackage_OnCreate(items, result, player) player:getInventory():AddItem("Base.MintCandy"); player:getInventory():AddItem("Base.MintCandy"); player:getInventory():AddItem("Base.MintCandy"); player:getInventory():AddItem("Base.MintCandy"); player:getInventory():AddItem("Base.MintCandy"); player:getInventory():AddItem("Base.MintCandy"); end I've tried my own codes, with and without the functions. my function: function OpenMayoPackage_OnCreate(items, result, player) player:getInventory():AddItem("Base.MayonnaiseFull"); end and heres my item currently. I've had the corresponding oncreate line in there too, but it didn't seem to do anything. I get the correct context, but no MayonnaiseFull is created when I execute the recipe. Edited April 29, 2018 by thiosk Pandorea 1 Link to comment Share on other sites More sharing options...
thiosk Posted April 29, 2018 Author Share Posted April 29, 2018 RESOLVED Ok I figured it out. 1. MayonnaiseFull=1 is insufficient. You need the module too, and for some reason, mayo is in the farming module, so the RESULT line should read: farming.MayonnaiseFull=1 2. You do not need the LUA. I suspect that was needed in earlier builds when you wanted to spawn multiple items or something. Now on to making powdered milk work. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now