Welcome Guest ( Log In | Register )

4 Pages V < 1 2 3 4 >  
Reply to this topicStart new topic
> [Script] HentaiVerse Monster Database (Back online!) & UserScript v1.2.0 (2022.03.20), M-M-M-MONSTER DATABASE!

 
post Oct 8 2021, 02:14
Post #41
Nezu



Rat
********
Group: Catgirl Camarilla
Posts: 3,932
Joined: 29-January 12
Level 500 (Ponyslayer)


QUOTE(dragontamer8740 @ Oct 8 2021, 01:02) *

Is there a way that I can submit my own monsters to the database from the monster lab? I would think that would be a useful feature.


No, the monster ID is not visible from the lab.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Oct 8 2021, 02:51
Post #42
Moonlight Rambler



Let's dance.
*********
Group: Gold Star Club
Posts: 6,418
Joined: 22-August 12
Level 372 (Dovahkiin)


QUOTE(Nezu @ Oct 7 2021, 20:14) *
No, the monster ID is not visible from the lab.
Oh, right. Never mind.
QUOTE(OnceForAll @ Apr 11 2021, 22:55) *
[*] hv-monsterdb.es5.user.js: Compatible with old browsers as well.
CODE
Timestamp: 07/10/2021, 20:18:24 GMT-4
Error: (void 0) is undefined
Source File: chrome://greasemonkey-modules/content/sandbox.js -> file:///path/to/profile/gm_scripts/HentaiVerse_Monster_Database_UserScript/gm4-polyfill.es5.min.js
Line: 1
I am using Greasemonkey 3.x in Seamonkey, which uses approximately the Firefox 60 codebase with some things backported from up to 78.

By the way, GM4 polyfills should work fine; the script you are grabbing from NPM appears to be broken. I have [github.com] this polyfill in some of my user scripts and it runs fine.
Dropping [greasemonkey.github.io] https://greasemonkey.github.io/gm4-polyfill/gm4-polyfill.js in the 'require' field fixes everything; please consider switching to that.
Also the sources for [unpkg.com] https://unpkg.com/browse/gm4-polyfill@1.0.1/gm4-polyfill.js don't match the min.js version.

After changing that, we have one more (larger) issue:
CODE
Timestamp: 07/10/2021, 20:51:49 GMT-4
Error: $ is not a function
Source File: chrome://greasemonkey-modules/content/sandbox.js -> file:///path/to/profile/gm_scripts/HentaiVerse_Monster_Database_UserScript/hv-monsterdb.es5.user.js
Line: 115
Looking in the user script, I see that you are setting '$ = _export' without first defining _export (it is defined later on in the script).

So, as of right now, it does not actually work on anything older than FF with GM4. In other words, it does not work with pale moon, waterfox classic, or Seamonkey.

If this is something from TypeScript, then Microsoft has an obvious and relatively large bug in its widely-used scripts (a use-before-declaration bug). If it's not from them, though, please fix it.
I tried shuffling some definitions around, but they go deep. And there are so many bug reports open on the typescript github that I have no idea where to start. And it's not exactly easy to search for a function named '$' in the bug tracker.

Anyway, looks like in TSLint you may want to use 'no-use-before-declare.'

This is a side question, because I've not tried writing typescript myself: what exactly is the benefit of pulling typescript into this particular user script instead of using plain JS? I've been considering using it for something of my own, but am always hesitant when I can technically get away with rolling my own and avoiding the extra stuff I am not using. I also have trust issues with Microsoft.

This post has been edited by dragontamer8740: Oct 8 2021, 03:11
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Oct 8 2021, 05:32
Post #43
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,624
Joined: 3-January 21
Level 500 (Ponyslayer)


QUOTE(dragontamer8740 @ Oct 8 2021, 08:51) *

