-
Notifications
You must be signed in to change notification settings - Fork 0
Effects
Mitchellbrine edited this page Aug 21, 2022
·
3 revisions
The basic component of this mod is how diseases affect the player and that is through their Effects. This core component creates different ways of altering the player. From status effects/potions to experience levels, effects can work a variety of ways on a player.
The following are vanilla effects that you can use (with the level at which they stop working).
Effect ID | Asymptomatic Level | Probability/Tick |
---|---|---|
bad-cough | 90 | 0.05% |
cough | 80 | 0.05% |
creative-sudden-death | 90 | 0.005% |
decreased-apetite | 50 | 0.05% |
develop-pneumonia | 70 | 0.005% |
famished | 90 | 0.025% |
fatigue | 100 | 5% |
hydrophobia | 80 | N/A |
iron-poke | 100 | 0.005% |
jitters | 80 | 100% |
jumping | 100 | 0.25% |
out-of-breath | 50 | 0.025% |
paranoia | 50 | 0.25% |
seizure | 25 | 0.2% |
sneeze | 75 | 0.05% |
sudden-death | 90 | 0.005% |
vomit | 75 | 0.05% |
To load a list of effects, create a file in the "dfx" folder: assets/<namespace>/dfx/
The following are the tags you need for creating an effect:
Tag | Raw Type | Default | Description |
---|---|---|---|
id |
String | The resource name of the effect to use in diseases | |
minDuration |
Integer/Long | 0 | The minimum amount of time that the effect can affect the player. |
maxDuration |
Integer/Long | 100 | The maximum amount of time that the effect can affect the player. |
duration |
Integer/Long |
Deprecated: will not work if either max or min are used. Sets both min and max at the same value. |
|
asymptomatic |
Integer | 100 | The level of blood cells required to not trigger the effect. |
weight |
Integer | 20,000 | The chance of the effect triggering (20,000 = constant) |
effects |
List | The core effects and their types/heaps/modifiers. |
{
"id": "sneeze", // While this one does not, remember to use a namespace like "modid:"
"minDuration": 1200, // The minimum amount of ticks an effect can appear, each number is one-twentieth (.05) of a second.
"maxDuration": 2400, // See above, but for maximum.
"asymptomatic": 75, // If the Blood_Cell_Count is lower than this, the effect will tick.
"weight": 10, // Out of 20,000 (or 1/100th chance a second)
"effects": [
{
"type": "sound", // Use a namespace (vanilla effects can use "diseasecraft:" or "minecraft:", or not have a namespace)
"heap": "diseasecraft:sneeze" // Most heaps will be sub-categories, but these two use resource names.
},
{
"type": "particulate-transmission", // This effect will only transmit viruses if the disease includes a vector.
"heap": "minecraft:item_slime" // This effect uses a particle, and that's what this resource name is for.
}
]
}
The "basic effects" are manipulatable mini-effects that you can use to create larger, more synthesized effects. These are used in vanilla disease effects and can be utilized in your own effects.
TBD.