Class BaseFeatureSelectionConfigurator<T, TBuilder>
Implements common fields and components for blueprints inheriting from Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.
Inheritance
Inherited Members
Namespace: BlueprintCore.Blueprints.Configurators.Classes.Selection
Assembly: BlueprintCore.dll
Syntax
public abstract class BaseFeatureSelectionConfigurator<T, TBuilder> : BaseFeatureConfigurator<T, TBuilder> where T : BlueprintFeatureSelection where TBuilder : BaseFeatureSelectionConfigurator<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 SourceBaseFeatureSelectionConfigurator(Blueprint<BlueprintReference<T>>)
Declaration
protected BaseFeatureSelectionConfigurator(Blueprint<BlueprintReference<T>> blueprint)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<T>> | blueprint |
Methods
| Improve this Doc View SourceAddNoSelectionIfAlreadyHasFeature(Nullable<Boolean>, List<Blueprint<BlueprintFeatureReference>>, Action<BlueprintComponent, BlueprintComponent>, ComponentMerge)
Adds Kingmaker.Blueprints.Classes.Spells.NoSelectionIfAlreadyHasFeature
Declaration
public TBuilder AddNoSelectionIfAlreadyHasFeature(bool? anyFeatureFromSelection = null, List<Blueprint<BlueprintFeatureReference>> features = null, Action<BlueprintComponent, BlueprintComponent> merge = null, ComponentMerge mergeBehavior = ComponentMerge.Fail)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Boolean> | anyFeatureFromSelection | |
System.Collections.Generic.List<Blueprint<Kingmaker.Blueprints.BlueprintFeatureReference>> | features | Blueprint of type BlueprintFeature. You can pass in the blueprint using:
|
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. |
Returns
Type | Description |
---|---|
TBuilder |
Remarks
- AnimalCompanionSelectionDomain2ecd6c64683b59944a7fe544033bb533
- EldritchScionBloodlineSelection94c29f69cdc34594a6a4677441ed7375
- SorcererBloodlineSelection24bef8d1bee12274686f6da6ccbc8914
AddPrerequisiteSelectionPossible(Nullable<Boolean>, Nullable<Prerequisite.GroupType>, Nullable<Boolean>, Nullable<Boolean>, Blueprint<BlueprintFeatureSelectionReference>)
Adds Kingmaker.Blueprints.Classes.Prerequisites.PrerequisiteSelectionPossible
Declaration
public TBuilder AddPrerequisiteSelectionPossible(bool? checkInProgression = null, Prerequisite.GroupType? group = null, bool? hideInUI = null, bool? isFeatureSelectionWhiteList = null, Blueprint<BlueprintFeatureSelectionReference> thisFeature = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Boolean> | checkInProgression | |
System.Nullable<Kingmaker.Blueprints.Classes.Prerequisites.Prerequisite.GroupType> | group | |
System.Nullable<System.Boolean> | hideInUI | |
System.Nullable<System.Boolean> | isFeatureSelectionWhiteList | InfoBox: If checked and BlueprintFeatureSelection 'ExceptWhiteListed' checked, 'Ignore Prerequisites' will be ignored |
Blueprint<Kingmaker.Blueprints.BlueprintFeatureSelectionReference> | thisFeature | Blueprint of type BlueprintFeatureSelection. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
Remarks
A feature selection with this component only shows up if the character is eligible for at least one feature.
This is useful when a character has access to different feature selections based on some criteria.
- ExpandedDefensed741f298dfae8fc40b4615aaf83b6548
- WildTalentBonusFeatEarth3f593346da04badb4185a47af8e4c4f7f
- WildTalentBonusFeatWater540a4fb42aafa7ee4991d3e3140e98856
AddToAllFeatures(Blueprint<BlueprintFeatureReference>[])
Adds to the contents of Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.m_AllFeatures
Declaration
public TBuilder AddToAllFeatures(params Blueprint<BlueprintFeatureReference>[] allFeatures)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintFeatureReference>[] | allFeatures | Blueprint of type BlueprintFeature. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
ClearAllFeatures()
Removes all elements from Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.m_AllFeatures
Declaration
public TBuilder ClearAllFeatures()
Returns
Type | Description |
---|---|
TBuilder |
CopyFrom(Blueprint<BlueprintReference<BlueprintFeatureSelection>>, Predicate<BlueprintComponent>)
Copies fields and components of the specified types from the blueprint.
Declaration
public TBuilder CopyFrom(Blueprint<BlueprintReference<BlueprintFeatureSelection>> blueprint, Predicate<BlueprintComponent> componentMatcher)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection>> | 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<BlueprintFeatureSelection>>, Type[])
Copies fields and components of the specified types from the blueprint.
Declaration
public TBuilder CopyFrom(Blueprint<BlueprintReference<BlueprintFeatureSelection>> blueprint, params Type[] componentTypes)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection>> | 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();
ModifyAllFeatures(Action<BlueprintFeatureReference>)
Modifies Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.m_AllFeatures by invoking the provided action on each element.
Declaration
public TBuilder ModifyAllFeatures(Action<BlueprintFeatureReference> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Kingmaker.Blueprints.BlueprintFeatureReference> | action |
Returns
Type | Description |
---|---|
TBuilder |
OnConfigureCompleted()
Declaration
protected override void OnConfigureCompleted()
Overrides
RemoveFromAllFeatures(Blueprint<BlueprintFeatureReference>[])
Removes elements from Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.m_AllFeatures
Declaration
public TBuilder RemoveFromAllFeatures(params Blueprint<BlueprintFeatureReference>[] allFeatures)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintFeatureReference>[] | allFeatures | Blueprint of type BlueprintFeature. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
RemoveFromAllFeatures(Func<BlueprintFeatureReference, Boolean>)
Removes elements from Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.m_AllFeatures that match the provided predicate.
Declaration
public TBuilder RemoveFromAllFeatures(Func<BlueprintFeatureReference, bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Func<Kingmaker.Blueprints.BlueprintFeatureReference, System.Boolean> | predicate |
Returns
Type | Description |
---|---|
TBuilder |
SetAllFeatures(Blueprint<BlueprintFeatureReference>[])
Sets the value of Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.m_AllFeatures
Declaration
public TBuilder SetAllFeatures(params Blueprint<BlueprintFeatureReference>[] allFeatures)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintFeatureReference>[] | allFeatures | Blueprint of type BlueprintFeature. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
SetExceptWhiteListed(Boolean)
Sets the value of Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.ExceptWhiteListed
Declaration
public TBuilder SetExceptWhiteListed(bool exceptWhiteListed = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | exceptWhiteListed | InfoBox: If set, 'IsFeatureSelectionWhiteList' prerequisites won't be ignored |
Returns
Type | Description |
---|---|
TBuilder |
SetGroup(FeatureGroup)
Sets the value of Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.Group
Declaration
public TBuilder SetGroup(FeatureGroup group)
Parameters
Type | Name | Description |
---|---|---|
Kingmaker.Blueprints.Classes.FeatureGroup | group |
Returns
Type | Description |
---|---|
TBuilder |
SetGroup2(FeatureGroup)
Sets the value of Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.Group2
Declaration
public TBuilder SetGroup2(FeatureGroup group2)
Parameters
Type | Name | Description |
---|---|---|
Kingmaker.Blueprints.Classes.FeatureGroup | group2 |
Returns
Type | Description |
---|---|
TBuilder |
SetIgnorePrerequisites(Boolean)
Sets the value of Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.IgnorePrerequisites
Declaration
public TBuilder SetIgnorePrerequisites(bool ignorePrerequisites = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | ignorePrerequisites |
Returns
Type | Description |
---|---|
TBuilder |
SetMode(SelectionMode)
Sets the value of Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.Mode
Declaration
public TBuilder SetMode(SelectionMode mode)
Parameters
Type | Name | Description |
---|---|---|
Kingmaker.Blueprints.Classes.Selection.SelectionMode | mode |
Returns
Type | Description |
---|---|
TBuilder |
SetObligatory(Boolean)
Sets the value of Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.Obligatory
Declaration
public TBuilder SetObligatory(bool obligatory = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | obligatory |
Returns
Type | Description |
---|---|
TBuilder |
SetShowThisSelection(Boolean)
Sets the value of Kingmaker.Blueprints.Classes.Selection.BlueprintFeatureSelection.ShowThisSelection
Declaration
public TBuilder SetShowThisSelection(bool showThisSelection = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | showThisSelection |
Returns
Type | Description |
---|---|
TBuilder |