Class BaseTrapConfigurator<T, TBuilder>
Implements common fields and components for blueprints inheriting from Kingmaker.Blueprints.Area.BlueprintTrap.
Inheritance
Inherited Members
Namespace: BlueprintCore.Blueprints.Configurators.Area
Assembly: BlueprintCore.dll
Syntax
public abstract class BaseTrapConfigurator<T, TBuilder> : BaseMapObjectConfigurator<T, TBuilder> where T : BlueprintTrap where TBuilder : BaseTrapConfigurator<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 SourceBaseTrapConfigurator(Blueprint<BlueprintReference<T>>)
Declaration
protected BaseTrapConfigurator(Blueprint<BlueprintReference<T>> blueprint)
Parameters
| Type | Name | Description |
|---|---|---|
| Blueprint<Kingmaker.Blueprints.BlueprintReference<T>> | blueprint |
Methods
| Improve this Doc View SourceAddExperience(IntEvaluator, Nullable<Int32>, Nullable<Boolean>, Nullable<EncounterType>, Action<BlueprintComponent, BlueprintComponent>, ComponentMerge, Nullable<Single>, Nullable<Boolean>)
Adds Kingmaker.Blueprints.Classes.Experience.Experience
Declaration
public TBuilder AddExperience(IntEvaluator count = null, int? cR = null, bool? dummy = null, EncounterType? encounter = null, Action<BlueprintComponent, BlueprintComponent> merge = null, ComponentMerge mergeBehavior = ComponentMerge.Fail, float? modifier = null, bool? playerGainsNoExp = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Kingmaker.ElementsSystem.IntEvaluator | count | |
| System.Nullable<System.Int32> | cR | |
| System.Nullable<System.Boolean> | dummy | |
| System.Nullable<Kingmaker.Blueprints.Classes.Experience.EncounterType> | encounter | |
| System.Action<Kingmaker.Blueprints.BlueprintComponent, Kingmaker.Blueprints.BlueprintComponent> | merge | If mergeBehavior is ComponentMerge.Merge and the component already exists, this expression is called to merge the components. |
| ComponentMerge | mergeBehavior | Handling if the component already exists since the component is unique. Defaults to ComponentMerge.Fail. |
| System.Nullable<System.Single> | modifier | |
| System.Nullable<System.Boolean> | playerGainsNoExp | InfoBox: When true, Exp will be used in encounter CR calculation, but player will not gained it |
Returns
| Type | Description |
|---|---|
| TBuilder |
Remarks
- 00_FindEchoLair876fc5d40aa5d8b47ac0138cf0a680ae
- DLC3_CR16_FaerieDragonHungryMagicSummon1f238fcbd1bb41cfbc35729a2d7c0d2c
- Ziforian_normal7ef2998dbeb7fda43a47ce842f4d142d
CopyFrom(Blueprint<BlueprintReference<BlueprintTrap>>, Predicate<BlueprintComponent>)
Copies fields and components of the specified types from the blueprint.
Declaration
public TBuilder CopyFrom(Blueprint<BlueprintReference<BlueprintTrap>> blueprint, Predicate<BlueprintComponent> componentMatcher)
Parameters
| Type | Name | Description |
|---|---|---|
| Blueprint<Kingmaker.Blueprints.BlueprintReference<Kingmaker.Blueprints.Area.BlueprintTrap>> | 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<BlueprintTrap>>, Type[])
Copies fields and components of the specified types from the blueprint.
Declaration
public TBuilder CopyFrom(Blueprint<BlueprintReference<BlueprintTrap>> blueprint, params Type[] componentTypes)
Parameters
| Type | Name | Description |
|---|---|---|
| Blueprint<Kingmaker.Blueprints.BlueprintReference<Kingmaker.Blueprints.Area.BlueprintTrap>> | 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();
ModifyActor(Action<BlueprintUnitReference>)
Modifies Kingmaker.Blueprints.Area.BlueprintTrap.m_Actor by invoking the provided action.
Declaration
public TBuilder ModifyActor(Action<BlueprintUnitReference> action)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<Kingmaker.Blueprints.BlueprintUnitReference> | action |
Returns
| Type | Description |
|---|---|
| TBuilder |
ModifyDisableActions(Action<ActionList>)
Modifies Kingmaker.Blueprints.Area.BlueprintTrap.DisableActions by invoking the provided action.
Declaration
public TBuilder ModifyDisableActions(Action<ActionList> action)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<Kingmaker.ElementsSystem.ActionList> | action |
Returns
| Type | Description |
|---|---|
| TBuilder |
ModifyDisableConditions(Action<ConditionsChecker>)
Modifies Kingmaker.Blueprints.Area.BlueprintTrap.DisableConditions by invoking the provided action.
Declaration
public TBuilder ModifyDisableConditions(Action<ConditionsChecker> action)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<Kingmaker.ElementsSystem.ConditionsChecker> | action |
Returns
| Type | Description |
|---|---|
| TBuilder |
ModifyTrapActions(Action<ActionList>)
Modifies Kingmaker.Blueprints.Area.BlueprintTrap.TrapActions by invoking the provided action.
Declaration
public TBuilder ModifyTrapActions(Action<ActionList> action)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<Kingmaker.ElementsSystem.ActionList> | action |
Returns
| Type | Description |
|---|---|
| TBuilder |
ModifyTriggerConditions(Action<ConditionsChecker>)
Modifies Kingmaker.Blueprints.Area.BlueprintTrap.TriggerConditions by invoking the provided action.
Declaration
public TBuilder ModifyTriggerConditions(Action<ConditionsChecker> action)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<Kingmaker.ElementsSystem.ConditionsChecker> | action |
Returns
| Type | Description |
|---|---|
| TBuilder |
OnConfigureCompleted()
Declaration
protected override void OnConfigureCompleted()
Overrides
SetActor(Blueprint<BlueprintUnitReference>)
Sets the value of Kingmaker.Blueprints.Area.BlueprintTrap.m_Actor
Declaration
public TBuilder SetActor(Blueprint<BlueprintUnitReference> actor)
Parameters
| Type | Name | Description |
|---|---|---|
| Blueprint<Kingmaker.Blueprints.BlueprintUnitReference> | actor | Blueprint of type BlueprintUnit. You can pass in the blueprint using:
|
Returns
| Type | Description |
|---|---|
| TBuilder |
SetAllowedForRandomEncounters(Boolean)
Sets the value of Kingmaker.Blueprints.Area.BlueprintTrap.AllowedForRandomEncounters
Declaration
public TBuilder SetAllowedForRandomEncounters(bool allowedForRandomEncounters = true)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | allowedForRandomEncounters |
Returns
| Type | Description |
|---|---|
| TBuilder |
SetDisableActions(ActionsBuilder)
Sets the value of Kingmaker.Blueprints.Area.BlueprintTrap.DisableActions
Declaration
public TBuilder SetDisableActions(ActionsBuilder disableActions)
Parameters
| Type | Name | Description |
|---|---|---|
| ActionsBuilder | disableActions |
Returns
| Type | Description |
|---|---|
| TBuilder |
SetDisableConditions(ConditionsBuilder)
Sets the value of Kingmaker.Blueprints.Area.BlueprintTrap.DisableConditions
Declaration
public TBuilder SetDisableConditions(ConditionsBuilder disableConditions)
Parameters
| Type | Name | Description |
|---|---|---|
| ConditionsBuilder | disableConditions |
Returns
| Type | Description |
|---|---|
| TBuilder |
SetDisableDC(Int32)
Sets the value of Kingmaker.Blueprints.Area.BlueprintTrap.DisableDC
Declaration
public TBuilder SetDisableDC(int disableDC)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | disableDC |
Returns
| Type | Description |
|---|---|
| TBuilder |
SetDisableTriggerMargin(Int32)
Sets the value of Kingmaker.Blueprints.Area.BlueprintTrap.DisableTriggerMargin
Declaration
public TBuilder SetDisableTriggerMargin(int disableTriggerMargin)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | disableTriggerMargin |
Returns
| Type | Description |
|---|---|
| TBuilder |
SetDisarmAnimation(UnitAnimationInteractionType)
Sets the value of Kingmaker.Blueprints.Area.BlueprintTrap.DisarmAnimation
Declaration
public TBuilder SetDisarmAnimation(UnitAnimationInteractionType disarmAnimation)
Parameters
| Type | Name | Description |
|---|---|---|
| Kingmaker.Visual.Animation.Kingmaker.UnitAnimationInteractionType | disarmAnimation |
Returns
| Type | Description |
|---|---|
| TBuilder |
SetIsHiddenWhenInactive(Boolean)
Sets the value of Kingmaker.Blueprints.Area.BlueprintTrap.IsHiddenWhenInactive
Declaration
public TBuilder SetIsHiddenWhenInactive(bool isHiddenWhenInactive = true)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | isHiddenWhenInactive |
Returns
| Type | Description |
|---|---|
| TBuilder |
SetPerceptionDC(Int32)
Sets the value of Kingmaker.Blueprints.Area.BlueprintTrap.PerceptionDC
Declaration
public TBuilder SetPerceptionDC(int perceptionDC)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | perceptionDC |
Returns
| Type | Description |
|---|---|
| TBuilder |
SetPerceptionRadius(Single)
Sets the value of Kingmaker.Blueprints.Area.BlueprintTrap.PerceptionRadius
Declaration
public TBuilder SetPerceptionRadius(float perceptionRadius)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | perceptionRadius |
Returns
| Type | Description |
|---|---|
| TBuilder |
SetTrapActions(ActionsBuilder)
Sets the value of Kingmaker.Blueprints.Area.BlueprintTrap.TrapActions
Declaration
public TBuilder SetTrapActions(ActionsBuilder trapActions)
Parameters
| Type | Name | Description |
|---|---|---|
| ActionsBuilder | trapActions |
Returns
| Type | Description |
|---|---|
| TBuilder |
SetTriggerConditions(ConditionsBuilder)
Sets the value of Kingmaker.Blueprints.Area.BlueprintTrap.TriggerConditions
Declaration
public TBuilder SetTriggerConditions(ConditionsBuilder triggerConditions)
Parameters
| Type | Name | Description |
|---|---|---|
| ConditionsBuilder | triggerConditions |
Returns
| Type | Description |
|---|---|
| TBuilder |