CODE
Timestamp: 07/10/2021, 20:18:24 GMT-4
Error: (void 0) is undefined
Source File: chrome://greasemonkey-modules/content/sandbox.js -> file:///path/to/profile/gm_scripts/HentaiVerse_Monster_Database_UserScript/gm4-polyfill.es5.min.js
Line: 1
I am using Greasemonkey 3.x in Seamonkey, which uses approximately the Firefox 60 codebase with some things backported from up to 78.

By the way, GM4 polyfills should work fine; the script you are grabbing from NPM appears to be broken. I have [github.com] this polyfill in some of my user scripts and it runs fine.
Dropping [greasemonkey.github.io] https://greasemonkey.github.io/gm4-polyfill/gm4-polyfill.js in the 'require' field fixes everything; please consider switching to that.
Also the sources for [unpkg.com] https://unpkg.com/browse/gm4-polyfill@1.0.1/gm4-polyfill.js don't match the min.js version.


Oh, I see why the polyfill goes wrong. In the early days browsers (without strict mode and ES6) let undefined references the global namespace, but the modern browsers doesn't. That's why the polyfill throws an Error on Firefox 60.

QUOTE(dragontamer8740 @ Oct 8 2021, 08:51) *

After changing that, we have one more (larger) issue:
CODE
Timestamp: 07/10/2021, 20:51:49 GMT-4
Error: $ is not a function
Source File: chrome://greasemonkey-modules/content/sandbox.js -> file:///path/to/profile/gm_scripts/HentaiVerse_Monster_Database_UserScript/hv-monsterdb.es5.user.js
Line: 115
Looking in the user script, I see that you are setting '$ = _export' without first defining _export (it is defined later on in the script).


The transforming is done by the babel and rollup, not by the typescript. Also, babel (more specifically, core-js) uses "var" to declare the "_export" which will hoist to the top-level anyway. But since it throws an error, I will look into it later.

QUOTE(dragontamer8740 @ Oct 8 2021, 08:51) *

This is a side question because I've not tried writing typescript myself: what exactly is the benefit of pulling typescript into this particular user script instead of using plain JS? I've been considering using it for something of my own, but am always hesitant when I can technically get away with rolling my own and avoiding the extra stuff I am not using. I also have trust issues with Microsoft.


Most importantly, typescript provides static type checking which could eliminate "type mismatches" bugs during coding. And with typescript, the IDE can have a much more powerful auto-completion and suggestions. Typescript also enables faster references and definition searching for some IDE. If I am about to write something in more than 100 lines, I will always use typescript instead of javascript.

Also, typescript introduces "interface", "generic", "abstract class", "enum", "protected field" along with many other concepts into javascript (which is especially useful if you are familiar with Java or .NET).

This post has been edited by OnceForAll: Oct 8 2021, 05:34
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Oct 13 2021, 19:01
Post #44
Moonlight Rambler



Let's dance.
*********
Group: Gold Star Club
Posts: 6,418
Joined: 22-August 12
Level 372 (Dovahkiin)


QUOTE(OnceForAll @ Oct 7 2021, 23:32) *
Oh, I see why the polyfill goes wrong. In the early days browsers (without strict mode and ES6) let undefined references the global namespace, but the modern browsers doesn't. That's why the polyfill throws an Error on Firefox 60.
Okay. So are you going to switch to the non-min.js version that works in ES5 (I was running the ES5 script)?
[unpkg.com] https://unpkg.com/gm4-polyfill@1.0.1/gm4-polyfill.js
QUOTE(OnceForAll @ Oct 7 2021, 23:32) *
The transforming is done by the babel and rollup, not by the typescript. Also, babel (more specifically, core-js) uses "var" to declare the "_export" which will hoist to the top-level anyway. But since it throws an error, I will look into it later.
Please do so, when you can. I assumed it was TS because it appears shortly under something saying "the following was inserted by typescript."
QUOTE(OnceForAll @ Oct 7 2021, 23:32) *
Most importantly, typescript provides static type checking which could eliminate "type mismatches" bugs during coding. And with typescript, the IDE can have a much more powerful auto-completion and suggestions. Typescript also enables faster references and definition searching for some IDE. If I am about to write something in more than 100 lines, I will always use typescript instead of javascript.
Ah, interesting. I don't really use an IDE (well, to the extent that emacs is an IDE I do), but type checking would be nice. One of the more annoying things about JS is how everything's floating point and I have to remember to use Math.floor() constantly for integer stuff.
QUOTE(OnceForAll @ Oct 7 2021, 23:32) *
Also, typescript introduces "interface", "generic", "abstract class", "enum", "protected field" along with many other concepts into javascript (which is especially useful if you are familiar with Java or .NET).
Ah, I am familiar with and somewhat dislike Java/.NET, partially because of some of those features (Once implemented, they're okay, but they're really annoying to initially implement under the hood). Thanks for the explanation.
I can understand how when dealing with large amounts of code it can become handy though.

