|
|
|
HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd) |
|
Jan 1 2018, 20:44
|
Maharid
Group: Catgirl Camarilla
Posts: 2,369
Joined: 27-April 10
|
Two things about New Equipment ranges. 1) If i select another range type, like Legendary for a Magnificent, i cannot click again to change the ranges again, i have to reload the tab. It will be better if we can click any time we want. 2) Look at that equipment: https://hentaiverse.org/equip/149353162/7366b27acdIf you chose another Range Type you get "Results finished" and the script won't show the values, you have to refresh and the item is stuck showing the Mag Ranges.
|
|
|
|
|
|
Jan 2 2018, 00:04
|
Superlatanium
Group: Gold Star Club
Posts: 7,573
Joined: 27-November 13
|
QUOTE(Cryosite @ Jan 1 2018, 05:50) Bug: Yep, oops. For some reason I got it into my head that localStorage.HVLevel was something set by HV rather than by another script, and was using that. I'll change it so that if the user is not level 500, it'll ping the base domain every week and update with the current level. QUOTE(Maharid @ Jan 1 2018, 18:44) 1) If i select another range type, like Legendary for a Magnificent, i cannot click again to change the ranges again, i have to reload the tab. It will be better if we can click any time we want. Yep. That was a problem. I forgot to re-display the menu after the new results came back. QUOTE(Maharid @ Jan 1 2018, 18:44) If you chose another Range Type you get "Results finished" and the script won't show the values, you have to refresh and the item is stuck showing the Mag Ranges. I think whatever issue this was was tied with (1), I never saw the problem but it seems to be working for me. [attachmentid=112848]
|
|
|
|
|
|
Jan 2 2018, 01:10
|
ShigureKaiII
Newcomer
Group: Gold Star Club
Posts: 74
Joined: 10-February 11
|
QUOTE(Superlatanium @ Jan 1 2018, 17:04) Yep, oops. For some reason I got it into my head that localStorage.HVLevel was something set by HV rather than by another script, and was using that. I'll change it so that if the user is not level 500, it'll ping the base domain every week and update with the current level. Yep. That was a problem. I forgot to re-display the menu after the new results came back. I think whatever issue this was was tied with (1), I never saw the problem but it seems to be working for me. [attachmentid=112848]
Thanks for your great script! But if I enable HV highlight equipment I cannot see any range. Once the highlight script is disabled everything is fine. Any solutions? (IMG:[ invalid] style_emoticons/default/unsure.gif) This post has been edited by frozen0416: Jan 2 2018, 01:11
|
|
|
|
|
|
Jan 2 2018, 01:14
|
Superlatanium
Group: Gold Star Club
Posts: 7,573
Joined: 27-November 13
|
QUOTE(frozen0416 @ Jan 1 2018, 23:10) But if I enable HV highlight equipment Link?
|
|
|
Jan 2 2018, 01:49
|
lazyNPC
Group: Gold Star Club
Posts: 3,346
Joined: 8-June 12
|
QUOTE(Superlatanium @ Jan 1 2018, 23:04) ...
Super, is it possible to send ranges to your server to update them? For an example, i got these Legendary Amber Power Gauntlets of Slaughter that have ADB < 0% by your script, and i'd like to send ranges over to your server to fix the data.
|
|
|
|
|
|
Jan 2 2018, 01:54
|
Superlatanium
Group: Gold Star Club
Posts: 7,573
Joined: 27-November 13
|
If it's unforged and un-IWd: QUOTE(Superlatanium @ Dec 30 2017, 08:36) If you see any stats that look like they're being parsed accurately but the current saved range is too narrow (equip stat < database min, or equip stat > database max), and the equip is unforged and un-IWd, send it to Jenga's database by clicking the "Display Style" line, and then by clicking the "Send Range" button. Unfortunately, yours is a bit IWd, so Jenga's server won't be able to parse it, nor will its info be added to the wiki. I'll add its stats to my manual database instead, though that's only a partial solution. Refresh your browser's database. This post has been edited by Superlatanium: Jan 2 2018, 01:57
|
|
|
|
|
|
Jan 2 2018, 02:33
|
lazyNPC
Group: Gold Star Club
Posts: 3,346
Joined: 8-June 12
|
QUOTE(Superlatanium @ Jan 2 2018, 00:54) If it's unforged and un-IWd: Unfortunately, yours is a bit IWd, so Jenga's server won't be able to parse it, nor will its info be added to the wiki. I'll add its stats to my manual database instead, though that's only a partial solution. Refresh your browser's database.
Oh right, i always forget the un-IWd part (IMG:[ invalid] style_emoticons/default/heh.gif) Btw, Super, since Percentages are shown at the bottom of the page anyway, wouldn't it be less redundant to put the unforged base stats instead of the percentages again as the normal base display style? This post has been edited by gianfrix94: Jan 2 2018, 04:15
|
|
|
|
|
|
|
|
|
Jan 2 2018, 04:09
|
Superlatanium
Group: Gold Star Club
Posts: 7,573
Joined: 27-November 13
|
That's, uh, quite some script... (IMG:[ invalid] style_emoticons/default/dry.gif) (anyone else who knows JS, just open it up and you'll see what I mean) QUOTE(frozen0416 @ Jan 2 2018, 01:46) document.body.innerHTML= html; QUOTE(frozen0416 @ Jan 1 2018, 23:10) No, not something I want to try to get compatible with, sorry QUOTE(gianfrix94 @ Jan 2 2018, 00:33) Btw, Super, since Percentages are shown at the bottom of the page anyway, wouldn't it be less redundant to put the unforged base stats instead of the percentages again as the normal base display style? The idea was that when looking at an equip, people can see the stats for everything quickly, the way they're used to up top, and that if they want a summary of the stats (for them to paste into a shop, for example), they can copy and paste the string on the bottom. I thought this would be the preferred default display style, but if others think differently, please say so. This post has been edited by Superlatanium: Jan 2 2018, 04:14
|
|
|
|
|
|
Jan 2 2018, 04:24
|
Ass Spanker
Group: Gold Star Club
Posts: 4,118
Joined: 25-July 12
|
QUOTE(Superlatanium @ Jan 2 2018, 10:09) That's, uh, quite some script... (IMG:[ invalid] style_emoticons/default/dry.gif) (anyone else who knows JS, just open it up and you'll see what I mean) Could be that I'm stupid but what do you mean?
|
|
|
|
|
|
Jan 2 2018, 04:29
|
lazyNPC
Group: Gold Star Club
Posts: 3,346
Joined: 8-June 12
|
QUOTE(Superlatanium @ Jan 2 2018, 03:09) That's, uh, quite some script... (IMG:[ invalid] style_emoticons/default/dry.gif) (anyone else who knows JS, just open it up and you'll see what I mean) No, not something I want to try to get compatible with, sorry QUOTE(as013 @ Jan 2 2018, 03:24) Could be that I'm stupid but what do you mean?
It's a clusterfuck, and those variable names... i think i saw them in those CS graduates memes. QUOTE(Superlatanium @ Jan 2 2018, 03:09) The idea was that when looking at an equip, people can see the stats for everything quickly, the way they're used to up top, and that if they want a summary of the stats (for them to paste into a shop, for example), they can copy and paste the string on the bottom. I thought this would be the preferred default display style, but if others think differently, please say so.
I do understand what you mean. Btw, is it possible to have a button that does this like in Eq. Comparison? Knowing where a Leg stands compared to a Mag at a glance is something i find useful. This post has been edited by gianfrix94: Jan 2 2018, 04:37
|
|
|
|
|
|
Jan 2 2018, 04:44
|
Ass Spanker
Group: Gold Star Club
Posts: 4,118
Joined: 25-July 12
|
QUOTE(gianfrix94 @ Jan 2 2018, 10:29) It's a clusterfuck, and those variable names... i think i saw them in those CS graduates memes.
The structure looks ok enough for me. Quite clean in my opinion. The var names though.
|
|
|
|
|
|
Jan 2 2018, 04:47
|
ShigureKaiII
Newcomer
Group: Gold Star Club
Posts: 74
Joined: 10-February 11
|
QUOTE(Superlatanium @ Jan 1 2018, 21:09) That's, uh, quite some script... (IMG:[ invalid] style_emoticons/default/dry.gif) (anyone else who knows JS, just open it up and you'll see what I mean) No, not something I want to try to get compatible with, sorry The idea was that when looking at an equip, people can see the stats for everything quickly, the way they're used to up top, and that if they want a summary of the stats (for them to paste into a shop, for example), they can copy and paste the string on the bottom. I thought this would be the preferred default display style, but if others think differently, please say so. That's fine. I only need to see some valuable equipment so I will disable highlight when I need percentile. (IMG:[ invalid] style_emoticons/default/biggrin.gif)
|
|
|
|
|
|
Jan 2 2018, 05:11
|
Superlatanium
Group: Gold Star Club
Posts: 7,573
Joined: 27-November 13
|
QUOTE(as013 @ Jan 2 2018, 02:24) Could be that I'm stupid but what do you mean? You want me to? A lot of it is style rather than functional, but just in order that I see... - binary operators should be separated with a space
- inconsistent use of semicolons (either use them everywhere or don't use them, keeping in mind ASI)
- never assign to .innerHTML unless you want to break all references anything has to anything inside the element. "document.body.innerHTML = .." breaks them all. This is the primary reason why trying to get anything non-static (like range displays) to work would be quite a pain
- there's no camelCase or even underscores (harder to read)
- inconsistent indentation ("which block is this statement in? without actually reading all the control statements around, we can't tell")
- window.location.href is more reliable than document.location.href
- "new Array()" << "[]" is much more preferable, don't call the array constructor (more readable too)
- "lklist = lklist.concat(str)" << concat is used to merge arrays to each other, use .push() to add single elements
- even better, don't mutate if you can avoid it, just define the array all at once
- "for(i=0;i<lklist.length;i++)... code involving lklist[\i]" << forEach is better because it provides abstraction (for example, easier to deal with a variable named "urlPath" referring to a URL path than with "lklist[\i]" referring to a URL path)
- implicit creation of global variables, like "temp=i;", is not a good thing
- the big switch statement centers around "temp", an integer from 0 to 12, but that variable has no meaning in itself; much clearer for each test above a block to directly state what it's testing for. "Temp == 3"? What does that mean? (self-documenting code is much better than code that requires comments with every condition)
- tons of duplicate code in the switch statements and below, there's so much I can't list it all. (eg. often, instead of "case 10: [lines of code] break; case 11 [identical lines of code] break;", do "case 10: case 11: [lines of code] break")
- And so on.
Some of this would be solved just by running it through a good linter. One might say that it doesn't matter as long as the code works, but it's better not to get into bad habits. Readability should be a significant concern - even if you don't want anyone else to read it, you're still going to have to read it, especially if you come across a bug much later and don't remember exactly how you wrote it. Sorry if this is sounding elitist, but I have a decent amount of experience with this sort of thing and don't like seeing people fall into easily avoidable traps. I don't write perfect code either (no one does), but I try to follow best practices as far as I know them. QUOTE(gianfrix94 @ Jan 2 2018, 02:29) Knowing where a Leg stands compared to a Mag at a glance is something i find useful. ? This post has been edited by Superlatanium: Jan 2 2018, 05:45
|
|
|
|
|
|
Jan 3 2018, 05:40
|
Maharid
Group: Catgirl Camarilla
Posts: 2,369
Joined: 27-April 10
|
Now the new Percentile Range Script work good, it also show a mesage that say what rarity is used for the displayed value, it's pretty fun: Legnedary Magnificent Legnedary Magnificent Legnedary Magnificent Legnedary Magnificent LegenBREK! LOL. (IMG:[ invalid] style_emoticons/default/duck.gif) I'm impossible, i know. (IMG:[ invalid] style_emoticons/default/biggrin.gif) This post has been edited by Maharid: Jan 3 2018, 05:41
|
|
|
Jan 4 2018, 03:25
|
lazyNPC
Group: Gold Star Club
Posts: 3,346
Joined: 8-June 12
|
QUOTE(Superlatanium @ Jan 2 2018, 04:11) ?
I meant a screen that shows where an Equip stands in both Mag and Leg Range at once, but it's not really important (IMG:[ invalid] style_emoticons/default/heh.gif)
|
|
|
|
|
|
Jan 4 2018, 08:04
|
Cryosite
Group: Members
Posts: 553
Joined: 29-August 17
|
Feature idea: After looking at gianfrix94's mockup, getting the idea of showing multiple values near each stat-label, and also thinking over the current "Display style: Forged Scaled To Level X" display, I thought of a potentially complicated, but possibly very useful display style.
Selecting it via hotkey would, like "Display style: Forged Scaled To Level X" produce an input dialogue window. The user would paste the equip link url of another piece of gear into it. Preferably the same general type (same equip slot at least). Some input validation might be needed to idiot-proof it sufficiently.
The display would then show what kind of increase or decrease [this] equipment is compared to the secondary piece of equipment. This could get complicated if the user wants to change to different display styles while keeping the comparison link. Maybe a checkbox could be used to maintain the link, and changing display styles with it unchecked breaks the link.
Another potential hazard is comparing, for example, armor with two different elemental mitigation prefixes. How to display that might be troublesome. Especially since the end result would always be a -100% of the current element, and +100% of the new element (or whatever % each piece of gear actually has). I could see this getting really messy when comparing things like staves or shade armor of the Arcanist with leather.
An obvious use for this would be to compare currently equipped gear with upgrade candidates. Another might be to compare potential purchases side by side more readily.
|
|
|
|
|
|
Jan 4 2018, 09:32
|
Superlatanium
Group: Gold Star Club
Posts: 7,573
Joined: 27-November 13
|
QUOTE(gianfrix94 @ Jan 2 2018, 02:29) attachembed=112855 I don't think there's quite enough space for me to do something like that, especially for equips that happen to be forged, IWd, and enchanted. If it were done, it would have to be in a completely separate section, like an appended table. An appended table also feels like a better place for showing stat comparisons against other gears.
|
|
|
|
|
|
Jan 4 2018, 12:40
|
Superlatanium
Group: Gold Star Club
Posts: 7,573
Joined: 27-November 13
|
This isn't directly HV related, but on FF 56.0.2, Dev tools LocalStorage sometimes does not show any of the LS items a domain has. Completely uninstalling/reinstalling FF and making a new profile solved it for a couple days, but the problem came back. Has anyone seen this before or know if there's a fix, other than hoping that it works on Quantum?
(upgrading to Quantum isn't an option for me because userscripts aren't saved in .user.js files on the hard drive any more)
|
|
|
5 User(s) are reading this topic (5 Guests and 0 Anonymous Users)
0 Members:
|
|
|
|
|