Jump to content
  • 0

how to make certain long ranged skills bypass pneuma


Jhedzkie

Question


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

help please.

thanks in advanced.

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

it's better to quote error if you want help on this as we don't all want to try it out to search trivial error. (and error message are usually descriptive enough).

now MarkZ had the good idea the better way is to mark those ignore it in db so you can change it easely, but adding a whole new row for this is a little bit overkill.

 

here the simplier way to do it, we'll add a new inf2 and set it on dragon breath as exemple :

-declare new inf2 :

skill.h::e_skill_inf2 add new inf2 with next bitmask :

    ....
    INF2_CHORUS_SKILL    = 0x4000, // Chorus skill
    INF2_BYPASSPNEUMA = 0x8000,
};

 

-use inf2 in code

battle.c::battle_calc_damage

        if( ( !(skill_get_inf2(skill_id)&INF2_BYPASSPNEUMA) && sc->data[SC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG ) || sc->data[SC__MANHOLE] ) {
            d->dmg_lv = ATK_BLOCK;
            return 0;
        }

 

-set dragon breath with this inf2 :

2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0x8000,0,misc,0,    RK_DRAGONBREATH,Dragon Breath

 

This step are the step you need to do and result you should have, here the current total diff. (unfortunatly diff won't match long, but if you understand the step you'll have no issue to update for latest version

# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /home/lighta/Documents/Myscript/RO/Servs/rathena
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: db/pre-re/skill_db.txt
--- db/pre-re/skill_db.txt Base (BASE)
+++ db/pre-re/skill_db.txt Locally Modified (Based On LOCAL)
@@ -38,6 +38,7 @@
 //    0x1000- disable usage on enemies (for non-offensive skills).
 //    0x2000- skill ignores land protector (e.g. arrow shower)
 //    0x4000- chorus skill
+//    0x8000- ignore pneuma
 // 13 maxcount: max amount of skill instances to place on the ground when
 //    player_land_skill_limit/monster_land_skill_limit is enabled. For skills
 //    that attack using a path, this is the path length to be used.
@@ -685,7 +686,7 @@
 2005,1,6,2,4,0x2,2,5,1,no,0,0,0,weapon,3,    RK_WINDCUTTER,Wind Cutter
 2006,0,6,4,-1,0x2,5,5,1,no,0,0,0,weapon,0,    RK_IGNITIONBREAK,Ignition Break
 2007,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0,        RK_DRAGONTRAINING,Dragon Training
-2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0,    RK_DRAGONBREATH,Dragon Breath
+2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0x8000,0,misc,0,    RK_DRAGONBREATH,Dragon Breath
 2009,0,6,4,0,0x3,3:4:5:6:7,5,1,no,0,0,0,none,0,    RK_DRAGONHOWLING,Dragon Howling
 2010,0,0,0,0,0,0,10,0,no,0,0,0,none,0,        RK_RUNEMASTERY,Rune Mastery
 2011,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,    RK_MILLENNIUMSHIELD,Millenium Shield
Index: db/re/skill_db.txt
--- db/re/skill_db.txt Base (BASE)
+++ db/re/skill_db.txt Locally Modified (Based On LOCAL)
@@ -38,6 +38,7 @@
 //    0x1000- disable usage on enemies (for non-offensive skills).
 //    0x2000- skill ignores land protector (e.g. arrow shower)
 //    0x4000- chorus skill
+//    0x8000- ignore pneuma
 // 13 maxcount: max amount of skill instances to place on the ground when
 //    player_land_skill_limit/monster_land_skill_limit is enabled. For skills
 //    that attack using a path, this is the path length to be used.
@@ -685,7 +686,7 @@
 2005,1,6,2,4,0x2,2,5,1,no,0,0,0,weapon,3,    RK_WINDCUTTER,Wind Cutter
 2006,0,6,4,-1,0x2,5,5,1,no,0,0,0,weapon,0,    RK_IGNITIONBREAK,Ignition Break
 2007,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0,        RK_DRAGONTRAINING,Dragon Training
-2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0,    RK_DRAGONBREATH,Dragon Breath
+2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0x8000,0,misc,0,    RK_DRAGONBREATH,Dragon Breath
 2009,0,6,4,0,0x3,3:4:5:6:7,5,1,no,0,0,0,none,0,    RK_DRAGONHOWLING,Dragon Howling
 2010,0,0,0,0,0,0,10,0,no,0,0,0,none,0,        RK_RUNEMASTERY,Rune Mastery
 2011,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,    RK_MILLENNIUMSHIELD,Millenium Shield
Index: src/map/battle.c
--- src/map/battle.c Base (BASE)
+++ src/map/battle.c Locally Modified (Based On LOCAL)
@@ -829,7 +829,7 @@
             status_change_end(bl, SC_SAFETYWALL, INVALID_TIMER);
         }
 
-        if( ( sc->data[SC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG ) || sc->data[SC__MANHOLE] ) {
+        if( ( !(skill_get_inf2(skill_id)&INF2_BYPASSPNEUMA) && sc->data[SC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG ) || sc->data[SC__MANHOLE] ) {
             d->dmg_lv = ATK_BLOCK;
             return 0;
         }
Index: src/map/skill.h
--- src/map/skill.h Base (BASE)
+++ src/map/skill.h Locally Modified (Based On LOCAL)
@@ -70,6 +70,7 @@
     INF2_NO_ENEMY       = 0x1000,
     INF2_NOLP           = 0x2000, // Spells that can ignore Land Protector
     INF2_CHORUS_SKILL    = 0x4000, // Chorus skill
+    INF2_BYPASSPNEUMA = 0x8000,
 };
 
 //Walk intervals at which chase-skills are attempted to be triggered.
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  134
  • Reputation:   35
  • Joined:  02/27/12
  • Last Seen:  

In path: ../src/map

In skill.h

Within struct s_skill_db { Find:

int unit_flag;

After ADD:

int pneumaIgnore;

In skill.c

Within function bool static bool skill_parse_row_skilldb(char* split[], int columns, int current)

Find:

safestrncpy(skill_db[i].desc, trim(split[16]), sizeof(skill_db[i].desc));

After Add:

if(split[17] && atoi(split[17]))
 skill_db[i].pneumaIgnore = 1;
else
 skill_db[i].pneumaIgnore = 0;

Within function static void skill_readdb(void)

Find:

sv_readdb(db_path, DBPATH"skill_db.txt"		  , ',',  17, 17, MAX_SKILL_DB, skill_parse_row_skilldb);

Replace with:

sv_readdb(db_path, DBPATH"skill_db.txt"		  , ',',  17, 18, MAX_SKILL_DB, skill_parse_row_skilldb);

In battle.c

Find:

 if( sc->data[sC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG || sc->data[sC__MANHOLE] ) {

Before ADD:

 if(!skill_db[skill_num].pneumaIgnore)

In path: ../db/re OR ../db/pre-re (depending on which version you're using).

In file:skill_db.txt

Go to the skill you want Pneuma to be ignored and add a comma and number 1 like this:

2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0, RK_DRAGONBREATH,Dragon Breath

To:

2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0, RK_DRAGONBREATH,Dragon Breath,1

It's optional to put 0 as any skill that has not the last value will be filled with 0.

Edited by MarkZD
  • Upvote 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  234
  • Reputation:   113
  • Joined:  02/24/15
  • Last Seen:  

On 3/6/2013 at 3:14 AM, Lighta said:

it's better to quote error if you want help on this as we don't all want to try it out to search trivial error. (and error message are usually descriptive enough).

now MarkZ had the good idea the better way is to mark those ignore it in db so you can change it easely, but adding a whole new row for this is a little bit overkill.

 

here the simplier way to do it, we'll add a new inf2 and set it on dragon breath as exemple :

-declare new inf2 :

skill.h::e_skill_inf2 add new inf2 with next bitmask :


    ....
    INF2_CHORUS_SKILL    = 0x4000, // Chorus skill
    INF2_BYPASSPNEUMA = 0x8000,
};

 

-use inf2 in code

battle.c::battle_calc_damage


        if( ( !(skill_get_inf2(skill_id)&INF2_BYPASSPNEUMA) && sc->data[SC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG ) || sc->data[SC__MANHOLE] ) {
            d->dmg_lv = ATK_BLOCK;
            return 0;
        }

 

-set dragon breath with this inf2 :


2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0x8000,0,misc,0,    RK_DRAGONBREATH,Dragon Breath


 

This step are the step you need to do and result you should have, here the current total diff. (unfortunatly diff won't match long, but if you understand the step you'll have no issue to update for latest version
 


# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /home/lighta/Documents/Myscript/RO/Servs/rathena
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: db/pre-re/skill_db.txt
--- db/pre-re/skill_db.txt Base (BASE)
+++ db/pre-re/skill_db.txt Locally Modified (Based On LOCAL)
@@ -38,6 +38,7 @@
 //    0x1000- disable usage on enemies (for non-offensive skills).
 //    0x2000- skill ignores land protector (e.g. arrow shower)
 //    0x4000- chorus skill
+//    0x8000- ignore pneuma
 // 13 maxcount: max amount of skill instances to place on the ground when
 //    player_land_skill_limit/monster_land_skill_limit is enabled. For skills
 //    that attack using a path, this is the path length to be used.
@@ -685,7 +686,7 @@
 2005,1,6,2,4,0x2,2,5,1,no,0,0,0,weapon,3,    RK_WINDCUTTER,Wind Cutter
 2006,0,6,4,-1,0x2,5,5,1,no,0,0,0,weapon,0,    RK_IGNITIONBREAK,Ignition Break
 2007,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0,        RK_DRAGONTRAINING,Dragon Training
-2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0,    RK_DRAGONBREATH,Dragon Breath
+2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0x8000,0,misc,0,    RK_DRAGONBREATH,Dragon Breath
 2009,0,6,4,0,0x3,3:4:5:6:7,5,1,no,0,0,0,none,0,    RK_DRAGONHOWLING,Dragon Howling
 2010,0,0,0,0,0,0,10,0,no,0,0,0,none,0,        RK_RUNEMASTERY,Rune Mastery
 2011,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,    RK_MILLENNIUMSHIELD,Millenium Shield
Index: db/re/skill_db.txt
--- db/re/skill_db.txt Base (BASE)
+++ db/re/skill_db.txt Locally Modified (Based On LOCAL)
@@ -38,6 +38,7 @@
 //    0x1000- disable usage on enemies (for non-offensive skills).
 //    0x2000- skill ignores land protector (e.g. arrow shower)
 //    0x4000- chorus skill
+//    0x8000- ignore pneuma
 // 13 maxcount: max amount of skill instances to place on the ground when
 //    player_land_skill_limit/monster_land_skill_limit is enabled. For skills
 //    that attack using a path, this is the path length to be used.
@@ -685,7 +686,7 @@
 2005,1,6,2,4,0x2,2,5,1,no,0,0,0,weapon,3,    RK_WINDCUTTER,Wind Cutter
 2006,0,6,4,-1,0x2,5,5,1,no,0,0,0,weapon,0,    RK_IGNITIONBREAK,Ignition Break
 2007,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0,        RK_DRAGONTRAINING,Dragon Training
-2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0,    RK_DRAGONBREATH,Dragon Breath
+2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0x8000,0,misc,0,    RK_DRAGONBREATH,Dragon Breath
 2009,0,6,4,0,0x3,3:4:5:6:7,5,1,no,0,0,0,none,0,    RK_DRAGONHOWLING,Dragon Howling
 2010,0,0,0,0,0,0,10,0,no,0,0,0,none,0,        RK_RUNEMASTERY,Rune Mastery
 2011,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,    RK_MILLENNIUMSHIELD,Millenium Shield
Index: src/map/battle.c
--- src/map/battle.c Base (BASE)
+++ src/map/battle.c Locally Modified (Based On LOCAL)
@@ -829,7 +829,7 @@
             status_change_end(bl, SC_SAFETYWALL, INVALID_TIMER);
         }
 
-        if( ( sc->data[SC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG ) || sc->data[SC__MANHOLE] ) {
+        if( ( !(skill_get_inf2(skill_id)&INF2_BYPASSPNEUMA) && sc->data[SC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG ) || sc->data[SC__MANHOLE] ) {
             d->dmg_lv = ATK_BLOCK;
             return 0;
         }
Index: src/map/skill.h
--- src/map/skill.h Base (BASE)
+++ src/map/skill.h Locally Modified (Based On LOCAL)
@@ -70,6 +70,7 @@
     INF2_NO_ENEMY       = 0x1000,
     INF2_NOLP           = 0x2000, // Spells that can ignore Land Protector
     INF2_CHORUS_SKILL    = 0x4000, // Chorus skill
+    INF2_BYPASSPNEUMA = 0x8000,
 };
 
 //Walk intervals at which chase-skills are attempted to be triggered.

could someone revive this pls?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  234
  • Reputation:   19
  • Joined:  06/15/12
  • Last Seen:  

Example please ;DD

Well the easy way would be editing the skill to magic attack.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

for example, i have my ranger go hunting down fallingbishop.

then i'd like double strafe to go through the pneuma which he loves to do.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  234
  • Reputation:   19
  • Joined:  06/15/12
  • Last Seen:  

Then whats the point of pneuma? This disturbs the balance of Ragnarok imho. This would effect PvE as well as PvP.

In your case, you should just disable pneuma for these certain MVPs.

Or @item the card directly into the hands of your users.....

But well, like i mentioned above. Just make the skill a magic attack and it shouldn´t be blocked by pneuma.

http://rathena.org/wiki/Custom_skill

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

i do know how to make skills, those exactly are what i wish to make bypass pneuma. so i'll just have to set it as magic attack?

because in this part of battle.c

if( ( sc->data[sC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG ) || sc->data[sC__MANHOLE] ) {
d->dmg_lv = ATK_BLOCK;
return 0;
}

it checks both magic and long ranged attacks and then makes the attack 'Miss!'

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   5
  • Joined:  12/25/11
  • Last Seen:  

i do know how to make skills, those exactly are what i wish to make bypass pneuma. so i'll just have to set it as magic attack?

because in this part of battle.c

if( ( sc->data[sC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG ) || sc->data[sC__MANHOLE] ) {
d->dmg_lv = ATK_BLOCK;
return 0;
}

it checks both magic and long ranged attacks and then makes the attack 'Miss!'

try changing the

if( (sc->data[sC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG) || sc->data[sC__MANHOLE] )

to

if( (sc->data[sC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG && skill_num != AC_DOUBLE) || sc->data[sC__MANHOLE] )

just a guess though

go Pinoy :D

Edited by Yomigaeru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

i do know how to make skills, those exactly are what i wish to make bypass pneuma. so i'll just have to set it as magic attack?

because in this part of battle.c

if( ( sc->data[sC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG ) || sc->data[sC__MANHOLE] ) {
d->dmg_lv = ATK_BLOCK;
return 0;
}

it checks both magic and long ranged attacks and then makes the attack 'Miss!'

try changing the

if( (sc->data[sC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG) || sc->data[sC__MANHOLE] )

to

if( (sc->data[sC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG) || sc->data[sC__MANHOLE] || skill_num != AC_DOUBLE )

just a guess though

go Pinoy :D

haha. yeah it probably would work, tho, its really unethical programming-wise since you have to hardcode every skill just to make it bypass pneuma.

im thinking about adding a flag here on skills but i have no idea where to start.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

In path: ../src/map

In skill.h

Within struct s_skill_db { Find:

int unit_flag;
After ADD:

int pneumaIgnore;
In skill.c

Within function bool static bool skill_parse_row_skilldb(char* split[], int columns, int current)

Find:

safestrncpy(skill_db[i].desc, trim(split[16]), sizeof(skill_db[i].desc));
After Add:

if(split[17] && atoi(split[17]))
  skill_db[i].pneumaIgnore = 1;
else
  skill_db[i].pneumaIgnore = 0;
Within function static void skill_readdb(void)

Find:

sv_readdb(db_path, DBPATH"skill_db.txt"		  , ',',  17, 17, MAX_SKILL_DB, skill_parse_row_skilldb);
Replace with:

sv_readdb(db_path, DBPATH"skill_db.txt"		  , ',',  17, 18, MAX_SKILL_DB, skill_parse_row_skilldb);

In battle.c

Find:

  if( sc->data[SC_PNEUMA] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG || sc->data[SC__MANHOLE] ) {
Before ADD:

  if(!skill_db[skill_num].pneumaIgnore)
In path: ../db/re OR ../db/pre-re (depending on which version you're using).

In file:skill_db.txt

Go to the skill you want Pneuma to be ignored and add a comma and number 1 like this:

2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0, RK_DRAGONBREATH,Dragon Breath

To:
>

2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0, RK_DRAGONBREATH,Dragon Breath,1

It's optional to put 0 as any skill that has not the last value will be filled with 0.

 

i gont an error on skill.c and battle.c can u help me?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  297
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

i have fixed this issue ages ago using the same method that Lighta suggested. with credits to MarkZD, he's the one who gave the idea that made me think about what I had now. either way works.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

- FIXED - 

Edited by Rebel
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...