Roukys / HHauto

GNU General Public License v3.0
45 stars 44 forks source link

Need tests for Beta Version #16

Closed Roukys closed 3 years ago

Roukys commented 3 years ago

Hello all,

I would need some tests before commiting the new version :)

Installation https://github.com/Roukys/HHauto/raw/beta/HHAuto.user.js

Modifications : https://github.com/Roukys/HHauto/milestone/1

Script will automatically go back to main release 5.1.0 when it will be published (depending of your setting in Tampermonkey or other)

OldRon1977 commented 3 years ago

I will test the script tomorrow...

What should be tested? Specific parts or everything?

Knatan commented 3 years ago

The new salary checker for the card owners is absolutely based. Especially now that it takes so freaking long to load the harem page these days.

Roukys commented 3 years ago

@OldRon1977 : mainly it is powerplaces, salary and league rank :)

On my side it is running since yesterday without issues

OldRon1977 commented 3 years ago

I am still testing the new version. There is one bug I found sofar.

I set the specific order at the AutoPowerPlaces Index Filter to "2;3;1" to see, if the script behaves correctly. First, the script fetches the rewards in order 1;2;3 - no problem here, fetching rewards is always good ;) A few minutes later the script started the PoP via AutoAssign in order 1;2;3... so here it the specific order has not been taken. I will run a second try in 7h ;)

Roukys commented 3 years ago

@OldRon1977 you're right I kept the loop counting and filtering but did not only use the filter. In fact it behave like champions, only a filter of champions to battle not a specific order.

would it be useful to do it in a certain order ?

OldRon1977 commented 3 years ago

Ah, ok....

I think a specific order will be useful if you don't have so many girls, because you might not have enough to fill the roster. So I would like to fill those rosters up first, where I don't have the girl so that I don't lose the chance to get points...

Roukys commented 3 years ago

@OldRon1977 didn't see it like that. shouldn't be hard, let me look at that

Roukys commented 3 years ago

@OldRon1977 : ok checked on powerplaces. I've enforced following of the filter but only for the check order : https://github.com/Roukys/HHauto/raw/beta/HHAuto.user.js v5.1-beta.1

However it won't force the order by waiting for prior PlaceOfPower to be launched.

example filter : 1;3;2 example situation : 1 ongoing, 3 finished, 2 ongoing.

Do we want 3 to wait for 1 to end, 1 to be launched then launch 3 ? -> then I need to find a way ... (honestly I don't see the use there)

Or you can simply deactivate powerplace for enough time for all of them to be ready, then activate it again. In this case they will be activated in order :) => currently what I've implemented in v5.1-beta.1

OldRon1977 commented 3 years ago

This might be relevant, if you want to start a new PoP (e.g. Hardcore needed) and have a PoP running (also Hardcore). So you might want to shift your girls to the new task... But, if this is too complicated to be implemented, I would simply let it go... so a specific order yes; waiting for a task to finish no

If someone really needs to shift, he would simply wait until all PoP are finished and the start the script again...

Roukys commented 3 years ago

yes I would leave it like that, forcing could have unwanted action. Any case I think that if your priority is pop1 and can't start because you don't have enough girl, then as soon as another PoP will stop, the order will be followed, thus pop1 will be started first.

So I'd say it does the trick.

Edit: I can't test it, enough girls on prod for all powerplaces and not enough for 1 in test ...

Knatan commented 3 years ago

I used version 5.1-beta.0 Today on the test server the Atuoleague feature went bananas and kept perpetually locking the tab in reloads. Every other userscripts were disabled. I enabled only the master switch, the Per tabs Setting, the info box, and the AutoLeague. Settings shown in the screenshot. Untitled

Here are the console logs. I first opened the log, the reloaded the tab, then enabled the Autoleage option in the script and let the script go bananas for a few minutes, then I clicked on the upper left corner link which escapes the reload hell, and then I quickly disabled the Autoleage, and the I saved the log. Messages Log: messages_test.hentaiheroes.com-1603899237085.log User Messages: user_messsages_test.hentaiheroes.com-1603899264644.log Errors: (file was empty, couldn't upload to github) Warnings: (Either I forgot to save it, or it was empty) Info: info_test.hentaiheroes.com-1603899297186.log Verbose; verbose_test.hentaiheroes.com-1603899309251.log

I hope that helps. Thanks again for developing these cool features!!

Roukys commented 3 years ago

@Knatan : it arrived to me this morning on test though I had to restart my browser, even stopping tampermonkey did not help. As soon as I was going back manually to League it was the same reload issue.

Same thing on your side ?

Knatan commented 3 years ago

Ah, I didn't try to disable Tampermonkey. But apparently everything works now. Same script version. Really weird, perhaps the game developers are just experimenting, heh.

OldRon1977 commented 3 years ago

I tested the actual beta (5.1-beta.1) again :)

