Difference between revisions of "Category:Stats - Drug"

From RimWorld Wiki
Jump to navigation Jump to search
m (DrugStatsUtility of Drug Category)
m
Line 10: Line 10:
 
|-
 
|-
 
! High gain per dose
 
! High gain per dose
| highGiver.severity
+
| highGiver.severity.ToStringPercent()
 
| The intensity of high gained per dose of this drug.
 
| The intensity of high gained per dose of this drug.
 
| 2480
 
| 2480
 
|-
 
|-
 
! High fall rate
 
! High fall rate
| {0} / day
+
| {(highFall.ToStringPercent())} / day
 
| How much this drug's high will decay each day.
 
| How much this drug's high will decay each day.
 
| 2470
 
| 2470
 
|-
 
|-
 
! High duration per dose
 
! High duration per dose
| {0} days ((highGiver.severity / highFall).ToString("F1"))
+
| {((highGiver.severity / highFall).ToString("F1"))} days
 
| How long this drug's high will last per dose.\n\nThis is calculated from the high gained per dose and the high fall rate.
 
| How long this drug's high will last per dose.\n\nThis is calculated from the high gained per dose and the high fall rate.
 
| 2460
 
| 2460
 
|-
 
|-
 
! Tolerance gain per dose
 
! Tolerance gain per dose
| toleranceGain
+
| toleranceGain.ToStringPercent()
 
| How much a user's tolerance to the chemical will increase for each dose of this drug.\n\nThis can be different for different forms of the same chemical.
 
| How much a user's tolerance to the chemical will increase for each dose of this drug.\n\nThis can be different for different forms of the same chemical.
 
| 2450
 
| 2450
 
|-
 
|-
 
! Tolerance fall rate
 
! Tolerance fall rate
| {0} / day
+
| {(DrugStatsUtility.GetToleranceOffsetPerDay(def).ToStringPercent())} / day
 
| How much a user's tolerance to the chemical will fall per day.
 
| How much a user's tolerance to the chemical will fall per day.
 
| 2440
 
| 2440
Line 40: Line 40:
 
|-
 
|-
 
! Random overdose chance
 
! Random overdose chance
| drugComp.largeOverdoseChance
+
| drugComp.largeOverdoseChance.ToStringPercent()
 
| The chance of a random overdose when taking this drug. Random overdoses can happen on any dose, whether it's a new user's first try or an experienced addict's hundredth hit.
 
| The chance of a random overdose when taking this drug. Random overdoses can happen on any dose, whether it's a new user's first try or an experienced addict's hundredth hit.
 
| 2380
 
| 2380
Line 46: Line 46:
 
! Safe dose interval for adults
 
! Safe dose interval for adults
 
| DrugStatsUtility.GetSafeDoseIntervalReadout(def)
 
| DrugStatsUtility.GetSafeDoseIntervalReadout(def)
| text
+
| An adult will only become addicted if they take the drug more often than this.\n\nThis is calculated from the drug's minimum tolerance to addict, the tolerance gain per dose, and the rate of tolerance decay. Some drugs don't have a safe interval. Such drugs can addict on any dose, even the first one.\n\nNote that the safe dose interval depends on a person's body size.
 +
----
 +
(For each human lifestage, add this:)
 +
LifeStageAge lifeStageAge = ThingDefOf.Human.race.lifeStageAges[i];
 +
string t = (i < ThingDefOf.Human.race.lifeStageAges.Count - 1) ? "AgeXToY".Translate(lifeStageAge.minAge, ThingDefOf.Human.race.lifeStageAges[i + 1].minAge - 1f) : "AgePlus".Translate(lifeStageAge.minAge);
 +
text += "\n  - " + lifeStageAge.def.LabelCap + " (" + t + ")" + ": " + "PeriodDays".Translate(DrugStatsUtility.GetSafeDoseInterval(def, lifeStageAge.def.bodySizeFactor).ToString("F1"));
 
| 2435
 
| 2435
 
|}
 
|}
  
 
[[Category:Stat]]
 
[[Category:Stat]]

Revision as of 04:17, 25 September 2024

Def Name Label Display
Order
Show
All By
Default
Drug Drug 30 false
Label Value String Report Text Display Priority In Category
High gain per dose highGiver.severity.ToStringPercent() The intensity of high gained per dose of this drug. 2480
High fall rate {(highFall.ToStringPercent())} / day How much this drug's high will decay each day. 2470
High duration per dose {((highGiver.severity / highFall).ToString("F1"))} days How long this drug's high will last per dose.\n\nThis is calculated from the high gained per dose and the high fall rate. 2460
Tolerance gain per dose toleranceGain.ToStringPercent() How much a user's tolerance to the chemical will increase for each dose of this drug.\n\nThis can be different for different forms of the same chemical. 2450
Tolerance fall rate {(DrugStatsUtility.GetToleranceOffsetPerDay(def).ToStringPercent())} / day How much a user's tolerance to the chemical will fall per day. 2440
Chemical drugComp.chemical.LabelCap The active chemical in this.\n\nIn some cases, the same chemical is present in multiple different drugs. These different drugs will satisfy the same addiction in different ways. 2490
Random overdose chance drugComp.largeOverdoseChance.ToStringPercent() The chance of a random overdose when taking this drug. Random overdoses can happen on any dose, whether it's a new user's first try or an experienced addict's hundredth hit. 2380
Safe dose interval for adults DrugStatsUtility.GetSafeDoseIntervalReadout(def) An adult will only become addicted if they take the drug more often than this.\n\nThis is calculated from the drug's minimum tolerance to addict, the tolerance gain per dose, and the rate of tolerance decay. Some drugs don't have a safe interval. Such drugs can addict on any dose, even the first one.\n\nNote that the safe dose interval depends on a person's body size.

(For each human lifestage, add this:) LifeStageAge lifeStageAge = ThingDefOf.Human.race.lifeStageAges[i]; string t = (i < ThingDefOf.Human.race.lifeStageAges.Count - 1) ? "AgeXToY".Translate(lifeStageAge.minAge, ThingDefOf.Human.race.lifeStageAges[i + 1].minAge - 1f) : "AgePlus".Translate(lifeStageAge.minAge); text += "\n - " + lifeStageAge.def.LabelCap + " (" + t + ")" + ": " + "PeriodDays".Translate(DrugStatsUtility.GetSafeDoseInterval(def, lifeStageAge.def.bodySizeFactor).ToString("F1"));

2435

This category currently contains no pages or media.