RimWorld

RimWorld

Only If 'Tolerance' Below in Drug Policy
47 kommentarer
SeoHyeon  [ophavsmand] 11. juli kl. 19:50 
Prepatcher (dependency mod) is not updated yet
ic0612 11. juli kl. 6:34 
1.6?
Evono 16. maj kl. 3:47 
This mod throws this error on boot "1x) Error while instantiating a mod of type DrugPolicyEnhanced.Mod: System.Reflection.TargetInvocationException

DrugPolicyEnhanced.Mod"
Evono 14. maj kl. 4:29 
thanks for making it
ggfirst 20. dec. 2024 kl. 0:47 
글씨가 깨지고 내성수치 설정을 못합니다.
Save outfit... 쓰고있었어서 뺴고 다시한번 해봤는데도 그래요 ㅠㅜ
Micah 26. juli 2024 kl. 23:31 
@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. juli 2024 kl. 4:36 
@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. juli 2024 kl. 4:04 
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. juli 2024 kl. 11:34 
This mod prevents alcoholics if you have many different alcohol-type drugs, thanks <3
VoiD 28. apr. 2024 kl. 11:25 
Working for me, too. Thank you for the update! I can see the slider now in QHD.
VitaKaninen 28. apr. 2024 kl. 8:05 
Works again, thanks!
SeoHyeon  [ophavsmand] 28. apr. 2024 kl. 7:40 
== 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  [ophavsmand] 24. apr. 2024 kl. 20:06 
@VoiD
I have exams until this week. I will check after this
VoiD 24. apr. 2024 kl. 19:03 
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  [ophavsmand] 24. apr. 2024 kl. 16:42 
@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 kl. 12:31 
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 kl. 12:17 
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 kl. 22:51 
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 kl. 22:59 
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  [ophavsmand] 30. mar. 2024 kl. 18:21 
@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 kl. 10:28 
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 kl. 10:22 
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 kl. 21:58 
This is really neat, thanks!
SeoHyeon  [ophavsmand] 29. mar. 2024 kl. 19:38 
== Update ==
- updated for 1.5
The Blind One 9. mar. 2024 kl. 20:12 
Thanks for the quick reply :)
SeoHyeon  [ophavsmand] 9. mar. 2024 kl. 15:23 
@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 kl. 13:04 
is the prepatcher mod required? I already have harmony.
SeoHyeon  [ophavsmand] 7. mar. 2024 kl. 1:53 
@_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 kl. 18:48 
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 kl. 6:22 
You're awesome, thanks.
SeoHyeon  [ophavsmand] 8. dec. 2023 kl. 3:08 
@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  [ophavsmand] 6. dec. 2023 kl. 22:10 
@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 kl. 20:45 
Sure - here it is. https://rentry.co/57uyy
SeoHyeon  [ophavsmand] 6. dec. 2023 kl. 20:22 
@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 kl. 8:10 
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  [ophavsmand] 5. dec. 2023 kl. 23:37 
@Kazuhito
고주스나 웨이크업 등의 몇몇 약물들은 내성이 존재하지 않지만, 중독성이 있는 약물로 취급되는건 처음 알았습니다.
그런 약물들은 이 모드의 기능이 적용되지 않도록 수정했습니다. 제보 감사합니다!
Rainstone 5. dec. 2023 kl. 21:54 
https://pastebin.com/WqeNYgB9
'약물 이름' 영향받지 않음 유전자나 원래 내성 자체가 없는 약물을 정기적으로 먹도록 하니까 위 링크에 복붙해놓은 에러 메시지가 뜨면서 게임이 조금씩 렉걸리네요
위에꺼가 영향받지 않음 유전자 들어간 웨이크업 로그, 밑에꺼가 내성이 존재하지 않는 약물(베지터블 가든 번화계 예방접종) 로그입니다
DrinkingBuddies 4. dec. 2023 kl. 10:50 
You just changed my life. Thanks.
mountainofcheezo 25. nov. 2023 kl. 19:09 
The scale bar is overlapping with the "only if recreaction below" when I select the scheduled usage.
SeoHyeon  [ophavsmand] 23. nov. 2023 kl. 18:58 
@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 kl. 17:15 
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 kl. 6:42 
How do we know what that should be set to? Is it universal? Is it going to be preset?
SeoHyeon  [ophavsmand] 19. nov. 2023 kl. 4:40 
@JageriuS
You can use Prison Labor with this mod for that.
JageriuS 19. nov. 2023 kl. 4:12 
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 kl. 23:16 
와우..이런 모드를!