Jump to content

replacement of a recipe in base module


chthonic

Recommended Posts

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 Base

What I've done is I've created a file SoupOverhaul.txt

here 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 above

So, 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.txt

UPD: 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 work

Anyone?

still unsolved

Link to comment
Share on other sites

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 :idea:, do not know much about scripts.

Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

  • 2 weeks later...

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