I set the order at PoP to 3;2;1 The script did an auto-assign in the order 1;3;2

It looks like, the script prefers the first PoP over the others ;)

Roukys commented 3 years ago

@OldRon1977 I'll let end my powerplaces to try again and see what is to be corrected.

Roukys commented 3 years ago

@OldRon1977 found it... forgot to commit my changes, but I will still have to wait for my powerplaces to end to test it. https://github.com/Roukys/HHauto/raw/beta/HHAuto.user.js 5.1-beta.2

Seems better :) Capture d’écran 2020-10-29 à 15 46 27 Capture d’écran 2020-10-29 à 15 49 22

Roukys commented 3 years ago

@Knatan for you :)

https://github.com/Roukys/HHauto/raw/beta/HHAuto.user.js 5.1-beta.3 Implements calculatePower for battle Seasons and League

OldRon1977 commented 3 years ago

@Roukys: I can't see the Calc for Battle Season / League... where do I find that?

Roukys commented 3 years ago

Normally first column : Capture d’écran 2020-10-29 à 19 57 27

OldRon1977 commented 3 years ago

Duh... face-to-desk Thanks!

It works... same results as the original script, now we must do something with that info ;)

Roukys commented 3 years ago

For seasons already done, for league more difficult because data for opponent is loaded on click. I need to find a workaround if possible without it costing too much time

OldRon1977 commented 3 years ago

Hi Roukys,

the script still does ignore the order I set for auto-assign at PoP. I tried the latest beta and set the order to 3;2;1 and a 2nd time to 2;3;1. For the first and second run, the script took the order 1;3;2... Hmmm... not sure why it did this both times...

Regards

Roukys commented 3 years ago

Strange order indeed ... I'll check on that

Roukys commented 3 years ago

Tried again and it worked. : Capture d’écran 2020-10-30 à 13 56 12 Capture d’écran 2020-10-30 à 13 56 34

Roukys commented 3 years ago

Hello,

could not resist but I think will be last addition in 5.1.0 👍 Proud to announce that now league can select opponent based on calculate power ( can be enabled in menu ) 5.1-beta.4 : https://github.com/Roukys/HHauto/raw/beta/HHAuto.user.js

First parsing of opponent will take a few minutes, parsing expires after 10 min to still get updates on opponents :)

OldRon1977 commented 3 years ago

Thanks, Roukys...

I will try and watch the script, but I am at D3 right now and I want to drop back to D2, so I won't do much fighting during this League ;)

Regards

Roukys commented 3 years ago

I'm doing the reverse, I dropped down to S3 and need to go back to D1 :)

v5.1-beta.6 corrected a calculatePower issue for league https://github.com/Roukys/HHauto/raw/beta/HHAuto.user.js

OldRon1977 commented 3 years ago

As soon as I start the Leagues Feature the script is stuck in an auto-loop. First I thought it does a calc for all opponents to simulate their power, so it can select the opponent with the best score, but the loop is now running for more than 5 minutes. How can I help with this bug?

Roukys commented 3 years ago

@OldRon1977 it is looping with powerCalculation or without it ? Else open chrome devtool and just past the console as a start with a screnshot of your parameters. I'm using it without issue but maybe it is a cumulation of parameters

Roukys commented 3 years ago

I've seen reload issue with league in HH discussion. does it do the same with the autoLeague disabled ?

Roukys commented 3 years ago

Hello @Knatan @OldRon1977 I will push this in main version tomorrow evening, seems ok for you guys ?

OldRon1977 commented 3 years ago

I am still testing... I found some rare behavior that could be eliminated with a restart of my browser. Maybe the updates did something funny at the cache or so ;) I would like to give it a full run a soon as my points are filled up again. So by tomorrow, I should be finished with testing :)

Roukys commented 3 years ago

Ok thanks lets see if we have result tomorrow, or I'll wait a little.

I've got it running for a moment on my side.

I've seen leagues issue on prod. And on test quest is broken so less test for me on test environnement ...

OldRon1977 commented 3 years ago

I never used AutoQuest... I want to read the story by myself ;)

What issues have you found otherwise, anything I might test?

Roukys commented 3 years ago

I'm using autoquest in test to have enough level to test other things.

No specifics, so far running without issue for me

