Jump to content
  • 0

Want to change Crazy weed element with Elemental Converter


Serina_RO

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  05/14/18
  • Last Seen:  

Hello,

We wanted the crazy weed not to be only Earth element but be able to change element with Elemental Converter. I tried to changing the element but compile didn't go through.

I edit the battle.c's crazy weed skill

case GN_CRAZYWEED_ATK: // Crazy Weed DMG_FIX( 500 + 100 * skill_lv, 100 ); ele = status_get_attack_element(bl); //{edit here} break;

{edit here} is the place that I change on the source but it couldn't change.

Could someone advise?

Thank you.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.03
  • Content Count:  112
  • Reputation:   9
  • Joined:  09/22/19
  • Last Seen:  

There are a couple things you could try. My first suggestion would be changing it in the skill_db (used to be a txt file, but I think its a yml for newer users now) so that it goes by enchant/endow element. If you want the base element to stay earth though, then perhaps leave skill_db alone and try going to this section in battle.cpp:

	if (s_ele == -1) { // pl=-1 : the skill takes the weapon's element
		s_ele = sstatus->rhw.ele;
		if(sd && sd->spiritcharm_type != CHARM_TYPE_NONE && sd->spiritcharm >= MAX_SPIRITCHARM)
			s_ele = sd->spiritcharm_type; // Summoning 10 spiritcharm will endow your weapon
	} else if (s_ele == -2) //Use status element
		s_ele = status_get_attack_sc_element(src,status_get_sc(src));
	else if (s_ele == -3) //Use random element
		s_ele = rnd()%ELE_ALL;

	switch(skill_id) {
		case LG_SHIELDSPELL:
			if (skill_lv == 2)
				s_ele = ELE_HOLY;
			break;

And adding this under the case LG_SHIELDSPELL section (after the break;):

		case: GN_CRAZYWEED_ATK:
			if (status_get_attack_sc_element(src,status_get_sc(src)) != NULL || status_get_attack_sc_element(src,status_get_sc(src)) != 0)
				s_ele = status_get_attack_sc_element(src,status_get_sc(src));
			break;

Note: I normally just research what has been used in other places of code and guess at what might work. This might work, or it might not, or it might just need some tweaking. Also, this coding won't allow for endowment to neutral element, because it looks like the status_get_attack_sc_element is set to return neutral as the element if no endow is found. You might be able to get around this, but it would take more coding.

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