Jump to content
  • 0

skil.conf delay_rate not working?


danielps

Question


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   18
  • Joined:  10/09/14
  • Last Seen:  

Hi guys, the conf below dont seems to be working...
delay_rate: 160

delay_dependon_agi: yes

when delay_rate = 100, I need 150 agi to no delay. I set delay_rate to 160, and 150 still no delay. It work only before 150 agi. If i have
0  agi, the delay is higher when i put delay_rate: 160, but it appears the be fixed in src 150 is no delay... how to increase the max agi tor no delay?

I tried chaing this 

// How much (dex*2+int) does variable cast turns zero?
vcast_stat_scale: 530

 

for this vcast_stat_scale: 730

 

Still 150 agi = no delay.

I want like 200 agi for no delay, how to do that?

Edited by danielps
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   18
  • Joined:  10/09/14
  • Last Seen:  

8 minutes ago, pajodex said:

Well, honestly I'm not a programmer. I just look at the codes and try what happens if I do this and that. 

I did many tests and now its working !! Thanks a lot ! like all ur answers here!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

Try to disable renewal cast at src/config/renewal.h 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   18
  • Joined:  10/09/14
  • Last Seen:  

7 hours ago, pajodex said:

Try to disable renewal cast at src/config/renewal.h 

Í did it. It doesnt work 100%. The problem is: if í set delay_rate tô 200, the time of skill delay is the Double. That is correct. But no matter how high is the delay_rate, agi 150 allways is no delay. Í wanted 200 agi for no delay. The delay rate seems tô work only for values smaller tham 150. Is 150 agi no delay fix in the src somewhere?

Did u get the point?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

1 hour ago, danielps said:

Í did it. It doesnt work 100%. The problem is: if í set delay_rate tô 200, the time of skill delay is the Double. That is correct. But no matter how high is the delay_rate, agi 150 allways is no delay. Í wanted 200 agi for no delay. The delay rate seems tô work only for values smaller tham 150. Is 150 agi no delay fix in the src somewhere?

Did u get the point?

Sorry, my bad.

Go check src/map/battle.cpp

Look for these:

	{ "casting_rate",                       &battle_config.cast_rate,                       100,    0,      INT_MAX,        },
	{ "delay_rate",                         &battle_config.delay_rate,                      100,    0,      INT_MAX,        },
	{ "delay_dependon_dex",                 &battle_config.delay_dependon_dex,              0,      0,      1,              },
	{ "delay_dependon_agi",                 &battle_config.delay_dependon_agi,              0,      0,      1,              },
	

Try to explore that part.

Edited by pajodex
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   18
  • Joined:  10/09/14
  • Last Seen:  

10 hours ago, pajodex said:

Sorry, my bad.

Go check src/map/battle.cpp

Look for these:


	{ "casting_rate",                       &battle_config.cast_rate,                       100,    0,      INT_MAX,        },
	{ "delay_rate",                         &battle_config.delay_rate,                      100,    0,      INT_MAX,        },
	{ "delay_dependon_dex",                 &battle_config.delay_dependon_dex,              0,      0,      1,              },
	{ "delay_dependon_agi",                 &battle_config.delay_dependon_agi,              0,      0,      1,              },
	

Try to explore that part.

What should i do here?

I didnt understand what is this struct and each value here =/

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

4 minutes ago, danielps said:

What should i do here?

I didnt understand what is this struct and each value here =/

Nvm that. try skill.cpp

Look for this part:

/*==========================================
 * Does delay reductions based on dex/agi, sc data, item bonuses, ...
 *------------------------------------------*/
