chthonic Posted December 7, 2013 Posted December 7, 2013 So I'm making a cooking overhaul mod for soups.What I want is to change the recipe of, say, Boring Soup in base module.Is there a way to do this via mod loader (not replacing the lines in the actual recipes.txt)?UPD: I've read RJ's tutorial to modloader, but still can't override the recipes in module BaseWhat I've done is I've created a file SoupOverhaul.txthere are its contents:module Base { recipe Make Boring Soup { destroy Pot/WaterPot, Water=3, Bacon/Ham/Egg/Peas/BeansOpen/Chicken/Steak/Salmon/TunaTinOpen, Result:BoringSoup, Time:70.0, }}In the game, instead of overriding the vanilla recipe, it shows 2: the vanilla recipe and mine.UPD:placing the whole recipes.txt with modified recipes in mod folder worked. But I'm still not satisfied. Want a more compact version, like i showed aboveSo, how can I replace the recipe?UPD: doesn't work with items.txt stuff either.I created a file soup.txt, placed it inside my mod folder.module Base{ item TastySoup{HungerChange = -55,Weight = 6,Type = Food,IsCookable = TRUE, DangerousUncooked = TRUE,UnhappyChange = -20,MinutesToBurn = 140,DisplayName = Tasty Soup,ReplaceOnUse = Pot,Icon = PotFull,MinutesToCook = 90,BoredomChange = -15, DaysTotallyRotten = 4, DaysFresh = 2, CustomContextMenu = Drink,}}Doesn't override the original tasty soup. Replacing whole items.txt works though, same as recipes.txtUPD: got it working with the items, not recipes though. It works only if I name the txt file in the mod folder "customitems.txt" other names don't workAnyone?still unsolved
harakka Posted December 10, 2013 Posted December 10, 2013 I'm also curious about this, as just replacing individual recipes and items would be much more practical and maintainable than having to replace everything. Even a "can't be done" response would be fine.
dred Posted December 10, 2013 Posted December 10, 2013 Maybe you could make a lua script file which detects if a modified/custom version of the recipe exist in the mod folder(s) and, if exist, loads the modified version overwriting the original one. It is only free thought , do not know much about scripts.
chthonic Posted December 10, 2013 Author Posted December 10, 2013 theres already a working system implemented. It just hasn't been explained. Need RJ or someone whos familiar with it to enlighten us, puny mortals
Connall Posted December 31, 2013 Posted December 31, 2013 So while I know this is a bit old I figured I would share this information, in case you were still curious or someone else stumbles across this thread and wants some answers. I'm unaware of recipes, but I might take a look at them soon. From what I can see though, you can actually replace items with the use of a mod, without needing to completely overwrite the original files. It's also not a great idea to overwrite the original file since it's possible for the mod to become outdated quicker. You are able to overwrite the values of items in the base game, but there's a bit of a catch. Lets say I make a file called "newitemschanged.txt" I had the original code from one of the items in the newitems file and changed some of the values. The mod will actually overwrite that original item's coding without the need to overwrite the entire file. I did say before that there's a catch. Here it is. Certain items (and I believe recipes but I can't be certain) are actually protected in some way from being modded. I'm not entirely sure how/why, or if it's a general glitch with the way the files get loaded, but no matter what, trying to change the values (such as weight) of items that were in items.txt just won't change. They will remain the same. Leading to the only way to do this, is actually overwrite the entire file, which isn't really the greatest thing to doing since it can make the mod obsolete rather quickly. I know it's not much, but there you have it.
RoboMat Posted January 9, 2014 Posted January 9, 2014 Not sure if recipes can be overwritten via text files (haven't tested it), but in theory you should be able to change the outcome of any recipe via the OnMakeItem (parameters = result, resultItem, recipe) event
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