• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

Crafting Skills XML

Hello all,

I am in the middle of creating a slighlty more difficulty inducing mod. I want to change the way vanilla weapons are unlocked. Rather than a single magazine unlocking multiple weapons, you must find a schematic for each weapon, this increases your skill in that weapon crafting by 1. For each level unlocked you would gain 2 levels of CraftingTier. Starting at Level 1 you cannot craft the item, the first schematic will unlock and allow you to craft tier 1 and 2, then 3 and 4 and finally 5 and 6 (Legendary)

The unlock item schematic works perfectly, it increase the skill by 1 and you can't go beyond the max_level of 4. The problem is only after reaching Max Level (4) and selecting the weapon in the crafting menu, backpack or workbench, I get bombarded by these errors:

2025-10-28T20:29:01 125.914 ERR Unhandled exception in GetBindingValue. Binding name: durabilitycolor
2025-10-28T20:29:01 125.915 ERR [XUi] Error while updating window group 'workstation_workbench':
2025-10-28T20:29:01 125.915 EXC Index was outside the bounds of the array.

This happens every game tick and I need to press F1 and Esc to close the console and get out of the menu so I can exit and reload.

I am not sure what is wrong with my progression.xml but the problem MUST be here as the schematic item works flawlessly and we can craft Tier 1/2/3/4, but only after reaching max level does it begin throwing these errors.

Here is the snippet:
<!-- Firstly, remove the existing craftingHandguns skill to remove conflicts -->
<remove xpath="/progression/crafting_skills/crafting_skill[@name='craftingHandguns']" />

<!-- Add custom Tier 1 Handgun skill -->
<append xpath="/progression/crafting_skills">
<crafting_skill name="craftingT1Pistol" max_level="4" parent="attCrafting" name_key="craftingT1PistolName" desc_key="craftingT1PistolDesc" long_desc_key="craftingT1PistolLongDesc" icon="ui_pistol_t1">

<display_entry item="gunHandgunT1Pistol" unlock_level="2,2,3,3,4,4"/>

<effect_group>
<passive_effect name="RecipeTagUnlocked" operation="base_set" level="2,4" value="1" tags="gunHandgunT1Pistol"/>

<passive_effect name="CraftingTier" operation="base_add" level="2,3,3,4,4,4" value="1,2,3,4,5,5" tags="gunHandgunT1Pistol"/>
</effect_group>
</crafting_skill>
</append>
 
I haven't reviewed the code much so am just making a quick observation (I've run in a similar issue before).
In the default code all Crafting Tier entries are 6 values EXCEPT the last entry, thats always 5:
e.g.
For handguns:
<passive_effect name="CraftingTier" operation="base_add" level="76,82,88,94,100" value="1,2,3,4,5" tags="gunHandgunT3DesertVulture"/>
for rifles:
<passive_effect name="CraftingTier" operation="base_add" level="68,76,84,92,100" value="1,2,3,4,5" tags="gunRifleT3SniperRifle"/>

Given that you only have one entry, it is also the last entry. Have you tried:
<passive_effect name="CraftingTier" operation="base_add" level="2,3,3,4,4" value="1,2,3,4,5" tags="gunHandgunT1Pistol"/>

see if that makes a difference.
cheers
 
I haven't reviewed the code much so am just making a quick observation (I've run in a similar issue before).
In the default code all Crafting Tier entries are 6 values EXCEPT the last entry, thats always 5:
e.g.
For handguns:
<passive_effect name="CraftingTier" operation="base_add" level="76,82,88,94,100" value="1,2,3,4,5" tags="gunHandgunT3DesertVulture"/>
for rifles:
<passive_effect name="CraftingTier" operation="base_add" level="68,76,84,92,100" value="1,2,3,4,5" tags="gunRifleT3SniperRifle"/>

Given that you only have one entry, it is also the last entry. Have you tried:
<passive_effect name="CraftingTier" operation="base_add" level="2,3,3,4,4" value="1,2,3,4,5" tags="gunHandgunT1Pistol"/>

see if that makes a difference.
cheers
Believe this was actually the fix, rather than having 3 levels, I set it to 7 (because I didn't set "min_level" until after I created the server) - then just had them unlock via item use in values of 2. Thank you.
 
Back
Top