Anti-Cheese Config
Is an experience abuse control system. Anti-Cheese allows you to control certain exploitable elements of XP gains to reduce the xp gained when using exploits. This system is intended to be open and flexible to allow you as the configurator a wide degree of control.
Anti-Cheese has 3 types of trackers:
- AFK Tracking
- Diminuation Tracking
- Normalization Tracking
All tracker types are Event-based. this means that you control how certain events are dealt with, not necessarily the individual infractions. This means you have different configurations for each event type and each event type will have its own tracker to manage that player's restrictions.
AFK Tracking
When players are not moving, they will begin to accrue AFK time. when that time reaches the configured threshold, they are considered AFK and will be penalized accordingly. The longer they remain AFK, the greater the penalty.
Heads up!
RECIEVE_DAMAGE and DEAL_DAMAGE events will only work with damage from entities. Damage from other sources such as cactus or drowning will not be detected by AFK anti-cheese.
Diminuation Tracking
Is when a player earns the same type of xp in rapid succession. Common examples include riding, and submersion. When configured, diminishing xp causes xp to become less and less, over time. Additionally, the reduction will persist for a set duration so the user has to wait before gaining that xp at full strength again. This can be used in a similar fashion to AFK tracking but does not require the user to be still. Both can be used together if needed.
Normalization Tracking
Is the prevention of extreme values. Examples include sprinting and swimming where rapid acceleration can cause huge spikes in xp. Normalization creates tolerance thresholds for how quickly xp can grow and keeps xp earned within those ranges. Much like diminuation, there is a retention time for how long a normalized value is retained before being reset. Normalization uses both a flat and percentage tolerance to handle extreme values. for example a 10% increase tolerance on 10 is 1, but 20 on 200. A flat tolerance of 15 would permit the 10 on 100, but limit the 200 xp to 15. In this sense, flat tolerance is the max increase in a single proc, whereas percent scales with the value.
Example Script File
WITH config(anticheese)set(afk_can_subtract).value(false);set(afk).event(SWIMMING).reduction(0.1).cooloff_amount(1).min_time_to_apply(200);set(diminishing_xp).event(RIDING).reduction(0.005).source(minecraft:horse,minecraft:boat).retention_duration(200);set(normalization).event(SPRINTING).tolerance_percent(0.1).retention_duration(400).tolerance_flat(10);END
Scripting Syntax
Each configuration uses a combination of set(config_keyword).value(some_value);
. The table below lists each configuration node's keyword, purpose and the value node format.
set node key | setting function | special nodes | value node |
---|---|---|---|
afk_can_subtract | if true, being AFK too long will cause losses in XP for that same action | true/false, default value(false) | |
afk | adds a setting for xp reductions while AFK | event(EVENT_TYPE) sets the event this afk setting applies to | see Setting values below |
diminishing_xp | adds a setting for xp reductions when repeating the same action | event(EVENT_TYPE) sets the event this afk setting applies to | see Setting values below |
normalization | adds a setting to make xp closer to previous earnings for events with xp spikes | event(EVENT_TYPE) sets the event this afk setting applies to | see Setting values below |
Setting
value nodes
node key | value format | default | function |
---|---|---|---|
source | a list of object ID strings | none | filters this anti-cheese setting by the source type. varies by event type |
min_time_to_apply | a whole number in milliseconds | 0 | for AFK settings defining the minimum time being AFK before reductions start |
reduction | a decimal value | 0.0 | the amount per duration of the anti-cheese to reduce xp by |
cooloff_amount | a whole number | 0 | the amount of reduction to fall off per tick after no longer meeting the anti-cheese criteria |
tolerance_percent | a decimal value | 0.0 | for normalization settings, what percent difference from the last xp is the limit |
tolerance_flat | a whole number | 0 | same as above but a flat difference, but for afk tracking applies to distance moved to still be considered AFK. |
retention_duration | a whole number | 0 | how long after no longer meeting criteria before reductions start to fall off |
strict_tolerance | true/false | true | used in AFK tracking. if true, the player's facing angle must also be within tolerance to be "afk" |