You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/defaulted/patch-gens/weapon-stats.md
+10-24Lines changed: 10 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,24 +8,10 @@ First off, let's define what this generator is, and does.
8
8
The primary purpose of this generator is for modifying weapon stats in a vanilla-expected manner.
9
9
10
10
This will produce a `minecraft:attribute_modifiers` component.
11
+
This generator has the id `defaulted:vanilla_weapon_stats`.
11
12
12
13
The following is an introduction to how to use it:
13
14
14
-
:::details Pseudocode
15
-
```json
16
-
{
17
-
...
18
-
"patch_generators": [
19
-
{
20
-
"generator": "defaulted:vanilla_weapon_stats",
21
-
...
22
-
}
23
-
]
24
-
...
25
-
}
26
-
```
27
-
:::
28
-
29
15
First off, mark whether it should maintain the previous attribute modifiers on top of its new ones.
30
16
31
17
This is defined with a boolean with the name `persist_previous`.
@@ -95,13 +81,13 @@ The ids for the damage and speed modifiers can be overridden with `damage_id_ove
95
81
## Weapon-Level-Based Values
96
82
97
83
If in object form, requires field `type`. Can have the following values, `constant`, `lookup`, and `linear`
98
-
* Constant has the following fields:
99
-
1. `value`: A floating-point value.
100
-
2. `applies_additional`: Whether to apply a bonus provided to it, tier damage in the case of attack damage, 0 otherwise.
101
-
* Lookup has the following fields:
102
-
1. `values`: A list of level-matching conditions, which themselves are an object with two fields: a weapon-level-based value of name `value` (taking the same form seen here), and a level condition named `condition`, of a `type` either `clamped`, which takes an integer `min` and integer `max`, and will be satisfied for all numbers between the two (inclusive), or a type `list`, which is a list of accepted levels to match.
103
-
2. `fallback`: A weapon-level-based value which will be used in the case no value matches.
104
-
* Linear has the following fields:
105
-
1. `base`: A weapon-level-based value which will be the base.
106
-
2. `per_level_above_first`: The weapon-level-based value to add to the base for each level above the first.
84
+
* Constant has the following fields:
85
+
1.`value`: A floating-point value.
86
+
2.`applies_additional`: Whether to apply a bonus provided to it, tier damage in the case of attack damage, 0 otherwise.
87
+
* Lookup has the following fields:
88
+
1.`values`: A list of level-matching conditions, which themselves are an object with two fields: a weapon-level-based value of name `value` (taking the same form seen here), and a level condition named `condition`, of a `type` either `clamped`, which takes an integer `min` and integer `max`, and will be satisfied for all numbers between the two (inclusive), or a type `list`, which is a list of accepted levels to match.
89
+
2.`fallback`: A weapon-level-based value which will be used in the case no value matches.
90
+
* Linear has the following fields:
91
+
1.`base`: A weapon-level-based value which will be the base.
92
+
2.`per_level_above_first`: The weapon-level-based value to add to the base for each level above the first.
107
93
All weapon-level-based values mentioned above can either be in object form or as a single floating-point value resolving to a constant.
0 commit comments