Equipment skills

WingedCatWingedCat Posts: 20
edited April 18 in General Modding
It's me again with another question.

I want some skills to require specific equipment (not just a weapon type).
For example a helmet that gives you a shield when your HP drops below 30% or a helmet that teaches Summon Skeleton.
It seems as if the "Add Stat" and "Learn Skill" effects don't work when put on equipment though.

Has anyone an idea how i might try to do this?

Comments

  • PhanjamPhanjam Posts: 3,297 ✭✭✭
    Hi wingedcat, it's me again too :D .

    You'd need to give the item an affix and its the affix which then gives the wearer the effect youre after.

    In the case of the blocking helmet, its affix would give you a skill that blocks under the conditions you set.

    There are several items (mainly uniques) which you can reverse-engineer to try and make your own ;)
    Torchmodders
    Torchlight 1 Class Pack (TL1CP) Mod for TL2: Steam | RGF
  • WingedCatWingedCat Posts: 20
    Thx for the answer Phanjam. I already tried that though.
    Effects like "Max HP", "Percent Speed" (apparently all the ones the game already uses) work just fine when either put directly into the "Effect" section of the item or when used as an Affix but "Add Stat" and "Learn Skill" won't work either way.
    "Learn Skill" seems to work though, when directly put in the "Effect" section of spell items like the game originally does.
  • PhanjamPhanjam Posts: 3,297 ✭✭✭
    Hi wingedcat! You wouldn't use ADD STAT or LEARN SKILL in the affix for the kind of effect you describe. You'd use one of these...

    CAST SKILL ON STRIKE (when you hit something)
    CAST SKILL ON STRUCK (when you are hit)
    CAST SKILL ON STRIKE FROM TARGET (not sure)
    CAST SKILL ON DEATH FROM EFFECT OWNER (not sure)
    CAST SKILL ON KILL (when you kill something)
    CAST SKILL ON KILL AT TARGET (not sure)
    CAST SKILL (when the skill to be proc'd is an always-on passive)

    depending on how the skill is supposed to get triggered.

    So the item gives you an AFFIX which gives you a SKILL that is triggered using one of the above. Note the triggering is in the AFFIX, not in the SKILL. I hope this is helping! :?
    Torchmodders
    Torchlight 1 Class Pack (TL1CP) Mod for TL2: Steam | RGF
  • WingedCatWingedCat Posts: 20
    Thanks Phanjam!
    My problem with this method though is that I can't LEARN skills but only trigger them, right?
    It's not like i can use "Summon Skeleton" as long as i wear a specific helmet, i could only make "Summon Skeleton" proc under a condition.
    It would also be enough if I could enable a skill that I already learned. My idea was to make a skill that only works when a certain stat has a value of 1 but i can't make equipment raise stats by only equipping it.
    I could only make the equipment proc a skill that raises the stat but that would require some bonus action to activate it and would also not lower the stat again when i unequip it.
  • PhanjamPhanjam Posts: 3,297 ✭✭✭
    WingedCat wrote:
    ...but i can't make equipment raise stats by only equipping it.
    Oh but you can! And (again) it would be an affix on the item that gets it done. The affix would use a SET STAT effect. Here's a code example from the WANDERER_FOCUS.DAT affix. It sets the stat "wandererfocus" to "1".
    [AFFIX]
    	<STRING>NAME:WANDERER_FOCUS
    	<INTEGER>RANK:0
    	<INTEGER>MIN_SPAWN_RANGE:0
    	<INTEGER>MAX_SPAWN_RANGE:999
    	<FLOAT>DURATION:0
    	<INTEGER>WEIGHT:0
    	<INTEGER>SLOTS_OCCUPY:0
    	[EFFECT]
    		<STRING>NAME:wandererfocus
    		<STRING>ACTIVATION:PASSIVE
    		<STRING>DURATION:INSTANT
    		<STRING>TYPE:SET STAT
    		<FLOAT>MIN:1
    		<FLOAT>MAX:1
    		<FLOAT>CHANCE:100
    	[/EFFECT]
    [/AFFIX]
    

    It's not an item affix, but you can use this same code for your item affix.
    Torchmodders
    Torchlight 1 Class Pack (TL1CP) Mod for TL2: Steam | RGF
  • WingedCatWingedCat Posts: 20
    I still don't get it to work. Here is the Affix i use on a helmet:
    [AFFIX]
    	<STRING>NAME:ADDSTAT1
    	<INTEGER>RANK:0
    	<INTEGER>MIN_SPAWN_RANGE:0
    	<INTEGER>MAX_SPAWN_RANGE:999
    	<FLOAT>DURATION:0
    	<INTEGER>WEIGHT:0
    	<INTEGER>SLOTS_OCCUPY:0
    	[EFFECT]
    		<STRING>NAME:EquipStat
    		<STRING>ACTIVATION:PASSIVE
    		<STRING>DURATION:instant
    		<STRING>TYPE:SET STAT
    		<FLOAT>MIN:1
    		<FLOAT>MAX:1
    		<FLOAT>CHANCE:100
    	[/EFFECT]
    [/AFFIX]
    

    And this is the condition for my skill:
    [STATWATCHER]
    			<STRING>STAT:EquipStat
    			<STRING>PRIMARY_TARGET_TYPE:SELF
    			<STRING>SECONDARY_TARGET_TYPE:VALUE
    			<STRING>WATCH_TYPE:GREATER THAN OR EQUAL TO
    			<FLOAT>SECONDARY_VALUE:1
    		[/STATWATCHER]
    

    The skill doesn't do anything by default. When I equip the helmet it still won't work but it works when I activate a passive skill with the same Affix the item has.
  • PhanjamPhanjam Posts: 3,297 ✭✭✭
    Hmmm. So the skill activates when the AFFIX is given by your Passive, which means the skill sees the STAT at 1. But the same skill does not activate when the same AFFIX is given by the item. So it seems the affix is not "sticking" when it's from the item. But if you have the [AFFIXES][/AFFIXES] block set up in your item .DAT that shouldn't be the case.

    I know there's a CLEAR STAT effect and sometimes it has to be used in conjunction with a SET STAT, to bring the stat back to '0'. But your skill condition is set to GREATER THAN OR EQUAL TO 1, so it should fire in any case (which needs fixing once we figure this out :P ; you want the stat back to '0' when you remove the item, so that the skill won't work).

    Can you describe the skill some more? Is it on NORMAL or PASSIVE activation, is it using EFFECTS directly or AFFIXES, basically what's it supposed to do ;)
    Torchmodders
    Torchlight 1 Class Pack (TL1CP) Mod for TL2: Steam | RGF
  • WingedCatWingedCat Posts: 20
    Right now i'm testing stuff with the engineer. I just added stuff to the bottom of the Shock Grenade skill and the Fire And Spark Affix:
    [SKILL]
    	<STRING>NAME:Shock Grenade
    	<TRANSLATE>DISPLAYNAME:Shock Grenade
    	<TRANSLATE>BASE_DESCRIPTION:You lob a grenade, which shocks and stuns enemies in a 4 meter radius. Consumes one |c00ff9933Charge|u for two additional grenades.
    	<TRANSLATE>TIER1_DESCRIPTION:Grenade shock radius grows to 5 meters
    	<TRANSLATE>TIER2_DESCRIPTION:Grenade stun time increased to 5 seconds
    	<TRANSLATE>TIER3_DESCRIPTION:Grenade shock radius grows to 6 meters and stun time increased to 6 seconds
    	<STRING>SKILL_ICON:skillicon_shockgrenade
    	<STRING>SKILL_ICON_INACTIVE:skillicon_shockgrenade_gray
    	<STRING>ACTIVATION_TYPE:NORMAL
    	<STRING>TARGET_ALIGNMENT:EVIL
    	<STRING>ANIMATION:special_Gen_Throw
    	<FLOAT>RANDOMRANGE:0
    	<FLOAT>RANGE:14
    	<STRING>MANA_COST_GRAPH:MANACOST_SPAMABLE
    	<FLOAT>SPEED:1.3
    	<INTEGER>COOLDOWNMS:1000
    	<FLOAT>TURNRATEOVERRIDE:-1
    	<STRING>REQUIREMENT_GRAPH:SKILLTIER5
    	<BOOL>DONT_STOP_ON_DEATH:1
    	<BOOL>CAN_BE_SILENCED:0
    	<BOOL>REQUIRES_PATHABLE:1
    	<INTEGER64>UNIQUE_GUID:1129599011661965094
    	[LEVEL1]
    		<FLOAT>RANDOMRANGE:0
    		[EVENT_START]
    			<STRING>FILE:media/skills/railman/grenades/shockwarmup.layout
    			<BOOL>ATTACHES:1
    			<STRING>FIREFROMBONE:RIGHTHAND
    		[/EVENT_START]
    		[EVENT_TRIGGER]
    			<STRING>FILE:media/skills/railman/grenades/shockprojectile.layout
    			<BOOL>ATTACHIGNORESOBSTRUCTIONS:1
    			<STRING>TRIGGERNAME:hit
    			[STATWATCHER]
    				<STRING>STAT:RAILMANCHARGE
    				<STRING>PRIMARY_TARGET_TYPE:SELF
    				<STRING>SECONDARY_TARGET_TYPE:VALUE
    				<STRING>WATCH_TYPE:EQUAL TO
    				<FLOAT>SECONDARY_VALUE:0
    			[/STATWATCHER]
    		[/EVENT_TRIGGER]
    		[EVENT_START]
    			<BOOL>NOSTEALEFFECTS:0
    			[AFFIXES]
    				<STRING>TARGET:SELF
    				<STRING>AFFIX:ADD_RAILMAN_CHARGE_ONE
    				<STRING>AFFIX:REMOVE_ONE_CHARGE
    			[/AFFIXES]
    			[STATWATCHER]
    				<STRING>STAT:PLAYER CHARGES
    				<STRING>PRIMARY_TARGET_TYPE:SELF
    				<STRING>SECONDARY_TARGET_TYPE:VALUE
    				<STRING>WATCH_TYPE:GREATER THAN
    				<FLOAT>SECONDARY_VALUE:0
    			[/STATWATCHER]
    		[/EVENT_START]
    		[EVENT_TRIGGER]
    			<STRING>FILE:media/skills/railman/grenades/shockprojectile2.layout
    			<BOOL>ATTACHIGNORESOBSTRUCTIONS:1
    			<STRING>TRIGGERNAME:hit
    			[STATWATCHER]
    				<STRING>STAT:RAILMANCHARGE
    				<STRING>PRIMARY_TARGET_TYPE:SELF
    				<STRING>SECONDARY_TARGET_TYPE:VALUE
    				<STRING>WATCH_TYPE:GREATER THAN
    				<FLOAT>SECONDARY_VALUE:0
    			[/STATWATCHER]
    			[AFFIXES]
    				<STRING>TARGET:SELF
    				<STRING>AFFIX:REMOVE_RAILMAN_CHARGE_ONE
    			[/AFFIXES]
    		[/EVENT_TRIGGER]
    		[EVENT_MISSILEDIE]
    			<STRING>FILE:media/skills/railman/grenades/shockgrenade_mk2.layout
    			[AFFIXES]
    				<INTEGER>AFFIXLEVEL:1
    				<STRING>AFFIX:ENGINEER SHOCK GRENADE
    			[/AFFIXES]
    		[/EVENT_MISSILEDIE]
    		[STATWATCHER]
    			<STRING>STAT:EquipStat
    			<STRING>PRIMARY_TARGET_TYPE:SELF
    			<STRING>SECONDARY_TARGET_TYPE:VALUE
    			<STRING>WATCH_TYPE:GREATER THAN OR EQUAL TO
    			<FLOAT>SECONDARY_VALUE:1
    		[/STATWATCHER]
    	[/LEVEL1]
    
    [AFFIX]
    	<STRING>NAME:RAILMAN_ELEMENTAL_DAMAGE_MASTERY
    	<INTEGER>RANK:0
    	<INTEGER>MIN_SPAWN_RANGE:0
    	<INTEGER>MAX_SPAWN_RANGE:999
    	<FLOAT>DURATION:0
    	<INTEGER>WEIGHT:0
    	<INTEGER>SLOTS_OCCUPY:0
    	[EFFECT]
    		<STRING>ACTIVATION:PASSIVE
    		<STRING>DURATION:ALWAYS
    		<STRING>TYPE:PERCENT DAMAGE BONUS
    		<STRING>DAMAGE_TYPE:FIRE
    		<STRING>GRAPHOVERRIDE:MASTERY_GRAPH
    		<FLOAT>MIN:125
    		<FLOAT>MAX:125
    	[/EFFECT]
    	[EFFECT]
    		<STRING>ACTIVATION:PASSIVE
    		<STRING>DURATION:ALWAYS
    		<STRING>TYPE:PERCENT DAMAGE BONUS
    		<STRING>DAMAGE_TYPE:ELECTRIC
    		<STRING>GRAPHOVERRIDE:MASTERY_GRAPH
    		<FLOAT>MIN:125
    		<FLOAT>MAX:125
    	[/EFFECT]
    	[EFFECT]
    		<STRING>NAME:EquipStat
    		<STRING>ACTIVATION:PASSIVE
    		<STRING>DURATION:ALWAYS
    		<STRING>TYPE:ADD STAT
    		<FLOAT>MIN:1
    		<FLOAT>MAX:1
    		<FLOAT>CHANCE:100
    	[/EFFECT]
    [/AFFIX]
    

    The general idea is to add several skills to custom classes that require specific armor or weapons (not just a type of weapon) or a complete set of equipment.
  • doudleydoudley Posts: 9
    Use a cast skill effect/affix on your item, the skill that would be casted has an effect of set stat/add stat. But on this way, only on enemy contact would the skill will take effect. Try using unittheme instead. Your main skill should have the unittheme requirement of that unittheme.
  • PhanjamPhanjam Posts: 3,297 ✭✭✭
    Hey I'm glad you dropped in doudley; I was running out of answers! :D

    I've never worked with UNITTHEME requirements in skills before - is there a skill we can reverse-engineer to see how it works?

    Thanks mucho!
    Torchmodders
    Torchlight 1 Class Pack (TL1CP) Mod for TL2: Steam | RGF
  • WingedCatWingedCat Posts: 20
    It works by just adding <STRING>THEMEREQUIRED:UNITTHEME
    I tried it but it seems to be the same as with the stats.
    It seems that equipment can't directly apply the Unittheme. It's not working as Effect, Affix or Set Affix.
  • doudleydoudley Posts: 9
    Phanjam wrote:
    Hey I'm glad you dropped in doudley; I was running out of answers! :D

    I've never worked with UNITTHEME requirements in skills before - is there a skill we can reverse-engineer to see how it works?

    Thanks mucho!
    Well, not as helpful as I presumed :P

    And I don't recall any existing class skills that uses unittheme skill activations but I think unit theme requirement function is used by monsters' skills in the game's data
    WingedCat wrote:
    It works by just adding <STRING>THEMEREQUIRED:UNITTHEME
    I tried it but it seems to be the same as with the stats.
    It seems that equipment can't directly apply the Unittheme. It's not working as Effect, Affix or Set Affix.
    Yup, I'm sorry for mentioning the unittheme, I have forgotten that I already tried that before and I've failed on so many attempts. ADD/SET STAT and UNITTHEME effects won't work directly on equipment as you said. On my Brother-in-Arms: Warbounds mod, I use trinkets to activate the skills of the human companion.

    Skill Bonus effect on the other hand, seems to appear on the item description unlike with add stat and unit theme effects but doesn't really apply on the targeted skill.

    Also, even if you manage to Learn a Skill from an item other than a scroll, the learned skill would only be in a form of a spell (I guess), so it would be not good if your character already have 4 spells on its spell slots anyway.

    Equipment skills are plainly proc skills. So, in its simplification, what you need, is already been provided. The skill won't be immediate effect but cast skill effects can be varied enough to explore upon.
  • WingedCatWingedCat Posts: 20
    This might end up being a whole lot more work than i thought it'd be but i think i can kinda get what i wanted.
    Thanks for the suggestions guys.
    I should probably open a new thread for a new question but i figured i might just as well ask here because i expect the answer to be "no" anyways.
    Is it possible to have equipment drop with sockets already applied to it?
  • PhanjamPhanjam Posts: 3,297 ✭✭✭
    I was about to say a quick "yes!" as i assumed you meant empty sockets. But given the discussion we've been having i guess i should clarify :D - you want the item socketed already, don't you?
    Torchmodders
    Torchlight 1 Class Pack (TL1CP) Mod for TL2: Steam | RGF
  • PhanjamPhanjam Posts: 3,297 ✭✭✭
    Hey wingedcat for the op discussion, have a read thru this thread. Kva3imoda pointed it out recently for another question... Might help
    Torchmodders
    Torchlight 1 Class Pack (TL1CP) Mod for TL2: Steam | RGF
  • WingedCatWingedCat Posts: 20
    That's a really interesting thread you found there. Thanks!
    And yes i meant socketed equipment ^^
  • PhanjamPhanjam Posts: 3,297 ✭✭✭
    WingedCat wrote:
    ...yes i meant socketed equipment ^^
    That's what I thought :D ! Well I asked RnF (the LAO mod series creator) and he doesn't think it's doable within GUTS :(
    Torchmodders
    Torchlight 1 Class Pack (TL1CP) Mod for TL2: Steam | RGF
Sign In or Register to comment.