Issue information

Issue ID
#8242
Status
Fixed
Severity
None
Started
Kaiser
Jun 25, 2014 5:58
Last Post
Playtester
Sep 13, 2014 20:45
Confirmation
N/A

Kaiser - Jun 25, 2014 5:58

Hello,

It seems that the chance for a status effect to occur on a mob through status cards (Flame Skull, Skeleton Prisoner, etc. - so basically "bAddEffWhenHit") is lower than what it should be, and it started occuring ever since I've started using this emulator (Hercules). It occurs for pre-renewal. I'm not sure if it would occur for renewal, or how it would work for renewal since I don't play renewal servers.

I assume something was changed with this, so I'm not sure if it's an official change or not, but I kinda don't think so.

I've tested using Flame Skull and Pest on a variety of mobs, and most of the time, it takes forever for anything to occur, especially compared to how it used to be.

For Flame Skull, it should be a 5% chance for the enemy to be Stun, Stone Curse, Blind or Curse, and multiple status effects could activate at the same time (so you could say it's around 20% chance for at least 1 status effect to occur), but most of the time, it takes 20~60 hits for one effect to occur. Sometimes nothing occurs at all.

I've tested Pest with 77 base INT, so that's a 9% chance to Stone Curse. Most of the time, it takes 30+ hits for any mob to be Stone Cursed.

I also tested Lich's Bone Wand's Wide Curse chance, and the chance seems to work as intended (it uses "bAutoSpellWhenHit").

On the first Hercules server I've played, I noticed mobs were receiving status effects less often, so I thought maybe I was unlucky, but after it's been happening for a while, I know it's not the case anymore.

Here's a couple of videos I've created to demonstrate:

First recorded attempt, Flame Skull Card (5% each status, 20% avg for any), only Stun happened once, nothing else.
[url="http://youtu.be/zx1vghkFjtc"]youtu.be/zx1vghkFjtc[/url]

2nd recorded attempt, Flame Skull Card (5% each status, 20% avg for any), lucky SC in the first hit, a 2nd SC eventually, and I think later on, a mob got Blinded. Nothing else.
[url="http://youtu.be/Xrf_SRRHDh4"]youtu.be/Xrf_SRRHDh4[/url]

3rd recorded attempt, Pest Card with 77+ base INT (9% SC chance), this has to be the luckiest, but the odds were still low...
[url="http://youtu.be/-i-N5cb882I"]youtu.be/-i-N5cb882I[/url]

4th recorded attempt, Pest Card with 77+ base INT (9% SC chance), only 3 SC before I died
[url="http://youtu.be/ICIr6ZVn-lY"]youtu.be/ICIr6ZVn-lY[/url]

5th recorded attempt, Skeleton Card + Skeleton Prisoner Card combo (9% sleep chance), not sure...
[url="http://youtu.be/c2an3PyYUVA"]youtu.be/c2an3PyYUVA[/url]

6th recorded attempt, Garm Card (50% freeze chance), it's hard to say with this one...felt almost normal, but at the same time, not often did they freeze in 1 hit (supposed to be around 50% chance for that to happen). Most of the time, it took 2~3 hits for the mob to freeze. It feels like the higher the status chance, the higher chance it can occur at what it should normally be at.
[url="http://youtu.be/YJInzC7fOxM"]youtu.be/YJInzC7fOxM[/url]

7th recorded attempt, started with Flame Skull, tried different stuff after, I'm not sure what to say about this one...just...nothing works, except Garm's Freezing apparently, Sasquatch didn't freeze it once. No blind occured. This is also what led me to believe certain mobs are more immune possibly due to their stats, but I'm not sure what kind of stats would possible give that much reduction...Just feels like some kind of bug.
[url="http://youtu.be/ens_MZ6FvV4"]youtu.be/ens_MZ6FvV4[/url]

8th recorded attempt, started with Flame Skull, but apparently that didn't want to work, so I added Skeleton + Skeleton Prisoner, and that helped a bit, but still very "unlucky".
[url="http://youtu.be/Q_XqjSpKrCQ"]youtu.be/Q_XqjSpKrCQ[/url]

Based on everything so far, I can only think that the chance may be reduced due to certain mob stats or something, to the point it doesn't activate at all for certain mobs. I know originally, the status chance COULD be lower on certain mobs like Mimic, but it would still activate often enough on them. Now it's like it's badly reduced for almost every mob.

If this could be looked into, that'd be great. Thanks!

If this is working as intended, could I see when it was implemented? Sorry also for all the videos, tried to be as informative as possible.

This post has been edited by Kaiser on Jul 11, 2014 20:27

Kaiser - Jul 14, 2014 16:11

Bump, is anyone else able to confirm this? Thanks.

Kaiser - Aug 1, 2014 16:27

Bump~

Kaiser - Aug 18, 2014 12:55

Bump

Playtester - Sep 9, 2014 13:18

The status resistances have been wrong on emulators since forever. I finally fixed them in 2012. Hercules took over those changes a while ago. While there are still a few mistakes with the duration reduction (LUK should reduce duration even on pre-renewal), the basic chance is correct already.


Most notable changes to the previous bugged version are:

1. Level difference plays a role! The each level of the attacker increases the chance by a fixed 0.1% while each level of the defender reduces the chance by a fixed 0.1%.
Only exception is the "Curse" status, that can't be reduced by level of defender (that's why you need more resistance the higher your level is).

2. Each point in LUK reduces the base chance by a fixed 0.1%.


So basically if you have a 5% status change bonus, that could for example be resisted by the target being 50 levels above you or by the target having 50 LUK.
So as you can see, for low base chances like 5%, LUK and level actually play a big role when it comes to status resistance. For higher base chances (like 25-50% stun chance from bash), the usefulness diminishes.


