Search the database
Search forum topics
Search members
Search for trades
diablo2.io is supported by ads
diablo2.io is supported by ads
6 replies   1004 views
1

Roll ranges for constant and variable stats displayed inconsistently

No data yet

Bug Report

2

Description

Device: All
Browser: All
OS: All

Hi, this is a great site! I use it to look up any item that I find during gameplay. I find the visual display of information to be very concise and useful.

I've found two small inconsistencies in how the information is presented, though, and wanted to report them to help make the site even better. I'm not sure if you want these in separate threads or not, but I'm posting them here because they seem closely related.

1. Constant stats for some items are displayed as variable stats

Whenever there's a range of any kind in a stat, the site displays it as a variable stat (the green box around it, and the <code title="Variable stat or range"> tag around it).

One quick example of this is the Raven Frost. You can see that the "15-45" in "Adds 15-45 Cold Damage, 4 sec. Duration" is displayed with a green box around it to indicate a variable stat, even though this is the same on every
Raven Frost
ring.


2. Variable stats are displayed as constant

Variable stats are displayed as constant in some fields. I've only noticed it in the defense and dmg fields, but it's possible that it's happening in other fields.

One example that shows both of the issues in one item is the Monarch. The Defense stat and the Paladin
Smite
Dmg stat are both displayed the in the same way (with no green box), even though the Defense stat is variable, and the Paladin
Smite
Dmg is constant (it is a range of damage, but it's always the same range for that item).

I would expect the defense stat to be displayed as variable, and the Paladin
Smite
Dmg to remain as is.
Description by duotrig
5

Can be used to make Runewords:

7
Device: All
Browser: All
OS: All

Hi, this is a great site! I use it to look up any item that I find during gameplay. I find the visual display of information to be very concise and useful.

I've found two small inconsistencies in how the information is presented, though, and wanted to report them to help make the site even better. I'm not sure if you want these in separate threads or not, but I'm posting them here because they seem closely related.

1. Constant stats for some items are displayed as variable stats

Whenever there's a range of any kind in a stat, the site displays it as a variable stat (the green box around it, and the <code title="Variable stat or range"> tag around it).

One quick example of this is the Raven Frost. You can see that the "15-45" in "Adds 15-45 Cold Damage, 4 sec. Duration" is displayed with a green box around it to indicate a variable stat, even though this is the same on every
Raven Frost
ring.


2. Variable stats are displayed as constant

Variable stats are displayed as constant in some fields. I've only noticed it in the defense and dmg fields, but it's possible that it's happening in other fields.

One example that shows both of the issues in one item is the Monarch. The Defense stat and the Paladin
Smite
Dmg stat are both displayed the in the same way (with no green box), even though the Defense stat is variable, and the Paladin
Smite
Dmg is constant (it is a range of damage, but it's always the same range for that item).

I would expect the defense stat to be displayed as variable, and the Paladin
Smite
Dmg to remain as is.
7
User avatar

Necrarch 3374Moderator

Necromancer Europe PC
Hey, that's a known issue, as I think the code detects the string "a - b" as a range in any case, but I will let our admin answer more precisely. Not sure it's easy t fix, though it is indeed a bit annoying.

Image

Main: Necromancer / Second: Assassin / Third: Amazon / Check my stash tabs :)
7
OP
Necrarch wrote: 2 weeks ago
Hey, that's a known issue...
Hi! Do you know if there's already another thread for it? I couldn't find one, but I'm happy to move there if needed.
7
User avatar

Necrarch 3374Moderator

Necromancer Europe PC
Not that I remember, but don't worry, Teebs if he manages to fix will clean all corresponding entries :)

Image

Main: Necromancer / Second: Assassin / Third: Amazon / Check my stash tabs :)
7
Another thread related to the variable look, which includes a comment from Teebling: bug-reports/phoenix-item-desc-t1606654.html

My grail tracker is for offline SC. I also play offline HC and recently some occasional online SC NL.
7
OP
Is there an established way to help fix these kind of bugs (like with an open source project)? I'm a professional web developer and would be happy to take a look at the codebase to see if there's a viable fix.
7
User avatar

ShadowHeart 5252Moderator

Paladin Europe PC Playstation
@Teebling you have previously mentioned (in the other thread about Phoenix) that you're using a regex to match ranges.

Could you tell us what the regex is, and perhaps we can help suggest improvements?
You could incorporate zero-width lookbehind assertions to ensure the matched range is not fixed damage ranges. (they all follow the Pattern of "Adds X-Y [Damage Type] Damage")

