Sign in to follow this  
Naruto

Simple Auras , reusable and clean

Recommended Posts

giphy.gif

 

Hi working on getting auras to work simply.....

 

So for this I use sg_warm_sun since its a damaging aura, but its going to be practically the same process for everything else

 

first up make a new status in status.h and .c

	status->set_sc( WT_DRAGON	         , SC_DRAGON           , SI_BLANK     , SCB_NONE );

Dont need to do anything else here unless you want to

 

 

next lets go to map.c

 

add this 

				if (sc->data[SC_DRAGON])
					skill->unit_move_unit_group(skill->id2group(sc->data[SC_DRAGON]->val4), bl->m, x1-x0, y1-y0);
				if (sc->data[SC_WARM])
					skill->unit_move_unit_group(skill->id2group(sc->data[SC_WARM]->val4), bl->m, x1-x0, y1-y0);

 

back to skill.c to work on the new skill i made

		case WT_DRAGON:
			skill->clear_unitgroup(src);
			if ((sg = skill->unitsetting(src,skill_id,skill_lv,src->x,src->y,0)))
				sc_start4(src,src,type,100,skill_lv,0,0,sg->group_id,skill->get_time(skill_id,skill_lv));
			break;
		case SG_SUN_WARM:
		case SG_MOON_WARM:
		case SG_STAR_WARM:
case UNT_DUMMYSKILL:
			switch (sg->skill_id) {
				case WT_DRAGON:
						skill->attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
						clif->specialeffect(bl,92,1);
					break;
				case SG_SUN_WARM:
				case SG_MOON_WARM:
				case SG_STAR_WARM:

so a note on UNT_DUMMSKILL, it represents unt id 0x86, which is the cookie cutter unt used in things that arent placable... are their own unts like sanctuary and stuff 

 

i make it bf_magic cause its easy to edit in battle.c wait till last step

and ofc specialeffect 92 is id, check areas... but i think it might be ok on 1, or 0 or just AREA 

 

 

next skill_db
 

{
	Id: 1609
	Name: "WT_DRAGON"
	Description: "Exploding Dragon"
	MaxLevel: 3
	Range: 1
	Hit: "BDT_SKILL"
	SkillType: {
		Self: true
	}
	AttackType: "Magic"
	Element: "Ele_Weapon"
	DamageType: {
		SplashArea: true
	}
	SplashRange: 1
	InterruptCast: true
	KnockBackTiles: 2
	AfterCastActDelay: 1000
	SkillData1: {
		Lv1: 10000
		Lv2: 20000
		Lv3: 60000
		Lv4: 60000
		Lv5: 60000
		Lv6: 60000
		Lv7: 60000
		Lv8: 60000
		Lv9: 60000
		Lv10: 60000
	}
	CoolDown: 0
	Requirements: {
		SPCost: 20
	}
	Unit: {
		Id: 0x86
		Range: 1
		Interval: 100
		Target: "Enemy"
	}
},

skilldata1 is the time it survives , how do you know its skilldata 1 ? 

 

here : 

				sc_start4(src,src,type,100,skill_lv,0,0,sg->group_id,skill->get_time(skill_id,skill_lv));

get_time 

get_time2 would be data2 in skill db and so on 3 to 4 

since aura is linked to Status, its only for us...

 

now open battle.c

 

					break;
				case WZ_STORMGUST:
					skillratio += 40 * skill_lv;
					break;
				case WT_DRAGON:
					skillratio += 100 * skill_lv;
					break;

 

 

 

right so this post will only cover how to activate it with a timer

 

its up to you to figure out how to do the rest but easy to disable / reanable with button by following pa_gospel and adding effects too.. Pa_gospel has it all really

 

 

 

Something else you can do now is just change this number in the skill_db

    Unit: {
        Id: 0x86
        Range: 1
        Interval: 100
        Target: "Enemy"
    }

now we linked status to aura we can change the unit id here to be any unt in the game like violent gale and deluge auras, they copy their respective UNT_DELUGE entries

anyways i did this for example : 

	Unit: {
		Id: 0x9c
		Range: 1
		Interval: 100
		Target: "Enemy"
	}

giphy.gif

 

my examples only lasted 3 seconds (3000 skilldata1) just so i can test time in my post

 

 

Ahhh pretty sure this is everything, let me know if you encounter an issue

 

Its weird, i remember a couple years back when i started playing with clif_specialeffect it didnt cast when you killed them with a skill directly... but it kills them and shows effect when you use them in unt's, i had a skill that was an aura back then that just slowed everyone around you it also had special effects attached but never bothered trying it on a dps aura.... interesting ... its a bit more work and a different way to write skills but at least youd have access to every effect in the client... pretty sure skilleffectinfo has a couple flaws 

Edited by Naruto

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this