Modified chain lightning

Naruto

New member
Messages
174
Points
0
giphy.gif


so basically just went over every thing in chainlightning 1 day and i can modify it without screwing up the game 

So for the gif above you need to remove everything about 

NJ_SYURIKEN




then lets continue back into the skill.c

case WL_CHAINLIGHTNING:
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
skill->addtimerskill(src,tick+status_get_amotion(src),bl->id,0,0,NJ_SYURIKEN,skill_lv,0,flag);
skill->addtimerskill(src,tick+status_get_amotion(src),bl->id,0,0,NJ_SYURIKEN,skill_lv,0,flag);
skill->addtimerskill(src,tick+status_get_amotion(src),bl->id,0,0,NJ_SYURIKEN,skill_lv,0,flag);
skill->addtimerskill(src,tick+status_get_amotion(src),bl->id,0,0,NJ_SYURIKEN,skill_lv,0,flag);
skill->addtimerskill(src,tick+status_get_amotion(src),bl->id,0,0,NJ_SYURIKEN,skill_lv,0,flag);
skill->addtimerskill(src,tick+status_get_amotion(src),bl->id,0,0,NJ_SYURIKEN,skill_lv,0,flag);

break;


by repeating the addtimerskill line, we can multiply the amount of times we send off a chain reaction, so im throwing 6 sets of shurikens, originally it was this : 

case WL_CHAINLIGHTNING:
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
skill->addtimerskill(src,tick+status_get_amotion(src),bl->id,0,0,WL_CHAINLIGHTNING_ATK,skill_lv,0,flag);
break;


I changed WL_CHAINLIGHTNING_ATK to NJ_SYURIKEN like we will for every entry for this source post

also you should have removed any previous syurikens so it was empty except in skill.h and battle c ( might need to remove it from battle.c)

case NJ_SYURIKEN:
case WL_CHAINLIGHTNING_ATK:
skill->attack(BF_MAGIC, src, src, target, skl->skill_id, skl->skill_lv, tick, (9-skl->type));
skill->toggle_magicpower(src, skl->skill_id);
struct map_session_data *sd = BL_UCAST(BL_PC, src);
int cr = (pc->checkskill(sd, WL_CHAINLIGHTNING) / 2);
//cr is amount of bounces
if (skl->type < (cr + skl->skill_lv - skl->skill_lv) && skl->x < 3) {

struct block_list *nbl = battle->get_enemy_area(src, target->x, target->y, (skl->type>2)?3:4, //area
BL_CHAR|BL_SKILL, target->id);
if (nbl == NULL)
skl->x++;
else
skl->x = 0;
//tick is time just modify digit over 50 for visible results
skill->addtimerskill(src, tick + 100, (nbl?nbl:target)->id, skl->x, 0, NJ_SYURIKEN, skl->skill_lv, skl->type + 1, skl->flag);
}
break;


so i added a easy variable to change as you want if you wanna balance it, int cr = skill level * 25, if you can do this you can probably whip something else up ... i changed the formula so it negated itself because it was cause problems otherwise

tick + time, i dont touch tick and keep the digit over 50 

area is just modified to be bigger then the original... i just leave it as it is since it doesnt really bother me, but if you set it to 1:1 then it wont move so much but obviously shorter range

you can keep playing with it but this is all you need

switch(skl->skill_id){
case NJ_SYURIKEN:
case WL_CHAINLIGHTNING_ATK:
case WL_TETRAVORTEX_FIRE:
case WL_TETRAVORTEX_WATER:
case WL_TETRAVORTEX_WIND:
case WL_TETRAVORTEX_GROUND:
// SR_FLASHCOMBO
case SR_DRAGONCOMBO:
case SR_FALLENEMPIRE:
case SR_TIGERCANNON:
case SR_SKYNETBLOW:




copy everything

editor note : the copy_skill thing is actually what a rogue with plagirize would copy, sooo if you get hit by the bolt of the skill where the damage i dealt, youll be copying the WL_CHAINLIGHTINING as an icon 

case NJ_SYURIKEN:
case WL_CHAINLIGHTNING_ATK:
copy_skill = WL_CHAINLIGHTNING;
break;

Code:
		case NJ_SYURIKEN:
		case WL_CHAINLIGHTNING_ATK:
			dmg.dmotion = clif->skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,1,NJ_SYURIKEN,-2,BDT_SKILL);
			break;

you gonna need to change everything in the battle.c too but if you delete it it will just be 100% magic damage

