Jump to content

Creating a level 1 wizard spell that costs 2 casts


Recommended Posts

I tried adjusting usageValue but it seems it does not affect power pool costs.

I then added "IsClassPowerPoolCount(This, Wizard, GreaterThanOrEqualTo, 2)" in ActivationPrerequisites and adding addResource statuseffect that removes 2 casts but it seems I might be missing a way to specify it to level 1 spells.

Are there any values that needs to be modified that I might have missed?

Edited by Cmushi
  • Like 1
Link to comment
Share on other sites

I got curious and took a look at the decompiled code and the GenericAbility.ConsumeResource function looks kinda like this:

if (this.GenericAbilityData.IsSpellUsageType)
{
    casterStats.ExpendSpellCast(this.AbilityClass, this.AbilityLevel);
}
else if (this.GenericAbilityData.IsClassPoolUsageType)
{
    casterStats.ConsumeClassAbilityPoolPoints(this.AbilityClass, this.UsageValue);
}
else if (this.GenericAbilityData.IsAccruedResourceUsageType)
{
    casterStats.ExpendAccruedResource(this.AbilityClass, this.UsageValue);
}

As you can see, the ExpendSpellCasts function doesn't take a parameter for UsageValue and always removes 1 cast from the appropriate spell level.

So basically the game never utilizes the UsageValue of Spells specifically. I don't think there's a way to get around it sadly.
You could maybe add a status effect with StatusEffectType set to SpellCastBonus and with -1 Value, to "remove" a Lv1 cast? But the spell could still be cast when you only have a single Lv1 cast remaining, so maybe wouldn't be helpful.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...