OldRon1977 commented 3 years ago

There is one bug, that I found. If I activate the option "UsePowerCalc" the script opens the Leagues site but does nothing. Also waiting for 5min does nothing. As soon as I deactivate the option, the script runs fine. I also tested with different settings for "MaxRank" and if there are Kisses or not.

I'm not sure if the script tries to collect data for the PowerCalc or if the new option to show the values at the Season is broken since when I open up the Opponents tab at the Season it shows NaN instead of values to me. Maybe the bug is here ;)

image

Roukys commented 3 years ago

Hello @OldRon1977,

would you have the console log ?

I've tried just now : Capture d’écran 2020-11-03 à 10 28 08

OldRon1977 commented 3 years ago

You posted how to get the log under Chrome... how can I get the log with Microsoft Edge? :)

Roukys commented 3 years ago

I think it is F12 then Console :)

OldRon1977 commented 3 years ago

Ok.... understood :) Which Information are you looking for... should I post everything?

OldRon1977 commented 3 years ago

Sofar I found:

Detected Harem Screen. Fetching Salary VM3849 userscript.html:619 Collected Data: (24) [79, 386726921, 403278708, 4439873, 831126711, 119, 109, 5052484, 24, 363410486, 231765083, 36, 811703858, 1403357, 998260995, 622421497, 356909834, 267784162, 101214651, 145, 652320197, 237064517, 54950499, 641076049] (24) [button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money, button.collect_money] VM3849 userscript.html:3037 autoLoop Disabled VM3849 userscript.html:3174 no event VM3849 userscript.html:619 Collected Data: (24) [79, 386726921, 403278708, 4439873, 831126711, 119, 109, 5052484, 24, 363410486, 231765083, 36, 811703858, 1403357, 998260995, 622421497, 356909834, 267784162, 101214651, 145, 652320197, 237064517, 54950499, 641076049] [] VM3849 userscript.html:1877 nextSalaryTime set to 18569:12:23:35 (17:55) VM3849 userscript.html:3019 Restoring page https://www.hentaiheroes.com/home.html VM3865 userscript.html:1877 eventGoing set to 18576:13:00:02 (07:00:54:20) VM3865 userscript.html:3122 (20) ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"] VM3865 userscript.html:3123 (3) [3, 6, 5] VM3865 userscript.html:3133 ET: 3 VM3886 userscript.html:3174 no event VM3886 userscript.html:2932 Time to fight in Season. VM3886 userscript.html:1356 Performing auto Season. VM3886 userscript.html:1480 Switching to Season screen. VM3886 userscript.html:81 going leaderboard->season VM3886 userscript.html:191 GotoPage : /season.html VM3886 userscript.html:3037 autoLoop Disabled VM3905 userscript.html:3174 no event VM3905 userscript.html:2932 Time to fight in Season. VM3905 userscript.html:1356 Performing auto Season. VM3905 userscript.html:1361 On season page. VM3905 userscript.html:1372 Remaining kisses : 1 VM3905 userscript.html:1375 Switching to Season-arena screen. VM3905 userscript.html:81 going season->season-arena VM3905 userscript.html:191 GotoPage : /season-arena.html VM3905 userscript.html:3037 autoLoop Disabled VM3926 userscript.html:3174 no event VM3926 userscript.html:2932 Time to fight in Season. VM3926 userscript.html:1356 Performing auto Season. VM3926 userscript.html:1384 On season arena page. VM3926 userscript.html:1452 Evilsmurf:NaN VM3926 userscript.html:1452 nicknick49:NaN VM3926 userscript.html:1452 Attila:NaN VM3926 userscript.html:1464 Going to crush : Evilsmurf VM3946 userscript.html:3174 no event VM3946 userscript.html:3019 Restoring page https://www.hentaiheroes.com/tower-of-fame.html userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:3174 no event userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:3174 no event

See the bold entries, here the script shows NaN.

So the script does not calc the values for the three oponents.

The VM3946 userscript.html:3174 no event --> refers into the script at lines 3103 to 3176

Roukys commented 3 years ago

thanks @OldRon1977 I do fear it is linked to edge, and should work with Chrome...

I think on Edge it is not able to capture the datas on opponents => therefore no calculations ...

Lets try to find if we can do something.

But with differences on browser, I fear I will only be able to maintain script only on chrome ...

Could you remove // from line 2698, save, reload page and go to Season, find opponents Paste me the console then and lets see...

OldRon1977 commented 3 years ago

I will try as suggested :)

The funny thing is, that Edge is build on Chromium, so it should be the same as on Chrome...

