 |
 |
 |
HV Script Thread, Discuss your creations. Includes guidelines and infos for script creation (2020-02-28 upd) |
|
Feb 18 2017, 03:34
|
Sapo84
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09

|
Discussion moved from What's the last thing you've accomplished?. QUOTE(simrock87 @ Feb 18 2017, 01:54)  Agreed, though i myself posted this free form a couple of times already. But a full blown license is going to s*ck and be way overkill. Generally i'd try to stick to: 1. You may use or modify any part of the script. 2. If you use or modify any part of the script, give credit to the original authors. 3. You may create new versions of the script if you like. 4. If you have a fix or improvement and the author is still actively maintaining the script, please contact the author if this fix/improvement should be moved into the main version before posting your own version to keep down on clutter. 4.1 If the author does not respond within an acceptable time frame you may release your script. 4.2 If your script differs greatly in function, internals or intention from the original, consider posting it as a new script. 5. If you don't credit the original authors i/we will be angry with you and stop posting scripts. #3 & #4 would be to address the fix22 issue that developed off CC and me being otherwise engaged. #4.2 would be for the original HoverPlay to CC thing. CC did essentially the same as HoverPlay but got totally different internals. Could have posted this as v2 or v3 of HoverPlay but went with a new project name. #5 would be new (IMG:[ invalid] style_emoticons/default/heh.gif) I think we can't really come to any conclusion about licenses, everyone is entitled to have his own idea. Personally I would always stick with a [ choosealicense.com] MIT-like licenses because I don't really care what everyone else does with the work I do unpaid (and when I'm paid it's not my code so actually I don't care even in that case (IMG:[ invalid] style_emoticons/default/heh.gif)) QUOTE(simrock87 @ Feb 18 2017, 01:54)  1. Who is going to maintain this, it's a similar situation to the wiki. 1.1 If the maintainer "disappears" what happens to the repo? Endless forks every 2 months will get annoying over time.
You can create an organization in Github, all the members of the organization will have access to the organization's repository. QUOTE(simrock87 @ Feb 18 2017, 01:54)  2. This is just me, but i already have multiple GH accounts for different projects and i wouldn't like to accidentally push/PR/comment something for HV with the wrong account for professional reasons (IMG:[ invalid] style_emoticons/default/heh.gif) I hear your pain, I had to rebase the whole Reloader history because I used my main account. No real solution here apart from checking before pushing. QUOTE(simrock87 @ Feb 18 2017, 01:54)  Though in general testing is great, but for a hv combat log parser that's mainly checking if all classes are setup right, util parsers work alright and if string parsing and splitting works as intended ... so lots of string typing and repetition (already have 100+ lines just checking if all items, skills and spells are recognized and they all look like expect(Util.Spell.isSpellOffensive('Fiery Blast')).toBe(true);)
I honestly wouldn't have wrote tests for those. Also I would have wrapped that in a foreach over an array of spell names. This post has been edited by Sapo84: Feb 18 2017, 03:37
|
|
|
|
|
 |
|
Feb 18 2017, 15:03
|
simrock87
Group: Members
Posts: 647
Joined: 12-June 11

