help [Skills] Adding Custom Passive

roygbiv

New member
Messages
6
Points
0
Github
roygbiv
okay, so i tried to make new passive skill for my swordsman job

here's my code
 

srcmapskill.h

 
enum e_skill {
 
 
PS_ONEAXE = 8443,
PS_TWOAXE = 8444,
NV_BASIC = 1,
 
SM_SWORD,
SM_TWOHAND,
srcmapbattle.c

case W_1HAXE:

if((skill_lv = pc->checkskill(sd,PS_ONEAXE)) > 0)
damage += (skill_lv * 100);
break;
case W_2HAXE:
if((skill_lv = pc->checkskill(sd,PS_TWOAXE)) > 0)
damage += (skill_lv * 150);
break;
in my db
dbpre-reskill_db.txt

8443,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0, PS_ONEAXE,One-Handed Axe Mastery

8444,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0, PS_TWOAXE,Two-Handed Axe Mastery
dbpre-reskill_tree.conf

Swordsman: {

inherit: ( "Novice" );
 
skills: {
 
PS_ONEAXE: 10
 
PS_TWOAXE: {
MaxLeve: 10
PS_ONEAXE: 1
}
SM_SWORD: 10
SM_TWOHAND: {
MaxLevel: 10
SM_SWORD: 1
}
SM_RECOVERY: 10
SM_BASH: 10
SM_PROVOKE: 10
SM_MAGNUM: {
MaxLevel: 10
SM_BASH: 5
}
SM_ENDURE: {
MaxLevel: 10
SM_PROVOKE: 5
}
SM_MOVINGRECOVERY: 1
SM_FATALBLOW: 1
SM_AUTOBERSERK: 1
}
}
in my grf
lua filesskillinfozskillid.lub
 

SKID = {

  PS_ONEAXE = 8443,
 
  PS_TWOAXE = 8444,

lua filesskillinfozskilldescript.lub

[sKID.PS_ONEAXE] = {

    "One Handed Axe Mastery",
    "MAX Lv : 10",
    "Skill Form: ^000099Passive^000000",
    "Description: ^777777Increase damage with One Handed",
    "Axe.^000000",
    "[Lv 1]: ^777777Atk +100^000000",
    "[Lv 2]: ^777777Atk +200^000000",
    "[Lv 3]: ^777777Atk +300^000000",
    "[Lv 4]: ^777777Atk +400^000000",
    "[Lv 5]: ^777777Atk +500^000000",
    "[Lv 6]: ^777777Atk +600^000000",
    "[Lv 7]: ^777777Atk +700^000000",
    "[Lv 8]: ^777777Atk +800^000000",
    "[Lv 9]: ^777777Atk +900^000000",
    "[Lv 10]: ^777777Atk +1000^000000"
  },
  [sKID.PS_TWOAXE] = {
    "Two Handed Axe Mastery",
    "MAX Lv : 10",
    "^777777Requirement : Axe Mastery 1^000000",
    "Skill Form: ^000099Passive^000000",
    "Description: ^777777Increase damage with Two Handed Axe Class Weapons.^000000",
    "[Lv 1]: ^777777Atk +150^000000",
    "[Lv 2]: ^777777Atk +300^000000",
    "[Lv 3]: ^777777Atk +450^000000",
    "[Lv 4]: ^777777Atk +600^000000",
    "[Lv 5]: ^777777Atk +750^000000",
    "[Lv 6]: ^777777Atk +900^000000",
    "[Lv 7]: ^777777Atk +1050^000000",
    "[Lv 8]: ^777777Atk +1200^000000",
    "[Lv 9]: ^777777Atk +1350^000000",
    "[Lv 10]: ^777777Atk +1500^000000"
  },
lua filesskillinfozskillinfolist.lub

[sKID.PS_ONEAXE] = {

"PS_ONEAXE";
SkillName = "One-Handed Axe Mastery",
MaxLv = 10,
SpAmount = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
bSeperateLv = false,
AttackRange = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
},
 
[sKID.PS_TWOAXE] = {
"PS_TWOAXE";
SkillName = "Two-Handed Axe Mastery",
MaxLv = 10,
SpAmount = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
bSeperateLv = false,
AttackRange = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
},



lua filesskillinfozskilltreeview.lub

 [JOBID.JT_SWORDMAN] = {

    [1] = SKID.SM_SWORD,
    [2] = SKID.SM_RECOVERY,
    [3] = SKID.SM_BASH,
    [4] = SKID.SM_PROVOKE,
    [5] = SKID.SM_AUTOBERSERK,
    [6] = SKID.SM_MOVINGRECOVERY,
    [8] = SKID.SM_TWOHAND,
    [10] = SKID.SM_MAGNUM,
    [11] = SKID.SM_ENDURE,
    [12] = SKID.SM_FATALBLOW,
    [15] = SKID.PS_ONEAXE,
    [22] = SKID.PS_TWOAXE
  },

-------
okay so i have already seen the passive skill in the skill window. but i cannot put any skill points in it.

1922524_4190707702057_431110146_n.jpg


can anyone tell me what i did wrong or is there anything i need to do that i havent done yet


Edit: The Damage Calculation is working fine when i use @allskill but it still isnt giving any skill points on the skill
Edit: when i check the sql it is saving my skills and it's level. when i manually put skill points on these two, it uses the skill points and give the effects but it is still in gray color.

Edit: i just found out that when i log out my mapserver is giving me a warning
 

mmo_char_fromsql: ignoring invalid skill (id=8444, lvl=10) of character Test (AID=2000000, CID=150000)
any help on this?

 
Last edited by a moderator:
I remember Emistry asked the same question before on IRC

[03:24:11] Luciano : i think the easy way out is to use the free ids between 700-1k

[03:24:16] Emistry : anyway ...the result is still same...an id that i used....either it's unknown id ... or it end up with overwrite current skill id

[03:24:44] Luciano : ids 720-850 are free

[03:24:46] Emistry : i see ..

[03:24:51] Luciano : ah

[03:24:52] Luciano : 721-850

[03:24:57] Emistry : so the skill id should use 721 ~ 850 ?

[03:25:02] Luciano : if you want to other ids its possible

[03:25:06] Luciano : just need to adjust the index formula

[03:25:12] Emistry : but how to adjust the index formula ?

[03:25:16] Luciano : easy way is to use 721-850 so that you dont need to edit the index.

.
the problem is because of http://herc.ws/board/topic/512-skill-id-processing-overhaul/hercules implement the skill ID reading in such a way that its harder to add more skill ID ( to save memory )

so we have to use the skill ID that is within the range of the gap that gravity not using

 
Last edited by a moderator:
Back
Top