I will see if the fix will work :)

Roukys commented 3 years ago

yes strange lets see what kind of data it gets or not you should 3 things like this : Capture d’écran 2020-11-03 à 14 04 29

OldRon1977 commented 3 years ago

Same with Chrome...

image

OldRon1977 commented 3 years ago

I cleaned the cache and other browser data, re-installed tampermonkey, and the script and de-activated all other scripts and extensions running...

So this is my current log: VM89:3 ???no Hero??? userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:1877 eventGoing set to 18576:13:00:03 (06:21:25:56) userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:3125 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:3126 3,6,5 userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:3136 ET: 3 userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:3177 no event userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:3177 no event userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:3177 no event

with this settings: image

Roukys commented 3 years ago

and if you go to season screen it does bring logs like the one I've shared ?

OldRon1977 commented 3 years ago

Nope... :/

image

OldRon1977 commented 3 years ago

Duh... I forgot to remove the "//" at line 2689...

Now I get:

VM4859 default.js:1 [Verstoß] Avoid using document.write(). style_write @ VM4859 default.js:1 run @ VM4859 default.js:1 (anonym) @ VM4859 default.js:1 jquery.min.js:3 [Verstoß] 'DOMContentLoaded' handler took 231ms VM4867 userscript.html:3177 no event VM4867 userscript.html:3177 no event default.js?v=60430888:1 [Verstoß] Avoid using document.write(). style_write @ default.js?v=60430888:1 run @ default.js?v=60430888:1 (anonym) @ default.js?v=60430888:1 jquery.min.js:3 [Verstoß] 'DOMContentLoaded' handler took 267ms userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:3177 no event userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:2700 371682 14735 62089 "class3" {class: "3", rarity: "legendary", Name: "Any", caracs: {…}, position_img: "suspendedcongress.png", …} {class: "3", rarity: "legendary", Name: "Valentina", caracs: {…}, position_img: "splittingbamboo.png", …} {class: "3", rarity: "legendary", Name: "Keiko", caracs: {…}, position_img: "indian.png", …} 279300 "ĒscaRossĀ" NaN NaN NaN "class3" {caracs: {…}, position_img: "suspendedcongress.png", class: "3", rarity: "legendary", Name: "Any"} {caracs: {…}, position_img: "bridge.png", class: "3", rarity: "legendary", Name: "Harmonia"} {caracs: {…}, position_img: "splittingbamboo.png", class: "3", rarity: "legendary", Name: "Nero"} 172256 userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:2700 371682 14735 62089 "class3" {class: "3", rarity: "legendary", Name: "Any", caracs: {…}, position_img: "suspendedcongress.png", …} {class: "3", rarity: "legendary", Name: "Valentina", caracs: {…}, position_img: "splittingbamboo.png", …} {class: "3", rarity: "legendary", Name: "Keiko", caracs: {…}, position_img: "indian.png", …} 279300 "Dan" NaN NaN NaN "class3" {caracs: {…}, position_img: "indian.png", class: "3", rarity: "legendary", Name: "Keiko"} {caracs: {…}, position_img: "splittingbamboo.png", class: "3", rarity: "legendary", Name: "Valentina"} {caracs: {…}, position_img: "indian.png", class: "3", rarity: "legendary", Name: "Sady"} 204400 userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:2700 371682 14735 62089 "class3" {class: "3", rarity: "legendary", Name: "Any", caracs: {…}, position_img: "suspendedcongress.png", …} {class: "3", rarity: "legendary", Name: "Valentina", caracs: {…}, position_img: "splittingbamboo.png", …} {class: "3", rarity: "legendary", Name: "Keiko", caracs: {…}, position_img: "indian.png", …} 279300 "Dar" NaN NaN NaN "class3" {caracs: {…}, position_img: "sodomy.png", class: "1", rarity: "legendary", Name: "Silver Lupa"} {caracs: {…}, position_img: "splittingbamboo.png", class: "3", rarity: "legendary", Name: "Norou"} {caracs: {…}, position_img: "missionary.png", class: "1", rarity: "epic", Name: "Quinn"} 224476 [Verstoß] 'setTimeout' handler took 63ms userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=3ed94163-9cc6-4f85-b1ef-9ec781e2bd6f:3177 no event

Here a screenshot: image

Same with Chrome: image

Current Script version is 5.1-beta.7

Roukys commented 3 years ago

Ok the 6 NaN do show that the script can't get ego def and damage of your opponents.

found the reason : on french version thousands are separated by space, on english by a comma.

I'll provide a fix on that and update it here :)