int skill_delayfix(struct block_list *bl, uint16 skill_id, uint16 skill_lv)
{
	int delaynodex = skill_get_delaynodex(skill_id);
	int time = skill_get_delay(skill_id, skill_lv);
	struct map_session_data *sd;
	struct status_change *sc = status_get_sc(bl);

	nullpo_ret(bl);
	sd = BL_CAST(BL_PC, bl);

	if (skill_id == SA_ABRACADABRA || skill_id == WM_RANDOMIZESPELL)
		return 0; //Will use picked skill's delay.

	if (bl->type&battle_config.no_skill_delay)
		return battle_config.min_skill_delay_limit;

	if (time < 0)
		time = -time + status_get_amotion(bl);	// If set to <0, add to attack motion.

	// Delay reductions
	switch (skill_id) {	//Monk combo skills have their delay reduced by agi/dex.
		case MO_TRIPLEATTACK:
		case MO_CHAINCOMBO:
		case MO_COMBOFINISH:
		case CH_TIGERFIST:
		case CH_CHAINCRUSH:
		case SR_DRAGONCOMBO:
		case SR_FALLENEMPIRE:
			//If delay not specified, it will be 1000 - 4*agi - 2*dex
			if (time == 0)
				time = 1000;
			time -= (4 * status_get_agi(bl) + 2 * status_get_dex(bl));
			break;
		case HP_BASILICA:
			if (sc && !sc->data[SC_BASILICA])
				time = 0; // There is no Delay on Basilica creation, only on cancel
			break;
		default:
			if (battle_config.delay_dependon_dex && !(delaynodex&1)) { // if skill delay is allowed to be reduced by dex
				int scale = battle_config.castrate_dex_scale - status_get_dex(bl);

				if (scale > 0)
					time = time * scale / battle_config.castrate_dex_scale;
				else //To be capped later to minimum.
					time = 0;
			}
			if (battle_config.delay_dependon_agi && !(delaynodex&1)) { // if skill delay is allowed to be reduced by agi
				int scale = battle_config.castrate_dex_scale - status_get_agi(bl);

				if (scale > 0)
					time = time * scale / battle_config.castrate_dex_scale;
				else //To be capped later to minimum.
					time = 0;
			}
	}

	if (sc && sc->data[SC_SPIRIT]) {
		switch (skill_id) {
			case CR_SHIELDBOOMERANG:
				if (sc->data[SC_SPIRIT]->val2 == SL_CRUSADER)
					time /= 2;
				break;
			case AS_SONICBLOW:
				if (!map_flag_gvg2(bl->m) && !map[bl->m].flag.battleground && sc->data[SC_SPIRIT]->val2 == SL_ASSASIN)
					time /= 2;
				break;
		}
	}

	if (!(delaynodex&2)) {
		if (sc && sc->count) {
			if (sc->data[SC_POEMBRAGI])
				time -= time * sc->data[SC_POEMBRAGI]->val3 / 100;
			if (sc->data[SC_WIND_INSIGNIA] && sc->data[SC_WIND_INSIGNIA]->val1 == 3 && skill_get_type(skill_id) == BF_MAGIC && skill_get_ele(skill_id, skill_lv) == ELE_WIND)
				time /= 2; // After Delay of Wind element spells reduced by 50%.
		}
	}

	if (!(delaynodex&4) && sd && sd->delayrate != 100)
		time = time * sd->delayrate / 100;

	if (battle_config.delay_rate != 100)
		time = time * battle_config.delay_rate / 100;

	//ShowInfo("Delay delayfix = %d\n",time);

	return max(time,0);
}

Try playing this part:

if (!(delaynodex&4) && sd && sd->delayrate != 100)
		time = time * sd->delayrate / 100;

	if (battle_config.delay_rate != 100)
		time = time * battle_config.delay_rate / 100;

maybe double the divider from 100 to 200.. trial and error will help

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   18
  • Joined:  10/09/14
  • Last Seen:  

7 minutes ago, pajodex said:

Nvm that. try skill.cpp

Look for this part:


/*==========================================
 * Does delay reductions based on dex/agi, sc data, item bonuses, ...
 *------------------------------------------*/
