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

Issue with RequirementItemModTier

Hey guys, Im testing "RequirementItemModTier" and I cant seem to get it to work.
I have an item_modifier that goes onto Glove armors:
XML:
<!-- item_modifiers.xml -->
<item_modifier name="modTestExecution" installable_tags="armorHands" modifier_tags="testing_execution" blocked_tags="noMods" type="attachment">
    <property name="Extends" value="modGeneralMaster"/>
   
    <property name="ShowQuality" value="true"/>
    <property name="QualityMin" value="1"/>

    <effect_group>    <!-- Tier 1 -->
        <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="1"/>
            <triggered_effect trigger="onSelfAttackedOther" action="AddBuff" buff="buffExecutionEffect"/>
    </effect_group>
    <effect_group>    <!-- Tier 2 -->
        <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="2"/>
            <triggered_effect trigger="onSelfAttackedOther" action="AddBuff" buff="buffExecutionEffect"/>
    </effect_group>
    <effect_group>    <!-- Tier 3 -->
        <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="3"/>
            <triggered_effect trigger="onSelfAttackedOther" action="AddBuff" buff="buffExecutionEffect"/>
    </effect_group>
    <effect_group>    <!-- Tier 4 -->
        <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="4"/>
            <triggered_effect trigger="onSelfAttackedOther" action="AddBuff" buff="buffExecutionEffect"/>
    </effect_group>
    <effect_group>    <!-- Tier 5 -->
        <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="5"/>
            <triggered_effect trigger="onSelfAttackedOther" action="AddBuff" buff="buffExecutionEffect"/>
    </effect_group>
    <effect_group>    <!-- Tier 6 -->
        <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="6"/>
            <triggered_effect trigger="onSelfAttackedOther" action="AddBuff" buff="buffExecutionEffect"/>
    </effect_group>
   
    <effect_group>
        <triggered_effect trigger="onSelfEquipStop" action="RemoveBuff" buff="buffExecutionEffect"/>
    </effect_group>
</item_modifier>
XML:
<!-- buffs.xml -->
<buff name="buffExecutionEffect" icon="ui_game_symbol_spear" icon_color="20,255,20">
    <stack_type value="ignore"/>
    <duration value="3"/>
    <display_value value="duration"/>
    <display_value_format value="time"/>
   
    <!-- Effect -->
    <effect_group>
        <passive_effect name="EntityDamage" operation="perc_add" value="2" tags="melee,perkArchery"/>
    </effect_group>
</buff>


Even when replacing the triggered_effect with a passive_effect, it doesnt seem to work (If removing the RequirementItemModTier portion, the the passive_effect and triggered_effect works)
For example, even this doesnt work:
XML:
<effect_group>    <!-- Tier 1 -->
    <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="1"/>
        <passive_effect name="RunSpeed" operation="perc_add" value="4"/>
</effect_group>
<effect_group>    <!-- Tier 2 -->
    <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="2"/>
        <passive_effect name="RunSpeed" operation="perc_add" value="4"/>
</effect_group>
<effect_group>    <!-- Tier 3 -->
    <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="3"/>
        <passive_effect name="RunSpeed" operation="perc_add" value="4"/>
</effect_group>
<effect_group>    <!-- Tier 4 -->
    <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="4"/>
        <passive_effect name="RunSpeed" operation="perc_add" value="4"/>
</effect_group>
<effect_group>    <!-- Tier 5 -->
    <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="5"/>
        <passive_effect name="RunSpeed" operation="perc_add" value="4"/>
</effect_group>
<effect_group>    <!-- Tier 6 -->
    <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="6"/>
        <passive_effect name="RunSpeed" operation="perc_add" value="4"/>
</effect_group>


I'm wondering if the issue is RequirementItemModTier's mod_name="" is the issue, where there is some kind of list i need to edit and add my mod_name (if that is even possible?)
 
So does it just not apply the buff? Maybe look at the rad remover and structure it like that. It looks fine to me at first glance, but who knows.
 
So does it just not apply the buff? Maybe look at the rad remover and structure it like that. It looks fine to me at first glance, but who knows.
It doesnt apply the buff, and when switching to a simple passive_effect, it doesnt apply that either, unless removal of the "RequirementItemModTier" requirement.

