A Touch of Wickedness

A touch of Wickedness is a mod where doing evil things is punished... but can also be farmed as a resource if you dare face the consequences of your acts.
Killing innocent creatures increases a hidden Wickedness stat which can also be reduced by performing specific acts such as taming and breeding animals, healing your pets or curing zombie villages.
Pushing the villain role too far spawns the Bailiff, a thief who comes for your most precious belongings. Your chest will not be safe from his wrath and even your personal possessions.
You can catch and kill him to get back what he stole and also to get a new resource, a Seal.
To pursue a career of wickedness you must protect your goodies by building unrobbable Strongboxes using Seals. Your current level of Wickedness can be hinted at by crafting a Tally Stick again using Seals.
For pack authors
- What a kill weighs is the data map
atouchofwickedness:wickedness_weighton entity types, each entry a whole number: by default 2 for livestock and fish, 5 for wild animals, 15 for rare and companion creatures, 30 for a villager and 50 for a cat or ocelot. A creature the map doesn't list weighs nothing, so a pack can weigh another mod's creatures by adding them. Any tamed creature weighsweights.tamedwhatever the map says, a babyweights.babyMultipliertimes its weight, and a neutral mob that went for its killer before they struck it nothing. - What an item is worth to the Bailiff is the data map
atouchofwickedness:bailiff_valueon items, keyed by item or item tag. The Bailiff takes one stack, each as likely as its share of what all the stacks it may take are worth, a stack being worth its Value times its count, plusbailiff.valuePerEnchantmentLevelper enchantment level. An unlisted item is worthbailiff.unlistedValue, and one valued 0 is never taken. By default stone, dirt, sand, gravel, netherrack, rotten flesh and seeds are worth nothing, and the scale runs from food and lapis at 5 to netherite gear at 900. - Which containers the Bailiff robs is the block entity type tag
atouchofwickedness:seizable, by default chests, trapped chests and barrels. A Bailiff robs only a container its own player opened. Ender chests, shulker boxes and Strongboxes are never robbed, even if a pack adds them to the tag. - What repairs a Tally Stick in an anvil is the item tag
atouchofwickedness:repairs_tally_stick, by default the Seal. - The Bailiff's drops are the loot table
atouchofwickedness:entities/bailiff: the Bailiff's Bag, under the loot conditionatouchofwickedness:bag_chance, which readsbailiff.bagChanceandbailiff.bagChancePerLootingLevel. The Seals and the stolen haul drop outside the table. - The recipes are
atouchofwickedness:strongbox(four Seals around a chest) andatouchofwickedness:tally_stick(a Seal and a stick), so a datapack can replace them.
Wickedness, the Threshold, the Bailiff's cooldown and the containers a player opened are kept on the player and survive death and restarts. The Bailiff itself is never saved: it is gone once its player logs out or changes dimension, and a visit it left unfinished is still owed.
The terms are in GLOSSARY.md, and what each release changed for a pack is in CHANGELOG.md.
Commands
All at permission level 2:
/wickedness get <player>shows a player's Wickedness./wickedness set <player> <value>and/wickedness add <player> <value>change it. Reaching the Threshold sends the Bailiff as a kill would./wickedness threshold <player>shows the Threshold they drew.
Configuration
Everything is in one common config, config/atouchofwickedness-common.toml. Times are in seconds.
weights:tamed(50),babyMultiplier(2), andhitCost(3), what each damaging hit short of the killing blow adds on a creature weighingtormentWeight(30) or more.gossip: villagers withinradius(16) who see a Wicked kill gainscale(5) times its weight in vanilla's minor negative gossip about the killer. 0 turns it off.decay:perDay(10), the Wickedness that falls each in-game day while the player is online.atonement: what kind acts take off:breeding(3),taming(10),healingPerHeart(1),curing(40), andgift(2), at mostgiftsPerDay(5) times a day.threshold:min(50) andmax(100), the range each player's Threshold is drawn from.standing: where Marked (0.5), Overdue (0.75) and Forfeit (0.9) start, as fractions of the Threshold.warnings: how often each Warning sounds (secondsBetweenMarked120,secondsBetweenOverdue60,secondsBetweenForfeit30) and how far off (markedDistance24,overdueDistance12,forfeitDistance4). Also how near animals flee from a Forfeit player (fleeRadius16) and how fast (animalFleeSpeed1.0,animalFleeSprintSpeed1.4).bailiff:- Arriving: how far from its player it arrives (
arrivalMinDistance12,arrivalMaxDistance24), the wait before another may come (secondsBetweenVisits300), and how often an owed visit retries (secondsBetweenRetries3). - Its stats:
health(60),damageon Normal (4),knockbackResistance(1),speed(0.35) andfleeSpeed(1.4). - What it robs: the containers remembered per player (
containersRemembered32), how near where it arrived they must be (robbingRadius32), how near a ground item must be (pickupRadius6) and what it must be worth (pickupFloor5), plusunlistedValue(1) andvaluePerEnchantmentLevel(20). - Leaving: how long it stays (
secondsOnSite60), how far it flees before it stops (vanishDistance24), and how long it charges its teleport (secondsToTeleport2). - Its drops: the Seals it drops (
sealsMin1,sealsMax3), and the chance of a Bailiff's Bag (bagChance0.05, plusbagChancePerLootingLevel0.01).
- Arriving: how far from its player it arrives (
tallyStick:uses(16).
The numbers are provisional while A Touch of Wickedness is below 1.0.
Compatibility
All optional, and none nested in the jar:
- Jade shows, when you look at a Bailiff, the player it came for and the stacks it has taken, and never anyone's Wickedness.
- A Touch of Madness: a Bailiff nearby drains Sanity like any hostile mob, through an optional entry in
#atouchofmadness:unsettling.
Dependencies
None beyond NeoForge, on Minecraft 26.1.2.
This is a hobby project: I’m not monetizing any part of A touch of mods suite. I’m building it for fun, to see how far I can take it.

