[B18] Universal Fermenter (2017-11-18)

Started by Kubouch, June 07, 2017, 08:09:22 PM

Previous topic - Next topic

Kubouch

I fixed the Tick problem so the Fermenter now behaves the same on either Normal or Rare tick.

Also made it compatible with CompRefuelable, CompPowerTrader and CompFlickable. If it is not fueled/powered on/flicked on, the production is stopped. Simple as that. You need to be a bit careful when setting the other comps as you can easily come up with some nonsense. For example CompRefuelable accepts only Normal tick, not Rare. Also some comps add lines in the bottom-left building description which can cause overflow since my mod (as the vanilla fermenting barrel) already adds a plenty of text.

All of these were pretty much one-liners. Very simple. It is amazing how everything is so connected within the game code :-D. Release is not ready yet but you can test it out on the development branch. Not much time to work on this due to my thesis deadline coming.

PS: If you uninstall the fermenter building and place is somewhere else, the contents will stay inside!

Cheers,
Jakub

notfood

Sounds nice. I want to update. What isn't ready?

We've been using it for all the alcohols, compost and now in the jerky drying process.

Kubouch

#32
Quote from: notfood on July 30, 2017, 01:19:26 AM
Sounds nice. I want to update. What isn't ready?

We've been using it for all the alcohols, compost and now in the jerky drying process.

I added a possibility for weather (sunshine, rain, snow, wind) to influence a fermenting speed (while respecting roofs). The weather influences only the production speed (according to how you set it in XML). It does not cause it to spoil. There are some edge cases, though, which need to be tracked down. The inspector string causes some problems and the progress bar does not show the amount of ingredients correctly.

MightyGooga

Hi, please crete mor things like this. Thank you verymuch

Kubouch

Quote from: gustavoghe on August 02, 2017, 10:15:16 PM
Hi, please crete mor things like this. Thank you verymuch

Thanks for the support. Unfortunately, I have to finish some other stuff and don't have time for modding now.

SpaceDorf

Hello Kubouch,

if I read the Wiki to your Fermenter Barrel Right, I can use a single Input to create different outputs through selection.

Is it possible to have different Input Materials that create different Output Materials ?
In this case I think it would be easiest to work with single items, one base ressource in, one other ressource out.
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Kubouch

Quote from: SpaceDorf on August 08, 2017, 02:06:54 PM
Hello Kubouch,

if I read the Wiki to your Fermenter Barrel Right, I can use a single Input to create different outputs through selection.

Is it possible to have different Input Materials that create different Output Materials ?
In this case I think it would be easiest to work with single items, one base ressource in, one other ressource out.

Hey, SpaceDorf. Sorry for the late reply.

I think you're referring to the Universal Fermenter. Fermenting Barrel was an early tutorial mod which I replaced with the Wiki.

You can definitely have different inputs creating different outputs. In this example you can easily replace Wort of the Ale beer with whatever and thus have the Ale being produced from whatever. The Wiki is a bit unclear by using Wort for both beers but you can use anything.

What you're selecting by the in game button is one of the <li>...</li> fields from the XML. They are completely independent to each other.

SpaceDorf

Thank you for answering, I was indeed referring to the universal fermenter and took the other Name from the Wiki or Tutorial.

With your pointers I just reread the Example again and noticed that I read it wrong the last time and it is capable of what I wanted.
So let me get that straight :
I can have different recipes prepared for the barrel, from which I can choose ingame.
But I have to choose the result by hand ?
It is not possible for the barrel to take any input from the list and determine the output from that.
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Kubouch

Quote from: SpaceDorf on August 22, 2017, 07:25:50 AM
Thank you for answering, I was indeed referring to the universal fermenter and took the other Name from the Wiki or Tutorial.

With your pointers I just reread the Example again and noticed that I read it wrong the last time and it is capable of what I wanted.
So let me get that straight :
I can have different recipes prepared for the barrel, from which I can choose ingame.
But I have to choose the result by hand ?
It is not possible for the barrel to take any input from the list and determine the output from that.

Yes, you pre-make the recipes in XML, each recipe in its <li>...</li> tag. You toggle between the recipes by the in-game button, selecting what will be produced. The fermenter does not automatically select the output based on what you put in it.

Perhaps the best idea is to download the mod and try playing with it. There are some bugs in the development branch and I think some of them are present even in the a17.5.0 version. However, they are just cosmetic and the mod should be safe to play. I'll get back to modding in September, now I'm super busy with my graduation exams. I plan to do a mod based on this (that's why I created UF) which will be a real example of how UF works.

Razzoriel

Sorry if i'm not understanding this correctly. But can this mod make multiple recipes in the same barrel? For example, fermenting barrels that can make both beer and vodka (one using hops, other using potatoes), and yield different results and have different outcomes based on what you 'feed' it with. Because from the instructions, it doesn't exactly tell you that.

Kubouch

Quote from: Razzoriel on August 24, 2017, 09:13:52 AM
Sorry if i'm not understanding this correctly. But can this mod make multiple recipes in the same barrel? For example, fermenting barrels that can make both beer and vodka (one using hops, other using potatoes) ...

Yes, absolutely.

Quote from: Razzoriel on August 24, 2017, 09:13:52 AM
... and yield different results and have different outcomes based on what you 'feed' it with. Because from the instructions, it doesn't exactly tell you that.

BUT you don't select the output by feeding ingredients. You select it with a button in game. Example: you have 2 recipes: wort -> beer, potatoes -> vodka. The fermenter can be in 2 modes now: 1. produce beer from wort (accepts only wort), 2. produce vodka from potatoes (accepts only potatoes). You switch the 2 modes by the in-game button.

I see the Wiki is not clear enough. When I have more time, I'll update it with better examples. As I said, I plan to make a mod based on UF. When it's done, I'll link it here as an example so hopefully it will make things more clear.

Kubouch

New version is sitting in my dev branch. After a little break I'm back to modding. Tomorrow (hopefully) I'll make an official release. I just need to update the Wiki as well. The biggest change is probably a possibility for weather to influence production speed. You can see the changelog for more details. See you soon.

Kubouch

New version (a17.6.0)!


  • Weather (sun, rain, snow, wind) can now affect production speed.
  • Compatible with CompRefuelable, CompPowerTrader and CompFlickable. They can switch the building on/off.
  • It is possible to use both Normal and Rare CompTick.
  • Fix: Incorrect bar display when partially filled.

Download:
    Universal Fermenter (a17.6.0)

The biggest change in this release is that you can set weather to influence the production speed. I set up an example on the Wiki which hopefully explains how to use it.

I also focused more on compatibility. CompRefuelable, CompPowerTrader and CompFlickable can stop the production process when out of fuel/without power/flicked off. Also Universal Fermenter can now be used with both Normal and Rare ticker types without any difference (rare is preferred since it uses less resources but some buildings might require normal).

I also fixed the bar displaying how much the building is filled to actually display how much the building is filled.

I see more people actually using this mod which is great. I got a request to put the mod on Steam Workshop and that will be the next thing I'm after.

Enjoy!

Kubouch

Unofficial update (a18.0.1)

I made it compatible with Alpha 18 (0.18.1719). There is one new feature: the building can have different texture for each product when it isn't empty.

Grab it here.

I also made a mod based on this. It adds Jecrell's Tobacco and Cigarettes mod and a drying rack. You first need to dry smokeleaf/tobacco leafs before rolling them into joints/cigarettes/cigars. It requires Universal Fermenter.

Grab it here.

Everything will be anounced properly when the Alpha 18 is officially released.

Enjoy!

kaptain_kavern