Item / Currency Costs
On top of its normal skill point cost, a skill can additionally require items and/or a currency amount from the target character's Game Creator 2 Bag. This is entirely optional — both cost lists default to empty, so existing skills and projects that don't use GC2 Inventory are completely unaffected.
Setting Costs
Set itemCosts / currencyCosts on the skill node via Graph Editor → node → Edit All Properties → "Item / Currency Costs".
| Field | Type | Description |
|---|---|---|
| itemCosts | List<ItemCostEntry> | Items required from the character's GC2 Bag. Each entry is a Unique ID string (matching the Item asset's own Unique ID) plus an amount. |
| currencyCosts | List<CurrencyCostEntry> | Currency amounts required from the character's GC2 Bag. Each entry is a Unique ID string (matching the Currency asset's own Unique ID) plus an amount. |
Each entry is a Unique ID string (matching the Item/Currency asset's own Unique ID in GC2 Inventory) plus an amount.
Inventory Bridge
Enforcement of item/currency costs needs the optional Inventory Bridge — an assembly (Runtime/Bridges/Inventory) that only compiles when the PTB_INVENTORY_BRIDGE define is active and GameCreator.Runtime.Inventory is present. It is auto-disabled otherwise by PTBBridgeValidator.
Enabling the Bridge
- Set Item Costs / Currency Costs on the skill node: Graph Editor → select node → Edit All Properties → "Item / Currency Costs"
- Enable the Inventory Bridge: Window → Progression Tree Builder → Bridges → Inventory Bridge
- Unity recompiles with the PTB_INVENTORY_BRIDGE define active
Behavior
| Situation | Result |
|---|---|
| Skill has no item/currency costs | Unchanged — only the skill point cost applies |
| Skill has costs, bridge enabled | Unlock Skill checks the Bag via ISkillCostProvider.CanAfford, deducts via Deduct |
| Skill has costs, bridge not enabled | Treated as affordable, nothing deducted, one warning per skill in the log |
Custom Cost Sources
Don't use GC2 Inventory, or want to charge from your own item/currency system instead? Assign your own provider to SkillCostProviderRegistry.Provider by implementing ISkillCostProvider.
public interface ISkillCostProvider
{
bool CanAfford(ProgressionSkill skill, GameObject target);
void Deduct(ProgressionSkill skill, GameObject target);
}Public API
ProgressionSkill.HasItemOrCurrencyCosts() → boolProgressionTreeBuilder.Runtime.Core.ISkillCostProviderSkillCostProviderRegistry.Provider — assign your own provider to support a non-Inventory item system