[Statwatcher] trouble

ArkanderArkander Posts: 107
edited September 2014 in GUTS Community Help
I've got a skill that is not behaving the way I want it and I think the problem is with the statwatchers' bugyness when interacting with Affixes/Effects and the skill itself. The skill is based off of the berserker's Stormclaw, but I wanted my skill (which I've given the temp name of "Frostcleave") to trigger every three hits instead of randomly. Unfortunately, this seemingly simple change ended up with a ton of moving parts:
  • A stat "wrld_fc_counter" that counts to 3
  • The base skill (Frostcleave) applies an affix for 40 seconds to the player
  • The affix (Frostcleave) with a Cast Spell on Melee Strike with 100% chance for FrostcleaveProc.
  • The skill FrostcleaveProc increments wrld_fc_counter if the counter is less than 3, or executes FrostcleaveStrike if the counter is 3 or more
  • The skill FrostcleaveStrike does damage, has a particle layout, etc. It also resets fc_counter to 0.

The problem is that FrostcleaveStrike fires every time. Do Statwatchers not work in proc'd skills?
[SKILL]
	<STRING>NAME:FrostcleaveProc
	<TRANSLATE>DISPLAYNAME:Surge after three hits
	<STRING>ACTIVATION_TYPE:PROC
	<STRING>TARGET_ALIGNMENT:EVIL
	<STRING>TARGET_TYPE:TARGET
	<FLOAT>RANDOMRANGE:0
	<FLOAT>RANGE:7
	<FLOAT>TURNRATEOVERRIDE:-1
	<BOOL>HIDDEN:1
	<BOOL>DONT_STOP_ON_DEATH:1
	<INTEGER64>UNIQUE_GUID:
	[LEVEL1]
		<FLOAT>RANDOMRANGE:0
		[EVENT_START]
			<BOOL>APPLYEFFECTS:1
			[EXECUTE_SKILL]
				<STRING>SKILL:FROSTCLEAVESTRIKE
			[/EXECUTE_SKILL]
			[STATWATCHER]
				<STRING>STAT:wrld_fc_counter
				<STRING>PRIMARY_TARGET_TYPE:SELF
				<STRING>WATCH_TYPE:GREATER THAN OR EQUAL TO
				<FLOAT>VALUE:3
			[/STATWATCHER]
		[/EVENT_START]
		[EVENT_START]
			<BOOL>NOSTRIKEEFFECTS:1
			<BOOL>APPLYEFFECTS:1
			<BOOL>STATSHIDDEN:1
			<BOOL>CAN_CLONE:0
			[EFFECTS]
				<STRING>TARGET:SELF
				[EFFECT]
					<STRING>NAME:wrld_fc_counter
					<STRING>ACTIVATION:DYNAMIC
					<STRING>TYPE:ADD STAT
					<STRING>STAT_SOURCE_TYPE:ON CAST CASTER
					<FLOAT>MIN:1
					<FLOAT>MAX:1
					<FLOAT>CHANCE:100
				[/EFFECT]
			[/EFFECTS]
			[STATWATCHER]
				<STRING>STAT:wrld_fc_counter
				<STRING>PRIMARY_TARGET_TYPE:SELF
				<STRING>WATCH_TYPE:LESS THAN
				<FLOAT>VALUE:3
			[/STATWATCHER]
		[/EVENT_START]
	[/LEVEL1]
[/SKILL]

