Class AbilityConfigurator
Configurator for Kingmaker.UnitLogic.Abilities.Blueprints.BlueprintAbility.
Inheritance
Inherited Members
Namespace: BlueprintCore.Blueprints.CustomConfigurators.UnitLogic.Abilities
Assembly: BlueprintCore.dll
Syntax
public class AbilityConfigurator : BaseAbilityConfigurator<BlueprintAbility, AbilityConfigurator>
Remarks
Each supported blueprint type has a corresponding Configurator
class to create and modify blueprints of
that type, e.g. FeatureConfigurator supports BlueprintFeature
. Configurators exist for all
blueprint types inheriting from Kingmaker.Blueprints.BlueprintScriptableObject, excluding any that are not used in the
base game.
Creating a Blueprint
Use New(string, string)
to create a blueprint:
FeatureConfigurator.New(MyBlueprintName, MyBlueprintGuid)
Once New()
is called the blueprint is added to the game library and can be referenced.
Using the Configurator
New()
returns a configurator with methods to set or modify blueprint fields and add or modify
Kingmaker.Blueprints.BlueprintComponent:
FeatureConfigurator.New(MyBlueprintName, MyBlueprintGuid).AddToGroups(FeatureGroup.Feat).AddPrerequisiteAlignment(AlignmentMaskType.LawfulGood).Configure();
Each method call returns the configurator allowing you to chain calls. Nothing is modified on the blueprint until
Configure()
is called, at which point the changes are applied and validated. Potential problems with the
blueprint are logged as warnings.
Modifying an Existing Blueprint
Use For(Blueprint)
to modify existing blueprints:
CharacterClassConfigurator.For(WizardClassGuid)
Usage is otherwise identical to creating a new blueprint.
For more information see Using BlueprintCore.
Methods
| Improve this Doc View SourceAddToSpellList(Int32, Blueprint<BlueprintSpellListReference>, Boolean)
Declaration
public AbilityConfigurator AddToSpellList(int level, Blueprint<BlueprintSpellListReference> spellList, bool addSpellListComponent = true)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | level | |
Blueprint<Kingmaker.Blueprints.BlueprintSpellListReference> | spellList | |
System.Boolean | addSpellListComponent |
Returns
Type | Description |
---|---|
AbilityConfigurator |
AddToSpellLists(Int32, SpellList[])
Configures this ability as a spell of the specified level for each spell list.
Declaration
public AbilityConfigurator AddToSpellLists(int level, params SpellList[] spellLists)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | level | |
SpellList[] | spellLists |
Returns
Type | Description |
---|---|
AbilityConfigurator |
Remarks
For each of the spellLists
a SpellListComponent
is added and the corresponding spell
list is modified to include the spell at the specified level
.
Automatically populates (if appropriate):
- Wizard Spell School Lists
- Thassilonian Wizard Spell Lists
- Belt of Perfection
- Rod of Mysticism
If you want to add a spell list not defined in SpellList use AddToSpellList(Int32, Blueprint<BlueprintSpellListReference>, Boolean).
AllowTargeting(Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>)
Convenience function to set all targeting behaviors: Kingmaker.UnitLogic.Abilities.Blueprints.BlueprintAbility.CanTargetPoint, Kingmaker.UnitLogic.Abilities.Blueprints.BlueprintAbility.CanTargetEnemies, Kingmaker.UnitLogic.Abilities.Blueprints.BlueprintAbility.CanTargetFriends, and Kingmaker.UnitLogic.Abilities.Blueprints.BlueprintAbility.CanTargetSelf
Declaration
public AbilityConfigurator AllowTargeting(bool? point = null, bool? enemies = null, bool? friends = null, bool? self = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Boolean> | point | |
System.Nullable<System.Boolean> | enemies | |
System.Nullable<System.Boolean> | friends | |
System.Nullable<System.Boolean> | self |
Returns
Type | Description |
---|---|
AbilityConfigurator |
For(Blueprint<BlueprintReference<BlueprintAbility>>)
Returns a configurator to modify the specified blueprint.
Declaration
public static AbilityConfigurator For(Blueprint<BlueprintReference<BlueprintAbility>> blueprint)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<Kingmaker.UnitLogic.Abilities.Blueprints.BlueprintAbility>> | blueprint |
Returns
Type | Description |
---|---|
AbilityConfigurator |
Remarks
Use this to modify existing blueprints, such as blueprints from the base game.
If you're using WrathModificationTemplate blueprints defined in JSON already exist.
New(String, String)
Creates a new blueprint and returns a new configurator to modify it.
Declaration
public static AbilityConfigurator New(string name, string guid)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
System.String | guid |
Returns
Type | Description |
---|---|
AbilityConfigurator |
Remarks
After creating a blueprint with this method you can use either name or GUID to reference the blueprint in BlueprintCore API calls.
An implicit cast converts the string to Blueprint<TRef>, exposing the blueprint instance and its reference.
NewSpell(String, String, SpellSchool, Boolean, SpellDescriptor[])
Spell specific version of New(String, String).
Declaration
public static AbilityConfigurator NewSpell(string name, string guid, SpellSchool school, bool canSpecialize, params SpellDescriptor[] spellDescriptors)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
System.String | guid | |
Kingmaker.Blueprints.Classes.Spells.SpellSchool | school | Adds a matching |
System.Boolean | canSpecialize | Set this to true if the spell is a valid target for Spell Specialization to update those selections. |
Kingmaker.Blueprints.Classes.Spells.SpellDescriptor[] | spellDescriptors | If specified, adds a |
Returns
Type | Description |
---|---|
AbilityConfigurator |
Remarks
Sets the ability type to AbilityType.Spell
.
Use AddToSpellLists(Int32, SpellList[]) to add it to the necessary spell lists.
SetCustomRange(Feet)
Sets the value of Kingmaker.UnitLogic.Abilities.Blueprints.BlueprintAbility.CustomRange
Declaration
public AbilityConfigurator SetCustomRange(Feet rangeInFeet)
Parameters
Type | Name | Description |
---|---|---|
Kingmaker.Utility.Feet | rangeInFeet |
Returns
Type | Description |
---|---|
AbilityConfigurator |
Remarks
Sets Kingmaker.UnitLogic.Abilities.Blueprints.BlueprintAbility.Range to AbilityRange.Custom.
SetCustomRange(Int32)
Sets the value of Kingmaker.UnitLogic.Abilities.Blueprints.BlueprintAbility.CustomRange
Declaration
public AbilityConfigurator SetCustomRange(int rangeInFeet)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rangeInFeet |
Returns
Type | Description |
---|---|
AbilityConfigurator |
Remarks
Sets Kingmaker.UnitLogic.Abilities.Blueprints.BlueprintAbility.Range to AbilityRange.Custom.
SetLocalizedDuration(Duration)
Use this if you have an ability with standard duration text. If you need something custom use SetLocalizedDuration(LocalString).
Declaration
public AbilityConfigurator SetLocalizedDuration(Duration duration)
Parameters
Type | Name | Description |
---|---|---|
Duration | duration |
Returns
Type | Description |
---|---|
AbilityConfigurator |
SetLocalizedSavingThrow(SavingThrow)
Use this if you have an ability with standard saving throw text. If you need something custom use SetLocalizedSavingThrow(LocalString).
Declaration
public AbilityConfigurator SetLocalizedSavingThrow(SavingThrow savingThrow)
Parameters
Type | Name | Description |
---|---|---|
SavingThrow | savingThrow |
Returns
Type | Description |
---|---|
AbilityConfigurator |