Content Patcher

Content Patcher

378k Downloads

[Content Patcher] add range conditions

Pathoschild opened this issue ยท 3 comments

commented

Add support for conditions that specify a range.

commented

Possible range syntax:

syntax meaning
100 exactly 100.
~100 max 100.
100~ min 100.
1~100 any value between 1 and 100, inclusively.

Possible alternative based on npm:

syntax meaning
100 exactly 100.
>=100 max 100.
<=100 min 100.
>=1 <=100 any value between 1 and 100, inclusively.
commented

Discussed in #modding on Discord; the min~max syntax is generally preferred, even if it's a bit less powerful.

commented

Done in develop for the upcoming Content Patcher 1.10. This uses a new {{Range}} token so it doesn't require a new feature:

"When": {
   "Hearts:Abigail": "{{Range:6, 13}}"
}