Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ProfessorFichte/More-RPG-Classes/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The More RPG Library extends Spell Engine’s spell school system with seven new schools: four magic schools, two ranged schools, and one melee school. Each school has unique power calculation formulas that combine different entity attributes.
Magic Spell Schools
Four elemental magic schools using the standard magic archetype.
Earth Magic
School ID: more_rpg_classes:earth
Color: 0xbd8b00 (brown/gold)
Archetype: MAGIC
Source: MoreSpellSchools.java:17
public static final SpellSchool EARTH = SpellSchools.register(
SpellSchools.createMagic("earth", 0xbd8b00)
);
Uses standard magic damage scaling
more_rpg_classes:earth_spell_power
Water Magic
School ID: more_rpg_classes:water
Color: 0x4dd9ff (cyan/aqua)
Archetype: MAGIC
Source: MoreSpellSchools.java:18
public static final SpellSchool WATER = SpellSchools.register(
SpellSchools.createMagic("water", 0x4dd9ff)
);
Air Magic
School ID: more_rpg_classes:air
Color: 0xd4e3fe (light blue)
Archetype: MAGIC
Source: MoreSpellSchools.java:19
public static final SpellSchool AIR = SpellSchools.register(
SpellSchools.createMagic("air", 0xd4e3fe)
);
Nature Magic
School ID: more_rpg_classes:nature
Color: 0x43bf4b (green)
Archetype: MAGIC
Source: MoreSpellSchools.java:20
public static final SpellSchool NATURE = SpellSchools.register(
SpellSchools.createMagic("nature", 0x43bf4b)
);
Ranged Spell Schools
Two ranged schools that combine ranged weapon attributes with elemental magic.
Frost Ranged
School ID: spell_power:frost_ranged
Color: 0xccffff (light cyan)
Archetype: ARCHERY
Damage Type: ARROW
Source: MoreSpellSchools.java:30
public static final SpellSchool FROST_RANGED = new SpellSchool(
SpellSchool.Archetype.ARCHERY,
Identifier.of(SpellPowerMod.ID, "frost_ranged"),
0xccffff,
DamageTypes.ARROW,
rangedDamageAttribute()
);
Power Calculation
Combines ranged damage with frost spell power:
Power Formula (MoreSpellSchools.java:53)
FROST_RANGED.addSource(SpellSchool.Trait.POWER, SpellSchool.Apply.ADD, query -> {
var second_power = query.entity().getAttributeValue(SpellSchools.FROST.attributeEntry);
return query.entity().getAttributeValue(rangedDamageAttribute()) + second_power;
});
Ranged Weapon Damage (or Generic Attack Damage if Ranged Weapon API not installed)
Frost Spell Power attribute value
rangedDamage + frostPower
Haste Calculation
If Ranged Weapon API is loaded:
Haste Formula (MoreSpellSchools.java:68)
FROST_RANGED.addSource(SpellSchool.Trait.HASTE, SpellSchool.Apply.ADD, query -> {
var haste = query.entity().getAttributeValue(EntityAttributes_RangedWeapon.HASTE.entry);
var rate = EntityAttributes_RangedWeapon.HASTE.asMultiplier(haste);
return rate - 1;
});
Critical Strike
If Critical Strike API is loaded:
Critical Chance (MoreSpellSchools.java:83)
FROST_RANGED.addSource(SpellSchool.Trait.CRIT_CHANCE, SpellSchool.Apply.ADD, query -> {
var value = query.entity().getAttributeValue(CriticalStrikeAttributes.CHANCE.attributeEntry);
return (double) CriticalStrikeAttributes.CHANCE.asChance(value);
});
Critical Damage (MoreSpellSchools.java:87)
FROST_RANGED.addSource(SpellSchool.Trait.CRIT_DAMAGE, SpellSchool.Apply.ADD, query -> {
var value = query.entity().getAttributeValue(CriticalStrikeAttributes.DAMAGE.attributeEntry);
return CriticalStrikeAttributes.DAMAGE.asMultiplier(value) - 1;
});
Fire Ranged
School ID: spell_power:fire_ranged
Color: 0xff3300 (red/orange)
Archetype: ARCHERY
Damage Type: ARROW
Source: MoreSpellSchools.java:35
public static final SpellSchool FIRE_RANGED = new SpellSchool(
SpellSchool.Archetype.ARCHERY,
Identifier.of(SpellPowerMod.ID, "fire_ranged"),
0xff3300,
DamageTypes.ARROW,
rangedDamageAttribute()
);
Power Calculation
Combines ranged damage with fire spell power:
Power Formula (MoreSpellSchools.java:57)
FIRE_RANGED.addSource(SpellSchool.Trait.POWER, SpellSchool.Apply.ADD, query -> {
var second_power = query.entity().getAttributeValue(SpellSchools.FIRE.attributeEntry);
return query.entity().getAttributeValue(rangedDamageAttribute()) + second_power;
});
Ranged Weapon Damage (or Generic Attack Damage if Ranged Weapon API not installed)
Fire Spell Power attribute value
Fire Ranged uses the same haste and critical strike calculations as Frost Ranged (see above).
Melee Spell Schools
Rage Melee
School ID: spell_power:rage_melee
Color: 0xb3b3b3 (gray)
Archetype: MELEE
Damage Type: PLAYER_ATTACK
Attribute: GENERIC_ATTACK_DAMAGE
Source: MoreSpellSchools.java:41
public static final SpellSchool RAGE_MELEE = new SpellSchool(
SpellSchool.Archetype.MELEE,
Identifier.of(SpellPowerMod.ID, "rage_melee"),
0xb3b3b3,
DamageTypes.PLAYER_ATTACK,
EntityAttributes.GENERIC_ATTACK_DAMAGE
);
Power Calculation
Combines attack damage with the custom Rage modifier:
Power Formula (MoreSpellSchools.java:77)
RAGE_MELEE.addSource(SpellSchool.Trait.POWER, SpellSchool.Apply.ADD, query -> {
return query.entity().getAttributeValue(EntityAttributes.GENERIC_ATTACK_DAMAGE) +
((query.entity().getAttributeValue(MRPGCEntityAttributes.RAGE_MODIFIER) - 100) / 10);
});
Generic Attack Damage attribute
(rageModifier - 100) / 10Where rageModifier is the Rage entity attribute value
attackDamage + ((rageModifier - 100) / 10)
Rage Scaling Example
- At 100 Rage:
+0 bonus damage
- At 150 Rage:
+5 bonus damage
- At 200 Rage:
+10 bonus damage
Haste
Haste Configuration (MoreSpellSchools.java:81)
SpellSchools.configureSpellHaste(RAGE_MELEE);
Uses standard spell haste configuration.
Critical Strike
If Critical Strike API is loaded, uses the same critical strike formulas as the ranged schools (see MoreSpellSchools.java:99-106).
Ranged Damage Attribute Helper
The schools use a helper method to determine the appropriate ranged damage attribute:
Attribute Selection (MoreSpellSchools.java:22)
private static RegistryEntry<EntityAttribute> rangedDamageAttribute() {
if (FabricLoader.getInstance().isModLoaded("ranged_weapon_api")) {
return EntityAttributes_RangedWeapon.DAMAGE.entry;
} else {
return EntityAttributes.GENERIC_ATTACK_DAMAGE;
}
}
This ensures compatibility whether or not the Ranged Weapon API mod is installed.
Initialization
All spell schools must be initialized during mod startup:
Initialization (MoreSpellSchools.java:47)
public static void initialize() {
SpellSchools.register(EARTH);
SpellSchools.register(WATER);
SpellSchools.register(AIR);
SpellSchools.register(NATURE);
// Configure power sources for ranged/melee schools
// ... (power calculation setup)
SpellSchools.register(FROST_RANGED);
SpellSchools.register(FIRE_RANGED);
SpellSchools.register(RAGE_MELEE);
}
Using Schools in Spells
Reference schools in your spell.json files:
{
"name": "Stone Spear",
"school": "more_rpg_classes:earth",
"cost": 25,
"impact": [
{
"action": {
"type": "DAMAGE",
"damage": 12
}
}
]
}
{
"name": "Ice Arrow",
"school": "spell_power:frost_ranged",
"cost": 15,
"impact": [
{
"action": {
"type": "DAMAGE",
"damage": 8
}
},
{
"action": {
"type": "STATUS_EFFECT",
"effect": "more_rpg_classes:frosted",
"duration": 60,
"amplifier": 0
}
}
]
}
{
"name": "Berserker Strike",
"school": "spell_power:rage_melee",
"cost": 20,
"impact": [
{
"action": {
"type": "DAMAGE",
"damage": 15
}
},
{
"action": {
"type": "CUSTOM",
"custom": {
"intent": "HARMFUL",
"handler": "more_rpg_classes:knock_up"
}
}
}
]
}
Trait System
Spell schools can have custom sources for various traits:
Available Traits
Base damage/power of spells from this school
Casting speed modifier (values represent percentage increase)
Critical strike chance (0.0 to 1.0, where 0.2 = 20%)
Critical damage multiplier bonus (where 0.5 = +50% crit damage)
Apply Methods
Adds the source value to the trait
Multiplies the trait by the source value
Creating Custom Schools
If you’re using More RPG Library as a dependency:
public static final SpellSchool SHADOW = SpellSchools.register(
SpellSchools.createMagic("shadow", 0x4a0e4e)
);
Custom School with Trait Sources
public static final SpellSchool BLOOD_MELEE = new SpellSchool(
SpellSchool.Archetype.MELEE,
Identifier.of("yourmod", "blood_melee"),
0x8b0000,
DamageTypes.PLAYER_ATTACK,
EntityAttributes.GENERIC_ATTACK_DAMAGE
);
BLOOD_MELEE.addSource(SpellSchool.Trait.POWER, SpellSchool.Apply.ADD, query -> {
// Power increases as health decreases
var entity = query.entity();
var missingHealthPercent = 1.0 - (entity.getHealth() / entity.getMaxHealth());
return entity.getAttributeValue(EntityAttributes.GENERIC_ATTACK_DAMAGE) * missingHealthPercent;
});
Integration Notes
The ranged schools automatically detect and integrate with:
- Ranged Weapon API - for ranged damage and haste attributes
- Critical Strike API - for crit chance and damage
If these mods are not installed, the schools gracefully fall back to vanilla attributes.
Spell schools must be registered during mod initialization, before any spells are loaded.
Use the hybrid schools (Frost Ranged, Fire Ranged, Rage Melee) to create builds that combine multiple playstyles and attribute types.