int skill_delayfix(struct block_list *bl, uint16 skill_id, uint16 skill_lv)
{
	int delaynodex = skill_get_delaynodex(skill_id);
	int time = skill_get_delay(skill_id, skill_lv);
	struct map_session_data *sd;
	struct status_change *sc = status_get_sc(bl);

	nullpo_ret(bl);
	sd = BL_CAST(BL_PC, bl);

	if (skill_id == SA_ABRACADABRA || skill_id == WM_RANDOMIZESPELL)
		return 0; //Will use picked skill's delay.

	if (bl->type&battle_config.no_skill_delay)
		return battle_config.min_skill_delay_limit;

	if (time < 0)
		time = -time + status_get_amotion(bl);	// If set to <0, add to attack motion.

	// Delay reductions
	switch (skill_id) {	//Monk combo skills have their delay reduced by agi/dex.
		case MO_TRIPLEATTACK:
		case MO_CHAINCOMBO:
		case MO_COMBOFINISH:
		case CH_TIGERFIST:
		case CH_CHAINCRUSH:
		case SR_DRAGONCOMBO:
		case SR_FALLENEMPIRE:
			//If delay not specified, it will be 1000 - 4*agi - 2*dex
			if (time == 0)
				time = 1000;
			time -= (4 * status_get_agi(bl) + 2 * status_get_dex(bl));
			break;
		case HP_BASILICA:
			if (sc && !sc->data[SC_BASILICA])
				time = 0; // There is no Delay on Basilica creation, only on cancel
			break;
		default:
			if (battle_config.delay_dependon_dex && !(delaynodex&1)) { // if skill delay is allowed to be reduced by dex
				int scale = battle_config.castrate_dex_scale - status_get_dex(bl);

				if (scale > 0)
					time = time * scale / battle_config.castrate_dex_scale;
				else //To be capped later to minimum.
					time = 0;
			}
			if (battle_config.delay_dependon_agi && !(delaynodex&1)) { // if skill delay is allowed to be reduced by agi
				int scale = battle_config.castrate_dex_scale - status_get_agi(bl);

				if (scale > 0)
					time = time * scale / battle_config.castrate_dex_scale;
				else //To be capped later to minimum.
					time = 0;
			}
	}

	if (sc && sc->data[SC_SPIRIT]) {
		switch (skill_id) {
			case CR_SHIELDBOOMERANG:
				if (sc->data[SC_SPIRIT]->val2 == SL_CRUSADER)
					time /= 2;
				break;
			case AS_SONICBLOW:
				if (!map_flag_gvg2(bl->m) && !map[bl->m].flag.battleground && sc->data[SC_SPIRIT]->val2 == SL_ASSASIN)
					time /= 2;
				break;
		}
	}

	if (!(delaynodex&2)) {
		if (sc && sc->count) {
			if (sc->data[SC_POEMBRAGI])
				time -= time * sc->data[SC_POEMBRAGI]->val3 / 100;
			if (sc->data[SC_WIND_INSIGNIA] && sc->data[SC_WIND_INSIGNIA]->val1 == 3 && skill_get_type(skill_id) == BF_MAGIC && skill_get_ele(skill_id, skill_lv) == ELE_WIND)
				time /= 2; // After Delay of Wind element spells reduced by 50%.
		}
	}

	if (!(delaynodex&4) && sd && sd->delayrate != 100)
		time = time * sd->delayrate / 100;

	if (battle_config.delay_rate != 100)
		time = time * battle_config.delay_rate / 100;

	//ShowInfo("Delay delayfix = %d\n",time);

	return max(time,0);
}

Try playing this part:


if (!(delaynodex&4) && sd && sd->delayrate != 100)
		time = time * sd->delayrate / 100;

	if (battle_config.delay_rate != 100)
		time = time * battle_config.delay_rate / 100;

maybe double the divider from 100 to 200.. trial and error will help

I tried changing this part. It works like skill.conf changing the delay_rate:100... is the same. My problem is the AGI!
No matter how high is the delay_rate, 150 agi allways is no delay. 

Ex: if i set delay_rate in this part of src ou in skill.conf to 99999 AND my agi is 149, the delay will take several minutes! But 150 agi still no delay ! Get the problem now? The problem is not the delay_rate itself, the problem is agi is fixed for no delay... T_T

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

4 minutes ago, danielps said:

I tried changing this part. It works like skill.conf changing the delay_rate:100... is the same. My problem is the AGI!
No matter how high is the delay_rate, 150 agi allways is no delay. 

Ex: if i set delay_rate in this part of src ou in skill.conf to 99999 AND my agi is 149, the delay will take several minutes! But 150 agi still no delay ! Get the problem now? The problem is not the delay_rate itself, the problem is agi is fixed for no delay... T_T

I'm trying to help, relax. I traced something out. It seems that the fixed 150 variable is coming from here:

{ "castrate_dex_scale",                 &battle_config.castrate_dex_scale,              150,    1,      INT_MAX,        },

