Skills on weapons Posted byF430on 19 Jul, 2018 03:38
Greetings all.
I got a question which hopefully can be answered here. As a test, I'm trying to make a unique weapon which can proc on strike. Normally, this would be a non-issue as there are plenty of stock procs in the game, but the proc I'm trying to make would be using a vanilla player skill. The problem is that skills are separated into core/parent which controls everything, as well as child skills which can include abilities that are added as more points are invested in the skill. If this is possible at all, would it require a chain of affixes and triggerables? Or would a single affix with correct skill name suffice? I tried this sort of thing before and the usual result was "20% chance to cast on strike" when testing in-game.
I have some additional questions, but I'll save them for later, as I don't want to make a massive wall with all of my novice woes.
Hi Phanjam. "x% to cast y" would be the desired effect, but the problem I'm having is that, instead of having a player skill proc from a weapon strike, nothing happens, and I get 3 question marks instead of the skill name that should proc. This is probably due to an incorrect skill name, but another issue is that skill folders have tonnes of files in them and picking the correct one is trial and error, moreso if I wanted to use a particular level of the skill, eg level 10 of Berserker's Raze skill, rather than just the barebones skill with 1 point in it.
Edit: in a stroke of genius, I reckon I managed to get it to work, somehow. Except a completely unexpected problem surfaced - neither the weapon, nor the skill it calls on strike, deal any damage whatsoever.
As you can see, the chance to cast is set at 100%. The skill it casts is that HAMMERFALLEMBER skill (the <STRING>NAME: inside the [EFFECT] block. kinda confusing i know, i proly shoulda named the skill differently from the affix )
The skill itself is a rehash of an old skill developed for another mod, but it can be anything you want really
[AFFIX] <STRING>NAME:UNIQUE_PROC_WEAPON_RAZE <INTEGER>RANK:0 <INTEGER>MIN_SPAWN_RANGE:0 <INTEGER>MAX_SPAWN_RANGE:999 <FLOAT>DURATION:0 <INTEGER>WEIGHT:0 <INTEGER>SLOTS_OCCUPY:0 [UNITTYPES] <STRING>UNITTYPE:UNIQUE SOCKETABLE <STRING>UNITTYPE:WEAPON [/UNITTYPES] [NOT_UNITTYPES] <STRING>UNITTYPE:WEAPON [/NOT_UNITTYPES] [EFFECT] <STRING>NAME:BigStrike <STRING>ACTIVATION:PASSIVE <INTEGER>LEVEL:15 <STRING>TYPE:CAST SKILL ON MELEE STRIKE <STRING>DAMAGE_TYPE:PHYSICAL <BOOL>SAVE:true <FLOAT>MIN:100 <FLOAT>MAX:100 [/EFFECT] [/AFFIX] The test weapon I made has "100% chance to cast Raze on strike", which is what I was after from the start, but the skill itself itself does not do any damage. More importantly, as stated before, the weapon itself doesn't do ANY damage either, and I have no idea why.
First about the weapon itself having no damage, to eliminate possible glitches in coding, i recommend u use a straight copy of an existing weapon .DAT with no edits at all except for - change NAME: - change GUID and - add your skill affix
If that works out u can always edit from there but it should be easier to trace back any problems
Next about the skill doing no damage - check that the skill DAT is able to find all the other files it needs to work, like any LAYOUT and damage AFFIX files. Calling layouts is file-path-specific so ur directory structure has to match (or the other way around)
I've tried quite a few things that you listed and then some, namely barebones item cloning, affix checking, making sure .dat/.layout files are in correct folders and whatnot, even made sure all project directories are uppercase so some data editors won't list the same thing more than once.
And yet, no damage from both the weapon and skill.
The orange werewolf mesh appears every time I attack an enemy so I'm just about certain the layouts are intact and refer to correct files. Also, none of the existing mods I have change that particular player skill in any way. I'm still very much a novice in this, but the only thing I can think is making the entire skill, or at least a specific level, into a standalone shared skill or something along the lines.
The skill in question is a vanilla Berserker skill [MEDIA\SKILLS\BERSERKER\BIGSTRIKE] and it's not modified in any way, besides I'm not sure SMF would like 11KB of text in a single post. But with activation types, I'm lead to believe that procs are always set to passive, as they can occur based on chance percentage.
[EVENT_TRIGGER] [/EVENT_TRIGGER] So what I did was follow PJ's instructions for the weapon & affix, then made a copy of the BigStrike skill, renamed it BigStrike2, and changed the GUID. I then changed the EVENT_TRIGGER to EVENT_START and everything works properly. Procced skills can still utilize the EVENT_UNITHIT, so the buff this skill applies still works.
Use the affix to set what level of the skill you want to proc through:
Edit: Oh and @F430 , ur right to point out its an existing vanilla skill so a repost is not necessary. But generally speaking, in the interest of advancing modding knowledge, 11kb of text is well well worth it!
Thanks for your help, lads. I won't be able to test this properly until later today, but based on my noobish understanding of what Epoch said, what is it exactly that I should do? Should I rename EVENT_TRIGGER brackets to EVENT_START, then remove original EVENT_START? Or should I merge them both and remove whatever is left within EVENT_TRIGGER, brackets themselves included? If I can slap the entries from both within a single bracket, then that's fair enough, but I'm not certain what to do with .layout references, since both _START and _TRIGGER have those, and I have no idea whether calling both in a single entry would cause issues.
Apologies for being dense, but I really want to get this right, as I'm very much enjoying modding TL2.
Leave the existing EVENT_START as is. Just change the EVENT_TRIGGER into a 2nd EVENT_START bracket. If I remember correctly, you can only have 1 layout per event bracket.
Alright, you two can rest easy now. I figured it out and the skill works perfectly. I cut the whole thing down to a single [LEVEL] entry and removed some unneeded strings like mana cost, tier descriptions and whatnot.
I would like to once again thank you both very much for assisting me in this.