For example, if you're using something like this: \w+-\w+ (just a guess based on the fact that Phoenix shield is highlighting the word "Level-up" as a range).
You could change it to something like this: (?<!Adds )(?<!\d)\d+(\.\d+)?-\d+(\.\d+)?
  • \d instead of \w to match only digits and not all word characters
  • \d+(\.\d+)? instead of just \d+ to support decimal values (like on Grief's +X% Damage To Demons, which is displayed incorrectly right now)
  • (?<!Adds ) (the first negative lookbehind) to ensure the range is not immediately preceded by "Adds ", which signals a fixed damage range
  • (?<!\d) (the second negative lookbehind) to ensure that the first negative lookbehind does not consume the first digit in the range (lookbehinds are greedy)
I have tested it against several items (Phoenix, Grief,
Astreon's Iron Ward
,
Raven Frost
and
Lightsabre
) and it appears to work correctly. There might be other cases I haven't thought of, of course.
Test result
This is how it would appear:

Phoenix:

4 socket Weapons

100% Chance To Cast level 40
Blaze
When You Level Up
40% Chance To Cast Level 22
Firestorm
On Striking
Level 10-15
Redemption
Aura When Equipped
+350-400% Enhanced Damage
Ignores Target's Defense
14% Mana Stolen Per Hit
-28% To Enemy Fire Resistance
20% Deadly Strike
+350-400 Defense Vs. Missile
+15-21 Fire Absorb

4 socket Shields

100% Chance To Cast level 40
Blaze
When You Level-up
40% Chance To Cast Level 22
Firestorm
On Striking
Level 10-15
Redemption
Aura When Equipped
+350-400 Defense Vs. Missile
+350-400% Enhanced Damage
-28% To Enemy Fire Resistance
+50 To Life
+5% To Maximum Lightning Resist
+10% To Maximum Fire Resist
+15-21 Fire Absorb

Grief:

35% Chance To Cast Level 15 Venom On Striking
+30-40% Increased Attack Speed
Damage +340-400
Ignore Target's Defense
-25% Target Defense
+(1.875 per character level) 1.875-185.625% Damage To Demons (Based on Character Level)
Adds 5-30 Fire Damage
-20-25% To Enemy Poison Resistance
20% Deadly Strike
Prevent Monster Heal
+2 To Mana After Each Kill
+10-15 Life After Each Kill

Astreon's Iron Ward
:

+240-290% Enhanced Damage
Damage +40-85
+50% Damage To Undead
Adds 80-240 Magic Damage
33% Chance of Crushing Blow
Slows Target By 25%
Damage Reduced By 4-7
+2-4 To Combat Skills (Paladin Only)
+10% Increased Attack Speed
150-200% Bonus To Attack Rating

Raven Frost
:

+150-250 To Attack Rating
Adds 15-45 Cold Damage, 4 sec. Duration
Cannot Be Frozen
+15-20 To Dexterity
+40 To Mana
Cold Absorb 20%

Lightsabre
:

+150-200% Enhanced Damage
Adds 10-30 Damage
Adds 60-120 Magic Damage
Adds 1-200 Lightning Damage
5-7% Mana Stolen Per Hit
5% Chance To Cast Level 14-20
Chain Lightning
On Attack
20% Increased Attack Speed
Ignore Target's Defense
Lightning Absorb 25%
+7 To Light Radius

I'm in CET (Central European Time), so that's UTC+1 normally and UTC+2 during DST.
My profile says Ladder, but I play both Ladder and Non-Ladder.
My profile says Softcore, but I play both Softcore and Hardcore.
My Holy Grail Tracker is for Offline Hardcore.
9

Advertisment

Hide ads
999

Greetings stranger!

You don't appear to be logged in...

99

Who is online

Users browsing Bug Reports: No registered users and 49 guests.

No matches
 

 

 

 

You haven't specified which diablo2.io user you completed this trade with. This means that you will not be able to exchange trust.

Are you sure you want to continue?

Yes, continue without username
No, I will specify a username
Choose which dclone tracking options you want to see in this widget:
Value:
Hide ads forever by supporting the site with a donation.

Greetings adblocker...

Warriv asks that you consider disabling your adblocker when using diablo2.io

Ad revenue helps keep the servers going and supports me, the site's creator :)

A one-time donation hides all ads, forever:
Make a donation