SW RPG Skills - ShortWlf/mcswrpg GitHub Wiki

RPG Levels Mod

Our mod gamifies common Minecraft activities by providing players with a variety of skills they can level up. Each skill awards XP when you perform specific actions, and once enough XP is gathered, you level up, receiving immediate feedback with a level-up sound and a boost of vanilla XP. The leveling formula can be configured to be linear or expandable, letting you fine-tune the progression curve.

Combat

What It Does: Combat reflects your player’s prowess in battle—the more skilled you are at vanquishing hostile mobs, the higher your Combat level becomes. A higher Combat level means you not only get recognition for your kill count but may also unlock bonuses or improved damage handling as you progress.

How to Level:

Mob Kills: Your Combat XP increases each time you eliminate a hostile mob (for example, zombies, creepers, skeletons, spiders, and witches). XP Calculation: The XP reward for each kill is configurable; specific mob types are defined in the mod’s configuration (combatMobs). If a mob type isn’t explicitly listed, a default XP value (combatVanillaXP) is awarded.

Detection:

Your mod scans the area around you once every 20 ticks (approximately once per second) using a tick-based method inherited from the objectives mod. If a mob that was previously nearby is no longer detected—indicating it has been killed—you receive the respective combat XP.

Feedback:

When sufficient XP has been accumulated to level up, you’ll receive auditory feedback via a level-up sound and a small vanilla XP boost, clearly marking your progress in combat.

Agility

What It Does: Agility reflects your player’s ability to move quickly and dodge obstacles.

How to Level:

Sprinting: Every 20 ticks (approximately once per second), if you’re sprinting, you earn agility XP. Feedback: When enough XP is gathered, your agility level increases, and you hear a level-up sound with a small vanilla XP boost.

Woodcutting

What It Does: Woodcutting measures your skill at gathering wood from various tree logs.

How to Level:

Breaking Logs: XP is awarded each time you break woodcutting-related blocks such as oak, spruce, birch, jungle, dark oak, and others. Progression: The XP per block is defined in the configuration, so different logs might offer different rewards.

Farming

What It Does: Farming improves your planting and resource management skills.

How to Level:

Using Seeds: When you interact with seeds (like wheat, beetroot, melon, pumpkin, and others), the mod awards you XP based on the type of seed. Configuration: Each seed’s XP multiplier is set in the config file, letting you adjust for balance and progression.

Harvesting

What It Does: Harvesting captures your ability to gather mature crops.

How to Level:

Breaking Mature Crops: XP is granted when you break fully-grown crops (such as wheat, carrots, potatoes, melon, pumpkin, and more). Maturity Check: For crops that grow in stages, XP is only awarded once they’re fully grown (or at the final age stage).

Fishing

What It Does: Fishing represents the skill and patience required to catch aquatic creatures.

How to Level:

Using a Fishing Rod: When you have a fishing rod in hand and fish (e.g., cod, salmon, tropical fish, pufferfish) are added to your inventory, you gain fishing XP. Inventory Check: The mod detects newly acquired fish items over a short time frame, awarding XP for each new catch.

Crafting

What It Does: Crafting tracks your creativity and dexterity in producing a variety of items.

How to Level:

Using Crafting Interfaces: By crafting items through the crafting table, player inventory, or even anvil screens, the mod monitors the changes in your inventory. XP Award: For items that appear in your crafting XP configuration (such as torches, pickaxes, axes, etc.), the difference in inventory counts is multiplied by a defined value to award XP.

Cooking

What It Does: Cooking represents your culinary prowess at preparing food.

How to Level:

Furnace/Smoker Interaction: When you use a furnace or smoker, the mod watches the output slot. Collecting cooked food (like cooked beef, porkchop, chicken, mutton, rabbit, cod, or salmon) rewards you cooking XP. Campfire Check: Additionally, if you’re near a lit campfire and have items like cooked fish in your inventory, you can earn extra cooking XP.

Smithing

What It Does: Smithing reflects your skill in smelting and forging materials into usable ingots.

How to Level:

Smelting Bars: When you smelt items that are recognized as smithing items—such as iron ingot, gold ingot, and copper ingot—the mod detects item count changes and awards smithing XP accordingly. Dual-System: This is handled similarly to the cooking XP system but with distinct configuration values tailored for smithing.

Mining

What It Does: Mining measures your prowess at extracting valuable materials from underground.

How to Level:

Block Breaking: XP is given when you break mining-related blocks such as various stones and ores (coal, iron, gold, diamond, emerald, redstone, lapis, deepslate, copper, etc.). Configured Rewards: Each block’s XP value is configurable so you can adjust your progression curve as needed.

Alchemy

What It Does: Alchemy gauges your aptitude in potion brewing and magical concoctions.

How to Level:

Brewing Stand Activity: When you use a brewing stand, the mod monitors its output slots (typically slots 1–3). Collecting Potions: When you remove brewed potions (such as regular, splash, or lingering potions) from the brewing stand, the mod compares previous slot counts with the current counts. XP Award: The difference (i.e., the number of potions taken) is multiplied by a value defined in the alchemy configuration, awarding XP for each collected potion.

Enchanting

What It Does: Enchanting measures your skill and creativity in imbuing items with magical properties, transforming ordinary gear into powerful tools or armor.

How to Level:

Enchanting Table Activity: When you use an enchantment table, the mod monitors the item placed in the primary enchantment slot (typically slot 0). Applying Enchantments: As you enchant an item—or if its enchantments are upgraded or modified—the mod detects the change from an unenchanted state to an enchanted state (or any change in its enchantments). XP Award: Each time a valid enchantment change is detected, a fixed amount of enchanting XP is awarded, as defined in the enchanting configuration. This XP contributes toward increasing your enchanting level, unlocking new heights of magical prowess.

Leveling Up

Each skill uses a standard leveling formula that can be configured to be either linear (XP is divided by a base value) or expandable (using a quadratic formula based on the square root). When your XP for a particular skill exceeds the level threshold:

Level-Up Notification: You receive a message in-game indicating the new level.

Vanilla XP Boost: A small burst of vanilla XP is also awarded. Sound Feedback: A level-up sound plays to provide auditory confirmation.