RimWorld

RimWorld

Drug Response
97 Comments
Pelador  [author] 5 Feb, 2020 @ 4:52am 
@Update @echo

Pawns will now use Drug response to take drugs whilst travelling on caravans. This assuming that the caravan has the appropriate drug as part of its inventory.
Pelador  [author] 7 Dec, 2019 @ 4:13pm 
@FYI

The mod Drug Policy Fix can now be used to help manage and correct drugs added or removed part way through a save game. It will also sort the drug listings alphabetically:

https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=1930268798
NECEROS 9 Nov, 2019 @ 7:06pm 
Thank you!
Pelador  [author] 9 Nov, 2019 @ 4:49pm 
@Neceros

Please see PDF guidance notes about native pain management drugs compatibility.
NECEROS 9 Nov, 2019 @ 4:01pm 
I'm using a mod called Paracetamol which basically adds acetaminophen. It removes pain without an addiction chance, but I can't seem to see it in the Drug Response menu.
Pradeth 5 Nov, 2019 @ 8:59am 
@Pelador

Absolutely no worries! Thanks for the quick check and fix! <3
Pelador  [author] 5 Nov, 2019 @ 8:25am 
PDF Notes updated.
Pelador  [author] 5 Nov, 2019 @ 8:20am 
@Update @Noroji

Correction to pain drug recognition values.

@Noroji: Apologies, I broke the levels for pain drugs last update messing about with the threshold values, should be fine now.
Pradeth 5 Nov, 2019 @ 6:29am 
@Pelador

No worries! Take your time, thanks for the quick answer. And yes, I checked the PDF before I asked here, that's the reason I wanted to ask if it should be in the List :)

I've messed a bit with the load order and Mods that are also supported. Seems I can set most of the "Zopeiod-based" Drugs from Rimcuisine 2, but none of Apothecary. So Elixier of Soothing also isn't in my list. It's not a huge issue for me currently, I will try some more if anything else is causing problems when I have some time left later. If only Rimworld wouldn't take ages to load with a big mod list x.x

Also, as I already wrote, giving the Tea or the Elixier of Soothing for Maladys is fine, but not for Pain relief.
Pelador  [author] 5 Nov, 2019 @ 5:39am 
@Noroji

Both Turmeric Tea and Elixir of Soothing should be able to be set as pain relief drugs. And yes you are right that not all items will be identified for pain use. They must be a drug that confers some relief to pain, but also marked with a mod extension to best denote them as drugs designed to manage pain. (Further details in PDF).

There is a patch setup for these two items to be compatible.

I'm currently at work and wont be back for a few hours to check my own current play through.
Pradeth 5 Nov, 2019 @ 2:53am 
I'm using it together with Apothecary and I can set different Teas as a Malady Response, but Teas that are mainly for reducing Pain cannot be set as a Pain Relief (for example Turmeric Tea, gives x77% Pain Modificator).

Is this intended (to not clutter the display with too much drugs) or is there any kind of problem with my load order/unintended bug here?
Pelador  [author] 29 Oct, 2019 @ 9:41pm 
@Update

Added chemical addictions as malady responses. This means you can now set responses in connection with addictions.
YunoAloe 26 Oct, 2019 @ 3:46am 
It is personal.
Pelador  [author] 25 Oct, 2019 @ 9:01pm 
我妻由乃

Props to you.

