Welcome Guest ( Log In | Register )

291 Pages V « < 225 226 227 228 229 > »   
Reply to this topicStart new topic
> HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd)

 
post Jul 4 2017, 01:38
Post #4521
na-mi-da



Newcomer
*
Group: Members
Posts: 44
Joined: 19-June 14
Level 294 (Godslayer)


Has anyone made an updated mod that changes the hp bar of monsters with how much they have like in reloader? Or at least displays the number on the hp bar?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 02:12
Post #4522
Superlatanium



Dreaming of optimizing the system
**********
Group: Gold Star Club
Posts: 7,577
Joined: 27-November 13
Level 500 (Godslayer)


QUOTE(na-mi-da @ Jul 3 2017, 23:38) *
Has anyone made an updated mod that changes the hp bar of monsters with how much they have like in reloader? Or at least displays the number on the hp bar?
Scroll up, one is HV Battle Reloaded with resizeHPBars True
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 04:20
Post #4523
ThunderAlways



Casual Poster
****
Group: Gold Star Club
Posts: 463
Joined: 7-June 13
Level 443 (Godslayer)


QUOTE(sigo8 @ Jul 4 2017, 05:43) *

XHR isn't faster than Ajax, They're different parts of the same thing. Saying one is better than the other is nonsense, like say a sword is better than Kendo.


QUOTE
XMLHttpRequest in the raw browser object that jQuery wraps into a more usable and simplified form and cross browser consistent functionality.

from [stackoverflow.com] stackoverflow. And encapsulation always make code slower.

QUOTE(End Of All Hope @ Jul 4 2017, 02:28) *

In simple terms, the script lol posted, makes your round advance without reloading the page.
Nothing related to ajax being slower than xhr. Only an entire page reload (round change) replaced with ajax reload.
Stop.


His script still replace large amount of innerHTML text with innerHTML text, which I believe is a problem now. to transfer battle data, json is enough at all, and only data needs replacing in page. Currently hv use lots of innerHTML replacement to update battle state, I guess thy Tenboro does this is to reduce the change of the server.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 04:30
Post #4524
sigo8



Clover Sprite
********
Group: Gold Star Club
Posts: 3,450
Joined: 9-November 11
Level 500 (Ponyslayer)


QUOTE(atashiyuki @ Jul 3 2017, 20:20) *

from [stackoverflow.com] stackoverflow. And encapsulation always make code slower.

Neither the old reloader script nor 0.85 use jquery, both use the native XHR objects directly.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 04:38
Post #4525
ThunderAlways



Casual Poster
****
Group: Gold Star Club
Posts: 463
Joined: 7-June 13
Level 443 (Godslayer)


QUOTE(sigo8 @ Jul 4 2017, 10:30) *

Neither the old reloader script nor 0.85 use jquery, both use the native XHR objects directly.

Or maybe I used a strange version of reloader...
CODE

