calaverinha Posted February 6 Share Posted February 6 (edited) I've tried using <passive_effect name="EntityDamage" operation="perc_set" value="@roll"/>, applied to the zombie, with @roll being 0 or 1. But this does nothing. I only see damage change with .xml files, but I don't want that. I want something like a blind debuff, with x% change for zombie missing the attack. My original logic was this: <effect_group> <triggered_effect trigger="onSelfBuffStart" action="ModifyCVar" cvar="roll" operation="set" value="1"/> <requirement name="RandomRoll" seed_type="Random" min_max="0,100" operation="LTE" value="15"/> <triggered_effect trigger="onSelfBuffUpdate" action="ModifyCVar" cvar="roll" operation="set" value="0"/> </effect_group> <effect_group> <passive_effect name="EntityDamage" operation="perc_set" value="@roll"/> </effect_group> Edited February 6 by calaverinha (see edit history) Link to comment Share on other sites More sharing options...
Bladestorm Games Posted February 6 Share Posted February 6 Maybe something like this? (Untested) <effect_group name="hit_rating"> <triggered_effect trigger="onSelfPrimaryActionStart" action="ModifyCVar" target="self" cvar="hit_rating" operation="set" value="randomint(0,100)"/> <triggered_effect trigger="onSelfSecondaryActionStart" action="ModifyCVar" target="self" cvar="hit_rating" operation="set" value="randomint(0,100)"/> </effect_group> <effect_group name="hit_chance"> <requirement name="CVarCompare" cvar="hit_rating" operation="LTE" value="25"/> <passive_effect name="EntityDamage" operation="perc_add" value="-5"/> </effect_group> The idea is, only when the entity with the buff begins their attack, their hit_rating will change between 0 and 100. Then the requirement tag checks if hit_rating is below 25, then sets the EntityDamage to -500% (which should be 0 damage). Whatever value you set for the requirement will be the % chance of a miss, so in my code, it is a 25% chance to miss. - If you want 15%, you'd change the 25 to 15 - If you want 75%, you'd change the 25 to 75 One issue that comes to mind with my method, is you'll still be getting hit, just with 0 damage taken, this is bad because Im thinking you can still be inflicted with debuffs, like CriticalHitsDebuffs, Bleeding, Concussion, etc Link to comment Share on other sites More sharing options...
calaverinha Posted February 6 Author Share Posted February 6 I've tested your solution and it also doesn't work. The problem is that EntityDamage <= 0 doesn't seem to work, zombies always do some damage. Link to comment Share on other sites More sharing options...
bdubyah Posted February 7 Share Posted February 7 They will do 1 damage at minimum if they connect. That's just how the game is coded. Same with player hands or any items/weapons. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now