RimWorld

RimWorld

Only If 'Tolerance' Below in Drug Policy
47 Comments
SeoHyeon  [author] 11 Jul @ 7:50pm 
Prepatcher (dependency mod) is not updated yet
ic0612 11 Jul @ 6:34am 
1.6?
Evono 16 May @ 3:47am 
This mod throws this error on boot "1x) Error while instantiating a mod of type DrugPolicyEnhanced.Mod: System.Reflection.TargetInvocationException

DrugPolicyEnhanced.Mod"
Evono 14 May @ 4:29am 
thanks for making it
ggfirst 20 Dec, 2024 @ 12:47am 
글씨가 깨지고 내성수치 설정을 못합니다.
Save outfit... 쓰고있었어서 뺴고 다시한번 해봤는데도 그래요 ㅠㅜ
Micah 26 Jul, 2024 @ 11:31pm 
@VitaKaninen Yes, you are correct. The mod doesn't currently do anything about overdosing. My original request was to add overdose protection support. If you look back 1 page on the comments you can see the previous discussion I had with @SeoHyeon on the subject.
VitaKaninen 26 Jul, 2024 @ 4:36am 
@Micah I would guess that the mod does exactly what it says. It allows a pawn to take the drug when the tolerance is under the specified value. If the Mod author had added special checks for the hidden overdose effect, I think he would have told you when you asked him. He said he didn't know, so I think you can assume there are no checks in place to ensure that the pawn is not under a hidden overdose effect.
Micah 26 Jul, 2024 @ 4:04am 
I'm getting back into the game and noticed that you responded to my previous comment:
> @Micah I'm not sure about that.

Which part aren't you sure about? The overdosing behavior is well documented on the wiki, the only part I'm uncertain about is the exact code underlying the mechanic and how a mod would be able to interact with the hidden overdose value.
cherry-wave 24 Jul, 2024 @ 11:34am 
This mod prevents alcoholics if you have many different alcohol-type drugs, thanks <3
VoiD 28 Apr, 2024 @ 11:25am 
Working for me, too. Thank you for the update! I can see the slider now in QHD.
VitaKaninen 28 Apr, 2024 @ 8:05am 
Works again, thanks!
SeoHyeon  [author] 28 Apr, 2024 @ 7:40am 
== update ==
- fixed error when loaded [1.5][KV] Save Storage, Outfit, Crafting, Drug, & Operation Settings

@VoiD
If you don't see the slide bar, it's perhaps related to your screen resolution. In FHD, the slider is visible.
SeoHyeon  [author] 24 Apr, 2024 @ 8:06pm 
@VoiD
I have exams until this week. I will check after this
VoiD 24 Apr, 2024 @ 7:03pm 
Thanks for the quick response, SeoHyeon.

No, i don't use Yayocombat3. Here is my modlist and a link to the log. Error starts at line 478.

https://imgur.com/a/czxN1nC

gist.github.com/HugsLibRecordKeeper/e2c131620591652e20fb73aa30306851
SeoHyeon  [author] 24 Apr, 2024 @ 4:42pm 
@VitaKanine
I think a compatibility patch for [Kv]save storages blahblah is outdated. It will not be harmful but I'll fix in my spare time.

@VoiD
Ummm strange... does you using Yayocombat3? Otherwise, can I request your modlist?🤔

@Micah
I'm not sure about that.
VitaKaninen 24 Apr, 2024 @ 12:31pm 
I am not getting the slider either. I was sure it was there a week or so ago when I set it up...
VoiD 24 Apr, 2024 @ 12:17pm 
Thanks for your work on the mod! I'm getting the same errer as VitaKaninen, however. I loaded my save anyway to check the drug policies. The column for "Only if tolerance below" is there but there are no sliders.

