Skip to main content

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.

The More RPG Library introduces ranged spell schools that combine archery mechanics with elemental magic. These schools use the ARCHERY archetype and calculate power based on ranged weapon damage.

Overview

Ranged spell schools are unique because they combine traditional ranged weapon damage with spell school power. They also integrate with the Ranged Weapon API and Critical Strike mods when available.

Frost Ranged

Frost Ranged combines frost magic with archery for icy projectile attacks.

School Properties

  • Color: 0xccffff (icy cyan)
  • Archetype: ARCHERY
  • Damage Type: DamageTypes.ARROW
  • ID: spell_power:frost_ranged

Registration

public static final SpellSchool FROST_RANGED = new SpellSchool(
    SpellSchool.Archetype.ARCHERY,
    Identifier.of(SpellPowerMod.ID, "frost_ranged"),
    0xccffff,
    DamageTypes.ARROW,
    rangedDamageAttribute()
);

Power Calculation

Frost Ranged calculates its power by combining ranged damage and frost spell power:
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;
});
Formula: Frost Ranged Power = Ranged Damage + Frost Spell Power

Haste Support

If the Ranged Weapon API is loaded, Frost Ranged benefits from ranged haste:
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 Integration

When Critical Strike mod is loaded, Frost Ranged gains critical chance and damage:
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);
});

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;
});
Frost Ranged synergizes well with the Frosted and Frozen Solid status effects for crowd control.

Ranged Damage Attribute Selection

Both ranged schools intelligently select the appropriate damage attribute:
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.

Mod Compatibility

Ranged spell schools automatically detect and integrate with:
  • Ranged Weapon API: Adds proper ranged damage and haste attributes
  • Critical Strike: Adds critical chance and damage modifiers
These integrations are automatic and require no additional configuration.

Using Ranged Schools

To use ranged spell schools in your spells, reference them in your spell JSON files:
{
  "school": "spell_power:frost_ranged",
  "power": 8.0,
  "range": 32
}

Build docs developers (and LLMs) love