• 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.

Understanding perk-based LootProb vs. Loot Groups

Askhab

Refugee
Hi everyone,
I’m trying to create a specialized mod that increases the drop rate for specific ammo types via perks, but I’ve hit a wall. Even with extreme values, the loot frequency doesn't seem to change in-game.
What I've done:
  1. Modified Base Perk: Changed perkBoomstick in progression.xml to:
    <passive_effect name="LootProb" operation="perc_add" level="1,5" value="20,200" tags="ammoShells"/>
  2. Added Custom Perk: Created a new perk for 7.62mm ammo:
  3. <append xpath="/progression/perks">
    <perk name="perkLootAmmo762" max_level="10" parent="skillGeneralPerks" base_skill_point_cost="10" name_key="perkLootAmmo762Name" desc_key="perkLootAmmo762Desc" icon="ui_game_symbol_add">
    <effect_group>
    <passive_effect name="LootProb" operation="perc_add" level="1,10" value="10,100" tags="ammo762mm"/>
    </effect_group>
    </perk>
    </append>
  4. The problem:
    The changes are confirmed to be active (no XPath errors, values show up correctly in debug), but after extensive testing (looting hundreds of containers), the amount and frequency of Shotgun Shells and 7.62mm ammo remain virtually the same as vanilla.
    My questions for the developers/community:
    • How does LootProb in progression.xml interact with the loot.xml groups?
    • If a loot container has a count or prob defined in loot.xml, does a perk’s perc_add actually override those chances, or is it capped by the container's loot group settings?
    • Is LootProb the right stat to change if I want a specific ammo type to appear more often, or should I be looking at LootStage modifiers or direct loot.xml overrides?
  5. I want to understand why a 20,000% increase (value="200") doesn't result in every box being full of that specific ammo. Any technical insight would be greatly appreciated!
 
Back
Top