Comments

  • dont put the stat watcher on the main skill where the event with the execute skill string is.
    instead put the watcher on the skill being executed
    refer to the embermages brand passives to get an idea of what im talking about
  • I tried your advice: I put a statwatcher into the Executed skill (FrostcleaveStrike) and removed the statwatchers from FrostcleaveProc. Skill behavior remained the same. :(

    Edit: Don't the .*brand skills use triggerables?
    [SKILL]
    	<STRING>NAME:FrostcleaveProc
    	<TRANSLATE>DISPLAYNAME:Surge after three hits
    	<STRING>ACTIVATION_TYPE:PROC
    	<STRING>TARGET_ALIGNMENT:EVIL
    	<STRING>TARGET_TYPE:TARGET
    	<FLOAT>RANDOMRANGE:0
    	<FLOAT>RANGE:7
    	<FLOAT>TURNRATEOVERRIDE:-1
    	<BOOL>HIDDEN:1
    	<BOOL>DONT_STOP_ON_DEATH:1
    	<INTEGER64>UNIQUE_GUID:-1924172914732371928
    	[LEVEL1]
    		<FLOAT>RANDOMRANGE:0
    		[EVENT_START]
    			<BOOL>NOSTRIKEEFFECTS:1
    			<BOOL>APPLYEFFECTS:1
    			<BOOL>STATSHIDDEN:1
    			<BOOL>CAN_CLONE:0
    			[EXECUTE_SKILL]
    				<STRING>SKILL:FROSTCLEAVESTRIKE
    			[/EXECUTE_SKILL]
    			[EFFECTS]
    				<STRING>TARGET:SELF
    				[EFFECT]
    					<STRING>NAME:wrld_fc_counter
    					<STRING>ACTIVATION:DYNAMIC
    					<STRING>TYPE:ADD STAT
    					<STRING>STAT_SOURCE_TYPE:ON CAST CASTER
    					<FLOAT>MIN:1
    					<FLOAT>MAX:1
    					<FLOAT>CHANCE:100
    				[/EFFECT]
    			[/EFFECTS]
    		[/EVENT_START]
    	[/LEVEL1]
    [/SKILL]
    
    [SKILL]
    	<STRING>NAME:FrostcleaveStrike
    	<TRANSLATE>DISPLAYNAME:Surge after three hits
    	<STRING>ACTIVATION_TYPE:PROC
    	<STRING>TARGET_ALIGNMENT:EVIL
    	<STRING>TARGET_TYPE:TARGET
    	<FLOAT>RANDOMRANGE:0
    	<FLOAT>RANGE:7
    	<FLOAT>TURNRATEOVERRIDE:-1
    	<BOOL>HIDDEN:1
    	<BOOL>DONT_STOP_ON_DEATH:1
    	<INTEGER64>UNIQUE_GUID:6890553984035510779
    	[LEVEL1]
    		<FLOAT>RANDOMRANGE:0
    		[EVENT_START]
    			<STRING>FILE:media/skills/warlord/frostcleave/frostcleaveproc.layout
    			<FLOAT>WEAPONDAMAGEPCT:40
    			<FLOAT>SOAKSCALEPCT:40
    			<STRING>DAMAGE_TYPE:ICE
    			<BOOL>NOSTRIKEEFFECTS:1
    			<BOOL>APPLYEFFECTS:1
    			<BOOL>STATSHIDDEN:1
    			<STRING>FIREFROMBONE:CENTER
    			<STRING>FIREATBONE:CENTER
    			[EFFECTS]
    				<STRING>TARGET:SELF
    				[EFFECT]
    					<STRING>NAME:wrld_fc_counter
    					<STRING>ACTIVATION:DYNAMIC
    					<STRING>DURATION:INSTANT
    					<STRING>TYPE:SET STAT
    					<STRING>STAT_SOURCE_TYPE:ON CAST CASTER
    					<FLOAT>MIN:0
    					<FLOAT>MAX:0
    					<FLOAT>CHANCE:100
    				[/EFFECT]
    			[/EFFECTS]
    			[STATWATCHER]
    				<STRING>STAT:WRLD_FC_COUNTER
    				<STRING>PRIMARY_TARGET_TYPE:SELF
    				<STRING>WATCH_TYPE:GREATER THAN OR EQUAL TO
    				<FLOAT>VALUE:3
    			[/STATWATCHER]
    		[/EVENT_START]
    	[/LEVEL1]
    [/SKILL]
    
  • look at the procc skills of the brands,
    dont stat watch the effect
    stat watch the entire skill
  • PhanjamPhanjam Posts: 3,297 ✭✭✭
    Posting so I can find this later on :P Timers seems a really useful but **** area!
    Torchmodders
    Torchlight 1 Class Pack (TL1CP) Mod for TL2: Steam | RGF
  • look at the procc skills of the brands,
    dont stat watch the effect
    stat watch the entire skill

    Put it where? AFAIK Statwatchers behave weirdly outside of [EVENT] tags.
  • [SKILL]
    	<STRING>NAME:Fire Brand
    	<TRANSLATE>DISPLAYNAME:Fire Brand Proc
    	<STRING>ACTIVATION_TYPE:NORMAL
    	<STRING>TARGET_ALIGNMENT:EVIL
    	<STRING>TARGET_TYPE:TARGET
    	<FLOAT>RANDOMRANGE:0
    	<FLOAT>TURNRATEOVERRIDE:-1
    	<BOOL>HIDDEN:1
    	<BOOL>DONT_STOP_ON_DEATH:1
    	<BOOL>CAN_BE_SILENCED:0
    	<INTEGER64>UNIQUE_GUID:-2062926497824096352
    	[LEVEL1]
    		<FLOAT>RANDOMRANGE:0
    		<INTEGER>LEVEL_REQUIRED:0
    		<STRING>REQUIREMENT_GRAPH:SKILLTIER5_PASSIVE
    		[EVENT_START]
    			<STRING>FILE:media/skills/arbiter/passives/firebrand.layout
    			<BOOL>NOSTRIKEEFFECTS:1
    			<BOOL>PLACEONTARGET:1
    			<BOOL>DAMAGESHAPES_HIT_ONCE:1
    			[AFFIXES]
    				<INTEGER>AFFIXLEVEL:-1
    				<STRING>TARGET:ENEMY
    				<STRING>AFFIX:ARBITER_FIRE_BRAND
    			[/AFFIXES]
    		[/EVENT_START]
    	[/LEVEL1]
    	[STATWATCHER]
    		<STRING>STAT:BURNING
    		<STRING>PRIMARY_TARGET_TYPE:ENEMY
    		<STRING>SECONDARY_TARGET_TYPE:VALUE
    		<STRING>WATCH_TYPE:EQUAL TO
    		<FLOAT>SECONDARY_VALUE:1
    	[/STATWATCHER]
    [/SKILL]
    

    Pop it in outside of, but at the same level as, the Skill Levels. Just one takes care of all 15 levels long as it stays at the bottom.

    Also, you might want to put a small cooldown on your skill that counts melee strikes, otherwise a player can accrue all 3 stat points in one swing of a weapon that deals splash damage.
  • sorry if i wasn't being concise enough,
    anyways, ill explain in more detail.
    heres an example of what you should be doing to your procc skill
    [SKILL]
    	<STRING>NAME:Fire Brand
    	<TRANSLATE>DISPLAYNAME:Fire Brand Proc
    	<STRING>ACTIVATION_TYPE:NORMAL
    	<STRING>TARGET_ALIGNMENT:EVIL
    	<STRING>TARGET_TYPE:TARGET
    	<FLOAT>RANDOMRANGE:0
    	<FLOAT>TURNRATEOVERRIDE:-1
    	<BOOL>HIDDEN:1
    	<BOOL>DONT_STOP_ON_DEATH:1
    	<BOOL>CAN_BE_SILENCED:0
    	<INTEGER64>UNIQUE_GUID:-2062926497824096352
    	[LEVEL1]
    		<FLOAT>RANDOMRANGE:0
    		<INTEGER>LEVEL_REQUIRED:0
    		<STRING>REQUIREMENT_GRAPH:SKILLTIER5_PASSIVE
    		[EVENT_START]
    			<STRING>FILE:media/skills/arbiter/passives/firebrand.layout
    			<BOOL>NOSTRIKEEFFECTS:1
    			<BOOL>PLACEONTARGET:1
    			<BOOL>DAMAGESHAPES_HIT_ONCE:1
    			[AFFIXES]
    				<INTEGER>AFFIXLEVEL:-1
    				<STRING>TARGET:ENEMY
    				<STRING>AFFIX:ARBITER_FIRE_BRAND
    			[/AFFIXES]
    		[/EVENT_START]
    	[/LEVEL1]
    	[STATWATCHER]
    		<STRING>STAT:BURNING
    		<STRING>PRIMARY_TARGET_TYPE:ENEMY
    		<STRING>SECONDARY_TARGET_TYPE:VALUE
    		<STRING>WATCH_TYPE:EQUAL TO
    		<FLOAT>SECONDARY_VALUE:1
    	[/STATWATCHER]
    [/SKILL]
    
    this is an excerpt of fire brands procc skill, notice how the stat watcher comes after the level tag,
    this means the stat watcher is encompassing the entire skill, so it will prevent it from ever firing if it doesn't meet the stat requirements.

    btw, stat watchers only works on events, levels, skills and lastly affixes, not direct effects, even though it gives you the option of appending one to them (this is most likely a bug with guts)

    EDIT: ninja'd by gyt :lol:
  • Zoink! Or wait, Jinx? Did we just post the exact same example with the exact same editing? Why yes, yes we did.
  • Awesome! Thanks guys.
  • It's still triggering every strike.... :(
    [SKILL]
    	<STRING>NAME:FrostcleaveStrike
    	<TRANSLATE>DISPLAYNAME:Surge after three hits
    	<STRING>ACTIVATION_TYPE:PROC
    	<STRING>TARGET_ALIGNMENT:EVIL
    	<STRING>TARGET_TYPE:TARGET
    	<FLOAT>RANDOMRANGE:0
    	<FLOAT>RANGE:7
    	<FLOAT>TURNRATEOVERRIDE:-1
    	<BOOL>HIDDEN:1
    	<BOOL>DONT_STOP_ON_DEATH:1
    	<INTEGER64>UNIQUE_GUID:6890553984035510779
    	[LEVEL1]
    		<FLOAT>RANDOMRANGE:0
    		[EVENT_START]
    			<STRING>FILE:media/skills/warlord/frostcleave/frostcleaveproc.layout
    			<FLOAT>WEAPONDAMAGEPCT:40
    			<FLOAT>SOAKSCALEPCT:40
    			<STRING>DAMAGE_TYPE:ICE
    			<BOOL>NOSTRIKEEFFECTS:1
    			<BOOL>APPLYEFFECTS:1
    			<BOOL>STATSHIDDEN:1
    			<STRING>FIREFROMBONE:CENTER
    			<STRING>FIREATBONE:CENTER
    			[EFFECTS]
    				<STRING>TARGET:SELF
    				[EFFECT]
    					<STRING>NAME:wrld_fc_counter
    					<STRING>ACTIVATION:DYNAMIC
    					<STRING>DURATION:INSTANT
    					<STRING>TYPE:SET STAT
    					<STRING>STAT_SOURCE_TYPE:ON CAST CASTER
    					<FLOAT>MIN:0
    					<FLOAT>MAX:0
    					<FLOAT>CHANCE:100
    				[/EFFECT]
    			[/EFFECTS]
    		[/EVENT_START]
    	[/LEVEL1]
    	[STATWATCHER]
    		<STRING>STAT:WRLD_FC_COUNTER
    		<STRING>PRIMARY_TARGET_TYPE:SELF
    		<STRING>WATCH_TYPE:GREATER THAN OR EQUAL TO
    		<FLOAT>VALUE:3
    	[/STATWATCHER]
    [/SKILL]
    
  • Your StatWatcher is incorrectly set up, which is understandable as the way statwatchers work is barely understandable. The wrld_frostcleave_stat (whatever) needs to be compares a Secondary Target Type. Look below.

    [STATWATCHER]
    <STRING>STAT:BURNING
    <STRING>PRIMARY_TARGET_TYPE:ENEMY
    <STRING>SECONDARY_TARGET_TYPE:VALUE
    <STRING>WATCH_TYPE:EQUAL TO
    <FLOAT>SECONDARY_VALUE:1
    [/STATWATCHER]

    Copy and pasting from existing, functioning skills will save you loads of time.
  • Ok, I think I understand why what I was doing didn't work:
    The primary and secondary are set up as the two sides to whatever compare operation you select. The Statwatcher then does a fill-in-the-blank with
    [PRIMARY_TARGET_TYPE]->[STAT] [WATCH_TYPE] [SECONDARY_TARGET_TYPE]->[STAT]
    Where the TARGET_TYPE of "VALUE" means it uses a constant instead of a stat.

    I was (effectively) putting both the variable and the value on the same side, and telling it to use the stat and ignore the value. This meant my fill-in-the-blank became
    SELF->fc_counter >=
    which is unintelligible to the parser, and the statwatcher is ignored.
    gytfunke wrote:
    Copy and pasting from existing, functioning skills will save you loads of time.

    As I know well ;) the problem is often finding a suitable example. In this case, I didn't know that the firebrand skill used statwatchers in the way I needed, and once it was pointed out I overlooked the difference between the example you guys used and what I had already done.

    For a random example of actually having this strategy work, I managed to find the Effect to increase Execute chance by looking up the affix for the Berserker's passive that also affects execute chance (it's the unintuitively named "PERCENT DUAL WIELDING ATTACK" Effect, if anyone needs to know).
  • Yeah, GUTS is a bit opaque when it comes to figuring out how things work. It's not complicated once you learn the oddities, but if the oddities were just documented the learning curve would be so much milder.
  • That sounds like a job for...

    TORCHMODDERS

    (I've been putting most of my limited GUTS time into a project (new class!) rather than any sort of comprehensive experimentation, alas)
  • Getting there ever so slowly, Arkander. Problem is, I'd rather be modding than writing tutorials. Maybe I should just record video of me modding, possibly with commentary.

    Know of any good software for that?
  • yep..
    your gonna have to copy a lot of stuff, try downloading other peoples custom classes and looking for interesting mechanics in there. then unpack them with guts and learn how they work, you'll learn heaps of techniques which can save you time and optimize your mod, which leads to an easier time balancing them, if you get to that stage.
Sign In or Register to comment.