Ludeon Forums

RimWorld => Releases => Mods => Outdated => Topic started by: Kubouch on June 07, 2017, 08:09:22 PM

Title: [B18] Universal Fermenter (2017-11-18)
Post by: Kubouch on June 07, 2017, 08:09:22 PM
Universal Fermenter

(https://gitlab.com/rwmods/universal-fermenter/raw/master/About/preview.png)

Universal Fermenter is a mod which allows you to create a custom "waiting" production buildings in a style of the vanilla fermenting barrel. The mod adds the possibility customize the building's parameters such as input ingredients, output product, temperature ranges, fermentation speed and an influence of weather on the speed. It is possible to assign multiple products to a single building and cycle through them in game. Adding a new fermenter building is simple and does not require any C# skills.

Information on how to use and what to set up is on the Wiki (https://gitlab.com/rwmods/universal-fermenter/wikis/home).

Comments and tips about the code or anything else are welcome and appreciated!

Downloads and links

Beta 18 (0.18.1722):
    Universal Fermenter (b18.1.0) (https://gitlab.com/rwmods/universal-fermenter/uploads/0871f46462c63ae8d3fd77c6e168c604/UniversalFermenter_b18.1.0.zip)

All versions:
    Universal Fermenter (https://gitlab.com/rwmods/universal-fermenter/tags)

Wiki:
    Wiki (https://gitlab.com/rwmods/universal-fermenter/wikis/home)

Repository links:
    Master branch (stable) (https://gitlab.com/rwmods/universal-fermenter)
    Development branch (cutting edge) (https://gitlab.com/rwmods/universal-fermenter/tree/dev)

Issues and bugs

If you find a bug or something that bothers you, you can create a new issue (https://gitlab.com/rwmods/universal-fermenter/issues) in my repository (possible to log in via GitHub or Google). Or you can just post it here.

Version

    b18: The current RimWorld beta
    first number: The main version number. I increment this when I introduce a new feature or a significant change.
    second number: Incremented whenever I fix something or add a small improvement of an existing feature.

Co-authors
cuproPanda: I used his Cupro's Drinks (https://ludeon.com/forums/index.php?topic=32190) which served as a base for this mod.

Permissions
You are encouraged to include this mod in your mod because that's why it was created in the first place. It is licensed under the MIT license. That means you can use this mod for any purpose and release it under any license, just give me a credit.

Changelog (https://gitlab.com/rwmods/universal-fermenter/blob/master/CHANGELOG.md)


## [b18.1.0] - 2017-11-18
* Official update to Beta 18 (0.18.1722), no other changes

## [a18.0.1] - 2017-11-13
* Possible to set up different graphics for empty/non-emty fermenter.
* Update to Alpha 18 (0.18.1719, unstable)


## [a17.6.0] - 2017-09-10
* It is possible to use both Normal and Rare CompTick.
* Compatible with CompRefuelable, CompPowerTrader and CompFlickable. They can
switch the building on/off
* Weather can influence production speed (namely sunshine, rain, snow and wind).
It does not cause ingredients to rot, just changes the speed.
* Add a button in dev mode for printing current weather speed factors and roofed
factor.
* Fix: Incorrect bar display when partially filled.

## [a17.5.0] - 2017-07-17
* All functionality in CompUniversalFermenter (no building class needed).
* Better inspection string (max. 5 lines).

## [a17.4.1] - 2017-07-16
* Added ingredients summary now trims vowels when max. line length is exceeded.
* Using static class instead of [StaticConstructorOnStartup].

## [a17.4.0] - 2017-07-09
* More readable XML format.
* Ingredients are set up by ThingFilter allowing multiple ingredients per
product.

## [a17.3.0] - 2017-06-12
* All vanilla fermenting barrel's parameters are now settable in XML (for each
product).

## [a17.2.0] - 2017-06-09
* Possible to set up more ingredient-product pairs.
* New ingame button for cycling through the products.
   
## [a17.1.0] - 2017-06-07
* First release: New building class and a component property based on a
fermenting barrel.
* Possible to set up a product to be made from one ingredient ThingDef.
Title: Re: [A17] Universal Fermenter
Post by: kaptain_kavern on June 07, 2017, 08:30:26 PM
You rocks !

Thank you
Title: Re: [A17] Universal Fermenter
Post by: cuproPanda on June 07, 2017, 09:14:58 PM
It looks good! I'll have to give it a test run sometime soon! You might want to consider adding a static class like this (https://github.com/cuproPanda/QRY/blob/master/Source/Quarry/Static.cs). It's a minor improvement that means each new fermenter won't have to recreate static data, and might allow you to remove [StaticConstructorOnStartup] from the fermenters. I just recently began updating my mods to use this method :)
Title: Re: [A17] Universal Fermenter
Post by: dismar on June 08, 2017, 12:29:47 AM
oh! shiny!
Title: Re: [A17] Universal Fermenter
Post by: AtomicRavioli on June 08, 2017, 01:10:25 AM
You are an awesome person, thanks! :)
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on June 08, 2017, 05:16:55 AM
Quote from: cuproPanda on June 07, 2017, 09:14:58 PM
It looks good! I'll have to give it a test run sometime soon! You might want to consider adding a static class like this (https://github.com/cuproPanda/QRY/blob/master/Source/Quarry/Static.cs). It's a minor improvement that means each new fermenter won't have to recreate static data, and might allow you to remove [StaticConstructorOnStartup] from the fermenters. I just recently began updating my mods to use this method :)

Yes please, more comments about my code. Even though I have some programming background, this is my first C# project ever.
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on June 08, 2017, 05:56:47 AM
Quote from: cuproPanda on June 07, 2017, 09:14:58 PM
It looks good! I'll have to give it a test run sometime soon! You might want to consider adding a static class like this (https://github.com/cuproPanda/QRY/blob/master/Source/Quarry/Static.cs). It's a minor improvement that means each new fermenter won't have to recreate static data, and might allow you to remove [StaticConstructorOnStartup] from the fermenters. I just recently began updating my mods to use this method :)

What is the purpose of the [StaticConstructorOnStartup]? As I understand it it should guarantee that the static members are loaded first and since they are static they belong to the class type and therefore should be loaded only once. I understand the Static (https://github.com/cuproPanda/QRY/blob/master/Source/Quarry/Static.cs) class approach you suggested, I just don't understand how it is different from [StaticConstructorOnStartup]. Also in your quarry (https://github.com/cuproPanda/QRY/blob/master/Source/Quarry/Building_Quarry.cs) mod you used both [StaticConstructorOnStartup] and the Static class. You should be able to safely remove [StaticConstructorOnStartup] when you're using the Static class, right?
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on June 08, 2017, 08:55:16 AM
I fixed the Fermenting Barrel (https://gitlab.com/rwmods/fermenting-barrel) maximum safe temperature to be the same as vanilla. They should be completely identical now.
Title: Re: [A17] Universal Fermenter
Post by: jecrell on June 08, 2017, 09:43:47 PM
Let's dry some tobacco leaves together
Title: Re: [A17] Universal Fermenter
Post by: koni on June 09, 2017, 06:21:29 AM
So, this is meant to be a framework for modders with no/less C skills? Thank you so much!!
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on June 09, 2017, 08:48:37 AM
Quote from: koni on June 09, 2017, 06:21:29 AM
So, this is meant to be a framework for modders with no/less C skills? Thank you so much!!

Yes, only knowledge how to add XML buildings is required.
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on June 09, 2017, 09:04:09 AM
New version (a17.2.0)!

Added the possibility to assign multiple resources to a single building. You can choose what to produce by clicking on a button in game.

The code is still a bit of a hodgepodge but I had a good time fixing bugs so I hope it will work nicely. I'm off for the weekend now :-D. Let me know about any issues, I'll try to fix them when I'm back.

Enjoy!
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on June 09, 2017, 10:27:50 AM
Just for convenience I added a "forbiddable" property to the Fermenting Barrel. When you forbid the barrel, colonists won't put stuff in so you can control how much resources get produced. It is a simple XML deed, you can easily do it yourself or remove it.

That updates Fermenting Barrel to version a17.2.1. Download etc. in the first post.
Title: Re: [A17] Universal Fermenter
Post by: lionessJess on June 10, 2017, 04:45:53 PM
You are a star!!! I have been trying to work out how to make my own fermenting barrel for ages, now I can finally finish my wine mod. I am super new to this and very grateful for your work!!
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on June 12, 2017, 06:22:38 PM
New version (a17.3.0)!

Now it is possible to assign all the properties to every resource. Each product can have its own fermenting temperature, speed, etc.

For more info, please visit a brand new Wiki (https://gitlab.com/rwmods/universal-fermenter/wikis/home). There are examples on how to use the mod and a list of all possible setable parameters. I ditched the Fermenting Barrel mod in favor of the Wiki.

Enjoy!
Title: Re: [A17] Universal Fermenter
Post by: notfood on June 12, 2017, 10:40:26 PM
I'm no fan of the current syntax. Taking the example from the wiki, this would be more understandable. Use Verse.FloatRange instead of lists of floats.

<ThingDef ParentName="BuildingBase">
  ...
  <thingClass>Kubouch.Building_UniversalFermenter</thingClass>
  ...
  <comps>
    <li Class="Kubouch.CompProperties_UniversalFermenter">
      <ingredient>Wort</ingredient>
      <products>
        <li>
          <thingDef>Lager</thingDef>
          <temperatureSafe>
            <min>0</min>
            <max>15</max>
          </temperatureSafe>
          <temperatureIdeal>
            <min>5</min>
            <max>15</max>
          </temperatureIdeal>
        </li>
        <li>
          <thingDef>Ale</thingDef>
          <temperatureSafe>
            <min>5</min>
            <max>30</max>
          </temperatureSafe>
          <temperatureIdeal>
            <min>15</min>
            <max>30</max>
          </temperatureIdeal>
        </li>
      </products>
    </li>
    <li Class="CompProperties_Forbiddable"/>
  </comps>
  <tickerType>Rare</tickerType>
  ...
</ThingDef>
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on June 13, 2017, 02:42:44 AM
Quote from: notfood on June 12, 2017, 10:40:26 PM
I'm no fan of the current syntax. Taking the example from the wiki, this would be more understandable. Use Verse.FloatRange instead of lists of floats.

I agree, it's not really understandable. I really appreciate these suggestions since this is basically my first mod ever and I don't know much. Something to do for the next version!
Title: Re: [A17] Universal Fermenter
Post by: Bombadil on June 19, 2017, 06:13:02 PM
Thanks for putting this up, it looks good. Is it possible to have a differing amount of ingredients and products? E.g. 1 ingredient and 10 products. The idea was to re-skin it as a beehive - 1 queen bee in results in 10 honeycomb later. Also, are recipes with multiple ingredients possible? E.g. 2 mushroom spore + 10 compost = 20 mushrooms. My understanding of your wiki suggests that these two things are not currently possible.
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on June 20, 2017, 04:01:30 AM
Quote from: Bombadil on June 19, 2017, 06:13:02 PM
Thanks for putting this up, it looks good. Is it possible to have a differing amount of ingredients and products? E.g. 1 ingredient and 10 products. The idea was to re-skin it as a beehive - 1 queen bee in results in 10 honeycomb later. Also, are recipes with multiple ingredients possible? E.g. 2 mushroom spore + 10 compost = 20 mushrooms. My understanding of your wiki suggests that these two things are not currently possible.

You're right, they are not possible (yet). Right now it is only one amount for both. Also you can have only one particular thing as an ingredient and product.

I am now working on implementing the notfood's suggestion above (that's done) and trying to make it possible for ingredients to be multiple resources (using i.e. the recipe bills syntax with ThingFilters). I'll try to add a support for different amounts, too. I'm not sure if I can make the new version before July, though.
Title: Re: [A17] Universal Fermenter
Post by: Bombadil on June 20, 2017, 07:47:52 AM
Thanks for your efforts, but the changes for the situation I gave are not actually necessary - I thought of a work around. I can just make an intermediate material step. Using the mushroom example I can make a recipe to "prepare starter", 2 spore + 10 compost = 20 starter so then it is the possible 20:20 ingredient:product amount that works.
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on July 04, 2017, 04:37:09 PM
I now implemented the 2 features mentioned by Bombadil:
Also I made a better syntax as suggested by notfood (with a separate ingredient filter for each product).

Soon I'll make a new release and update the Wiki (since the syntax is completely changed now) but for now you can get it from the development branch (https://gitlab.com/rwmods/universal-fermenter/tree/thingfilter) and test it.
Title: Re: [A17] Universal Fermenter
Post by: notfood on July 04, 2017, 07:33:43 PM
Thank you. I'm using this in HardcoreSK pack so it's reaching a lot of users. Soon though. heheh.

I did a minor modification to the syntax. Instead of defName I put result.
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on July 08, 2017, 06:21:37 PM
New version (a17.4.0)!


Download:
    Universal Fermenter (a17.4.0) (https://gitlab.com/rwmods/universal-fermenter/uploads/b42ec798b91a759c1ed2b990f2b50481/UniversalFermenter_a17.4.0.zip)

For more info check the examples (https://gitlab.com/rwmods/universal-fermenter/wikis/examples) and parameters' overview (https://gitlab.com/rwmods/universal-fermenter/wikis/setable-properties).

Enjoy!
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on July 08, 2017, 06:26:39 PM
Quote from: notfood on July 04, 2017, 07:33:43 PM
Thank you. I'm using this in HardcoreSK pack so it's reaching a lot of users. Soon though. heheh.

I did a minor modification to the syntax. Instead of defName I put result.

Great, feel free to include and modify it as you please :-).
I suppose you are refering to the <thingDef> tag. Personally, I like it as it is because it gives you a hint what exactly you should put there.
Title: Re: [A17] Universal Fermenter (2017-07-09)
Post by: notfood on July 08, 2017, 10:08:04 PM
It went live. Thank you. In use here: https://github.com/skyarkhangel/Hardcore-SK/blob/master/Mods/Core_SK/Defs/ThingDefs_Buildings/Buildings_Production.xml#L2330

It'll be added to more things in time.
Title: Re: [A17] Universal Fermenter (2017-07-09)
Post by: Kubouch on July 11, 2017, 04:56:21 AM
Quote from: notfood on July 08, 2017, 10:08:04 PM
It went live. Thank you. In use here: https://github.com/skyarkhangel/Hardcore-SK/blob/master/Mods/Core_SK/Defs/ThingDefs_Buildings/Buildings_Production.xml#L2330

It'll be added to more things in time.

Great to see it being used!
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on July 16, 2017, 07:03:12 AM
Update (a17.4.2)!


Download:
    Universal Fermenter (a17.4.2) (https://gitlab.com/rwmods/universal-fermenter/uploads/b2e3e6d8849121bd35cc045cdad52a77/UniversalFermenter_a17.4.2.zip)

Just popped out a new update while working on a new version and drinking coffee on my backyard. No need to change anything in your XML.

Enjoy!

EDIT: I had a missing file in a17.4.1. Fixed the derp in a17.4.2.
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on July 16, 2017, 06:01:39 PM
New version (a17.5.0)!


Download:
    Universal Fermenter (a17.5.0) (https://gitlab.com/rwmods/universal-fermenter/uploads/5c7e73d1208e80b0e931d2177f38c80a/UniversalFermenter_a17.5.0.zip)

From now on, the class Kubouch.Building_UniversalFermenter doesn't exist anymore and all the functionality is achieved solely by adding the Kubouch.CompProperties_UniversalFermenter. Otherwise the syntax is unchanged. This change allows for adding the Universal Fermenter functionality to any building class (or at least should - haven't tested that properly yet).

Another change is the inspector string. I shrank the lines to max. 5 lines. There is still one line left for other building/comp classes to fill.

Now I need to run through some compatibility checks and see how it blends with other vanilla building/comp classes and some mods. Right now, for example, it is necessary to use the Rare ticker which probably screws up the Refuelable comp compatibility. I need fix the mod to work with both Normal and Rare ticker types (seems easy).

Enjoy!
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: Dark_Inquisitor on July 17, 2017, 08:26:07 PM
This mod is amazing. When you'll add a possibility to require power to progress fermentation you'll be able to make literally everything... Just imagine that!
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: Kubouch on July 19, 2017, 03:58:02 AM
Quote from: Dark_Inquisitor on July 17, 2017, 08:26:07 PM
This mod is amazing. When you'll add a possibility to require power to progress fermentation you'll be able to make literally everything... Just imagine that!

Definitely. For the next release I plan to go through vanilla comps and see how compatible they are with my mod and possibly make them work together. Power component together with Refueable are definitely on my list. This would allow a lot more possibilities: electric ovens, smoking pits, automatic human meat crushers... well, stuff like that :-D.
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: Kubouch on July 28, 2017, 07:21:00 PM
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 (https://gitlab.com/rwmods/universal-fermenter/tree/dev). 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
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: 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.
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: Kubouch on July 30, 2017, 06:55:58 AM
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.
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: MightyGooga on August 02, 2017, 10:15:16 PM
Hi, please crete mor things like this. Thank you verymuch
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: Kubouch on August 06, 2017, 06:09:05 AM
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.
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: 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.
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: Kubouch on August 21, 2017, 12:43:54 PM
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 (https://gitlab.com/rwmods/universal-fermenter/wikis/examples#more-beers) 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.
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: 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.
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: Kubouch on August 24, 2017, 08:03:58 AM
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 (https://goo.gl/QqnWVX) 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.
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: 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), 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.
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: Kubouch on August 24, 2017, 09:37:12 AM
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.
Title: Re: [A17] Universal Fermenter (2017-07-17)
Post by: Kubouch on September 09, 2017, 10:57:14 AM
New version is sitting in my dev (https://gitlab.com/rwmods/universal-fermenter/tree/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 (https://gitlab.com/rwmods/universal-fermenter/blob/dev/CHANGELOG.md) for more details. See you soon.
Title: Re: [A17] Universal Fermenter
Post by: Kubouch on September 10, 2017, 04:25:48 PM
New version (a17.6.0)!


Download:
    Universal Fermenter (a17.6.0) (https://gitlab.com/rwmods/universal-fermenter/uploads/6e6cd4558f9a9ce97cf91a61fe811333/UniversalFermenter_a17.6.0.zip)

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 (https://gitlab.com/rwmods/universal-fermenter/wikis/examples#sun-dried-tomatoes-weather-effects) 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!
Title: Re: [A17] Universal Fermenter (2017-09-10)
Post by: Kubouch on November 12, 2017, 05:32:46 PM
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 (https://gitlab.com/rwmods/universal-fermenter/uploads/e26079af2769199a0c29cb9a7c3be302/UniversalFermenter_a18.0.1.zip).

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 (https://gitlab.com/rwmods/dry-leaves/uploads/8afdad98ae7341a49e9683f11d1ce1e0/DryLeaves_a18.0.1.zip).

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

Enjoy!
Title: Re: [A17] Universal Fermenter (2017-09-10)
Post by: kaptain_kavern on November 12, 2017, 10:22:39 PM
YaY!

Thanks
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: Kubouch on November 18, 2017, 07:39:43 AM
New version (b18.1.0)!


Download:
    Universal Fermenter (b18.1.0) (https://gitlab.com/rwmods/universal-fermenter/uploads/0871f46462c63ae8d3fd77c6e168c604/UniversalFermenter_b18.1.0.zip)

The only main change is the possibility of having a different texture per product, when there are some ingredients loaded. It works a bit the same way as vanilla Power Switch uses the on/off textures. When the building is empty, a default texture is used for all the products. How to use the feature is described on the Wiki (https://ludeon.com/forums/index.php?topic=36823.0).

Enjoy!
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: notfood on November 18, 2017, 05:55:59 PM
Woot!
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: Harry_Dicks on January 03, 2018, 04:09:01 PM
When extracting Universal Fermenter, there is no base folder for it. My question is, does RimWorld care what the name of the base folder is? Can it be just Universal Fermenter, or does it need to be UniversalFermenter_b18.1.0 ?
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: Canute on January 04, 2018, 04:38:00 AM
Maybe you notice some discussion about steam mods, Steam store the mod's into folder with numeric names.
It doesn't matter how the folder is named, the mod name is stored into the about.xml  .

Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: Kubouch on January 20, 2018, 04:39:16 PM
Quote from: Harry_Dicks on January 03, 2018, 04:09:01 PM
When extracting Universal Fermenter, there is no base folder for it. My question is, does RimWorld care what the name of the base folder is? Can it be just Universal Fermenter, or does it need to be UniversalFermenter_b18.1.0 ?

You can name the folder as you want. I should keep that in mind for future releases and zip it with the base folder.
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: PreDiabetic on January 24, 2018, 03:21:27 PM
<comps>
<li Class="Kubouch.CompProperties_UniversalFermenter">
<products>
                <li>
                    <thingDef>Megaspider_Meat</thingDef>
                    <ingredientFilter>
<thingDefs>
<li>Hay</li>
</thingDefs>
                    </ingredientFilter>
                    <temperatureSafe>
                        <min>0</min>
                        <max>50</max>
                    </temperatureSafe>
                    <temperatureIdeal>
                        <min>10</min>
                        <max>20</max>
                    </temperatureIdeal>
<maxCapacity>100</maxCapacity>
                    <baseFermentationDuration>300000</baseFermentationDuration>
                    <efficiency>5</efficiency>
                </li>
</products>
</li>
       <li Class="CompProperties_Forbiddable"/>
    </comps>


why this doesn't work? Standart Barrel with only changes to "<thingClass>Building</thingClass>" due to your warning.
JobDriver threw exception in initAction. Pawn=Xue, Job=UF_FillUniversalFermenter (Job_49148) A=Thing_InsectLab765038 B=Thing_Hay1007488, Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at Kubouch.CompUniversalFermenter.AddIngredient (Verse.Thing ingredient) [0x00000] in <filename unknown>:0
  at Kubouch.JobDriver_FillUniversalFermenter+<>c__DisplayClass8_0.<MakeNewToils>b__1 () [0x00000] in <filename unknown>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x00000] in <filename unknown>:0  lastJobGiver
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: Kubouch on February 04, 2018, 04:34:32 PM
Quote from: PreDiabetic on January 24, 2018, 03:21:27 PM
<comps>
<li Class="Kubouch.CompProperties_UniversalFermenter">
<products>
                <li>
                    <thingDef>Megaspider_Meat</thingDef>
                    <ingredientFilter>
<thingDefs>
<li>Hay</li>
</thingDefs>
                    </ingredientFilter>
                    <temperatureSafe>
                        <min>0</min>
                        <max>50</max>
                    </temperatureSafe>
                    <temperatureIdeal>
                        <min>10</min>
                        <max>20</max>
                    </temperatureIdeal>
<maxCapacity>100</maxCapacity>
                    <baseFermentationDuration>300000</baseFermentationDuration>
                    <efficiency>5</efficiency>
                </li>
</products>
</li>
       <li Class="CompProperties_Forbiddable"/>
    </comps>


why this doesn't work? Standart Barrel with only changes to "<thingClass>Building</thingClass>" due to your warning.
JobDriver threw exception in initAction. Pawn=Xue, Job=UF_FillUniversalFermenter (Job_49148) A=Thing_InsectLab765038 B=Thing_Hay1007488, Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at Kubouch.CompUniversalFermenter.AddIngredient (Verse.Thing ingredient) [0x00000] in <filename unknown>:0
  at Kubouch.JobDriver_FillUniversalFermenter+<>c__DisplayClass8_0.<MakeNewToils>b__1 () [0x00000] in <filename unknown>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x00000] in <filename unknown>:0  lastJobGiver


Hi, thanks for letting me know.

Just as a sanity check, make sure that you have the latest version (b18.1.0) (https://gitlab.com/rwmods/universal-fermenter/tags/b18.1.0).

Could you send me the whole file where you added this?

I am not RimWorlding these days but I think I'll make a new version in a relatively near future to address all the things that are popping out. I added this to my issues list (https://gitlab.com/rwmods/universal-fermenter/issues) to make sure it will be looked into.
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: MightyGooga on July 31, 2018, 02:09:42 PM
Hello, is it possible to reposition the progress bar display? In a 3x2 building it is in a akward position.
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: Kubouch on August 01, 2018, 03:45:26 AM
Quote from: MightyGooga on July 31, 2018, 02:09:42 PM
Hello, is it possible to reposition the progress bar display? In a 3x2 building it is in a akward position.

Hi, I'll look into it. Thanks for reporting. I'm going to update this mod to a 1.0 version when it's stable. Added this to my todo list.
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: scareLOL444 on August 05, 2018, 11:59:30 AM
Hello,
First off all, thank you for this mod, it made my life so much easier.
So, I plan to release a mod to the steam workshop in the near future that uses Universal Fermenter, however, I couldn't find your mod on the workshop.
If you don't plan to release to the workshop, do you allow me to embed the necessary code from your mod within mine (while still metionning the use of your mod and linking to this page) in order to simplify the installation process for steam users ?
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: mcduff on August 05, 2018, 02:47:09 PM
Does this work as is with 1.0 or should I wait for the update?
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: Syrchalis on August 10, 2018, 09:11:20 AM
I updated this to 1.0 because I needed it for my private blueberry mod.

[attachment deleted due to age]
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: dismar on October 19, 2018, 11:18:11 PM
Quote from: Syrchalis on August 10, 2018, 09:11:20 AM
I updated this to 1.0 because I needed it for my private blueberry mod.

lol A lot of us use this mod's coding now :) I have my own version for my mods as well. Thanks Kubouch!
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: alexus30f on November 02, 2018, 04:17:20 AM
+1 for this "Hello, is it possible to reposition the progress bar display? In a 3x2 building it is in a akward position."

Alternatively, an option to toggle the progress bar on/off would also be good. The bar sometime gets in the way when using the code on other objects/graphic.
Title: Re: [B18] Universal Fermenter (2017-11-18)
Post by: Reize81 on March 22, 2019, 04:13:21 PM
I used the Universal Fermenter for my mod (and included credits & thx) and it works fine. Unfortunately if my mod is run along the 1.0 cigarettes mod I get a mod conflict because both mods use the Universal Fermenter.

Which raises the two questions:

- How to solve the conflict ?
- How to have more than one type of universal fermenter active ?

Here is a link to my mod: https://ludeon.com/forums/index.php?topic=48298.0 (https://ludeon.com/forums/index.php?topic=48298.0)

Can anyone help ?


Update:The user Automatic on steam suggested to rename the universal fermenter assembly using dnspy. I did and it works. So this should solve my conflict and my problems.