Carry Different Medicine Types

If you liked this item, please rate it up on Steam Workshop page.

Author: Kopp

Last revision: 3 Aug, 2023 at 14:27 UTC

File size: 141.31 KB

On Steam Workshop

Description:

A simple mod that allows your colonists to carry different types of medicines in their inventories.

This feature was requested by users of another mod of mine: Choose Your Medicine.
Since it is not related to a doctors selection of medicine when tending/operating, I decided to make it its own mod.

  • Compatibility:
    Works for mod added medicines, as long as the corresponding thingDef has a statBase ‘MedicalPotency’.
    Not compatible with mods that change the gui element ‘carry’ in the assign tab.

  • Performance:
    • Obviously the more things a colonist should carry, the higher the impact on performance.
      I did not measure it, but I assume it is fine for a few colonist and a few different things.
    • The change to the assign tab gui has a surprisingly positive effect.
      A test with about 50 pawns showed the calculation for vanilla took about 0.3ms on average, while with the mod about 0.12ms.

  • Limitations:
    The mod uses the vanilla system to make colonists put the medicines in their inventories, so be aware of the following:
    • Colonists will not clear their inventories. (If they have 10 herbals in their inventory and you set it to 5, they will not drop the surplus)
    • Colonists will not respect their ‘mass carried limit’ when picking up medicine.
  • Adding/Removing from a save:
    Should be fine. There will be errors when removing from a save once, but they can be ignored. Make a backup anyway!

  • Else:
    I am not 100% happy that you have to open another gui to set the medicines to carry. If you can think of a better solution, feel free to comment it!

    Source of the mod is included.

    Credits and Thanks to:
    Ratzinger for giving feedback.
    Brrainz for Harmony.
    Dubs for Dubs Performance Analyzer.
    Marnador for the RimWorld font, used in the preview picture.
    Tynan and Ludeon for RimWorld.

    License [creativecommons.org]

Download
Required items:

Click the title to search on this site.


HarmonySteam Workshop