Jump to content

A simple Buff Help Please?


RavenWits

Recommended Posts

I want to add a simple Resistance Buff to burning. But somehow it is not effective. What did I do wrong? Can someone help please?

 

<buff name="buffResistance" icon="ui_game_symbol_defense" name_key="buffResistanceName" description_key="buffResistanceDesc" icon_color="0,0,100">
	<stack_type value="replace"/>
	<duration value="10"/>
	<update_rate value="1"/>
	<effect_group>
		<requirements compare_type="or">
		<requirement name="HasBuff" buff="buffBurningEnvironment"/>
		<requirement name="RandomRoll" seed_type="Random" target="self" min_max="0,100" operation="LTE" value="@burning"/>
		</requirements>
		<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" target="self" buff="buffBurningEnvironment"/>
	</effect_group>
</buff>

Link to comment
Share on other sites

I'm not at the CPU atm but u can look at what I did here when I made the electric coat. Allows the user to wear a coat and apply elemental resistance for themselves while still doing damage. If you can't get it to work after messing around with with that I'll try and give you a working code when I get home from work. Check out the code in this thread.

https://7daystodie.com/forums/showthread.php?104258-Mod-Request-Armor-electrify-mod-add-on&p=925195

Link to comment
Share on other sites

I'm not sure exactly what this part does <requirements compare_type="or">

But given what you're trying to do, I think that is not necessary. It reads in sequence so if the person doesn't have the buff it won't continue, if the random roll doesn't hit, it won't continue (to the triggered_effect).

 

Can you tell us what your expected result is?

Link to comment
Share on other sites

I'm not sure exactly what this part does <requirements compare_type="or">

But given what you're trying to do, I think that is not necessary. It reads in sequence so if the person doesn't have the buff it won't continue, if the random roll doesn't hit, it won't continue (to the triggered_effect).

 

Can you tell us what your expected result is?

 

Yeah Im confused with what exactly that is supposed to do as well. I assumed that he just wanted a resistance buff that can be accomplished by looking at the code in the thread but now I'm not so sure that's what he is after. We need more info bud

Link to comment
Share on other sites

It's almost done

 

Ok. I've managed to get this code work properly. So what it does is, when the player have a perk called "Holdline" at level 1, this buff removes "LegSprained" and "buffIllInfection" debuffs immediately on self.

 

<buff name="buffResistance" icon="ui_game_symbol_defense" name_key="buffResistanceName" description_key="buffResistanceDesc" icon_color="160,200,255" icon_blink="true">
	<stack_type value="replace"/>
	<duration value="10"/>
	<update_rate value=".1"/>
	<effect_group>
		<requirement name="HasBuff" buff="buffLegSprained"/>
		<requirement name="CVarCompare" cvar="HoldTheLine" operation="LTE" value="1"/>
		<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" target="self" buff="buffLegSprained"/>
	</effect_group>
	<effect_group>
		<requirement name="HasBuff" buff="buffIllInfection0"/>
		<requirement name="CVarCompare" cvar="HoldTheLine" operation="LTE" value="1"/>
		<triggered_effect trigger="onSelfBuffUpdate" action="RemoveBuff" target="self" buff="buffIllInfection0"/>
               </effect_group>
<buff/>

 

Also, I've created a new perk called "Hold the Line" as you can see at level 1 of the perk it gives the previously created buff "buffResistance" and its target is "AOE" so it has a range to give others profit from this buff. This also work properly.

 

	<perk name="perkHoldTheLine" parent="skillInfluence" name_key="perkHoldTheLine" desc_key="perkHoldTheLineDesc" icon="ui_game_symbol_defense">
	<level_requirements level="1"><requirement name="ProgressionLevel" progression_name="attCharisma" operation="GTE" value="1" desc_key="reqCharismaLevel01"/>

	<effect_group>
		<triggered_effect trigger="onSelfProgressionUpdate" action="ModifyCVar" cvar="HoldTheLine" operation="set" value="1" target="selfAOE" target_tags="ally,party" range="5">

			<requirement name="ProgressionLevel" progression_name="perkHoldTheLine" target="self" operation="Equals" value="1"/>
			<requirement name="CVarCompare" cvar="HoldTheLine" target="other" operation="GTE" value="1"/>
		</triggered_effect>

		<triggered_effect trigger="onSelfProgressionUpdate" action="AddBuff" buff="BuffResistance" target="selfAOE" target_tags="ally,party" range="5">
			<requirement name="ProgressionLevel" progression_name="perkHoldTheLine" target="self" operation="Equals" value="1"/>
		</triggered_effect>

		<effect_description level="1" desc_key="perkHoldTheLineRank1Desc" />
	</effect_group>
</perk> 

 

But I have another question. I also put this perk under a new created attribute called "attCharisma". And I want this attribute to give range boost to "HoldtheLine" perk when leveled up. Now the perk gives range of "5" I want this to stay at "5" when perk levels up. Instead I want to increase "range" when the parent attribute "attCharisma" levels up. So how should I do that? I mean should I enter a new tag to all of range related perks and then boost target tags range? I don't know I am little confused here? Can anybody help me with the situation?

Link to comment
Share on other sites

<requirements compare_type="or">

simply means that if any of the requirements return true, then the effect group or effect will be triggered.

 

By default the requirements are evaluated using *and* operators. Meaning they all have to return true or it doesn't apply.

 

Hope that helps.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...