As Curse works a bit differently and can't be resisted as easily as other status changes, you could use that to your advantage, though. If you curse a target, his LUK will drop to 0, making him very vulnurable to other low chance status changes.


I also wrote a guide for this on RMS: [url="http://forum.ratemyserver.net/guides/guide-official-status-resistance-formulas-(pre-renewal)/"]Official Status Resistance Formulas (Pre-Renewal)[/url]

This post has been edited by Playtester on Sep 10, 2014 10:04

Playtester - Sep 10, 2014 10:18

Actually having said that, it's still strange that the status change doesn't occur in the first video...


Kavach Icarus is level 60 and you are level 99. That alone should give you a chance boost of 3.9%. He has 10 Vit and 40 Luk.

The actual success chance for each status change to occur consequently in that sample should be:
5% - 0.5% + 3.9% - 4.0% = 4.4%


Maybe there is some error somewhere when it comes to "StatusChangeWhenHit". Is bl and src correctly transferred here? Source has to be the defender and bl has to be the attacker in that case.[code=auto:0]sc_def = st->vit*100; sc_def2 = st->luk*10 + SCDEF_LVL_DIFF(bl, src, 99, 10);[/code]Looks correct to me at least.

This all is assuming that you didn't adjust level, vit or luk on Kavach Icarus, though.

Kaiser - Sep 10, 2014 14:58

Thanks for the response. I wasn't aware that previous emulators wasn't already using LUK and levels to determine the chance for status effect. In fact, I assumed that bAddEffWhenHit would ignore that and work at the indicated chance, regardless of the player/enemy's stats, unless they were fully immune to it.

Everything should be default; no stats changed on any monsters. I will, however, try this again on the most recent revision when I have a chance (or someone else can), since it's been a few months now.

This post has been edited by Kaiser on Sep 10, 2014 14:59

Playtester - Sep 10, 2014 17:43

Older emulators also made LUK reduce the chance, but it's a big difference whether it's a percentual reduction (previously) or a fixed one (now & official).

For example:

Target has 30 LUK and all other stats 0. Before that meant a percentual reduction of 10%. Now it's a fixed reduction of 3%.

Base Chance 50%:
Before: 50% - 50%*10% = 45%
Now: 50% - 3% = 47%

Base Chance 9%:
Before: 9% - 9%*10% = 8.1%
Now: 9% - 3% = 6%

Base Chance 5%:
Before: 5% - 5%*10% = 4.5%
Now: 5% - 3% = 2%

As you can see, the lower the base chance, the more noticable the change. Which is basically what you already noticed during your tests.


But as said, I find it still strange that the chance seems so low even though your level is much higher than the level of the enemy. Officially if your level is far above the enemy level, the chance increases a lot.

Probably would require to create two "test enemies". Like all stats equal to 1 but one with level 1 and one with level 99. When the level 1 attacks you, he should be afflicted by status changes more often than the one at level 99 if everything works fine.

This post has been edited by Playtester on Sep 10, 2014 17:48

Garr - Sep 12, 2014 20:05

[code=auto:0] SCDEF_LVL_DIFF(bl, src, 99, 10); [/code]
There's a small catch to this thing, as I found lately:
[code=auto:0] /// Renewal level modifier. /// In renewal, returns the difference between the levels of 'bl' and 'src', both capped to 'maxlv', multiplied by 'factor' /// In pre-renewal, returns zero. #ifdef RENEWAL #define SCDEF_LVL_DIFF(bl, src, maxlv, factor) ( ( SCDEF_LVL_CAP((bl), (maxlv)) - SCDEF_LVL_CAP((src), (maxlv)) ) * (factor) ) #else #define SCDEF_LVL_DIFF(bl, src, maxlv, factor) 0 #endif [/code]
So if the server is pre-renewal...

Playtester - Sep 13, 2014 6:14

Yeah, that would explain the bug. The level difference also needs to be considered in pre-renewal.

But where did you find that?

I checked here:
[url="https://raw.githubusercontent.com/HerculesWS/Hercules/master/src/map/status.c"]https://raw.githubusercontent.com/HerculesWS/Hercules/master/src/map/status.c[/url]

And there is no such define:[code=auto:0][...] return tick ? tick : 1; // If no source, it can't be resisted (NPC given) /// Returns the 'bl's level, capped to 'cap' #define SCDEF_LVL_CAP(bl, cap) ( (bl) ? (status->get_lv(bl) > (cap) ? (cap) : status->get_lv(bl)) : 0 ) /// returns the difference between the levels of 'bl' and 'src', both capped to 'maxlv', multiplied by 'factor' #define SCDEF_LVL_DIFF(bl, src, maxlv, factor) ( ( SCDEF_LVL_CAP((bl), (maxlv)) - SCDEF_LVL_CAP((src), (maxlv)) ) * (factor) ) //Status that are blocked by Golden Thief Bug card or Wand of Hermod [...][/code]

Garr - Sep 13, 2014 19:44

Ah, turns out it was [url="https://github.com/HerculesWS/Hercules/commit/a06e53479131c25ce2343c431c688c57b3bfa2c0"]fixed 15 days ago[/url], just my version is a bit older than that. Guess it should be fixed now then (and ticket closed).

Michi - Sep 13, 2014 20:35

sorry didn't see this post :p
Fixed in: [url="https://github.com/HerculesWS/Hercules/commit/a06e53479131c25ce2343c431c688c57b3bfa2c0"]https://github.com/HerculesWS/Hercules/commit/a06e53479131c25ce2343c431c688c57b3bfa2c0[/url]

Playtester - Sep 13, 2014 20:45

Hi Michi, I added you to a conversation regarding some more info regarding the status resistances. :-)