If and when any release is posted I can add it to a list of mods that have been patched for native support. (Assuming it isn't personal patching).
YunoAloe 25 Oct, 2019 @ 3:18pm 
> It is the other author's discretion about whether they wish to adopt best compatibility
In reality it turns out that I as a player am adding compatibility to someone else's mod instead.
Boner Storm 25 Oct, 2019 @ 4:06am 
@Pelador Thanks! Will do!
Pelador  [author] 25 Oct, 2019 @ 12:40am 
@Boner Storm

Drug response is set up to apply to races that are human like and have the "organic standard" hediffgiver set.

Androids use an alternative hediffgiver set as far as I'm aware, so wouldn't even be considered by this mod to apply a response. They wouldn't have the comp attached to them that DR uses to initiate a response. So any checks that were changed in the last update, wouldn't even be applicable to them.

One to check with the Androids mod perhaps?
Boner Storm 24 Oct, 2019 @ 10:37pm 
@Pelador OK I did some testing and figured out that whatever caused it had something to do with trying to install Android Tiers parts on a K-9 robot. As soon as I canceled the job, everything went completely back to normal.

Just asking: do you think it's possible the update could have clashed with that? I'm sure it's something else but I could have sworn this worked before the update.
Pelador  [author] 24 Oct, 2019 @ 5:39pm 
@Boner Storm

Not seeing the same myself, and considering the change made to the last update with teetotallers, I very much doubt DR is the issue for an "incredible" change in performance.
Pelador  [author] 24 Oct, 2019 @ 5:34pm 
@我妻由乃

Originally yes, but then further considered the need for the mod extension to better recognise and apply effective pain management drugs.

It is the other author's discretion about whether they wish to adopt best compatibility with the use of this mod and I'd prefer to see DR used as an effective tool for managing pain, as intended, than have it diluted down and potentially add confusion with its use because other authors don't want to apply compatibility.
YunoAloe 24 Oct, 2019 @ 5:10pm 
@Pelador
Have you considered making an option to switch between only approved and all possible drugs for pain relief? Some authors will not patch their mods.
Boner Storm 24 Oct, 2019 @ 4:49pm 
I just got hit with incredible game lag after the update. Is anybody else experiencing this?

I've got a heavy mod load but it's been working fine until now.
Pelador  [author] 24 Oct, 2019 @ 4:23pm 
@XXX_420_Bad_Boy [JIZZ_WIZARDS]

np.

I wish I could more readily patch every single mod out there that introduces drugs. But these need inspection as well as adding the patch code. It would then also require a need to keep informed about every single mod that then introduces a drug or changes them.

It is far more sensible for authors of other mods to apply native support, which is a relatively simple patch operation adding a mod extension to relevant drugs when this mod is loaded. It also affords discretion to other mod authors some control over how they wish to classify something as an effective pain management drug or not. And it would also best confer better version control when authors make additions or changes.

I have patched some of the more recognised popular mods simply as a matter of courtesy to players.
xxx_420_Bad_Boy [Wizard_Cum] 24 Oct, 2019 @ 4:11pm 
@Pelador, sorry, I misread the documentation above about which end the patching is on.

As for the other question I figured it out. Thanks!
Pelador  [author] 24 Oct, 2019 @ 4:11pm 
@XXX_420_Bad_Boy [JIZZ_WIZARDS]

You need to "positively" identify a drug response for either a pain setting or malady, once set it will apply a response as specified unless as described in the PDF, a policy setting or other nuance may prevent use.

The selection of drugs available are managed using a menu drop-down.

In the case of maladies this selects from all medical drugs.

For pain drugs, it checks that a drug has a property that applies an offset or limitation to pain. But since a number of modded drugs may introduce a small incidental amount of pain relief, I thought sensible to use the mod extension to better identify which drugs are used intentionally as a pain management drug. This to help the drop down options more manageable for players and also to allow some confidence that the drug selected has some pain management capability more effective than the aforementioned incidental versions.
Pelador  [author] 24 Oct, 2019 @ 1:54pm 
@XXX_420_Bad_Boy [JIZZ_WIZARDS]

The PDF notes describe what steps need to be taken to enable native support for dedicated pain medication, otherwise it will automatically detect medical drugs for use with maladies.

I would suggest where other mods introduce drugs that are intended to manage pain that you make the author aware of the above notes to allow them to enable their drugs for effective use.
Pelador  [author] 22 Oct, 2019 @ 10:12pm 
@✮ ~Hello_World~ ✮

It is MP compatible.
"The" SeanMacLeod 22 Oct, 2019 @ 9:21pm 
I thought his handle was "Zetrith"?
✮ ~徐磊~ ✮ | Roy 22 Oct, 2019 @ 8:26pm 
thank you! hey is this zenith multiplayer compatible?
Pelador  [author] 22 Oct, 2019 @ 2:55pm 
@Update @llIlIlIllIIIlIlIIlIIllI

Drug response will now check to see if the pawn is a teetotaller and in this case will not initiate a response with a non-medical drug.
Pelador  [author] 18 Oct, 2019 @ 3:37am 
@Update

Simplified the recognition of added body parts (prosthetics/bionics) for the purposes of performance improvements.
Evil Weevil 17 Oct, 2019 @ 6:08am 
@Pelador

Thanks so much for your detailed response! I will give it a shot.
Pelador  [author] 16 Oct, 2019 @ 9:28pm 
@Dante

You can hmu on Rimworld Discord if needs be: https://discord.gg/rimworld
Pelador  [author] 16 Oct, 2019 @ 9:27pm 
@Dante [cont...]

If the wine however has already been defined as a social drug with other associations to things like alcohol tolerances and addiction then it is again the same process as above, but ensuring other needed drug definitions are associated. But for the purposes of policy and how the drug is handled for social use of not is determined by the drug category, so you will have to decide if you want to best define it as a medical drug or not.

This can remove the drug from some binging related activities if not applying a caveat process to still identify it for these purposes.
Pelador  [author] 16 Oct, 2019 @ 9:11pm 
@Dante

There are more elements that would need to be defined to convert a regular ingestible to a drug. And as far as I'm aware you can only apply one drug category value.

However, it all you want to do is apply a hediff from ingesting food/drink that adds a small amount of say blood filtration to achieve what you want, then it is more simply a case of adding a outcome doer to the ingestible definitions. You don't have to then apply it as a drug and consider the need to add it into a drug policy. Depends if you want to schedule the use etc.
Evil Weevil 16 Oct, 2019 @ 8:31pm 
I am interested in how you could make it such that blueberry wine (from the blueberries mod) could be given as a response to infection.

I am hesitant to add the tag <drugCategory>Medical</drugCategory> under <ingestible> </ingestible> for fear of breaking something, because it already has <drugCategory>Medical</drugCategory> there. Is it possible to add more than one tag here, or will this fail catastrophically? If so, is this the correct way to make it run? Or should they be separated with commas? (ie <>Social,Medical</>)

<ingestible>
<drugCategory>Social</drugCategory>
</drugCategory>Medical</drugCategory>
</ingestible>

Pelador  [author] 14 Oct, 2019 @ 1:52am 
You see my original reasoning was that if a drug is being used for medical purposes it kind of overrides the concerns of a persons needs or preferences.

The priority here being that for medical purposes the social drug was deemed necessary to be used.
Pelador  [author] 14 Oct, 2019 @ 1:47am 
@llIlIlIllIIIlIlIIlIIllI

Noted.

But worth mentioning this is the case of utilising "social" drugs as opposed to medical drugs which wont be a concern for teetotallers.

Regardless, I'll add a global option that in the case of a social drug and teetotaller, you can decide if a response is initiated. Will do so as soon as is possible.
Ronnie 14 Oct, 2019 @ 1:37am 
I would love an option to disable this for teetotalers so they don't get pissed at everyone for feeding them drugs.
Pelador  [author] 8 Oct, 2019 @ 2:26am 
@Update

Harmony mod patch fix supplied to allow some semblance of compatibility with the Tenants mod. It can be found here: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=1883923470

ty, @NECEROS for providing helpful assistance in testing this.
Pelador  [author] 7 Oct, 2019 @ 11:27am 
我妻由乃

Ty for the feedback.
YunoAloe 7 Oct, 2019 @ 9:49am 
I'm not sure if any drop of performance is still there, but there's definitely no clear one anymore.
Pelador  [author] 7 Oct, 2019 @ 5:00am 
@Neceros

I have potentially found a way to omit Tenants from the Drug response process.

But I'd initially prefer you to explore things with the author of Tenants with a view to allowing surgery options (as medical drug use) being something seen of potential benefit for Tenants, perhaps even a perk that improves relations with them?
NECEROS 7 Oct, 2019 @ 1:38am 
This makes perfect sense. Thank you for the detailed response. I'll talk with the Tenants author! :D
Pelador  [author] 7 Oct, 2019 @ 1:26am 
@Neceros

The Drug policy scheduling and drug response compliment each other for the benefit of colonists.

The scheduler denotes drugs that are taken on a regular basis, whereas drug response reacts to pain or maladies where no regular scheduling occurs. It is only on the basis that a drug "isn't" scheduled normally that drug response won't then react, not the other way around.

And I find it odd that Tenants would consider something of benefit to them (potentially life saving in the case of maladies) as being rude, if anything I would see this as being beneficial.

Regardless, I will look into the compatibility request to see if there is a way of omitting tenants from the process. Though am surprised they haven't been denoted as "guests" to be something different to "colonists". (E.g. Hospitality enables guests as opposed to defining them as colonists). These design choices then not in the best interests for compatibility.
NECEROS 6 Oct, 2019 @ 10:34pm 
Hello!

I would like to request that colonists which shouldn't be taking a drug (based on the drug assignments tabs) don't automatically take a drug for pain. If this is already a consideration, then I may need a patch for the Tenants mod. Sometimes they will try to give pain meds to tenants, and tenants often consider that rude, and may choose to leave.

Thanks!
Pelador  [author] 6 Oct, 2019 @ 1:01pm 
@Update

Additional performance improvements added to the process.

Additional early checking when examining hediffs to recognise missing body parts and those related to prosthetics/bionics. Also the interval between checks has been slightly increased (though still a magnitude of a few seconds in real time at normal speed).
Pelador  [author] 5 Oct, 2019 @ 12:52pm 
我妻由乃

k, that's probably where any focus in improvements need to be then, ty for the helpful feedback.