GreaseMonkey'ing Cantr - customizing Cantr, clientside
Moderators: Public Relations Department, Players Department
- Doug R.
- Posts: 14857
- Joined: Wed Mar 23, 2005 6:56 pm
- Contact:
Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside
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),.
Hamsters is nice. ~Kaylee, Firefly
- EchoMan
- Posts: 7768
- Joined: Fri Aug 26, 2005 1:01 pm
- Location: Stockholm, Sweden
Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside
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.
- Estaar
- Posts: 1166
- Joined: Tue Jun 19, 2012 9:23 am
- Location: Luxembourg
Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside
What kind of alterations?
Stranger in a strange land.
- EchoMan
- Posts: 7768
- Joined: Fri Aug 26, 2005 1:01 pm
- Location: Stockholm, Sweden
Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside
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.
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.
- EchoMan
- Posts: 7768
- Joined: Fri Aug 26, 2005 1:01 pm
- Location: Stockholm, Sweden
Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside
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.
Instead it is now part of the Cantr skin pack. More news about that follow shortly in another topic.
- Greek
- Programming Dept. Member/Translator-Polish
- Posts: 4726
- Joined: Mon Feb 13, 2006 5:41 pm
- Location: Kraków, Poland
- Contact:
Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside
Same for Cantr Green.
‘Never! Run before you walk! Fly before you crawl! Keep moving forward! You think we should try to get a decent mail service in the city. I think we should try to send letters anywhere in the world! Because if we fail, I’d rather fail really hugely’
-
- Posts: 311
- Joined: Thu Feb 05, 2009 4:56 am
CVEE: Event and Emote Restyling mod, read events easier now~
This "userscript" changes the styling of events in Cantr, like so:
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.
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.
-
- Posts: 9
- Joined: Fri Jan 18, 2013 7:25 am
- Doug R.
- Posts: 14857
- Joined: Wed Mar 23, 2005 6:56 pm
- Contact:
Re: CVEE: Event and Emote Restyling mod, read events easier
Interesting. Thanks!
Hamsters is nice. ~Kaylee, Firefly
- Doug R.
- Posts: 14857
- Joined: Wed Mar 23, 2005 6:56 pm
- Contact:
Re: CVEE: Event and Emote Restyling mod, read events easier
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.
Hamsters is nice. ~Kaylee, Firefly
- Doug R.
- Posts: 14857
- Joined: Wed Mar 23, 2005 6:56 pm
- Contact:
Re: CVEE: Event and Emote Restyling mod, read events easier
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.
Hamsters is nice. ~Kaylee, Firefly
-
- Posts: 87
- Joined: Tue Dec 06, 2011 5:54 pm
Re: CVEE: Event and Emote Restyling mod, read events easier
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.
-
- Posts: 311
- Joined: Thu Feb 05, 2009 4:56 am
Re: CVEE: Event and Emote Restyling mod, read events easier
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?
-
- Posts: 87
- Joined: Tue Dec 06, 2011 5:54 pm
Re: CVEE: Event and Emote Restyling mod, read events easier
Yes. My current pattern is Just adding # to the list of characters conflicts with specifying the color for quotes in the basic version though.
Code: Select all
/[#\*]+[\s\S]*?[#\*]+/g
-
- Posts: 311
- Joined: Thu Feb 05, 2009 4:56 am
Re: CVEE: Event and Emote Restyling mod, read events easier
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).
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?
Navi wrote:Yes. My current pattern isJust adding # to the list of characters conflicts with specifying the color for quotes in the basic version though.Code: Select all
/[#\*]+[\s\S]*?[#\*]+/g
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?
Return to “General Discussion”
Who is online
Users browsing this forum: No registered users and 1 guest