imgur.com/a/Wm5nv9y
VitaKaninen 22 Apr, 2024 @ 10:51pm 
I am getting an error each time I load the game:
Error while instantiating a mod of type DrugPolicyEnhanced.Mod: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> HarmonyLib.HarmonyException: Patching exception in method static System.Reflection.MethodBase DrugPolicyEnhanced.Patch_IOUtill_SavePolicySettings::TargetMethod() ---> System.Exception: Method static System.Reflection.MethodBase DrugPolicyEnhanced.Patch_IOUtill_SavePolicySettings::TargetMethod() returned an unexpected result: null
[Ref 80C99045]
at HarmonyLib.PatchClassProcessor.RunMethod[S,T] (T defaultIfNotExisting, T defaultIfFailing, System.Func`2[T,TResult] failOnResult, System.Object[] parameters) [0x00130] in <6ddb2f07a97745adaa7bad4e17020462>:0
Micah 30 Mar, 2024 @ 10:59pm 
I believe all of the hard drugs (flake, yayo, go-juice, wake-up) and penoxycyline add to a hidden overdose number, and when that number gets over a certain value you start suffering from overdose problems. The overdose number falls naturally with time, and in general I believe it is "safe" to do one hard drug every ~9 hours without deleterious effects.

One option would be to just look at that hidden overdose value and if it is greater than 0 don't allow another hard drug. Another option would be to just disallow any hard drugs within 9 hours of the last hard drug usage.

Thanks for looking into it either way! I have some pawns with multiple genetic dependencies which prevents random overdosing and addiction gains, but it doesn't stop the cumulative overdosing effect. At the moment I have to micromanage their drug use or else they start consuming all at the same time which is really annoying.
SeoHyeon  [author] 30 Mar, 2024 @ 6:21pm 
@Micah
Thanks for your suggestion, since I don't use Go-Juice or Flake due to the dangerous of addiction I didn't know about it. so I'll figure out how to implement it.
Micah 30 Mar, 2024 @ 10:28am 
Actually, maybe just a checkbox rather than a slider. I can't imagine you would ever want to have a *little* bit of a risk of overdose when you could just wait an hour and avoid the risk entirely.
Micah 30 Mar, 2024 @ 10:22am 
Any chance you could add a column for preventing overdosing? I have some pawns on a Go-Juice + Flake schedule but sometimes they'll take both in succession and they both contribute to overdose, so they will overdose which negates the benefits of using them (50% conscious).

Something like "only if can't overdose" or something. I know this wouldn't impact random OD chance, but it would be nice to at least not have them OD in a preventable way.
Futstub 29 Mar, 2024 @ 9:58pm 
This is really neat, thanks!
SeoHyeon  [author] 29 Mar, 2024 @ 7:38pm 
== Update ==
- updated for 1.5
The Blind One 9 Mar, 2024 @ 8:12pm 
Thanks for the quick reply :)
SeoHyeon  [author] 9 Mar, 2024 @ 3:23pm 
@The Blind One
Yes Prepatcher is required.
Prepatcher includes Harmony but has more features. This mod uses Prepatcher's features.
The Blind One 9 Mar, 2024 @ 1:04pm 
is the prepatcher mod required? I already have harmony.
SeoHyeon  [author] 7 Mar, 2024 @ 1:53am 
@_Real_Deal_
In short, in case of ambrosia, below 15% is safe, since the tolerance is more safer when it is lower value.
Additionally in case of beer, 25%.

And the tolerance indicator in the health tab is no matter with this mod, But 'Tolerance gain per dose', 'New addiction min tolerances' matters.
You can check it in the information tab of each drugs.

You may feel that manually setting the tolerance for each drug is very tired work. Then you can you 'Safe drug policy generator' with this mod!
_Real_Deal_ 6 Mar, 2024 @ 6:48pm 
Hey Bro! Thanks for Mod!
I can't figure out which % is safer, minimal number or max number is better? For example, if a pawn has a tolerance indicator of 98% in the health column, and I want let him take drugs till this number fall down to 90% then in your mod I should set the indicator to 90% or vice versa 10%, I can’t understand which value is correct, more or less? And please, provide your set up values which you use for ambrosia as an example.
mountainofcheezo 8 Dec, 2023 @ 6:22am 
You're awesome, thanks.
SeoHyeon  [author] 8 Dec, 2023 @ 3:08am 
@mountainofcheezo
The reason was Yayo Combat 3. since they replaces a vanilla method to their own method, when you turn on the option 'Use ammo' from yayo combat, the vanilla method wasn't executed.
So I made a patch for Yayo Combat 3, It will be ok for now.
SeoHyeon  [author] 6 Dec, 2023 @ 10:10pm 
@mountainofcheezo
mmm.... Can I request your mod list with XML file by RimPy? In rimpy, 'Export List' and share to me please!
I couldn't figure out what overlaps with my mod's one.
mountainofcheezo 6 Dec, 2023 @ 8:45pm 
Sure - here it is. https://rentry.co/57uyy
SeoHyeon  [author] 6 Dec, 2023 @ 8:22pm 
@mountainofcheezo
I'm apologize that I haven't see your comment.
It looks conflict with other mods that you using, Because in vanilla and my mod list It works well.
So, I suspect it's because one other mod edits the drug policy dialog, which overlaps with my mod's feature.
Can I get your mod list? Thanks.
mountainofcheezo 6 Dec, 2023 @ 8:10am 
In regards to my comment below - please see this image. If I select "Scheduled" usage, the sliders on the right overlap and are not usable.

https://imgur.com/a/v2A7NgS
SeoHyeon  [author] 5 Dec, 2023 @ 11:37pm 
@Kazuhito
고주스나 웨이크업 등의 몇몇 약물들은 내성이 존재하지 않지만, 중독성이 있는 약물로 취급되는건 처음 알았습니다.
그런 약물들은 이 모드의 기능이 적용되지 않도록 수정했습니다. 제보 감사합니다!
Rainstone 5 Dec, 2023 @ 9:54pm 
https://pastebin.com/WqeNYgB9
'약물 이름' 영향받지 않음 유전자나 원래 내성 자체가 없는 약물을 정기적으로 먹도록 하니까 위 링크에 복붙해놓은 에러 메시지가 뜨면서 게임이 조금씩 렉걸리네요
위에꺼가 영향받지 않음 유전자 들어간 웨이크업 로그, 밑에꺼가 내성이 존재하지 않는 약물(베지터블 가든 번화계 예방접종) 로그입니다
DrinkingBuddies 4 Dec, 2023 @ 10:50am 
You just changed my life. Thanks.
mountainofcheezo 25 Nov, 2023 @ 7:09pm 
The scale bar is overlapping with the "only if recreaction below" when I select the scheduled usage.
SeoHyeon  [author] 23 Nov, 2023 @ 6:58pm 
@Raptorias
You can set it in the editing dialog of drug policy for each drug. The default value is 'Anyway'; 100%, same as Vanilla RW experience. If you don't want the colonists to become addicted to the drug, set this value below the minimum addiction tolerance threshold for each drug. But the easiest way is to set it to 0%.

@Don't Farm Me Thanks
This mod is a successor of 'Safe Drug Policy Generator' mod, Because I also created that mod lol
Don't Farm Me Thanks 23 Nov, 2023 @ 5:15pm 
Thank you, thank you. This is something I've wanted forever. I used the "Safe from Addiction" mod but pawns just use every drug available any chance they get versus for recreation.
Raptorias 23 Nov, 2023 @ 6:42am 
How do we know what that should be set to? Is it universal? Is it going to be preset?
SeoHyeon  [author] 19 Nov, 2023 @ 4:40am 
@JageriuS
You can use Prison Labor with this mod for that.
JageriuS 19 Nov, 2023 @ 4:12am 
Thanks! How feasible would it be for You do copy of a drug tab for a Prisoners? That way it would be possible to set up regular wake up doses for them without manually administering.
KingsMan_ 18 Nov, 2023 @ 11:16pm 
와우..이런 모드를!