|
QUOTE(Sapo84 @ Feb 18 2017, 01:34)  I think we can't really come to any conclusion about licenses, everyone is entitled to have his own idea. Personally I would always stick with a [ choosealicense.com] MIT-like licenses because I don't really care what everyone else does with the work I do unpaid (and when I'm paid it's not my code so actually I don't care even in that case (IMG:[ invalid] style_emoticons/default/heh.gif)) Totally forgot about MIT, usually i have to put up with apache or gpl licenses (IMG:[ invalid] style_emoticons/default/heh.gif) MIT is actually fine, considering i wouldn't want to actually follow up on any license breaches. Though i've seen some "malicious" scripts, based on other scripts here, online for sale. QUOTE(Sapo84 @ Feb 18 2017, 01:34)  You can create an organization in Github, all the members of the organization will have access to the organization's repository. I hear your pain, I had to rebase the whole Reloader history because I used my main account. No real solution here apart from checking before pushing.
In essence: Don't F up (IMG:[ invalid] style_emoticons/default/laugh.gif) Didn't know you could use organizations on free/public plans? QUOTE(Sapo84 @ Feb 18 2017, 01:34)  I honestly wouldn't have wrote tests for those. Also I would have wrapped that in a foreach over an array of spell names.
Well, it's a finite set and when i actually put in the effort to do the testing stretch, might just cover it as well. Looping would have been an option, but i wouldn't have been able to resist just copy pasting, or referring for that part, the name array from inside the class (IMG:[ invalid] style_emoticons/default/heh.gif)
|
|
|
|
|
 |
|
Feb 18 2017, 15:27
|
Sapo84
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09

|
QUOTE(simrock87 @ Feb 18 2017, 14:03)  Though i've seen some "malicious" scripts, based on other scripts here, online for sale.
That sucks, but I'm not sure any license would help preventing that (and surely no one is gonna sue over a 100-500 lines script). Anyway, I like MIT because you don't need 5 minutes just to read it and understand what you can and cannot do, Apache pre-V2 are also quite good (fuck GPLv3, they also forced the Apache to go from a few lines to a two page monstruosity). QUOTE(simrock87 @ Feb 18 2017, 14:03)  In essence: Don't F up (IMG:[ invalid] style_emoticons/default/laugh.gif) If you F up and push you're actually F uping up two times imho. In the office I actually attached a print of the Boromir meme with "one does not simply push to upstream" (IMG:[ invalid] style_emoticons/default/heh.gif) QUOTE(simrock87 @ Feb 18 2017, 14:03)  Didn't know you could use organizations on free/public plans?
The only differences between free and paid plans are private repositories, as long as everything is public you get everything for free. This post has been edited by Sapo84: Feb 18 2017, 15:33
|
|
|
|
|
 |
|
Feb 19 2017, 11:39
|
KitsuneAbby
Group: Catgirl Camarilla
Posts: 7,572
Joined: 12-July 14

|
Am I the only one who finds out that all scripts are broken right now? Reloader was down, Cracklingcast was down and Track drop in battle was down during this morning's RE. But they were working fine when I tried the first arena.
I don't see anythng abnormal in Reloader's regex? /^https?:\/\/(alt|www)?\.?hentaiverse\.org.*$/
But I can clearly see what's wrong with Cracklingcast and Track Drop: http://*.hentaiverse.org/?s=Battle* http://*.hentaiverse.org/*
|
|
|
|
Feb 20 2017, 23:56
|
Maharid
Group: Catgirl Camarilla
Posts: 2,428
Joined: 27-April 10

|
Hi, someone know if a script to fast toggle Font Engine Setting on and off exist?
Fundamentally i'm searching something that let me switch between the Default Hentaiverse Font (that i mainly use) and the Custom Font i chose without havong to go on the Setting page, click and apply every time.
|
|
|
|
Feb 21 2017, 00:11
|
Cleavs
Group: Gold Star Club
Posts: 24,322
Joined: 18-January 07

|
not that i know. but allow me to ask you: is there a specific reason to want to keep HV default font?
|
|
|
|
Feb 21 2017, 00:15
|
Maharid
Group: Catgirl Camarilla
Posts: 2,428
Joined: 27-April 10

|
I have some visual problems and find the Default Font easyer to see, expecially if i stay on for long time for Arenas, IW or Grindfeast.
At this point can i ask if there is a downloadable version of the Default Font so i can install it and make scripts use it with the Font Engine Setting?
|
|
|
|
Feb 21 2017, 00:35
|
lazyNPC
Group: Gold Star Club
Posts: 3,346
Joined: 8-June 12

|
QUOTE(Maharid @ Feb 20 2017, 23:15)  At this point can i ask if there is a downloadable version of the Default Font so i can install it and make scripts use it with the Font Engine Setting?
Unfortunately it doesn't exist. You can try using this font i use plus Resize user bars text script to fix overflow in hp/mp/sp bars, it's pretty big: font-family: Copperplate Gothic Light font-size: 9 font-weight: bold vertical adjust: -2
|
|
|
|
|
 |
|
Feb 21 2017, 00:52
|
Cleavs
Group: Gold Star Club
Posts: 24,322
Joined: 18-January 07

|
QUOTE(Maharid @ Feb 20 2017, 23:15)  I have some visual problems and find the Default Font easyer to see, expecially if i stay on for long time for Arenas, IW or Grindfeast.
At this point can i ask if there is a downloadable version of the Default Font so i can install it and make scripts use it with the Font Engine Setting?
i aks because there are fonts similar to that (don't remember which one though), but that particular one is made by jpgs. replacing it with a custom font should help load time
|
|
|
|
Feb 21 2017, 01:00
|
Maharid
Group: Catgirl Camarilla
Posts: 2,428
Joined: 27-April 10

|
Resize User Bar is good but for the font i will keep Verdana and switching with Default.
Thanks.
|
|
|
|
Feb 21 2017, 01:19
|
bensalenkkari
Group: Catgirl Camarilla
Posts: 937
Joined: 30-January 17

|
Is there a script that lists the tokens, artifacts, etc found during arena/fest at the end? I tried items detection and some other script, but neither seemed to work.
|
|
|
|
Feb 21 2017, 01:25
|
Superlatanium
Group: Gold Star Club
Posts: 7,663
Joined: 27-November 13

|
QUOTE(bensalenkkari @ Feb 20 2017, 23:19)  Is there a script that lists the tokens, artifacts, etc found during arena/fest at the end? I tried items detection and some other script, but neither seemed to work. You can use Income Summary for a list of everything (items only, not equips), it's an extremely powerful tool, but it's not meant to look that pretty (and is more for looking at results over multiple battle series than single battles). I think there was something by sssss2 that did what you're describing but I'm pretty sure he deleted it.
|
|
|
|
|
 |
|
Feb 21 2017, 01:34
|
lazyNPC
Group: Gold Star Club
Posts: 3,346
Joined: 8-June 12

|
QUOTE(bensalenkkari @ Feb 21 2017, 00:19)  Is there a script that lists the tokens, artifacts, etc found during arena/fest at the end? I tried items detection and some other script, but neither seemed to work.
You could use Track Drop in Battle by NerfThis or my mod of his (you can find the link in my signature). Or Superlatanium Income Summary.
|
|
|
|
|
 |
|
Feb 21 2017, 01:46
|
bensalenkkari
Group: Catgirl Camarilla
Posts: 937
Joined: 30-January 17

|
QUOTE(Superlatanium @ Feb 21 2017, 01:25)  You can use Income Summary for a list of everything (items only, not equips), it's an extremely powerful tool, but it's not meant to look that pretty (and is more for looking at results over multiple battle series than single battles).
I think there was something by sssss2 that did what you're describing but I'm pretty sure he deleted it.
Income Summary is (at least in my opinion) more of a long term tracker, and I mainly want to see the yields from single battle series. QUOTE(gianfrix94 @ Feb 21 2017, 01:34)  You could use Track Drop in Battle by NerfThis or my mod of his (you can find the link in my signature). Or Superlatanium Income Summary.
Your mod of Track Drop is exactly what I was looking for (actually it's got even better than what I tried to get working at first, tracking more stuff). Thanks for pointing it out!
|
|
|
|
|
 |
|
Feb 21 2017, 04:02
|
simrock87
Group: Members
Posts: 647
Joined: 12-June 11

|
Question before i go to bed.
I want to pass data between different user-scripts for often used data retrievals like monster status and buffs and so on. Reloader currently does send some status information outward through CustomEvents, but those have no data and little logic in this case.
The use-case i'm imagining is: 1. Approx 10 scripts are running, the order in which they execute is not determinable. Add 1 script for data retrieval and communication. 2. Let's assume the following for the execution order 2.1 5 scripts get executed before the data retrieval and are able to attach event handlers to listen for data. 2.2 The retrieval script reads the data and fires its event with data object attached. 2.3 The remaining 5 scripts execute for the first time after the dispatch of 2.2 and attach their handlers afterwards. 3. After a Reloader_reloaded the data retrieval script does its thing again, the other 10 scripts may depend on the data fetched through the retrieval bit and all scripts may run in any random order.
Addendum: - Each of the 10 scripts has a uniform way to map the passed object back onto a class. - This is with a 90% likelyhood going to be very hacky in any way.
Questions: #1 Which scripts are able to receive the data on the first run? #2 If only half the scripts actually catch the event what would be a good way to retrigger an emission? Keeping in mind part of the scripts may have already done their job. #3 Nesting different event handlers seems like a sure fire way to create total chaos and interdependence on data and execution conditions seems ... unwise.
Thoughts: #1 I've thought of using Promises, but that does not seem to fit the bill (only resolve once as well as the lib overhead, also Promises + Events seems to be a very very bad idea from my research) #2 Also just had a very bad idea about abusing web workers, but that has its own challenges for user scripts and shared access (including third party DOM parsing and so on).
|
|
|
|
|
 |
|
Feb 21 2017, 10:35
|
Sapo84
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09

|
Can't you just use localstorage for passing data around? The other scripts can react to storage event (and if multiple data is written they can react only to the keys they are interested in) and on the first run they can just check if there is data available (in case they missed the event).
|
|
|
|
|
 |
|
Feb 21 2017, 11:59
|
trikon000
Group: Gold Star Club
Posts: 1,127
Joined: 17-August 07

|
QUOTE(Sapo84 @ Feb 21 2017, 03:35)  Can't you just use localstorage for passing data around? The other scripts can react to storage event (and if multiple data is written they can react only to the keys they are interested in) and on the first run they can just check if there is data available (in case they missed the event).
You will eventually will run across a coder with good intentions and terrible coding skills who will wipe out all that data through an untimely erase function ment for a small block of data.
|
|
|
|
|
 |
|
Feb 21 2017, 18:39
|
Sapo84
Group: Gold Star Club
Posts: 3,332
Joined: 14-June 09

|
QUOTE(trikon000 @ Feb 21 2017, 10:59)  You will eventually will run across a coder with good intentions and terrible coding skills who will wipe out all that data through an untimely erase function ment for a small block of data.
From what I understood the idea is having one source of data (like vanilla reloader is for reloaded events) and other script using that instead of subscribing/parsing/whatever themselves. In that case there would be no need to clear anything. And if the skills of the coder are subpar it can break all the other scripts regardless, so I don't think using localstorage instead of events would be that more dangerous.
|
|
|
|
|
 |
|
Feb 21 2017, 19:00
|
simrock87
Group: Members
Posts: 647
Joined: 12-June 11

|
QUOTE(Sapo84 @ Feb 21 2017, 16:39)  From what I understood the idea is having one source of data (like vanilla reloader is for reloaded events) and other script using that instead of subscribing/parsing/whatever themselves. In that case there would be no need to clear anything. And if the skills of the coder are subpar it can break all the other scripts regardless, so I don't think using localstorage instead of events would be that more dangerous.
Pretty much this. Got the idea off the issue bp raised on coding standards. My thought was creating some sort of lib that does all the heavy parsing stuff that we have in every script in different ways and then offer it to other scripts as long as they implement a specific standard (read: copy/paste some code). The obvious advantage would be that for patches or changes only one script would have to be changed as long as nothing groundbreakingly new appears (like moving away from auras in 1950 (IMG:[ invalid] style_emoticons/default/wink.gif)). The less obvious advantage would be to move the heavy DOM parsing parts out of most scripts, run this only once, and actually have a clearer logic in those. Downside, obviously is one more base-script.
|
|
|
|
|
 |
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
 |
 |
 |
|