I'm assuming you're not putting that, verbatim, into your own modlet's buffs.xml file, and that this is an example to get the general idea of what you want to do.
In your example, the buffBurningElement's duration is set by the buffBurningElementDuration cvar. That cvar is set to 10 before the buff is applied.
In general, if you are using a buff to add another buff, you should be able to first set whatever cvar that it uses for its duration (or any other effect that is determined by a cvar). But, make sure you look at the other buff, because it almost certainly modifies that cvar itself, and it might change that cvar to something you don't want after it starts.
In this example, the buffBurningElement buff automatically sets the buffBurningElementDuration to 10 when it starts, if it's below that value. So you couldn't make it a shorter duration than 10. It also will set the cvar to 10 (not add 10) when the buff stacks.
Also, that is not the only way (and probably not even the most common way) that buff durations are set. It's often a combination of stack_type and duration values. Using a cvar does allow for more control, which is probably why TFP use it here. For details on that, the comments at the end of buffs.xml are your friends.
EDIT: Here's a helpful hint. You can use the "</>" button to add code to posts. It makes the code much easier to read. Here's your code formatted as XML by the forums:
Originally I added that code into the item file of the mod and renamed the buff name so that we had a new buff (perhaps should have been in buffs file) then I could edit the duration but I found the buff wouldn't fire so I scrapped that idea. With it being a different name I assumed it would just add to the buffs file and use the same cvar but then I could change the duration and there would be no issues.
One of the reasons to reduce was the user would get hit also if he missed a shot. In the end however I managed to use onSelfAttackedOther in triggered effect which stopped the user setting on fire on a miss; I am still curious on how to go about it but at least can move forward without for now.
Also someone mentioned !entitytagcompare would also stop it hitting other players (if it does so already haven't tested that), hopefully that is correct, the current ammo is below:
Here I left the actionrayhit in as it shocks the player on a miss which is quite fun I find...probably need to add the entitytagcompare to stop use against other players but wanted to test it out first
<item name="Rageshockammo9mm">
<property name="Tags" value="ammo"/>
<property name="DisplayType" value="ammoBullet"/>
<property name="HoldType" value="45"/>
<property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/>
<property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
<property name="Material" value="Mbrass"/>
<property name="MeltTimePerUnit" value=".4"/>
<property name="Stacknumber" value="300"/><!-- STK ammo high -->
<property name="EconomicValue" value="9"/>
<property name="Group" value="Ammo/Weapons,Ammo,Ranged Weapons"/>
<property name="CustomIcon" value="ammo9mmBulletBall"/>
<property name="CustomIconTint" value="7AA543"/><!--Camo -->
<effect_group name="ammo9mmBulletBall" tiered="false">
<passive_effect name="EntityDamage" operation="base_set" value="32" tags="perkGunslinger,9mmGun"/>
<passive_effect name="BlockDamage" operation="base_set" value="6" tags="perkGunslinger"/>
<passive_effect name="DamageModifier" operation="perc_add" value="-.8" tags="earth"/>
<passive_effect name="DamageModifier" operation="perc_add" value="2" tags="wood"/>
<triggered_effect trigger="onSelfPrimaryActionRayHit " action="AddBuff" target="other" buff="buffShocked"/>
</effect_group>
</item>
Heres the burn ammo
<item name="Rageburnzomammo9mm"><!-- Burn ammo -->
<property name="Tags" value="ammo"/>
<property name="DisplayType" value="ammoBullet"/>
<property name="HoldType" value="45"/>
<property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/>
<property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
<property name="Material" value="Mbrass"/>
<property name="MeltTimePerUnit" value=".4"/>
<property name="Stacknumber" value="300"/><!-- STK ammo high -->
<property name="EconomicValue" value="9"/>
<property name="Group" value="Ammo/Weapons,Ammo,Ranged Weapons"/>
<property name="CustomIcon" value="ammo9mmBulletBall"/>
<property name="CustomIconTint" value="A42ACC"/><!--Purple-->
<effect_group name="ammo9mmBulletBall" tiered="false">
<passive_effect name="EntityDamage" operation="base_set" value="32" tags="perkGunslinger,9mmGun"/>
<passive_effect name="BlockDamage" operation="base_set" value="6" tags="perkGunslinger"/>
<passive_effect name="DamageModifier" operation="perc_add" value="-.8" tags="earth"/>
<passive_effect name="DamageModifier" operation="perc_add" value="2" tags="wood"/>
<triggered_effect trigger="onSelfAttackedOther " action="AddBuff" target="other" buff="buffBurningZombie"/> <!-- onSelfAttackedOther seems to work best at not harming player-->
<requirement name="!EntityTagCompare" tags="player"/> <!-- stops the ammo harming other players-->
</effect_group>
</item>
Next questions are:
How to make this craftable in a workstation
Can sound effects be added when buff ammo is used?
And lastly, I would really like to make a sniper ammo, basically it has 3 rounds, the first one is normal, second one is shock/stun (if there is a good stun buff?) ammo, third one is another normal round but this time it carries a x5 multiplier if a player scores a headshot whilst it hits an entity that has been hit with the shock buff, is that possible?
Would be very satisfying to stun the enemy, then switch rounds line up the shot and hit a perfect headshot for the finish, or something along these lines......I think of the Vindicare Assasins from 40k when I picture this kind of thing.