Class BaseInteractionRootConfigurator<T, TBuilder>
Implements common fields and components for blueprints inheriting from Kingmaker.Interaction.BlueprintInteractionRoot.
Inheritance
Inherited Members
Namespace: BlueprintCore.Blueprints.Configurators.Interaction
Assembly: BlueprintCore.dll
Syntax
public abstract class BaseInteractionRootConfigurator<T, TBuilder> : BaseBlueprintConfigurator<T, TBuilder> where T : BlueprintInteractionRoot where TBuilder : BaseInteractionRootConfigurator<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 SourceBaseInteractionRootConfigurator(Blueprint<BlueprintReference<T>>)
Declaration
protected BaseInteractionRootConfigurator(Blueprint<BlueprintReference<T>> blueprint)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<T>> | blueprint |
Methods
| Improve this Doc View SourceCopyFrom(Blueprint<BlueprintReference<BlueprintInteractionRoot>>, Predicate<BlueprintComponent>)
Copies fields and components of the specified types from the blueprint.
Declaration
public TBuilder CopyFrom(Blueprint<BlueprintReference<BlueprintInteractionRoot>> blueprint, Predicate<BlueprintComponent> componentMatcher)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<Kingmaker.Interaction.BlueprintInteractionRoot>> | 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<BlueprintInteractionRoot>>, Type[])
Copies fields and components of the specified types from the blueprint.
Declaration
public TBuilder CopyFrom(Blueprint<BlueprintReference<BlueprintInteractionRoot>> blueprint, params Type[] componentTypes)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<Kingmaker.Interaction.BlueprintInteractionRoot>> | 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();
ModifyDefaultDestructionSuccessSound(Action<String>)
Modifies Kingmaker.Interaction.BlueprintInteractionRoot.m_DefaultDestructionSuccessSound by invoking the provided action.
Declaration
public TBuilder ModifyDefaultDestructionSuccessSound(Action<string> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.String> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyDestructionFx(Action<PrefabLink>)
Modifies Kingmaker.Interaction.BlueprintInteractionRoot.m_DestructionFx by invoking the provided action.
Declaration
public TBuilder ModifyDestructionFx(Action<PrefabLink> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Kingmaker.ResourceLinks.PrefabLink> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyLockpickCriticalFailSound(Action<String>)
Modifies Kingmaker.Interaction.BlueprintInteractionRoot.m_LockpickCriticalFailSound by invoking the provided action.
Declaration
public TBuilder ModifyLockpickCriticalFailSound(Action<string> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.String> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyLockpickEndSound(Action<String>)
Modifies Kingmaker.Interaction.BlueprintInteractionRoot.m_LockpickEndSound by invoking the provided action.
Declaration
public TBuilder ModifyLockpickEndSound(Action<string> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.String> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyLockpickFailSound(Action<String>)
Modifies Kingmaker.Interaction.BlueprintInteractionRoot.m_LockpickFailSound by invoking the provided action.
Declaration
public TBuilder ModifyLockpickFailSound(Action<string> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.String> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyLockpickStartSound(Action<String>)
Modifies Kingmaker.Interaction.BlueprintInteractionRoot.m_LockpickStartSound by invoking the provided action.
Declaration
public TBuilder ModifyLockpickStartSound(Action<string> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.String> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyLockpickSuccessSound(Action<String>)
Modifies Kingmaker.Interaction.BlueprintInteractionRoot.m_LockpickSuccessSound by invoking the provided action.
Declaration
public TBuilder ModifyLockpickSuccessSound(Action<string> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.String> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyMagicPowerItem(Action<BlueprintItemReference>)
Modifies Kingmaker.Interaction.BlueprintInteractionRoot.m_MagicPowerItem by invoking the provided action.
Declaration
public TBuilder ModifyMagicPowerItem(Action<BlueprintItemReference> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Kingmaker.Blueprints.BlueprintItemReference> | action |
Returns
Type | Description |
---|---|
TBuilder |
OnConfigureCompleted()
Declaration
protected override void OnConfigureCompleted()
Overrides
SetDefaultDestructionSuccessSound(String)
Sets the value of Kingmaker.Interaction.BlueprintInteractionRoot.m_DefaultDestructionSuccessSound
Declaration
public TBuilder SetDefaultDestructionSuccessSound(string defaultDestructionSuccessSound)
Parameters
Type | Name | Description |
---|---|---|
System.String | defaultDestructionSuccessSound |
Returns
Type | Description |
---|---|
TBuilder |
SetDestructionFx(AssetLink<PrefabLink>)
Sets the value of Kingmaker.Interaction.BlueprintInteractionRoot.m_DestructionFx
Declaration
public TBuilder SetDestructionFx(AssetLink<PrefabLink> destructionFx)
Parameters
Type | Name | Description |
---|---|---|
AssetLink<Kingmaker.ResourceLinks.PrefabLink> | destructionFx | You can pass in the animation using a PrefabLink or it's AssetId. |
Returns
Type | Description |
---|---|
TBuilder |
SetFxDenominator(Single)
Sets the value of Kingmaker.Interaction.BlueprintInteractionRoot.m_FxDenominator
Declaration
public TBuilder SetFxDenominator(float fxDenominator)
Parameters
Type | Name | Description |
---|---|---|
System.Single | fxDenominator | InfoBox: For final Fx scale we use formula: 1 + (ObjectScale - 1) / FxDenominator |
Returns
Type | Description |
---|---|
TBuilder |
SetInteractionDCVariation(Int32)
Sets the value of Kingmaker.Interaction.BlueprintInteractionRoot.m_InteractionDCVariation
Declaration
public TBuilder SetInteractionDCVariation(int interactionDCVariation)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | interactionDCVariation |
Returns
Type | Description |
---|---|
TBuilder |
SetLockpickCriticalFailSound(String)
Sets the value of Kingmaker.Interaction.BlueprintInteractionRoot.m_LockpickCriticalFailSound
Declaration
public TBuilder SetLockpickCriticalFailSound(string lockpickCriticalFailSound)
Parameters
Type | Name | Description |
---|---|---|
System.String | lockpickCriticalFailSound |
Returns
Type | Description |
---|---|
TBuilder |
SetLockpickEndSound(String)
Sets the value of Kingmaker.Interaction.BlueprintInteractionRoot.m_LockpickEndSound
Declaration
public TBuilder SetLockpickEndSound(string lockpickEndSound)
Parameters
Type | Name | Description |
---|---|---|
System.String | lockpickEndSound |
Returns
Type | Description |
---|---|
TBuilder |
SetLockpickFailSound(String)
Sets the value of Kingmaker.Interaction.BlueprintInteractionRoot.m_LockpickFailSound
Declaration
public TBuilder SetLockpickFailSound(string lockpickFailSound)
Parameters
Type | Name | Description |
---|---|---|
System.String | lockpickFailSound |
Returns
Type | Description |
---|---|
TBuilder |
SetLockpickStartSound(String)
Sets the value of Kingmaker.Interaction.BlueprintInteractionRoot.m_LockpickStartSound
Declaration
public TBuilder SetLockpickStartSound(string lockpickStartSound)
Parameters
Type | Name | Description |
---|---|---|
System.String | lockpickStartSound |
Returns
Type | Description |
---|---|
TBuilder |
SetLockpickSuccessSound(String)
Sets the value of Kingmaker.Interaction.BlueprintInteractionRoot.m_LockpickSuccessSound
Declaration
public TBuilder SetLockpickSuccessSound(string lockpickSuccessSound)
Parameters
Type | Name | Description |
---|---|---|
System.String | lockpickSuccessSound |
Returns
Type | Description |
---|---|
TBuilder |
SetMagicPowerCost(Int32)
Sets the value of Kingmaker.Interaction.BlueprintInteractionRoot.m_MagicPowerCost
Declaration
public TBuilder SetMagicPowerCost(int magicPowerCost)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | magicPowerCost | InfoBox: Used to calculate result count after item destruction: Item.Cost / MagicPowerCost = `count of MagicPowerItem` |
Returns
Type | Description |
---|---|
TBuilder |
SetMagicPowerItem(Blueprint<BlueprintItemReference>)
Sets the value of Kingmaker.Interaction.BlueprintInteractionRoot.m_MagicPowerItem
Declaration
public TBuilder SetMagicPowerItem(Blueprint<BlueprintItemReference> magicPowerItem)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintItemReference> | magicPowerItem | InfoBox: Will drop from destroyed items to indicate their cost Blueprint of type BlueprintItem. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |