Enquirer Home Page | Twitter | Back to Improbable Island

 Forum Index > Off-Topic > Out-of-Game New Topic Post Reply
 A Greasemonkey Script: Truancy Meter
 |  Printable Version
tehdave
 Wednesday, November 17 2010 @ 04:47 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 12/17/09
Posts: 429

Quote by: Devin

Quote by: tehdave

Is there a way to transfer data between two computers? So I can track it back and forth from work and home?



I wish there was, I have a similar issue. All the GM data is stored with other browser settings in prefs.js (A.K.A. about:config), so if you find a good way to synchronize that, this'll go along with it, but I haven't come across any really good solutions.



Another downside is multiple characters doesn't work...unless you install the script twice (once for www.improbableisland.com/* and again for improbableisland.com/*) and use either one all the time for the given character. Otherwise the script saves the same quest info across the board.


Isn't sanity just a one-trick pony anyway? All you get is one trick: rational thinking. But when you're good and crazy, oooh, oooh, the sky's the limit.
 
Profile Email
Quote
Devin
 Wednesday, November 17 2010 @ 05:20 PM UTC  
Forum Contestant
Contestant

Status: offline

Registered: 06/17/10
Posts: 30

Quote by: tehdave

Another downside is multiple characters doesn't work...unless you install the script twice (once for www.improbableisland.com/* and again for improbableisland.com/*) and use either one all the time for the given character. Otherwise the script saves the same quest info across the board.



That, I should be able to fix. At the very least, I can teach the script to store different values for www. and not (and any other subdomain you @include it on).


 
Profile Email
Quote
Anonymous: blob
 Wednesday, November 17 2010 @ 07:12 PM UTC  


or you can use opera and firefox at the same time, one for each character.


 
Quote
Matthew
 Thursday, November 18 2010 @ 03:11 AM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 08/26/10
Posts: 578

Just so you guys know, Chrome now supports Greasemonkey scripts natively. Tested and it works fine.


 
Profile Email
Quote
tehdave
 Thursday, November 18 2010 @ 05:38 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 12/17/09
Posts: 429

Quote by: blob

or you can use opera and firefox at the same time, one for each character.



what if I'm RPing 6 characters at once? I need all 3 of my browsers to run them all!

