Page 9 of 15

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Posted: Tue Oct 09, 2012 5:37 pm
by Doug R.
Install Greasmonkey if you're running Firefox, or an equivalent program if you're using Chrome (I use Tampermonkey). Download the Cantr enhanced script and install it (easy on Greasemonkey, harder on Chrome),.

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Posted: Thu Oct 11, 2012 7:50 am
by EchoMan
You install the Greasemonkey plugin in FireFox, and then you can use JavaScript and Stylesheets to alter the looks and some behaviour of the game.

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Posted: Thu Oct 11, 2012 7:51 am
by Estaar
What kind of alterations?

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Posted: Thu Oct 11, 2012 8:07 am
by EchoMan
It depends on how good a programmer you are. :)

A lot is possible, some useful. The first post in this topic describes how you use it, though that script isn't available any more I think.

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Posted: Thu Nov 29, 2012 11:55 pm
by EchoMan
The cantr-grey userscript is now discontinued and not supported anymore.

Instead it is now part of the Cantr skin pack. More news about that follow shortly in another topic. :)

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Posted: Fri Nov 30, 2012 1:28 am
by Greek
Same for Cantr Green.

CVEE: Event and Emote Restyling mod, read events easier now~

Posted: Thu Mar 21, 2013 6:36 am
by AlchemicRaker
This "userscript" changes the styling of events in Cantr, like so:
Image
Non-chat is darkened, and emotes are tinted and italicized.

For people who what to customize more, I have it mark the entire event, character's names, "quoted" parts of events, and *emoted* parts of events. On top of this, Cantr already marks types of events (you could detect if it was a character talking, or a radio for instance) so there's lots of possibilities.

To use this you'll need either TamperMonkey(Chrome), GreaseMonkey(FireFox), or the equivalent for your browser.

Now get one of the versions of CVEE (this extension/userscript):

Basic Edition - This should work right away, like shown in the image above.
Advanced Edition - There's some instructions on the page to get you started (and the CSS to make it work like the Basic version) so you can make your own styles.

Re: CVEE: Event and Emote Restyling mod, read events easier

Posted: Thu Mar 21, 2013 8:58 am
by pancakes
Thanks!

Re: CVEE: Event and Emote Restyling mod, read events easier

Posted: Thu Mar 21, 2013 1:20 pm
by Doug R.
Interesting. Thanks!

Re: CVEE: Event and Emote Restyling mod, read events easier

Posted: Thu Mar 21, 2013 1:24 pm
by Doug R.
You don't need Tampermonkey if you're running Chrome. You can install it natively in the browser. Just download the script and drag it onto your extensions page.

Re: CVEE: Event and Emote Restyling mod, read events easier

Posted: Thu Mar 21, 2013 1:27 pm
by Doug R.
If anyone is good at modding this, I'd like to mod it extensively for my own purposes. I could learn myself, but if someone can do it in a few minutes and it willing to do it for me, then I won't have to expend that time.

Re: CVEE: Event and Emote Restyling mod, read events easier

Posted: Thu Mar 21, 2013 4:02 pm
by Navi
Doug R. wrote:If anyone is good at modding this, I'd like to mod it extensively for my own purposes. I could learn myself, but if someone can do it in a few minutes and it willing to do it for me, then I won't have to expend that time.


I can look into it if you want. I've already modified mine to pick up # emotes and ** emotes. I haven't figured out the hyphen emotes used by Spanish characters yet. The simple approach gets confused by the hyphen in the date/time at the beginning of the event. Maybe stripping off the time first, then working on the rest will work.

This is similar to the approach I used for formatting the text in the turn report tool.

Re: CVEE: Event and Emote Restyling mod, read events easier

Posted: Thu Mar 21, 2013 5:21 pm
by AlchemicRaker
Doug R. wrote:If anyone is good at modding this, I'd like to mod it extensively for my own purposes. I could learn myself, but if someone can do it in a few minutes and it willing to do it for me, then I won't have to expend that time.

I could probably do it if it's not terribly complicated. What kind of modding do you mean? To the script itself?

@Navi, I'll try and make a code to match paired - emotes. #'d emotes use pairs of # too, right?

Re: CVEE: Event and Emote Restyling mod, read events easier

Posted: Thu Mar 21, 2013 5:43 pm
by Navi
Yes. My current pattern is

Code: Select all

/[#\*]+[\s\S]*?[#\*]+/g
Just adding # to the list of characters conflicts with specifying the color for quotes in the basic version though.

Re: CVEE: Event and Emote Restyling mod, read events easier

Posted: Thu Mar 21, 2013 5:48 pm
by AlchemicRaker
I've updated both Basic & Advanced scripts to be a little more robust and to (optionally) include *emotes*, #emotes#, and -emotes- (only * and # are enabled by default).

Navi wrote:Yes. My current pattern is

Code: Select all

/[#\*]+[\s\S]*?[#\*]+/g
Just adding # to the list of characters conflicts with specifying the color for quotes in the basic version though.

Already ran into that and fixed it. If you DO find any interesting cases that the new queries break on, let me know though, I'll keep fixing it up. Did you change anything else about the mod?