Jump to content
  • 0

Where to go to modify skills?


Neutral

Question


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  11/03/16
  • Last Seen:  

Hello all, I'm relatively new to the rAthena scene, and I'm looking to learn more about the inner workings of the game and eventually how to pump out my own custom scripts and modifications. For reference sake I plan on working with pre-renewal primarily in case this is important information.

For the time being I've been wondering how to work with skills. For instance if I look at a skill like Envenom...

  • Where is element determined and how can I change that?
  • Where is the poison status proc determined and how can I change that status rate?
  • How do I work with skill damage, sp cost, cast times, delays, etc.
    • Although I do know that in rathena/db there's a file called skill_damage_db for skill damage, but I'd like to know where I could find the raw script anyways just in case or if there's more and/or preferred ways to edit outside of skill_damage_db.

I ask these things for a couple reasons, first I tried looking at the source and other available files, but I found it pretty confusing to locate where skills are exactly and what does what. Second, I was using the rAthena wiki before this thread, and it would almost seem as if it's no longer accessible? (404 error) and when I use the wiki available in the docs section at the top I found that a lot of sections were incomplete (if I click on scripting it brings me to a 404) so I'm under the assumption a transfer is currently being place. I didn't know where else to learn about these things except for directly on the forums as a result. Just thought I'd ask on the forums so that way I have a better understanding on where some things are for the future. Thanks for your support.

Edited by Neutral
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  659
  • Reputation:   664
  • Joined:  11/12/12
  • Last Seen:  

Envenom's element can be found in db/(pre-)re/skill_db.txt, look for TF_POISON.

52,-2,6,1,5,0,0,10,1,no,0,0,0,weapon,0,0x0,		TF_POISON,Envenom

The 5 is for poison.

As for the rest, you'll have to look up how it's been implemented. Start off by checking in skill.c and you'll see soon enough that the status is applied in skill_additional_effect. You're looking for:

	case TF_POISON:
	case AS_SPLASHER:
		if(!sc_start2(src,bl,SC_POISON,(4*skill_lv+10),skill_lv,src->id,skill_get_time2(skill_id,skill_lv))
			&& sd && skill_id==TF_POISON
		)
			clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
		break;

The proc chance is at (4*skill_lv+10), which is out of 100. If you want to costumize TF_POISON only, you'll have to separate it from AS_SPLASHER since they share the same poison effect.

Battle formulas (or skill damage) are usually in battle.c. Searching for TF_POISON will get you to

// renewal:
		if(skill_id == TF_POISON) //Additional ATK from Envenom is treated as mastery type damage [helvetica]
			ATK_ADD(wd.masteryAtk, wd.masteryAtk2, 15 * skill_lv);
// or pre-renewal:
		if (skill_id == TF_POISON)
			ATK_ADD(wd.damage, wd.damage2, 15 * skill_lv);

So the damage of 15 * skill_lv can be changed there.

SP costs and other skill requirements are found in db/(pre-re)/skill_require_db.txt.

52,0,0,12,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0								//TF_POISON

Poison will consume 12 SP as shown on the line above.

Cast times and delays are found in db/(pre-)re/skill_cast_db.txt :

//-- TF_POISON
52,0,0,0,0,15000:20000:25000:30000:35000:40000:45000:50000:55000:60000,0,0

So here it uses the 'duration2' field, which is then used in the function above 'skill_get_time2(skill_id,skill_lv)' to get the duration of the status on the player. You can get more info from the file's header.

Edit: oops, I missed the pre-renewal part! Sorry ;x! Most of the information still works though xD

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

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  11/03/16
  • Last Seen:  

This taught me a lot in a single post, thank you for walking me through all that, it was extremely informative. :)

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