Let me help you, do this:

find this part:

if (battle_config.delay_dependon_agi && !(delaynodex&1)) { // if skill delay is allowed to be reduced by agi
				int scale = battle_config.castrate_dex_scale - status_get_agi(bl);

				if (scale > 0)
					time = time * scale / battle_config.castrate_dex_scale;
				else //To be capped later to minimum.
					time = 0;

and edit this part:

time = time * scale / battle_config.castrate_dex_scale;

to this:

time = time * scale / 200; // <-- 200, your desired agi stat

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   18
  • Joined:  10/09/14
  • Last Seen:  

15 minutes ago, pajodex said:

I'm trying to help, relax. I traced something out. It seems that the fixed 150 variable is coming from here:


{ "castrate_dex_scale",                 &battle_config.castrate_dex_scale,              150,    1,      INT_MAX,        },

Let me help you, do this:

find this part:


if (battle_config.delay_dependon_agi && !(delaynodex&1)) { // if skill delay is allowed to be reduced by agi
				int scale = battle_config.castrate_dex_scale - status_get_agi(bl);

				if (scale > 0)
					time = time * scale / battle_config.castrate_dex_scale;
				else //To be capped later to minimum.
					time = 0;

and edit this part:


time = time * scale / battle_config.castrate_dex_scale;

to this:


time = time * scale / 200; // <-- 200, your desired agi stat

 

Thanks a lot for the help, like for the time ur wasting, but still not work xD
I tried changing for 80 and 200, same result both, 150 = no delay, oh god pleasee help me T_T

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

10 minutes ago, danielps said:

Thanks a lot for the help, like for the time ur wasting, but still not work xD
I tried changing for 80 and 200, same result both, 150 = no delay, oh god pleasee help me T_T

This is so saddening. I'm busy scripting an NPC, so I cant really test it out my self.

Revert everything.

change scale to your stat desired from:

time = time * scale / battle_config.castrate_dex_scale;

To this:

time = time * 200 / battle_config.castrate_dex_scale;

Not that but this xD

int scale = battle_config.castrate_dex_scale - status_get_agi(bl);

to something like

int scale = 200 - status_get_agi(bl);

 

Edited by pajodex
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   18
  • Joined:  10/09/14
  • Last Seen:  

2 minutes ago, pajodex said:

This is so saddening. I'm busy scripting an NPC, so I cant really test it out my self.

Revert everything.

change scale to your stat desired from:


time = time * scale / battle_config.castrate_dex_scale;

To this:


time = time * 200 / battle_config.castrate_dex_scale;

 

Hey bro now it worked ! but not 100% i did this:

 

if (battle_config.delay_dependon_agi) { // if skill delay is allowed to be reduced by agi
                int scale = battle_config.castrate_dex_scale - status_get_agi(bl);

                //if (scale > 0)
                    time = time * scale;
                //else //To be capped later to minimum.
                    //time = 0;
            }

 

Now the agi to no deay is 190, BUUTTT, when agi = 0, the delay is like 3x slower than the normal delay T_T
Programming sucks....

Edited by danielps
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  78
  • Topics Per Day:  0.03
  • Content Count:  436
  • Reputation:   167
  • Joined:  12/12/17
  • Last Seen:  

3 minutes ago, danielps said:

Hey bro now it worked ! but not 100% i did this:

 

if (battle_config.delay_dependon_agi) { // if skill delay is allowed to be reduced by agi
                int scale = battle_config.castrate_dex_scale - status_get_agi(bl);

                //if (scale > 0)
                    time = time * scale/800;
                //else //To be capped later to minimum.
                    //time = 0;
            }

 

Now the agi to no deay is 190, BUUTTT, when agi = 0, the delay is like 3x slower than the normal delay T_T
Programming sucks....

Well, honestly I'm not a programmer. I just look at the codes and try what happens if I do this and that. 

I think you have to do something with the scale part. Do the equation and you can get it right:

int scale = battle_config.castrate_dex_scale - status_get_agi(bl);

specifically this equation:

battle_config.castrate_dex_scale = your battle config cast rate dex scale
status_get_agi(bl); = your character agi staat

 

Edited by pajodex
  • Upvote 1
Link to comment
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
Answer this question...

×   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.

×
×
  • Create New...