[MOD] (Alpha 7) Refrigeration (v1.0.4 - Updated Nov 1)

Started by indiecosmic, October 15, 2014, 06:12:41 PM

Previous topic - Next topic

indiecosmic

Description
RimWorld Refrigeration is an attempt to add seamless long-time food storage to the game. It adds a refrigerator (along with a research project) which extends the shelf-time of prepared meals as long as the food is placed inside the refrigerator and the fridge is powered.

The refrigerator works as an ordinary storage spot, which lets colonists to place and take away meals without any extra player action required.



Download

Download RimWorld Refrigeration [Alpha 7] (v1.0.4) - Mod DB

Download the latest release on GitHub

How to install

  • Unzip the contents and place them in your RimWorld/Mods folder.
  • Activate the mod in the mod menu in the game.

How to use

  • Research the refrigeration project.
  • Build a refrigerator and make sure it has got power.

Notes
This is my first real attempt at a RimWorld mod for use by other players. Feel free to post opinions, ideas, bug reports, etc the comment section below.

Changelog

Version 1.0.4 (2014-11-01)

  • Added a glowing effect that lights up a small area around the fridge, for all the colonist night owls looking for a late snack.
Version 1.0.3 (2014-10-21)

  • Fixed a bug which prevented the refrigerator to be connected to the power grid.
Version 1.0.2 (2014-10-19)

  • Added temperature based power consumption, which increases refrigerator's the power needed in warm maps, and decreases power needed in cold maps.
  • Updated refrigerator texture to better match the vanilla furniture.
Version 1.0.1 (2014-10-16)

  • Added saving and loading and saving of refrigerator state.
  • Balanced the multiplier for stored meals.

Source code
Full source code is available at GitHub.

TheXIIILightning

Awesome! I'll be sure to try this once I'm finished with my current colony. ^^

kingqwerty


Kilroy232

I have been waiting to see this one show up. I never could quite get the code right. Very nice work :)

eatKenny

Well done, it's one of the "must have" mod ;)

Minus

Was gonna post this as a suggestion, awesome to see someone's already done it!

Our cybernetic hearts mean we care more!
Mods: Extended Surgery and Bionics, Brain Surgery, Medical XP Balance

indiecosmic

Thanks guys! I hope you'll like it. My first thought was that it should be a rather trivial mod to make, but when digging into how the food system works I changed my mind. I'm not surprised this haven't been done before. It took some "creative code" and a lot of Bernard Black to sort it out.


skullywag

Noce work, you beat me to it. Gonna have a dig and see how you handled it. :)
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Shinzy

Oh this is cool ;D
There's been some demand for a mod like this atleast based on all the comments I've read about fridges!

mrofa

Thats a nice mode, just out of curiosity did you made some system to restore/set spoil time when food is take out from fridge or fridge is destroyed ?
All i do is clutter all around.

indiecosmic

Quote from: mrofa on October 16, 2014, 04:20:02 AM
Thats a nice mode, just out of curiosity did you made some system to restore/set spoil time when food is take out from fridge or fridge is destroyed ?

Thank you! Yeah, when food is taken out from the fridge, or if the fridge loses power or is destroyed the spoil time will revert to its' original rate. I noticed I will need to balance it to behave more "realistic" though, right now it fluctuates a bit much. I'll post an update shortly.

Shinzy

Quote from: mrofa on October 16, 2014, 04:20:02 AM
Thats a nice mode, just out of curiosity did you made some system to restore/set spoil time when food is take out from fridge or fridge is destroyed ?
I did some testing with this =P it instantly removes the spoiling time multiplier from the thing during solar flare or when it's turned off or destroyed by repeated lightning strikes

well.. I can't actually confirm the last one cause the food evaporated before the fridge died
But it was fun either way
Strike lightning tool is grape

aww! and ofcourse indiecosmis managed to reply first

indiecosmic

Quote from: skullywag on October 16, 2014, 03:32:34 AM
Noce work, you beat me to it. Gonna have a dig and see how you handled it. :)

Feel free! Just give me a shout if you want me to explain the code, there are some parts in there which aren't very apparent if you haven't dug through the original meal code, looks a bit strange. :)

indiecosmic

When playing around I found a few issues I'll look into:

  • Food left in the fridge while saving a game will be "refrozen", i.e. have another multiplier applied to it on load.
  • The multiplier behaves a bit "unrealistic" right now, it will need some balancing to extend and shorten spoil times proportionally to the original meal state.

indiecosmic

Just made a new release which balances the multiplier a bit, and also adds saving and loading of refrigerator state to get around some minor bugs. This release should be backwards compatible as well.