- Version
- V3
- Platform
- Windows
First, list the original code:
<passive_effect name="RoundsPerMinute" operation="perc_add" level="1,2,3,4,5" value=".125,.25,.375,.5,.5" tags="turretMelee"/>
<passive_effect name="ReloadSpeedMultiplier" operation="perc_add" level="4,5" value="0.1,0.2" tags="perkTurrets"/>
The problem with this coding approach is that the attack animations for the robot sledgehammer and robot turret cannot be played at an extremely fast speed when held in hand.
For the robot sledgehammer, after percentage-based attack speed buffs stack past a certain point, its swings per minute while held manually are lower than when it is deployed stationary.However, this issue does not occur if the same attacks per minute are achieved by directly modifying the base attack speed value instead of percentage bonuses.
When the robot turret's fire rate exceeds 105, it does not suffer from the reduced attack speed seen in handheld weapons, but its firing animation becomes out of sync with its actual firing rate.
Regarding the robot turret, I recommend implementing attack speed boost abilities with the following coding logic.
<append xpath="//perk[@name='perkTurrets']">
<effect_group>
<passive_effect name="RoundsPerMinute" operation="perc_add" level="1,2,3,4,5" value=".15,.35,.55,.75,.75" tags="turretMelee"/>
<passive_effect name="RoundsPerMinute" operation="perc_add" level="1,2,3,4,5" value=".3,.7,1.1,1.5,1.5" tags="deployed">
<requirement name="ItemHasTags" tags="turretRanged"/></passive_effect>
</effect_group>
</append>
<set xpath="//book[@name='perkTechJunkie7Hydraulics']/effect_group">
<passive_effect name="RoundsPerMinute" operation="perc_add" level="1" value=".05" tags="turretMelee"/>
<passive_effect name="RoundsPerMinute" operation="perc_add" level="1" value=".1" tags="deployed">
<requirement name="ItemHasTags" tags="turretRanged"/></passive_effect>
</set>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
This is the stats code for the robot turret; I hope adjustments can be made to its fire rate parameters.
<stats>
<!-- Base_Random_Roll -->
<stat name="EntityDamage" value="0,0,1,0,.1"/>
<stat name="MagazineSize" value="0,0,1,0,.1"/>
<stat name="RoundsPerMinute" value="0,0,1,0,.02"/>
<stat name="DamageFalloffRange" value="0,0,1,0,.1"/>
<stat name="DegradationMax" value="0,0,1,0,.1"/>
<!-- Q1_Boosted_Rolls -->
<stat name="EntityDamage" value="1,0,.3,.1,.5"/>
<stat name="MagazineSize" value="1,0,.3,.1,.5"/>
<stat name="RoundsPerMinute" value="1,0,.3,.02,.1"/>
<stat name="DamageFalloffRange" value="1,0,.3,.1,.5"/>
<stat name="DegradationMax" value="1,0,.3,.1,.5"/>
<!-- Q2_Boosted_Rolls -->
<stat name="EntityDamage" value="2,10,.3,.1,.5"/>
<stat name="MagazineSize" value="2,10,.3,.1,.5"/>
<stat name="RoundsPerMinute" value="2,10,.3,.02,.1"/>
<stat name="DamageFalloffRange" value="2,10,.3,.1,.5"/>
<stat name="DegradationMax" value="2,10,.3,.1,.5"/>
<!-- Q3_Boosted_Rolls -->
<stat name="EntityDamage" value="3,11,.3,.1,.5"/>
<stat name="MagazineSize" value="3,11,.3,.1,.5"/>
<stat name="RoundsPerMinute" value="3,11,.3,.02,.1"/>
<stat name="DamageFalloffRange" value="3,11,.3,.1,.5"/>
<stat name="DegradationMax" value="3,11,.3,.1,.5"/>
<!-- Q4_Boosted_Rolls -->
<stat name="EntityDamage" value="4,12,.3,.1,.5"/>
<stat name="MagazineSize" value="4,12,.3,.1,.5"/>
<stat name="RoundsPerMinute" value="4,12,.3,.02,.1"/>
<stat name="DamageFalloffRange" value="4,12,.3,.1,.5"/>
<stat name="DegradationMax" value="4,12,.3,.1,.5"/>
<!-- Q5_Boosted_Rolls -->
<stat name="EntityDamage" value="5,14,.3,.1,.5"/>
<stat name="MagazineSize" value="5,14,.3,.1,.5"/>
<stat name="RoundsPerMinute" value="5,14,.3,.02,.1"/>
<stat name="DamageFalloffRange" value="5,14,.3,.1,.5"/>
<stat name="DegradationMax" value="5,14,.3,.1,.5"/>
<!-- Q6_Boosted_Rolls -->
<stat name="EntityDamage" value="6,16,.3,.1,.5"/>
<stat name="MagazineSize" value="6,16,.3,.1,.5"/>
<stat name="RoundsPerMinute" value="6,16,.3,.02,.1"/>
<stat name="DamageFalloffRange" value="6,16,.3,.1,.5"/>
<stat name="DegradationMax" value="6,16,.3,.1,.5"/>
<!-- Q6_Boosted_Rolls -->
<stat name="EntityDamage" value="6,20,.3,.5,.7"/>
<stat name="MagazineSize" value="6,20,.3,.5,1"/>
<stat name="RoundsPerMinute" value="6,20,.3,.1,.3"/>
<stat name="DamageFalloffRange" value="6,20,.3,.5,.7"/>
<stat name="DegradationMax" value="6,20,.3,.5,.7"/>
</stats>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
These are the codes for the three-round burst mod and full-auto mod, and I hope revisions can be made based on them.
<item_modifier name="modGunTriggerGroupBurst3" installable_tags="firingMode,turretRanged" modifier_tags="trigger" blocked_tags="noMods" type="attachment">
<property name="Extends" value="modGeneralMaster"/>
<property name="UnlockedBy" value="modGunTriggerGroupBurst3Schematic"/>
<property name="TraderStageTemplate" value="modsTier2"/>
<property name="CustomIcon" value="modGunTriggerGroupBurst"/>
<effect_group tiered="false">
<passive_effect name="BurstRoundCount" operation="base_set" value="3"/>
<passive_effect name="RoundsPerMinute" operation="perc_add" value=".1"/>
<passive_effect name="IncrementalSpreadMultiplier" operation="perc_add" value=".05"/>
</effect_group>
</item_modifier>
<item_modifier name="modGunTriggerGroupAutomatic" installable_tags="firingMode,turretRanged" modifier_tags="trigger" blocked_tags="noMods" type="attachment">
<property name="Extends" value="modGeneralMaster" param1="CustomIcon"/>
<property name="UnlockedBy" value="modGunTriggerGroupAutomaticSchematic"/>
<property name="TraderStageTemplate" value="modsTier3"/>
<effect_group tiered="false">
<passive_effect name="BurstRoundCount" operation="base_set" value="0"/>
<passive_effect name="RoundsPerMinute" operation="perc_add" value=".12"/>
<passive_effect name="IncrementalSpreadMultiplier" operation="perc_add" value=".06"/>
</effect_group>
</item_modifier>
<passive_effect name="RoundsPerMinute" operation="perc_add" level="1,2,3,4,5" value=".125,.25,.375,.5,.5" tags="turretMelee"/>
<passive_effect name="ReloadSpeedMultiplier" operation="perc_add" level="4,5" value="0.1,0.2" tags="perkTurrets"/>
The problem with this coding approach is that the attack animations for the robot sledgehammer and robot turret cannot be played at an extremely fast speed when held in hand.
For the robot sledgehammer, after percentage-based attack speed buffs stack past a certain point, its swings per minute while held manually are lower than when it is deployed stationary.However, this issue does not occur if the same attacks per minute are achieved by directly modifying the base attack speed value instead of percentage bonuses.
When the robot turret's fire rate exceeds 105, it does not suffer from the reduced attack speed seen in handheld weapons, but its firing animation becomes out of sync with its actual firing rate.
Regarding the robot turret, I recommend implementing attack speed boost abilities with the following coding logic.
<append xpath="//perk[@name='perkTurrets']">
<effect_group>
<passive_effect name="RoundsPerMinute" operation="perc_add" level="1,2,3,4,5" value=".15,.35,.55,.75,.75" tags="turretMelee"/>
<passive_effect name="RoundsPerMinute" operation="perc_add" level="1,2,3,4,5" value=".3,.7,1.1,1.5,1.5" tags="deployed">
<requirement name="ItemHasTags" tags="turretRanged"/></passive_effect>
</effect_group>
</append>
<set xpath="//book[@name='perkTechJunkie7Hydraulics']/effect_group">
<passive_effect name="RoundsPerMinute" operation="perc_add" level="1" value=".05" tags="turretMelee"/>
<passive_effect name="RoundsPerMinute" operation="perc_add" level="1" value=".1" tags="deployed">
<requirement name="ItemHasTags" tags="turretRanged"/></passive_effect>
</set>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
This is the stats code for the robot turret; I hope adjustments can be made to its fire rate parameters.
<stats>
<!-- Base_Random_Roll -->
<stat name="EntityDamage" value="0,0,1,0,.1"/>
<stat name="MagazineSize" value="0,0,1,0,.1"/>
<stat name="RoundsPerMinute" value="0,0,1,0,.02"/>
<stat name="DamageFalloffRange" value="0,0,1,0,.1"/>
<stat name="DegradationMax" value="0,0,1,0,.1"/>
<!-- Q1_Boosted_Rolls -->
<stat name="EntityDamage" value="1,0,.3,.1,.5"/>
<stat name="MagazineSize" value="1,0,.3,.1,.5"/>
<stat name="RoundsPerMinute" value="1,0,.3,.02,.1"/>
<stat name="DamageFalloffRange" value="1,0,.3,.1,.5"/>
<stat name="DegradationMax" value="1,0,.3,.1,.5"/>
<!-- Q2_Boosted_Rolls -->
<stat name="EntityDamage" value="2,10,.3,.1,.5"/>
<stat name="MagazineSize" value="2,10,.3,.1,.5"/>
<stat name="RoundsPerMinute" value="2,10,.3,.02,.1"/>
<stat name="DamageFalloffRange" value="2,10,.3,.1,.5"/>
<stat name="DegradationMax" value="2,10,.3,.1,.5"/>
<!-- Q3_Boosted_Rolls -->
<stat name="EntityDamage" value="3,11,.3,.1,.5"/>
<stat name="MagazineSize" value="3,11,.3,.1,.5"/>
<stat name="RoundsPerMinute" value="3,11,.3,.02,.1"/>
<stat name="DamageFalloffRange" value="3,11,.3,.1,.5"/>
<stat name="DegradationMax" value="3,11,.3,.1,.5"/>
<!-- Q4_Boosted_Rolls -->
<stat name="EntityDamage" value="4,12,.3,.1,.5"/>
<stat name="MagazineSize" value="4,12,.3,.1,.5"/>
<stat name="RoundsPerMinute" value="4,12,.3,.02,.1"/>
<stat name="DamageFalloffRange" value="4,12,.3,.1,.5"/>
<stat name="DegradationMax" value="4,12,.3,.1,.5"/>
<!-- Q5_Boosted_Rolls -->
<stat name="EntityDamage" value="5,14,.3,.1,.5"/>
<stat name="MagazineSize" value="5,14,.3,.1,.5"/>
<stat name="RoundsPerMinute" value="5,14,.3,.02,.1"/>
<stat name="DamageFalloffRange" value="5,14,.3,.1,.5"/>
<stat name="DegradationMax" value="5,14,.3,.1,.5"/>
<!-- Q6_Boosted_Rolls -->
<stat name="EntityDamage" value="6,16,.3,.1,.5"/>
<stat name="MagazineSize" value="6,16,.3,.1,.5"/>
<stat name="RoundsPerMinute" value="6,16,.3,.02,.1"/>
<stat name="DamageFalloffRange" value="6,16,.3,.1,.5"/>
<stat name="DegradationMax" value="6,16,.3,.1,.5"/>
<!-- Q6_Boosted_Rolls -->
<stat name="EntityDamage" value="6,20,.3,.5,.7"/>
<stat name="MagazineSize" value="6,20,.3,.5,1"/>
<stat name="RoundsPerMinute" value="6,20,.3,.1,.3"/>
<stat name="DamageFalloffRange" value="6,20,.3,.5,.7"/>
<stat name="DegradationMax" value="6,20,.3,.5,.7"/>
</stats>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
These are the codes for the three-round burst mod and full-auto mod, and I hope revisions can be made based on them.
<item_modifier name="modGunTriggerGroupBurst3" installable_tags="firingMode,turretRanged" modifier_tags="trigger" blocked_tags="noMods" type="attachment">
<property name="Extends" value="modGeneralMaster"/>
<property name="UnlockedBy" value="modGunTriggerGroupBurst3Schematic"/>
<property name="TraderStageTemplate" value="modsTier2"/>
<property name="CustomIcon" value="modGunTriggerGroupBurst"/>
<effect_group tiered="false">
<passive_effect name="BurstRoundCount" operation="base_set" value="3"/>
<passive_effect name="RoundsPerMinute" operation="perc_add" value=".1"/>
<passive_effect name="IncrementalSpreadMultiplier" operation="perc_add" value=".05"/>
</effect_group>
</item_modifier>
<item_modifier name="modGunTriggerGroupAutomatic" installable_tags="firingMode,turretRanged" modifier_tags="trigger" blocked_tags="noMods" type="attachment">
<property name="Extends" value="modGeneralMaster" param1="CustomIcon"/>
<property name="UnlockedBy" value="modGunTriggerGroupAutomaticSchematic"/>
<property name="TraderStageTemplate" value="modsTier3"/>
<effect_group tiered="false">
<passive_effect name="BurstRoundCount" operation="base_set" value="0"/>
<passive_effect name="RoundsPerMinute" operation="perc_add" value=".12"/>
<passive_effect name="IncrementalSpreadMultiplier" operation="perc_add" value=".06"/>
</effect_group>
</item_modifier>
- Reproduction Steps
- I LOVE TFP
- Link to Logs
- https://pastebin.com/
- Link to Screenshot/Video
- https://www.bilibili.com/video/BV1Ag7p62EBy/?vd_source=36c7e1b6ab1b3151b49413127b713e5a