kerbholz Posted August 11, 2014 Share Posted August 11, 2014 I'm currently working on "Hot Drinks", a mod where you can make cups of coffee/tea. I've copied code from the "Make Hot Drink" recipe to my "Make a Cup of Tea" recipe and changed mine to use "A Mug of Water" instead of "Mugl" and "Water". Recipe "Make Hot Drink":recipe Make Hot Drink{ Mugl, Water, Coffee/Teabag, Sugar, Result:Mugfulll, Time:70.0,} My recipe "Make a Cup of Tea":recipe Make Cup of Tea { WaterMug, Teabag, Result:CuppaTea, Time:70.0, } The problem I'm facing is, when I actually "Make a Cup of Tea" in game, one "A Mug of Water" gets removed, but an "Empty Mug" gets added to my inventory. I'm just beginning modding, so I think this has to do with "ReplaceOnUseOn" or "ReplaceOnDeplete" from item "WaterMug" - but what do I know? Is there any way to override this behaviour? So no empty mug gets added when making a cup of tea but still the Mug of Water can be used as desired? Mod source can be found @GitHub Link to comment Share on other sites More sharing options...
CaptKaspar Posted August 11, 2014 Share Posted August 11, 2014 Is it possible to change the mod to not require sugar to make a 'Hot Drink'. I regularly make coffee without sugar. Perhaps adding sugar could have an additional energy boost since sugar contains calories? EDIT: I saw your post here http://theindiestone.com/forums/index.php/topic/10047-hot-drinks/ and I love the idea! I read this post before the above mentioned one. So disregard this comment Link to comment Share on other sites More sharing options...
kerbholz Posted August 12, 2014 Author Share Posted August 12, 2014 Finally solved this by changing my recipe to destroy the WaterMug: recipe Make Cup of Tea{ destroy WaterMug, Teabag, Result:CuppaTea, Time:70.0,} Link to comment Share on other sites More sharing options...
Jatta Pake Posted September 2, 2014 Share Posted September 2, 2014 Did you ever find the lua function that causes Water Mugs to always be replaced with Empty Mugs in recipes? I'm wondering if I can manipulate a similar function to make my MIB mod work. Link to comment Share on other sites More sharing options...
kerbholz Posted September 2, 2014 Author Share Posted September 2, 2014 The only thing I found was in [sTEAMFOLDER]\ProjectZomboid\media\scripts\items.txt:item WaterMug{ IsWaterSource = TRUE, Weight = 0.2, CanStoreWater = TRUE, Type = Drainable, UseWhileEquipped = FALSE, UseDelta = 1, DisplayName = A Mug of Water, ReplaceOnDeplete = Mugl, ReplaceOnUseOn = WaterSource-WaterMug, Icon = Mugl,}Which I think won't help with your MIB 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