• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

[MODLET] Quality Effectiveness Bonuses

I think I've figured out the degradationperuse. It basically means it will use that many durability points per swing, so if you set it to a negative, you're essentially making it repair itself per swing. So if it's set to <passive_effect name="DegradationPerUse" operation="base_set" value="16"/> That means it will use 16 durability points per successful hit. I'm not sure what the default durabilityperuse for each melee weapon/tool is, but if you set it to <passive_effect name="DegradationPerUse" operation="perc_add" value="3,0.25" tier="1,6"/> that will start it out using 3 durability points per use at tier 1 and then making it use 0.25 durability points per use at tier 6. I hope this explanation helps

The only problem then becomes, each weapon has it's own set degredation per use and changing the value doesn't seem to use percentages. By default the AK47 uses 16 durability per shot, and the rocket launcher uses 50. I assume that any item that doesn't have degradationperuse specified means it will be set to use 1 durability per use. Then again, I could be 100% wrong with all of this

 
You are right, however, my entire modlet uses this method to adjust all of the values for all of the items en mass. This allows the modlet to even work on items added in by other mods/modlets, as long as they are loaded first.

You see adding and subtracting a percentage adjusts the base value in all other cases, but for some reason DegredationPerUse seems to apply every use of the item, rather than adjusting the degredationperuse base value.

Note in your example you would want to change perc_add (percent added) to base_set

 
I'm discovering that the AttacksPerMinute has odd effects. I am working on getting a WeedCleaver working again. I.E. Machete that swings SUPER fast. Tried using Delay in the Action blocks to no real effect. Moved on to trying AttacksPerMinute (yes I cleared Delay out) in the Base Effects.

Started with setting it to 300, yet the character would only swing once every 5 seconds.

Set to it 150, and the character would then swing once every 2-3 seconds. Backwards right?

So somehow there is a limit, a ceiling in there somewhere or something about the new systems that I haven't grasped yet.

 
Flurry of blows uses perc_add 5% - 25% for attacksperminute

buffs.xml uses attacksperminute as a debuff with perc_subtract

So it would seem that the higher the better. But that delay between attacks isn't helpful.

Let me ask, if the total number of attacks the same with attacks per minute because of the delay? My tests indicated that they weren't but I didn't go as high as you did.

 
Yea, I think there is a ceiling where the effects invert. I increased Iron Fireaxe from 47 to 55 and reduced the power attack reduction from -3 to -2.5 and it definitely swings faster. But as I posted in another thread I had weird results with the Stone Axe. Increased from 75 and it swung slower while the animation sped up. Reduced to 50 and it swung faster. Reduced below 50 and it swung slower again. I don't know if the sweet spot is a certain number with all weapons, or if different weapons have different sweet spots, but it seems like you just have to adjust up and down until you find it and that'll be the fastest you can get until they fix the way AttacksPerMinute works. Delay only seems to effect repair speed on repair weapons.

 
Two things about this mod I discovered while doing my own testing.

1. Power attacks:

Damage calc for items in general seems to be:

(EntityDamage + (EntityDamage * (sum of all perc_add values)) = Modified_EntityDamage,

Then if you have any DamageModifiers, Modified_EntityDamage + (Modified_EntityDamage * DamageModifier)

or more simply,

(EntityDamage * (1 + sum of all perc_add values)) * (1 + DamageModifier)

Damage modifiers are applied after all Entity/BlockDamage calculations, so things like DamageModifier tags="head" (headshot multiplier) or "wood" will be applied after.

I noticed you only have a modifier for base effects and not power attacks. All of the items with power attack modifiers have a default BlockDamage perc_add of 2. So power attacks do base damage + 200%. Using the Iron Fireaxe as an example:

Default Standard attack block damage: 30 + 0 (no perc_add values) = 30

Default Power attack block damage: 30 + (30 * (2 from power atk)) = 90

With your mod an Iron Fireaxe at Tier 6 should be doing:

Standard attack block damage: 30 + (30 * (2 from tier)) = 90

Power attack block damage: 30 + (30 * (2 from power atk + 2 from tier)) = 150

Now, this all depends on how you *want* the damages to be multiplied. With the way it is currently, the standard attack increases +200% from default but the power attack only increases 67% from default. To increase both by 200%, you could add:

<append xpath="/items/item/effect_group[@name=Power Attack]">

<passive_effect name="BlockDamage" operation="perc_add" value="0,4" tier="1,6" tags="secondary"/>

</append>

(No need to <remove> the original "Power Attack" effect, the new line will be added together with the original line in calculation for a total of 6 at Tier 6. Make sure you have tags="secondary" or this will add to the standard attack despite being in a different effect_group)

This results in:

30 + (30 * (2 from power atk + 2 from tier + 4 from power atk tier)) = 270, which is the default 90 + 200%

Now, 270 is a pretty strong power attack, so you may want to modify the "Base Effects" number, or you may just prefer it the way you have it.

2. Using <remove> first may not be necessary.

I noticed you <remove> to clear any default perc_adds then you re-add them for weapons that had modifiers, such as the hunting rifle with its 0.35. I don't believe this is necessary. If you just use <append> to add a new line, it will simply add the two lines together. I did some testing with hunting rifle block damage. Changed base to 20 for easier testing, and my Tier 6 is set to perc_add 0.5.

Shooting at a wood block which the HR gets a DamageModifier of 4 on wood. Using simplified equation:

Tier 1:

(20 * (1 + 0.35 block damage + 0 from tier)) * (1 + 4) = 135, verified ingame

Tier 6:

(20 * (1 + 0.35 block damage + 0.5 from tier)) * (1 + 4) = 185, verified ingame

So yea, doing the <remove> then re-adding for each weapon may be unnecessary. Also you have a universal EntityDamage tier multipler of 0,0.5 (+50%), but for the re-added weapons you increase by 100% (eg hunting rifle is 0.35,1.35). I would assume maybe you wanted ranged weapons to do more damage but you only added them for weapons that had them removed, but haven't added the +100% bonus to 9mm pistol or others.

 
Last edited by a moderator:
I really appreciate that information, I will work it into the mod.

And the remove was because I wasn't sure how they would stack or if they even would, so when I discovered that some ranged weapons had bonus damage (or penalties for the AK and SMG) I figured I should add tehm seperately. Again thanks for testing all of this and posting it.

 
It seems someone figured out you can use Rounds Per minute in places of Attacks per minute ot increae melee attack speeed, I will be trying it out and hopully working it into the mod, probably tomorrow.

 
Well, tehy fixed attacksperminute, so that is great news, teh mod as it exists now should begin working with melee weapon speed now.

 
Back
Top