This post has been edited by dragontamer8740: Oct 13 2021, 19:08
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Oct 13 2021, 21:49
Post #45
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,624
Joined: 3-January 21
Level 500 (Ponyslayer)


QUOTE(dragontamer8740 @ Oct 14 2021, 01:01) *

Okay. So are you going to switch to the non-min.js version that works in ES5 (I was running the ES5 script)?


No. I write my own GM4 polyfill instead: [github.com] https://github.com/SukkaW/hv-monsterdb-user...a32c8527c62623d

QUOTE(dragontamer8740 @ Oct 14 2021, 01:01) *
Please do so, when you can.


Pale Moon just stop supporting macOS months ago (they even shut down the community-maintained version, and ban those developers' accounts from their community), so I can't check it any sooner. But I will look into it when I have time to set up a virtual machine.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 5 2021, 12:22
Post #46
mathl33t



Active Poster
*******
Group: Gold Star Club
Posts: 1,077
Joined: 9-April 19
Level 500 (Ponyslayer)


I'm playing dwd in isekai, and schoolgirls are occasionally getting highlighted.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 5 2021, 14:21
Post #47
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,624
Joined: 3-January 21
Level 500 (Ponyslayer)


QUOTE(mathl33t @ Nov 5 2021, 18:22) *

I'm playing dwd in isekai, and schoolgirls are occasionally getting highlighted.


Actually, it is kinda intended behavior. Those SG were scanned before my userscript add support for Isekai reset detection so they need to be rescanned once. And I haven't scanned monsters in the Isekai for a while and my guess is other users haven't as well.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 13 2021, 06:49
Post #48
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,624
Joined: 3-January 21
Level 500 (Ponyslayer)


QUOTE(dragontamer8740 @ Oct 8 2021, 08:51) *

CODE
Timestamp: 07/10/2021, 20:51:49 GMT-4
Error: $ is not a function
Source File: chrome://greasemonkey-modules/content/sandbox.js -> file:///path/to/profile/gm_scripts/HentaiVerse_Monster_Database_UserScript/hv-monsterdb.es5.user.js
Line: 115
Looking in the user script, I see that you are setting '$ = _export' without first defining _export (it is defined later on in the script).

So, as of right now, it does not actually work on anything older than FF with GM4. In other words, it does not work with pale moon, waterfox classic, or Seamonkey.

If this is something from TypeScript, then Microsoft has an obvious and relatively large bug in its widely-used scripts (a use-before-declaration bug). If it's not from them, though, please fix it.
I tried shuffling some definitions around, but they go deep. And there are so many bug reports open on the typescript github that I have no idea where to start. And it's not exactly easy to search for a function named '$' in the bug tracker.

Anyway, looks like in TSLint you may want to use 'no-use-before-declare.'


QUOTE(dragontamer8740 @ Oct 14 2021, 01:01) *

Please do so, when you can.


I have implemented a fix for the issue and tested it on Pale Moon 29 and SeaMonkey, with their GreaseMonkey. The change will be included in the next version.

This post has been edited by OnceForAll: Nov 14 2021, 00:47
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 25 2021, 17:29
Post #49
Ransotengai



Casual Poster
***
Group: Members
Posts: 213
Joined: 24-February 19
Level 372 (Dovahkiin)


Hi there, I just added the script to tampermonkey and it says here

QUOTE(OnceForAll @ Apr 12 2021, 04:55) *

Then install the script to your UserScript Manager.

There is nothing else you need to do! The script will handle everything for you![list]






But nothing actually happens, is it because
QUOTE(OnceForAll @ Apr 12 2021, 04:55) *


*The script will update the local database from the server once a day, typically at the Dawn of a New Day and out of the battle.
*During the battle, the script will automatically show monster information on the page. All information comes from the local database, with no network requests to the database server involved.




And my local database is not updated yet? and can I do that manually? or must I wait till next Dawn of a New Day?


or do I need to change some settings in HV or in monesterbation?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 25 2021, 18:32
Post #50
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,624
Joined: 3-January 21
Level 500 (Ponyslayer)


QUOTE(Ransotengai @ Nov 25 2021, 23:29) *

Hi there, I just added the script to tampermonkey and it says here
But nothing actually happens ...
And my local database is not updated yet? and can I do that manually? or must I wait till next Dawn of a New Day?


The update checks the date of the last time you update the local database and compares it with today's date. If they are different, the script will download the database from the server to update your local one.

So if it is your first time installing the script, the "last update" value will be null, so the script should automatically download the data from the server unless you are in the middle of the Battle. The script will never download the data during the battle to prevent the performance impact.

You can set the "debug" to true, check the output inside your browser's console to see if there are any errors.

You can also perform an update manually. Set the "debug" option to true, and execute the following command in your browser's console:

CODE
HVMonsterDB.forceUpdateLocalDatabase()


This post has been edited by OnceForAll: Nov 25 2021, 19:52
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 25 2021, 19:23
Post #51
Ransotengai



Casual Poster
***
Group: Members
Posts: 213
Joined: 24-February 19
Level 372 (Dovahkiin)


after I eet the "debug" option to true and started a battle, the console reads like this

Attached Image

which are the two monsters appearing in that round, but no data appeared next to 'em ar anywhere I can see.

p.s. I disabled these two options in console settings

*javascript source maps
*CSS source maps

Sooooo, advice please.

Edit: I kinda found this (invisible unless I hover over it), and I can move it around, but it shows no data at all

Attached Image

This post has been edited by Ransotengai: Nov 26 2021, 21:25
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 27 2021, 20:44
Post #52
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,624
Joined: 3-January 21
Level 500 (Ponyslayer)


QUOTE(Ransotengai @ Nov 26 2021, 01:23) *

after I eet the "debug" option to true and started a battle, the console reads like this

Attached Image

which are the two monsters appearing in that round, but no data appeared next to 'em ar anywhere I can see.

p.s. I disabled these two options in console settings

*javascript source maps
*CSS source maps

Sooooo, advice please.

Edit: I kinda found this (invisible unless I hover over it), and I can move it around, but it shows no data at all

Attached Image


That's kinda strange. It means that the script is working properly, and can find monsters (and their id) in the battle, but no data to be shown since there is no data stored in the local.

Just check the console when you are out of the battle:

1. Out of the battle
2. Open the console
3. Refresh the page, wait a moment to see if anything logged in the console
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 27 2021, 23:16
Post #53
Ransotengai



Casual Poster
***
Group: Members
Posts: 213
Joined: 24-February 19
Level 372 (Dovahkiin)


QUOTE(OnceForAll @ Nov 27 2021, 20:44) *

That's kinda strange. It means that the script is working properly, and can find monsters (and their id) in the battle, but no data to be shown since there is no data stored in the local.

Just check the console when you are out of the battle:

1. Out of the battle
2. Open the console
3. Refresh the page, wait a moment to see if anything logged in the console


gives me this baby

Attached Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 27 2021, 23:37
Post #54
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,624
Joined: 3-January 21
Level 500 (Ponyslayer)


QUOTE(Ransotengai @ Nov 28 2021, 05:16) *

gives me this baby

Attached Image


Ouch! (IMG:[invalid] style_emoticons/default/blink.gif)

It seems like even if the download failed, the date still gets updated.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 27 2021, 23:46
Post #55
Ransotengai



Casual Poster
***
Group: Members
Posts: 213
Joined: 24-February 19
Level 372 (Dovahkiin)


QUOTE(OnceForAll @ Nov 27 2021, 23:37) *

Ouch! (IMG:[invalid] style_emoticons/default/blink.gif)

It seems like even if the download failed, the date still gets updated.


so, advice (IMG:[invalid] style_emoticons/default/smile.gif) (IMG:[invalid] style_emoticons/default/smile.gif) ....... pleeeeease

This post has been edited by Ransotengai: Nov 27 2021, 23:47
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 27 2021, 23:59
Post #56
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,624
Joined: 3-January 21
Level 500 (Ponyslayer)


QUOTE(Ransotengai @ Nov 28 2021, 05:46) *

so, advice (IMG:[invalid] style_emoticons/default/smile.gif) (IMG:[invalid] style_emoticons/default/smile.gif) ....... pleeeeease


Well, there will be another dawn soon, when the database will get updated.

You can also try execute the following code in your console:
CODE
HVMonsterDB.forceUpdateLocalDatabase();


Which will try to download and update your local database immediately.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Nov 28 2021, 00:25
Post #57
Ransotengai



Casual Poster
***
Group: Members
Posts: 213
Joined: 24-February 19
Level 372 (Dovahkiin)


QUOTE(OnceForAll @ Nov 27 2021, 23:59) *

Well, there will be another dawn soon, when the database will get updated.

You can also try execute the following code in your console:
CODE
HVMonsterDB.forceUpdateLocalDatabase();


Which will try to download and update your local database immediately.


And so shall it be, in the mean time, I get this during battle

Attached Image

Doesn't that mean the database is updated and has the monsters I face, just doesn't want to share.

Edit: Just found that if I change "showMonsterInfoBox" from "true" to "false", this box Attached Image changes size (gets smaller).

This post has been edited by Ransotengai: Nov 28 2021, 00:39
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 2 2022, 22:05
Post #58
hgbdd



Godslayer Angelic Belldandy (On vacations)
**********
Group: Gold Star Club
Posts: 8,365
Joined: 8-December 08
Level 500 (Ponyslayer)


There's something wrong with the server?

I't getting the pop up message:
"There is something wrong when trying to update the local database from the server"

User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 4 2022, 22:52
Post #59
forgottendropzone



/o_o\
******
Group: Catgirl Camarilla
Posts: 764
Joined: 31-January 18
Level 500 (Ponyslayer)


QUOTE(hgbdd @ Mar 2 2022, 12:05) *

There's something wrong with the server?

I't getting the pop up message:
"There is something wrong when trying to update the local database from the server"


Definitely been getting that problem too the past few days. Anyone getting it too?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 9 2022, 17:01
Post #60
OnceForAll



Fluffy Tail Fox
*******
Group: Catgirl Camarilla
Posts: 1,624
Joined: 3-January 21
Level 500 (Ponyslayer)


QUOTE(hgbdd @ Mar 3 2022, 04:05) *
There's something wrong with the server?

I't getting the pop up message:
"There is something wrong when trying to update the local database from the server"

QUOTE(forgottendropzone @ Mar 5 2022, 04:52) *
Definitely been getting that problem too the past few days. Anyone getting it too?


The database server is currently down. And I am still looking for an alternative.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


4 Pages V < 1 2 3 4 >
Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 15th April 2025 - 13:05