Class BaseItemWeaponConfigurator<T, TBuilder>
Implements common fields and components for blueprints inheriting from Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.
Inheritance
Inherited Members
Namespace: BlueprintCore.Blueprints.Configurators.Items.Weapons
Assembly: BlueprintCore.dll
Syntax
public abstract class BaseItemWeaponConfigurator<T, TBuilder> : BaseItemEquipmentHandConfigurator<T, TBuilder> where T : BlueprintItemWeapon where TBuilder : BaseItemWeaponConfigurator<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 SourceBaseItemWeaponConfigurator(Blueprint<BlueprintReference<T>>)
Declaration
protected BaseItemWeaponConfigurator(Blueprint<BlueprintReference<T>> blueprint)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<T>> | blueprint |
Methods
| Improve this Doc View SourceAddToEnchantments(Blueprint<BlueprintWeaponEnchantmentReference>[])
Adds to the contents of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_Enchantments
Declaration
public TBuilder AddToEnchantments(params Blueprint<BlueprintWeaponEnchantmentReference>[] enchantments)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintWeaponEnchantmentReference>[] | enchantments | Blueprint of type BlueprintWeaponEnchantment. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
AddWeaponKineticBlade(Blueprint<BlueprintAbilityReference>, Blueprint<BlueprintAbilityReference>, Action<BlueprintComponent, BlueprintComponent>, ComponentMerge)
Adds Kingmaker.UnitLogic.Class.Kineticist.WeaponKineticBlade
Declaration
public TBuilder AddWeaponKineticBlade(Blueprint<BlueprintAbilityReference> activationAbility = null, Blueprint<BlueprintAbilityReference> blast = null, Action<BlueprintComponent, BlueprintComponent> merge = null, ComponentMerge mergeBehavior = ComponentMerge.Fail)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintAbilityReference> | activationAbility | Blueprint of type BlueprintAbility. You can pass in the blueprint using:
|
Blueprint<Kingmaker.Blueprints.BlueprintAbilityReference> | blast | Blueprint of type BlueprintAbility. 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
- AirKineticBladeWeapon43ff67143efb86d4f894b10577329050
- IceKineticBladeWeapona1eee0a2735401546ba2b442e1a9d25d
- WaterKineticBladeWeapon6a1bc011f6bbc7745876ce2692ecdfb5
ClearEnchantments()
Removes all elements from Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_Enchantments
Declaration
public TBuilder ClearEnchantments()
Returns
Type | Description |
---|---|
TBuilder |
CopyFrom(Blueprint<BlueprintReference<BlueprintItemWeapon>>, Predicate<BlueprintComponent>)
Copies fields and components of the specified types from the blueprint.
Declaration
public TBuilder CopyFrom(Blueprint<BlueprintReference<BlueprintItemWeapon>> blueprint, Predicate<BlueprintComponent> componentMatcher)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon>> | 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<BlueprintItemWeapon>>, Type[])
Copies fields and components of the specified types from the blueprint.
Declaration
public TBuilder CopyFrom(Blueprint<BlueprintReference<BlueprintItemWeapon>> blueprint, params Type[] componentTypes)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintReference<Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon>> | 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();
ModifyDamageDice(Action<DiceFormula>)
Modifies Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_DamageDice by invoking the provided action.
Declaration
public TBuilder ModifyDamageDice(Action<DiceFormula> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Kingmaker.RuleSystem.DiceFormula> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyDamageType(Action<DamageTypeDescription>)
Modifies Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_DamageType by invoking the provided action.
Declaration
public TBuilder ModifyDamageType(Action<DamageTypeDescription> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Kingmaker.RuleSystem.Rules.Damage.DamageTypeDescription> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyEnchantments(Action<BlueprintWeaponEnchantmentReference>)
Modifies Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_Enchantments by invoking the provided action on each element.
Declaration
public TBuilder ModifyEnchantments(Action<BlueprintWeaponEnchantmentReference> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Kingmaker.Blueprints.BlueprintWeaponEnchantmentReference> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifySecondWeapon(Action<BlueprintItemWeaponReference>)
Modifies Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_SecondWeapon by invoking the provided action.
Declaration
public TBuilder ModifySecondWeapon(Action<BlueprintItemWeaponReference> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Kingmaker.Blueprints.BlueprintItemWeaponReference> | action |
Returns
Type | Description |
---|---|
TBuilder |
ModifyType(Action<BlueprintWeaponTypeReference>)
Modifies Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_Type by invoking the provided action.
Declaration
public TBuilder ModifyType(Action<BlueprintWeaponTypeReference> action)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Kingmaker.Blueprints.BlueprintWeaponTypeReference> | action |
Returns
Type | Description |
---|---|
TBuilder |
OnConfigureCompleted()
Declaration
protected override void OnConfigureCompleted()
Overrides
RemoveFromEnchantments(Blueprint<BlueprintWeaponEnchantmentReference>[])
Removes elements from Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_Enchantments
Declaration
public TBuilder RemoveFromEnchantments(params Blueprint<BlueprintWeaponEnchantmentReference>[] enchantments)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintWeaponEnchantmentReference>[] | enchantments | Blueprint of type BlueprintWeaponEnchantment. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
RemoveFromEnchantments(Func<BlueprintWeaponEnchantmentReference, Boolean>)
Removes elements from Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_Enchantments that match the provided predicate.
Declaration
public TBuilder RemoveFromEnchantments(Func<BlueprintWeaponEnchantmentReference, bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Func<Kingmaker.Blueprints.BlueprintWeaponEnchantmentReference, System.Boolean> | predicate |
Returns
Type | Description |
---|---|
TBuilder |
SetAlwaysPrimary(Boolean)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_AlwaysPrimary
Declaration
public TBuilder SetAlwaysPrimary(bool alwaysPrimary = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | alwaysPrimary |
Returns
Type | Description |
---|---|
TBuilder |
SetCanChangeVisual(Boolean)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_CanChangeVisual
Declaration
public TBuilder SetCanChangeVisual(bool canChangeVisual = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | canChangeVisual |
Returns
Type | Description |
---|---|
TBuilder |
SetCountAsDouble(Boolean)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.CountAsDouble
Declaration
public TBuilder SetCountAsDouble(bool countAsDouble = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | countAsDouble | InfoBox: Считать за два оружия, для PF-497061 |
Returns
Type | Description |
---|---|
TBuilder |
SetDamageDice(DiceFormula)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_DamageDice
Declaration
public TBuilder SetDamageDice(DiceFormula damageDice)
Parameters
Type | Name | Description |
---|---|---|
Kingmaker.RuleSystem.DiceFormula | damageDice |
Returns
Type | Description |
---|---|
TBuilder |
SetDamageType(DamageTypeDescription)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_DamageType
Declaration
public TBuilder SetDamageType(DamageTypeDescription damageType)
Parameters
Type | Name | Description |
---|---|---|
Kingmaker.RuleSystem.Rules.Damage.DamageTypeDescription | damageType |
Returns
Type | Description |
---|---|
TBuilder |
SetDoubleValue(Boolean)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.Double
Declaration
public TBuilder SetDoubleValue(bool doubleValue = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | doubleValue |
Returns
Type | Description |
---|---|
TBuilder |
SetEnchantments(Blueprint<BlueprintWeaponEnchantmentReference>[])
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_Enchantments
Declaration
public TBuilder SetEnchantments(params Blueprint<BlueprintWeaponEnchantmentReference>[] enchantments)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintWeaponEnchantmentReference>[] | enchantments | Blueprint of type BlueprintWeaponEnchantment. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
SetIsCanChangeVisualOverriden(Boolean)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_IsCanChangeVisualOverriden
Declaration
public TBuilder SetIsCanChangeVisualOverriden(bool isCanChangeVisualOverriden = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isCanChangeVisualOverriden |
Returns
Type | Description |
---|---|
TBuilder |
SetKeepInPolymorph(Boolean)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.KeepInPolymorph
Declaration
public TBuilder SetKeepInPolymorph(bool keepInPolymorph = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | keepInPolymorph |
Returns
Type | Description |
---|---|
TBuilder |
SetOverrideDamageDice(Boolean)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_OverrideDamageDice
Declaration
public TBuilder SetOverrideDamageDice(bool overrideDamageDice = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | overrideDamageDice |
Returns
Type | Description |
---|---|
TBuilder |
SetOverrideDamageType(Boolean)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_OverrideDamageType
Declaration
public TBuilder SetOverrideDamageType(bool overrideDamageType = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | overrideDamageType |
Returns
Type | Description |
---|---|
TBuilder |
SetOverrideDestructible(Boolean)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_OverrideDestructible
Declaration
public TBuilder SetOverrideDestructible(bool overrideDestructible = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | overrideDestructible | InfoBox: If true, ignores destructible property value from armor type and uses it from blueprint item. |
Returns
Type | Description |
---|---|
TBuilder |
SetOverrideShardItem(Boolean)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_OverrideShardItem
Declaration
public TBuilder SetOverrideShardItem(bool overrideShardItem = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | overrideShardItem | InfoBox: If true, ignores shard item from weapon type and uses shard from this blueprint. |
Returns
Type | Description |
---|---|
TBuilder |
SetSecondWeapon(Blueprint<BlueprintItemWeaponReference>)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_SecondWeapon
Declaration
public TBuilder SetSecondWeapon(Blueprint<BlueprintItemWeaponReference> secondWeapon)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintItemWeaponReference> | secondWeapon | Blueprint of type BlueprintItemWeapon. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |
SetSize(Size)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_Size
Declaration
public TBuilder SetSize(Size size)
Parameters
Type | Name | Description |
---|---|---|
Kingmaker.Enums.Size | size |
Returns
Type | Description |
---|---|
TBuilder |
SetType(Blueprint<BlueprintWeaponTypeReference>)
Sets the value of Kingmaker.Blueprints.Items.Weapons.BlueprintItemWeapon.m_Type
Declaration
public TBuilder SetType(Blueprint<BlueprintWeaponTypeReference> type)
Parameters
Type | Name | Description |
---|---|---|
Blueprint<Kingmaker.Blueprints.BlueprintWeaponTypeReference> | type | Blueprint of type BlueprintWeaponType. You can pass in the blueprint using:
|
Returns
Type | Description |
---|---|
TBuilder |