Class BaseAiActionConfigurator<T, TBuilder>
Implements common fields and components for blueprints inheriting from Kingmaker.AI.Blueprints.BlueprintAiAction.
Inheritance
Inherited Members
Namespace: BlueprintCore.Blueprints.Configurators.AI
Assembly: BlueprintCore.dll
Syntax
public abstract class BaseAiActionConfigurator<T, TBuilder> : BaseBlueprintConfigurator<T, TBuilder> where T : BlueprintAiAction where TBuilder : BaseAiActionConfigurator<T, TBuilder>
Type Parameters
Name | Description |
---|---|
T | |
TBuilder |
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.
Constructors
| Improve this Doc View SourceBaseAiActionConfigurator(Blueprint<BlueprintReference<T>>)
Declaration
protected BaseAiActionConfigurator(Blueprint<BlueprintReference<T>> blueprint)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<T>> | blueprint |
Methods
| Improve this Doc View SourceAddToActorConsiderations(Blueprint<ConsiderationReference>[])
Adds to the contents of Kingmaker.AI.Blueprints.BlueprintAiAction.m_ActorConsiderations
Declaration
public TBuilder AddToActorConsiderations(params Blueprint<ConsiderationReference>[] actorConsiderations)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.ConsiderationReference>[] | actorConsiderations | Tooltip: Considerations that only depend on deciding unit Blueprint of type Consideration. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
AddToTargetConsiderations(Blueprint<ConsiderationReference>[])
Adds to the contents of Kingmaker.AI.Blueprints.BlueprintAiAction.m_TargetConsiderations
Declaration
public TBuilder AddToTargetConsiderations(params Blueprint<ConsiderationReference>[] targetConsiderations)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.ConsiderationReference>[] | targetConsiderations | Tooltip: Considerations that also depend on action target Blueprint of type Consideration. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
ClearActorConsiderations()
Removes all elements from Kingmaker.AI.Blueprints.BlueprintAiAction.m_ActorConsiderations
Declaration
public TBuilder ClearActorConsiderations()
Returns
Type | Description |
---|---|
TBuilder |
ClearTargetConsiderations()
Removes all elements from Kingmaker.AI.Blueprints.BlueprintAiAction.m_TargetConsiderations
Declaration
public TBuilder ClearTargetConsiderations()
Returns
Type | Description |
---|---|
TBuilder |
CopyFrom(Blueprint<BlueprintReference<BlueprintAiAction>>, Predicate<BlueprintComponent>)
Copies fields and components of the specified types from the blueprint.
Declaration
public TBuilder CopyFrom(Blueprint<BlueprintReference<BlueprintAiAction>> blueprint, Predicate<BlueprintComponent> componentMatcher)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<Kingmaker.AI.Blueprints.BlueprintAiAction>> | blueprint | |
System.Predicate<Kingmaker.Blueprints.BlueprintComponent> | componentMatcher | Any components in |
Returns
Type | Description |
---|---|
TBuilder |
Remarks
NOT A DEEP COPY. This means objects copied are shared between blueprints. Changes to copied objects affect both blueprints.
Recommended when you need to create a nearly identical ability but change some parts such as a
ContextRankConfig
.
// Copy the Undead Bloodline's Incorporeal Form ability, replacing the duration w/ Character Level rounds
AbilityConfigurator.New(NewIncorporealForm, Guids.NewIncorporealForm)
.CopyFrom(
AbilityRefs.BloodlineUndeadIncorporealFormAbility,
typeof(AbilityEffectRunAction),
typeof(AbilityResourceLogic),
typeof(SpellComponent))
.AddContextRankConfig(ContextRankConfigs.CharacterLevel())
.Configure();
CopyFrom(Blueprint<BlueprintReference<BlueprintAiAction>>, Type[])
Copies fields and components of the specified types from the blueprint.
Declaration
public TBuilder CopyFrom(Blueprint<BlueprintReference<BlueprintAiAction>> blueprint, params Type[] componentTypes)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<Kingmaker.AI.Blueprints.BlueprintAiAction>> | blueprint | |
System.Type[] | componentTypes | Any components in |
Returns
Type | Description |
---|---|
TBuilder |
Remarks
NOT A DEEP COPY. This means objects copied are shared between blueprints. Changes to copied objects affect both blueprints.
Recommended when you need to create a nearly identical ability but change some parts such as a
ContextRankConfig
.
// Copy the Undead Bloodline's Incorporeal Form ability, replacing the duration w/ Character Level rounds
AbilityConfigurator.New(NewIncorporealForm, Guids.NewIncorporealForm)
.CopyFrom(
AbilityRefs.BloodlineUndeadIncorporealFormAbility,
typeof(AbilityEffectRunAction),
typeof(AbilityResourceLogic),
typeof(SpellComponent))
.AddContextRankConfig(ContextRankConfigs.CharacterLevel())
.Configure();
ModifyActions(Action<ActionList>)
Modifies Kingmaker.AI.Blueprints.BlueprintAiAction.Actions by invoking the provided action.
Declaration
public TBuilder ModifyActions(Action<ActionList> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Kingmaker.ElementsSystem.ActionList> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyActorConsiderations(Action<ConsiderationReference>)
Modifies Kingmaker.AI.Blueprints.BlueprintAiAction.m_ActorConsiderations by invoking the provided action on each element.
Declaration
public TBuilder ModifyActorConsiderations(Action<ConsiderationReference> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Kingmaker.Blueprints.ConsiderationReference> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyCooldownDice(Action<DiceFormula>)
Modifies Kingmaker.AI.Blueprints.BlueprintAiAction.CooldownDice by invoking the provided action.
Declaration
public TBuilder ModifyCooldownDice(Action<DiceFormula> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Kingmaker.RuleSystem.DiceFormula> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyTargetConsiderations(Action<ConsiderationReference>)
Modifies Kingmaker.AI.Blueprints.BlueprintAiAction.m_TargetConsiderations by invoking the provided action on each element.
Declaration
public TBuilder ModifyTargetConsiderations(Action<ConsiderationReference> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Kingmaker.Blueprints.ConsiderationReference> | action |
Returns
Type | Description |
---|---|
TBuilder |
OnConfigureCompleted()
Declaration
protected override void OnConfigureCompleted()
Overrides
RemoveFromActorConsiderations(Blueprint<ConsiderationReference>[])
Removes elements from Kingmaker.AI.Blueprints.BlueprintAiAction.m_ActorConsiderations
Declaration
public TBuilder RemoveFromActorConsiderations(params Blueprint<ConsiderationReference>[] actorConsiderations)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.ConsiderationReference>[] | actorConsiderations | Tooltip: Considerations that only depend on deciding unit Blueprint of type Consideration. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
RemoveFromActorConsiderations(Func<ConsiderationReference, Boolean>)
Removes elements from Kingmaker.AI.Blueprints.BlueprintAiAction.m_ActorConsiderations that match the provided predicate.
Declaration
public TBuilder RemoveFromActorConsiderations(Func<ConsiderationReference, bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Func<Kingmaker.Blueprints.ConsiderationReference, System.Boolean> | predicate |
Returns
Type | Description |
---|---|
TBuilder |
RemoveFromTargetConsiderations(Blueprint<ConsiderationReference>[])
Removes elements from Kingmaker.AI.Blueprints.BlueprintAiAction.m_TargetConsiderations
Declaration
public TBuilder RemoveFromTargetConsiderations(params Blueprint<ConsiderationReference>[] targetConsiderations)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.ConsiderationReference>[] | targetConsiderations | Tooltip: Considerations that also depend on action target Blueprint of type Consideration. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
RemoveFromTargetConsiderations(Func<ConsiderationReference, Boolean>)
Removes elements from Kingmaker.AI.Blueprints.BlueprintAiAction.m_TargetConsiderations that match the provided predicate.
Declaration
public TBuilder RemoveFromTargetConsiderations(Func<ConsiderationReference, bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Func<Kingmaker.Blueprints.ConsiderationReference, System.Boolean> | predicate |
Returns
Type | Description |
---|---|
TBuilder |
SetActions(ActionsBuilder)
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.Actions
Declaration
public TBuilder SetActions(ActionsBuilder actions)
Parameters
Type | Name | Description |
---|---|---|
ActionsBuilder | actions | Tooltip: Additional actions to run after the action is triggered |
Returns
Type | Description |
---|---|
TBuilder |
SetActorConsiderations(Blueprint<ConsiderationReference>[])
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.m_ActorConsiderations
Declaration
public TBuilder SetActorConsiderations(params Blueprint<ConsiderationReference>[] actorConsiderations)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.ConsiderationReference>[] | actorConsiderations | Tooltip: Considerations that only depend on deciding unit Blueprint of type Consideration. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
SetAdditionalBehaviour(Boolean)
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.AdditionalBehaviour
Declaration
public TBuilder SetAdditionalBehaviour(bool additionalBehaviour = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | additionalBehaviour | Tooltip: Action's availability affected by difficulty settings |
Returns
Type | Description |
---|---|
TBuilder |
SetBaseScore(Single)
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.BaseScore
Declaration
public TBuilder SetBaseScore(float baseScore)
Parameters
Type | Name | Description |
---|---|---|
System.Single | baseScore |
Returns
Type | Description |
---|---|
TBuilder |
SetCombatCount(Int32)
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.CombatCount
Declaration
public TBuilder SetCombatCount(int combatCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | combatCount |
Returns
Type | Description |
---|---|
TBuilder |
SetCooldownDice(DiceFormula)
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.CooldownDice
Declaration
public TBuilder SetCooldownDice(DiceFormula cooldownDice)
Parameters
Type | Name | Description |
---|---|---|
Kingmaker.RuleSystem.DiceFormula | cooldownDice |
Returns
Type | Description |
---|---|
TBuilder |
SetCooldownRounds(Int32)
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.CooldownRounds
Declaration
public TBuilder SetCooldownRounds(int cooldownRounds)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | cooldownRounds |
Returns
Type | Description |
---|---|
TBuilder |
SetInvertDifficultyRequirements(Boolean)
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.InvertDifficultyRequirements
Declaration
public TBuilder SetInvertDifficultyRequirements(bool invertDifficultyRequirements = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | invertDifficultyRequirements |
Returns
Type | Description |
---|---|
TBuilder |
SetMinDifficulty(GameDifficultyOption)
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.MinDifficulty
Declaration
public TBuilder SetMinDifficulty(GameDifficultyOption minDifficulty)
Parameters
Type | Name | Description |
---|---|---|
Kingmaker.Settings.GameDifficultyOption | minDifficulty |
Returns
Type | Description |
---|---|
TBuilder |
SetOncePerRound(Boolean)
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.OncePerRound
Declaration
public TBuilder SetOncePerRound(bool oncePerRound = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | oncePerRound |
Returns
Type | Description |
---|---|
TBuilder |
SetStartCooldownRounds(Int32)
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.StartCooldownRounds
Declaration
public TBuilder SetStartCooldownRounds(int startCooldownRounds)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | startCooldownRounds |
Returns
Type | Description |
---|---|
TBuilder |
SetTargetConsiderations(Blueprint<ConsiderationReference>[])
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.m_TargetConsiderations
Declaration
public TBuilder SetTargetConsiderations(params Blueprint<ConsiderationReference>[] targetConsiderations)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.ConsiderationReference>[] | targetConsiderations | Tooltip: Considerations that also depend on action target Blueprint of type Consideration. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
SetUseOnLimitedAI(Boolean)
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.UseOnLimitedAI
Declaration
public TBuilder SetUseOnLimitedAI(bool useOnLimitedAI = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | useOnLimitedAI |
Returns
Type | Description |
---|---|
TBuilder |
SetUseWhenAIDisabled(Boolean)
Sets the value of Kingmaker.AI.Blueprints.BlueprintAiAction.UseWhenAIDisabled
Declaration
public TBuilder SetUseWhenAIDisabled(bool useWhenAIDisabled = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | useWhenAIDisabled |
Returns
Type | Description |
---|---|
TBuilder |