$('#LoadingText').show();
    function SubmitAction() {
    // Prevent a display glitch when using an item
    unsafeWindow.battle.toggle_default_pane();

    if (!semaphore) {
        semaphore = true;

        // Selectively replace elements on the screen
        $('#LoadingText').show();
        var loadStart = (new Date()).getTime();
        $.ajax({
                type: 'POST',
                url: '',
                data: $('#battleform > input').serialize()
            })
            .done(function(data) {.......
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 05:17
Post #4526
Muddybug



Casual Poster
****
Group: Gold Star Club
Posts: 463
Joined: 28-March 17
Level 498 (Godslayer)


Ok, so what's the trick to get Monsterbation to run on Firefox-like browsers?

thx in advance.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 06:45
Post #4527
friggo



~Snug as a bug in a rug~
*******
Group: Gold Star Club
Posts: 2,134
Joined: 9-October 14
Level 500 (Ponyslayer)


QUOTE(Superlatanium @ Jun 28 2017, 11:00) *

Attached File  Percentile_Ranges_1.2.1.user.js.txt ( 16.24k ) Number of downloads: 13830


This script now properly calculates forged values; the error is now on the order of 0.01-0.03 rather than up to 10%. Thanks to Scremaz for the data.


Possible bug: Cotton pieces with "Curse-weaver" and "Earth-walker" suffixes don't display values properly. Getting these messages:

QUOTE
no htmlname for Prof
no match for (item name)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 13:41
Post #4528
Usagi =



Veteran Poster
********
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
Level 453 (Dovahkiin)


QUOTE(atashiyuki @ Jul 4 2017, 10:20) *

His script still replace large amount of innerHTML text with innerHTML text, which I believe is a problem now. to transfer battle data, json is enough at all, and only data needs replacing in page. Currently hv use lots of innerHTML replacement to update battle state, I guess thy Tenboro does this is to reduce the change of the server.


I remember TenB mentioning that this is just the first pass and there will be further improvements to the way objects are replaced in the future. Maybe slimmer JSONs.

As for my script, from my testing I think it probably saves around 300ms per round due to not having to rebuilt the page and also completely eliminates flashing.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 14:53
Post #4529
hc br



Veteran Poster
********
Group: Catgirl Camarilla
Posts: 3,684
Joined: 18-October 15
Level 500 (Ponyslayer)


QUOTE(sickentide @ Jun 29 2017, 01:39) *

Attached File  HentaiverseMonsterbation.1.1.2.1.user.js.zip ( 8.59k ) Number of downloads: 240

features:
  • cooldowns
  • move player effect to above monsters
  • effect durations, including stacks
  • change background or quickbar colour according to alert conditions
  • hide battle log
  • skip end of round popup, unless you want to stop at battle end or on equipment drop
  • quickbar extender, including gem icon
  • bind actions to perform on monsters to mouse buttons and wheel
  • hoverplay, both for melee and spell rotation, with option to stop under conditions like spark, channelling etc.
  • key bindings
  • support for default and custom fonts
  • drop tracker
  • round/turn/speed counter
thanks to FiniteA, sigo8 and simrock87 for the parts of their code that i have used




[attachembed=105204]

Line 32

CODE
quickbarExtend = [ 1,'ikey_1','ikey_2','ikey_3','ikey_4','ikey_5','ikey_6','ikey_10','ikey_11','ikey_12','ikey_s1','ikey_s2','ikey_s3','ikey_s4','ikey_s5','ikey_n1' ],


This post has been edited by hc br: Jul 4 2017, 14:55
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 16:33
Post #4530
manga522



Azarashi Samurai
*****
Group: Gold Star Club
Posts: 517
Joined: 2-January 17
Level 411 (Godslayer)


QUOTE
// ==UserScript==
// @name HV - Ignore Flicker
// @namespace tatarime
// @description Ignore: effect expire
// @include https://hentaiverse.org/*
// @version 0.1
// ==/UserScript==

if (document.getElementById('togpane_log')) {
var css = document.createElement("style");
css.innerHTML = ".bte > img, .btm6 > img{opacity: 1!important}";
document.getElementsByTagName('head')[0].appendChild(css);
}



could some one code master fix this please ? no function with 0.85 (IMG:[invalid] style_emoticons/default/blush.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 17:25
Post #4531
simrock87



<('.'<) (>'.')> (^'.')>
*****
Group: Members
Posts: 647
Joined: 12-June 11
Level 399 (Godslayer)


QUOTE(LOL50015 @ Jul 4 2017, 11:41) *

As for my script, from my testing I think it probably saves around 300ms per round due to not having to rebuilt the page and also completely eliminates flashing.

Page render times were about 7-12ms for me when i checked during .84, you just notice the flicker as the bg color is white instead of beige, with beige as bg color the flicker isn't nearly as noticeable.
The downside of making rounds also use xhr is that you're pushing off garbage collection and if a script has some leaks they will then keep building. Even with the DOMContentLoaded you're throwing, there are some practical issues with scripts as they assume that they start from a blank state, so you possibly may get some multiple initializations.

(forgot to multi-quote ...)
Regarding the battle script:
Yes, they are minified/uglified and a pain to read, but the original usually is pretty readable it just gets cut down to save on resources (simply traffic and how long a socket is blocked during transfer, smaller files -> quicker transfer). If you're aware what some function is supposed to be doing it's still quite easy to decipher.

QUOTE
His script still replace large amount of innerHTML text with innerHTML text, which I believe is a problem now. to transfer battle data, json is enough at all, and only data needs replacing in page. Currently hv use lots of innerHTML replacement to update battle state, I guess thy Tenboro does this is to reduce the change of the server.

Also direct html makes the replacement easier and you need to do less js-fu to delete/(re)create/update elements. Also pretty sure the innerhtml replacement works in more browsers, or at least with less polyfills than something more advanced.
As a side-effect it makes bot-development a bit more annoying as you need to parse the html with all stuff already processed instead of just getting the raw data you'd want from a REST interface.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 17:39
Post #4532
Taylia



Newcomer
*
Group: Gold Star Club
Posts: 35
Joined: 8-March 16
Level 268 (Lord)


QUOTE(atashiyuki @ Jul 4 2017, 12:20) *

His script still replace large amount of innerHTML text with innerHTML text, which I believe is a problem now. to transfer battle data, json is enough at all, and only data needs replacing in page. Currently hv use lots of innerHTML replacement to update battle state, I guess thy Tenboro does this is to reduce the change of the server.


It's accepted wisdom that constructing* a string in javascript and replacing the innerHTML is faster than manipulating the DOM. I've certainly seen this in updating table rows and my expectation is if Tenboro sent the full state in JSON and then each of the text/hp bar nodes was individually updated with the information from the exchanged JSON, the resultant script would be significantly slower than the current bulk-replacement of the contents of the enclosing element and triggering a single re-render/re-flow/re-paint. There might be some savings to use an incremental JSON update on the quickbar and buffs, but the innerHTML replacement for the monsters is almost certainly faster.


*related note, apparently V8 now does "a" + "b" + ... + "z" faster than ["a", ..., "z"].join('') (IMG:[invalid] style_emoticons/default/blink.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 18:07
Post #4533
Sapo84



Deus lo vult
********
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09
Level 500 (Ponyslayer)


QUOTE(Taylia @ Jul 4 2017, 17:39) *

It's accepted wisdom that constructing* a string in javascript and replacing the innerHTML is faster than manipulating the DOM. I've certainly seen this in updating table rows and my expectation is if Tenboro sent the full state in JSON and then each of the text/hp bar nodes was individually updated with the information from the exchanged JSON, the resultant script would be significantly slower than the current bulk-replacement of the contents of the enclosing element and triggering a single re-render/re-flow/re-paint. There might be some savings to use an incremental JSON update on the quickbar and buffs, but the innerHTML replacement for the monsters is almost certainly faster.

It's also significantly slower to generate the HTML server-side vs just sending a JSON with the new raw data (and Tenboro is paying for the server resources).
It's also slower to transfer more data via HTTP (and even slower with HTTPS).
And how much would it take for a modern browser to update 60 DOM Elements (I don't think it will ever be more than ~60 elements to update)? 5ms with an old pc?
It makes no difference whatsoever unless one is playing on something like IE7 (not like HV works with IE7).

The only reason it's still setting the innerHTML is because it would have been more complicated to just move everything to raw data + DOM manipulation.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 18:35
Post #4534
Mahiro-kyun



Casual Poster
****
Group: Gold Star Club
Posts: 343
Joined: 8-May 12
Level 500 (Godslayer)


QUOTE(manga522 @ Jul 4 2017, 17:33) *

could some one code master fix this please ? no function with 0.85 (IMG:[invalid] style_emoticons/default/blush.gif)


This should work, I think.

CODE
// ==UserScript==
// @name HV - Ignore Flicker
// @namespace tatarime
// @description Ignore: effect expire
// @match *://*.hentaiverse.org/*
// @version 0.85
// ==/UserScript==

if (document.getElementById('pane_log')) {
    var css = document.createElement("style");
    css.innerHTML = ".btm6 > img, #pane_effects > img{opacity: 1!important}";
    document.head.appendChild(css);
}
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 4 2017, 19:01
Post #4535
manga522



Azarashi Samurai
*****
Group: Gold Star Club
Posts: 517
Joined: 2-January 17
Level 411 (Godslayer)


QUOTE(Mahiro-kyun @ Jul 4 2017, 18:35) *

This should work, I think.

CODE
// ==UserScript==
// @name HV - Ignore Flicker
// @namespace tatarime
// @description Ignore: effect expire
// @match *://*.hentaiverse.org/*
// @version 0.85
// ==/UserScript==

if (document.getElementById('pane_log')) {
    var css = document.createElement("style");
    css.innerHTML = ".btm6 > img, #pane_effects > img{opacity: 1!important}";
    document.head.appendChild(css);
}




great thanks very much (IMG:[invalid] style_emoticons/default/happy.gif) it's really help me out there if something i can do for you just call me (IMG:[invalid] style_emoticons/default/wink.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 5 2017, 01:30
Post #4536
Usagi =



Veteran Poster
********
Group: Gold Star Club
Posts: 2,923
Joined: 29-October 13
Level 453 (Dovahkiin)


QUOTE(simrock87 @ Jul 4 2017, 23:25) *

Page render times were about 7-12ms for me when i checked during .84, you just notice the flicker as the bg color is white instead of beige, with beige as bg color the flicker isn't nearly as noticeable.
The downside of making rounds also use xhr is that you're pushing off garbage collection and if a script has some leaks they will then keep building. Even with the DOMContentLoaded you're throwing, there are some practical issues with scripts as they assume that they start from a blank state, so you possibly may get some multiple initializations.


I used a ping script to calculate time between turns and while normally I get ~350ms, on loading a new round I get ~600ms.

Well, even reloader didn't work with all existing script right off the bat.

This post has been edited by LOL50015: Jul 5 2017, 01:31
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 5 2017, 01:46
Post #4537
Scremaz



A certain pervert. OT expert. Just dancing around in the game.
***********
Group: Gold Star Club
Posts: 24,304
Joined: 18-January 07
Level 500 (Ponyslayer)


QUOTE(LOL50015 @ Jul 5 2017, 01:30) *

Well, even reloader didn't work with all existing script right off the bat.

progress comes with mistakes.

btw, updates on the .85 hovering. involved/interested coders may want to check post #2 on that thread
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 5 2017, 08:14
Post #4538
ThunderAlways



Casual Poster
****
Group: Gold Star Club
Posts: 463
Joined: 7-June 13
Level 443 (Godslayer)


QUOTE(Taylia @ Jul 4 2017, 23:39) *

It's accepted wisdom that constructing* a string in javascript and replacing the innerHTML is faster than manipulating the DOM. I've certainly seen this in updating table rows and my expectation is if Tenboro sent the full state in JSON and then each of the text/hp bar nodes was individually updated with the information from the exchanged JSON, the resultant script would be significantly slower than the current bulk-replacement of the contents of the enclosing element and triggering a single re-render/re-flow/re-paint. There might be some savings to use an incremental JSON update on the quickbar and buffs, but the innerHTML replacement for the monsters is almost certainly faster.
*related note, apparently V8 now does "a" + "b" + ... + "z" faster than ["a", ..., "z"].join('') (IMG:[invalid] style_emoticons/default/blink.gif)


you are right but it's not what I'm talking about. for modifying tables, especially create large amount of new rows, directly modify innerHTML can be much faster. This may avoids lots of JS function calls, use more native ways to generate the elements and attach it to certain node.
but all the child elements was fully destroyed and regenerated in this way. this is not always a must, especially when the elements inside are heavy and does only small change. for monster pane, each turn only hp, mp, sp and buffs needs refreshing, I believe simply change the values should be much more faster than remove the elements, clean, parse the html text and construct those elements, add event listeners, finally attach them to document. Each moster's html text has about 1k bytes length, and 1K for effect pane, 4K for quick bar, 4K for vatals/skills. this is really not a must, at least skills and buffs's descriptions are not a must.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 5 2017, 13:44
Post #4539
sickentide



sexromancer
*******
Group: Catgirl Camarilla
Posts: 1,355
Joined: 31-August 10
Level 500 (Ponyslayer)


stopOnBuffsExpiring is back in, there is now a setting to change or disable individual alert colours, MonsterAction has been replaced with HoverAction which accomplishes the same while being more user-friendly, and it should be compatible with LOL50015's ajax round advance script Attached File  HentaiverseMonsterbation.1.1.3.user.js.zip ( 8.77k ) Number of downloads: 160


This post has been edited by sickentide: Jul 5 2017, 15:37
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Jul 5 2017, 14:48
Post #4540
adz



Casual Poster
***
Group: Members
Posts: 170
Joined: 19-June 15
Level 496 (Godslayer)


As of today, no scripts are working for me in battle for HV. I'm using Chrome with Tampermonkey. All Scripts meant for Bazaar, Forge etc. are still working fine.

The issue does not occur with Firefox.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


291 Pages V « < 225 226 227 228 229 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 30th January 2025 - 10:35