I added like 40 of those chains and this is what it looks like

giphy.gif


i just realized i was using chain lightning for the gifs, but the idea was to use it with the throw shuriken skill ... thats why we changed everything ... and we turned shuriken into the _ATK part of chain attack so we have the animation attached.... so you need to make a new skill and copy chainlightning completly....

so just make a new skill call it NJ_SHURIKENPRE and copy chain lightning then make NJ_SYURKEN copy CHAINLIGHTNING_ATK

 
Last edited by a moderator:
Server may crash with your changes if skill invoked not by player

 
ahh didnt try that but everything should be clean when you use it yourself ! 

 
I once doubled the skill NJ_SYURIKEN by copying everything that was in the original skill to make a version that didn't consumption items, but the copy wasn't showing animation, have an idea why?

download (1).png

 
I once doubled the skill NJ_SYURIKEN by copying everything that was in the original skill to make a version that didn't consumption items, but the copy wasn't showing animation, have an idea why?

View attachment 5374
probably cause you werent using it like WL_CHAINLIGHTNING_ATK since thats where its animation is 

but if your talking about a new skill using the throw shuriken animation just as its own

you need to call BF_WEAPON and throw shuriken together in the skill.c ... that is, if you cant make it with skilleffectinfo in the data.grf

something like this

skill->attack(BF_WEAPON,src,src,bl,NJ_SYURIKEN,skill_lv,tick,flag);


then just make a bunch of different options in syuriken and you could link them to other skills possibly easily.... id have to find the proper call or whatever though... but ill post about it if you dont figure it out

because the animation itself is linked to the skill id 

 
Last edited by a moderator:
I went over it again, trying to get it working on separate ids but had issues with it and just tossed it to the side but fixed it 

The issue was the re declaration of SD and my CR integer

Basically just copy pasting the old chain lightning with my modifications

the only difference is here

case MR_AUTOAIM_ATK:
skill->attack(BF_MAGIC, src, src, target, skl->skill_id, skl->skill_lv, tick, (9-skl->type));
skill->toggle_magicpower(src, skl->skill_id);
struct map_session_data *sd = BL_UCAST(BL_PC, src);
int cr2 = 25;
//cr is amount of bounces
if (skl->type < (cr2 + skl->skill_lv - skl->skill_lv) && skl->x < 3) {

struct block_list *nbl = battle->get_enemy_area(src, target->x, target->y, (skl->type>2)?1:2, //area
BL_CHAR|BL_SKILL, target->id);
if (nbl == NULL)
skl->x++;
else
skl->x = 0;
//tick is time just modify digit over 50 for visible results
skill->addtimerskill(src, tick + 100, (nbl?nbl:target)->id, skl->x, 0, MR_AUTOAIM_ATK, skl->skill_lv, skl->type + 1, skl->flag);
}
break;
case WL_CHAINLIGHTNING_ATK:
skill->attack(BF_MAGIC, src, src, target, skl->skill_id, skl->skill_lv, tick, (9-skl->type));
skill->toggle_magicpower(src, skl->skill_id);
int cr = 25;
//cr is amount of bounces
if (skl->type < (cr + skl->skill_lv - skl->skill_lv) && skl->x < 3) {

struct block_list *nbl = battle->get_enemy_area(src, target->x, target->y, (skl->type>2)?1:2, //area
BL_CHAR|BL_SKILL, target->id);
if (nbl == NULL)
skl->x++;
else
skl->x = 0;
//tick is time just modify digit over 50 for visible results
skill->addtimerskill(src, tick + 100, (nbl?nbl:target)->id, skl->x, 0, WL_CHAINLIGHTNING_ATK, skl->skill_lv, skl->type + 1, skl->flag);
}
break;


the top one is written as

struct map_session_data *sd = BL_UCAST(BL_PC, src);
int cr2 = 25;


i changed the integer we use for bounces and i DONT declare the SD in the ACTUAL chain lightning ( doesnt matter, whichever is on top) 

Doubt theirs any issues with it, works fine in game

One thing though using this YOU HAVE TO make changes to your skillinfolist.lub within your GRF

It reads the range, just look it up with my stuff

id 1626, 1627

MR_AUTOAIM

giphy.gif


A few things that it could use is effects... and actor animation change, easily done following other guides 

View attachment skillid.lub
View attachment skillinfolist.lub
View attachment skill.c
View attachment skill.h

 
Back
Top