Yeah, I've been referencing 3.0's item_modifiers.xml and both codes are pretty identical, so I'm not sure if I'm messing it up, or maybe there is something like a hidden internal list for "mod_name" (I thought mod_name would be linked to the item_modifier's code name, but this might not be true and mod_name looks up an internal list)

Here's the Rad Removal code:

XML:
<item_modifier name="modGunMeleeRadRemover" installable_tags="weapon,tool" modifier_tags="specialDamage" blocked_tags="noMods" type="attachment">
    <property name="Extends" value="modGeneralMaster" param1="CustomIcon"/>
    <property name="UnlockedBy" value="modGunMeleeRadRemoverSchematic"/>
    <property name="TraderStageTemplate" value="modsTier3"/>
    <property name="ShowQuality" value="true"/>
    <property name="DisplayType" value="modGunMeleeRadRemover"/>
    <property name="QualityMin" value="1"/>

    <!-- Increases damage against radiated,charged,infernal enemies -->
    <effect_group tiered="false">
        <requirement name="EntityTagCompare" target="other" tags="radiated,charged,infernal"/>
            <triggered_effect trigger="onSelfDamagedOther" action="AddBuff" target="other" buff="buffRadiatedRegenBlock15">
                <requirement name="RequirementItemModTier" mod_name="modGunMeleeRadRemover" operation="Equals" value="1"/></triggered_effect>
            <triggered_effect trigger="onSelfDamagedOther" action="AddBuff" target="other" buff="buffRadiatedRegenBlock30">
                <requirement name="RequirementItemModTier" mod_name="modGunMeleeRadRemover" operation="Equals" value="2"/></triggered_effect>
            <triggered_effect trigger="onSelfDamagedOther" action="AddBuff" target="other" buff="buffRadiatedRegenBlock45">
                <requirement name="RequirementItemModTier" mod_name="modGunMeleeRadRemover" operation="Equals" value="3"/></triggered_effect>
            <triggered_effect trigger="onSelfDamagedOther" action="AddBuff" target="other" buff="buffRadiatedRegenBlock60">
                <requirement name="RequirementItemModTier" mod_name="modGunMeleeRadRemover" operation="Equals" value="4"/></triggered_effect>
            <triggered_effect trigger="onSelfDamagedOther" action="AddBuff" target="other" buff="buffRadiatedRegenBlock75">
                <requirement name="RequirementItemModTier" mod_name="modGunMeleeRadRemover" operation="Equals" value="5"/></triggered_effect>
            <triggered_effect trigger="onSelfDamagedOther" action="AddBuff" target="other" buff="buffRadiatedRegenBlock90">
                <requirement name="RequirementItemModTier" mod_name="modGunMeleeRadRemover" operation="Equals" value="6"/></triggered_effect>
    </effect_group>
    <effect_group>
        <passive_effect name="DegradationMax" operation="base_set" value="10,60" tier="1,6" tag="modRanged"/>
        <display_value name="dRegenerationBlocker" value="15,30,45,60,75,90" tier="1,2,3,4,5,6"/>
    </effect_group>
</item_modifier>

So a note for Rad Remover, it's onSelfDamageOther has the target="other" component, mine doesnt, but I can verify that removing the "RequirementItemModTier" from my code will fire the triggered_event and give me the buff, so that isnt the issue, where it might have been giving the buff to the target rather than self.
XML:
<effect_group>    <!-- Tier 6 -->
    <!-- <requirement name="RequirementItemModTier" mod_name="modTestExecution" operation="Equals" value="6"/> -->
    <triggered_effect trigger="onSelfAttackedOther" action="AddBuff" buff="buffExecutionEffect"/>
</effect_group>
 
Not able to really test it myself atm, but only other difference I can see is those reqs for the rad remover has tiered="false" on its effect group. Maybe try that, though not sure it matters. That and wrapping your trigger around the RequirementItemModTier req like the rad remover does.
 
Not able to really test it myself atm, but only other difference I can see is those reqs for the rad remover has tiered="false" on its effect group. Maybe try that, though not sure it matters. That and wrapping your trigger around the RequirementItemModTier req like the rad remover does.
Last night, I've tried a few combinations, and nothing was working.
But im going to try a few combinations again, maybe I missed something.
 
Back
Top