(Note: this is not recommended for sanity's sake...)


Isn't sanity just a one-trick pony anyway? All you get is one trick: rational thinking. But when you're good and crazy, oooh, oooh, the sky's the limit.
 
Profile Email
Quote
Tahvohck
 Thursday, November 18 2010 @ 07:40 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 10/15/10
Posts: 65

Quote by: tehdave

Quote by: blob

or you can use opera and firefox at the same time, one for each character.



what if I'm RPing 6 characters at once? I need all 3 of my browsers to run them all!

(Note: this is not recommended for sanity's sake...)



Dave, I'm pretty sure that would cause badnav problems, no matter how you look at it.

As for separating characters, add a piece into the code that gives you a greasmonkey user script command to change the current character, and save the monster variables, etc. as whatever.charactername.variable. Note: I know this can be done, I don't know the specific code for it. Sorry.


 
Profile Email
Quote
tehdave
 Thursday, November 18 2010 @ 08:11 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 12/17/09
Posts: 429

Quote by: Tahvohck

Quote by: tehdave

Quote by: blob

or you can use opera and firefox at the same time, one for each character.


what if I'm RPing 6 characters at once? I need all 3 of my browsers to run them all!
(Note: this is not recommended for sanity's sake...)


Dave, I'm pretty sure that would cause badnav problems, no matter how you look at it.



Not true. www.improbableisland.com and improbableisland.com are different sessions. that means you can log in on two different characters in the same browser. (but not more)

In other news, I like the idea of a separate saved variable file per character. Is there a way to automate that at all?


Isn't sanity just a one-trick pony anyway? All you get is one trick: rational thinking. But when you're good and crazy, oooh, oooh, the sky's the limit.
 
Profile Email
Quote
Tahvohck
 Thursday, November 18 2010 @ 08:55 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 10/15/10
Posts: 65

Quote by: tehdave

Not true. www.improbableisland.com and improbableisland.com are different sessions. that means you can log in on two different characters in the same browser. (but not more)

In other news, I like the idea of a separate saved variable file per character. Is there a way to automate that at all?
[/p]


Ohh, that's good to know.

And I can't think of a way to automate it, as there doesn't appear to be anywhere that an unchanging but character-specific code/line of text/thingie is on any of the pages, unless we can convince CMJ to add the character's name to the "Vital info" table. Like I said before, though, you could add a dropdown menu to change characters, or a script command to the same effect.

Oh, and you wouldn't have to install the script twice. Just install it for *improbableisland.com/* and it will automatically work for both.


 
Profile Email
Quote
tehdave
 Thursday, November 18 2010 @ 09:25 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 12/17/09
Posts: 429

Quote by: Tahvohck

Quote by: tehdave
Not true. www.improbableisland.com and improbableisland.com are different sessions. that means you can log in on two different characters in the same browser. (but not more)
In other news, I like the idea of a separate saved variable file per character. Is there a way to automate that at all?

Ohh, that's good to know.

And I can't think of a way to automate it, as there doesn't appear to be anywhere that an unchanging but character-specific code/line of text/thingie is on any of the pages, unless we can convince CMJ to add the character's name to the "Vital info" table. Like I said before, though, you could add a dropdown menu to change characters, or a script command to the same effect.

Oh, and you wouldn't have to install the script twice. Just install it for *improbableisland.com/* and it will automatically work for both.



The only problem with *improbableisland.com/* is that the script would attempt to run on enquirer.improbableisland.com and labs.improbableisland.com

The only reason to install it twice would be to set up two different variable files for different characters (if you use the naked domain for one specifically, and the www domain for another) if the character switcher isn't implemented (in current form, for instance)


Isn't sanity just a one-trick pony anyway? All you get is one trick: rational thinking. But when you're good and crazy, oooh, oooh, the sky's the limit.
 
Profile Email
Quote
Tahvohck
 Thursday, November 18 2010 @ 09:55 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 10/15/10
Posts: 65

Ah, right, didn't think of it that way.

Alternatively, add an exclude line for those two, but at that point it's more trouble than it's worth. Though are there any nodes the script could attach to on the enquirer/labs?


 
Profile Email
Quote
tehdave
 Friday, November 19 2010 @ 06:46 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 12/17/09
Posts: 429

Quote by: Tahvohck

Ah, right, didn't think of it that way.

Alternatively, add an exclude line for those two, but at that point it's more trouble than it's worth. Though are there any nodes the script could attach to on the enquirer/labs?



No idea, but why risk breaking something when it's just as much work either way?

On another note: Is there a way, with your change to the Truancy Script, to add markers to the "overall" bar at each level?
I'd do it myself, but I'm terrible at code.. one of those things I've always meant to try and pick up and run with...wonder if it could be designed maybe with just a bunch of bars sitting next to each other?


Isn't sanity just a one-trick pony anyway? All you get is one trick: rational thinking. But when you're good and crazy, oooh, oooh, the sky's the limit.
 
Profile Email
Quote
Swede
 Saturday, November 20 2010 @ 01:50 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 05/27/10
Posts: 127

Quote by: Matthew

Just so you guys know, Chrome now supports Greasemonkey scripts natively. Tested and it works fine.



Thanks. I didn't knew that and was running Firefox next to Chrome.


 
Profile Email
Quote
Tahvohck
 Saturday, November 20 2010 @ 08:01 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 10/15/10
Posts: 65

Quote by: tehdave
On another note: Is there a way, with your change to the Truancy Script, to add markers to the "overall" bar at each level?
I'd do it myself, but I'm terrible at code.. one of those things I've always meant to try and pick up and run with...wonder if it could be designed maybe with just a bunch of bars sitting next to each other?[/p]


Short answer: Yes, but I'm lazy.

Long answer: Yes, and I'm probably going to add it at some point, but that will be a lot of coding, enough--at my current knowledge level--to double the length of the code, at least. As it stands, each "bar" is actually a table with two different colored columns, scaled to be the right sizes. So a broken bar would be at least 16 columns, each one having to be scaled per DK. Also, you may have noticed this by now, but the first 7 levels are only the first 10th of the bar, so it may not even be a good idea.


 
Profile Email
Quote
Devin
 Sunday, November 21 2010 @ 01:54 AM UTC  
Forum Contestant
Contestant

Status: offline

Registered: 06/17/10
Posts: 30

Quote by: tehdave

Quote by: blob

or you can use opera and firefox at the same time, one for each character.



what if I'm RPing 6 characters at once? I need all 3 of my browsers to run them all!

(Note: this is not recommended for sanity's sake...)



I've found that seasonone.improbableisland.com and seasontwo.improbableisland.com both work too. Mr. Green


 
Profile Email
Quote
Maniak
 Sunday, November 21 2010 @ 11:27 AM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 10/11/10
Posts: 298

Quote by: Devin

Quote by: tehdave

Quote by: blob

or you can use opera and firefox at the same time, one for each character.



what if I'm RPing 6 characters at once? I need all 3 of my browsers to run them all!

(Note: this is not recommended for sanity's sake...)



I've found that seasonone.improbableisland.com and seasontwo.improbableisland.com both work too. Mr. Green



Finally, 12 characters to roleplay simultaneous!


http://maniak.cu.cc/
 
Profile Email Website
Quote
Matthew
 Sunday, November 21 2010 @ 01:12 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 08/26/10
Posts: 578

Quote by: Maniak

Finally, 12 characters to roleplay simultaneous!


I'd be pretty impressed, actually.


 
Profile Email
Quote
bl0b
 Tuesday, November 23 2010 @ 11:28 AM UTC  
Forum Contender
Contender

Status: offline

Registered: 06/19/10
Posts: 66

Greasemonkey script that reduces the size of bars in your backpack. Useful if you have hundreds of cards for instance.
Let me know if you guys have any problems with it.


PHP Formatted Code
// ==UserScript==
// @name           freezingcold
// @description    reduce the backpack stretchiness
// @include        http://improbableisland.com/*
// @include        http://www.improbableisland.com/*
// ==/UserScript==



window.bytes_new_width = function()
{
        // Define new size. Each kg = 5
        var new_size = 50; //could even go all the way up to 1000
        // get the main table and reset its width
        var tbl = document.getElementsByTagName('table');
        var l = tbl.length;
        for (var i=0; i<l; i++)
        {
                //table hight of 5 is the one for backpacks
                if (tbl[i].getAttribute("height")==5){
                        if (tbl[i].getAttribute("width") > 100)
                        {
                                tbl[i].setAttribute("width", new_size);
                        }
                }
        }
}
window.addEventListener("load", window.bytes_new_width, false);


 
Profile Email
Quote
Matthew
 Tuesday, November 23 2010 @ 01:30 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 08/26/10
Posts: 578

Quote by: bl0b

Greasemonkey script that reduces the size of bars in your backpack. Useful if you have hundreds of cards for instance.
Let me know if you guys have any problems with it.


It's like my prayers have been answered! This works perfectly, thank you. (Kind of funny timing, though; I'd just turned in my huge card hand. Oh well... I'll just assume it works for that, too.)


 
Profile Email
Quote
bl0b
 Tuesday, November 23 2010 @ 02:20 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 06/19/10
Posts: 66

Should work for all bars with height attribute = 5, meaning all weight bars and even experience bar, midget rage bar and adrenaline pack bars and others that I can't remember now. So if you want, you can make those reeeeeeeeeeally tiny.

If you want bars a bit bigger, you'd have to fiddle with the numbers a bit for that.
If you change the number 50 and number 100 to 400, then the maximum bar length you get is the same as the length of 80 kg backpack, which should be just right. Or maybe change it to 500, to have the cap at 100 kg. Depending on personal preferences.


 
Profile Email
Quote
Tahvohck
 Saturday, November 27 2010 @ 12:28 AM UTC  
Forum Contender
Contender

Status: offline

Registered: 10/15/10
Posts: 65

Hey bl0b, just wondering, but what's the point of the for() loop? I don't see any reason for that to be there.

Also, if you don't mind, I'm going to add in a Greasemonkey command to change the bar length on the fly, so you don't have to edit the code to change the length.


 
Profile Email
Quote
Content generated in: 1.60 seconds
New Topic Post Reply



 All times are UTC. The time is now 08:52 PM.

Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content