GreaseMonkey'ing Cantr - customizing Cantr, clientside

General out-of-character discussion among players of Cantr II.

Moderators: Public Relations Department, Players Department

User avatar
Doug R.
Posts: 14857
Joined: Wed Mar 23, 2005 6:56 pm
Contact:

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Postby Doug R. » Fri Jul 26, 2013 12:49 pm

Thank you Greek! This is very welcome!
Hamsters is nice. ~Kaylee, Firefly
User avatar
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

Postby Greek » Sat Jul 27, 2013 12:26 am

Unstable version of Cantr Enhanced 1.8 is available. You install it at your own risk, but it works fine almost always, at least on FF.
‘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’
User avatar
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

Postby Greek » Sat Jul 27, 2013 12:17 pm

New stable 1.8.2 version can be downloaded on http://userscripts.org/scripts/show/109440.

What's new?
1. Whispering using AJAX from events page.
It's possible to talk to everyone or whisper to selected character like this:
Image

Be careful when whispering secrets, I didn't find any bugs, but I also can't guarantee it's always working ;)

2. It's possible to rename characters on events page.
Image

As a result, I've decided to change default behaviour when clicking on character name. You'll have to click on character's name instead of hovering it to get CE popup menu. It's planned to add more char data on the popup, so it's better to make it easy to read and not disappear so fast.
To access full character description page you have to click on the name and then first button to the right.
If you don't like this new feature then you can uncheck it in CE options to have old way of showing popup.

3. Much faster
Something wrong happened with new Chrome and some js instructions work much slower than on firefox. I've managed to make script faster by ~50% on firefox and by ~80% on Chrome (tests were done for about 6000 natural events).

4. Line is where you stopped reading
There's a line which points first event which was shown by autorefresh when browser tab with events page was not focued.
Image

5. Toolbar on the right
Which shows charmenu buttons in convenient place

All features can be disabled/enabled in CE options on player page

What next?
I'd like to show more data on the popup, but it's impossible without server-side changes, so doing them to use just in CE would be a big waste of time. Maybe something like that will be made available for the game itself.
I'm going to make "whispers list" saveable in browser storage (just like buildings&vehicles bookmarks), but I'll need feedback about it when you'll be more familiar with new features.
‘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’
User avatar
SekoETC
Posts: 15523
Joined: Wed May 05, 2004 11:07 am
Location: Finland
Contact:

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Postby SekoETC » Sat Jul 27, 2013 12:38 pm

I was first excited about the line, but if it only applies to autorefresh, that would only benefit people who leave the tab open in the background. It would be more useful if it showed where unread events start when you enter the character from the list, because if you don't do anything, the old events are going to stay there for several clicks.
Not-so-sad panda
User avatar
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

Postby Greek » Sun Jul 28, 2013 12:32 pm

Do you mean a line which shows events which were never read?
It's a good idea, but impossible to do in external script. However it can be easily done in the game itself.

Tick signaler was malfunctioning in new CE. There's new version 1.8.2.1 where this bug is fixed.
‘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’
User avatar
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

Postby Greek » Mon Sep 16, 2013 11:14 am

Hohoho!

Cantr Enhanced version 2.0.0
http://userscripts.org/scripts/show/109440

What's new?
http://youtu.be/BnBrzgWyHC8 :D

Recent game changes have broken some features, now they should work again.
‘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’
User avatar
SekoETC
Posts: 15523
Joined: Wed May 05, 2004 11:07 am
Location: Finland
Contact:

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Postby SekoETC » Sat Sep 21, 2013 9:49 am

For the next version, would it be possible to add the possibility of bookmarking locations so that they appear at the top of the page no matter which category they are in? If a location has a lot of vehicles, it's annoying having to scroll down to buildings each time, especially when moving a hundred kilos of resources.
Not-so-sad panda
User avatar
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

Postby Greek » Sat Sep 21, 2013 10:14 am

It doesn't work? It should.
‘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’
User avatar
SekoETC
Posts: 15523
Joined: Wed May 05, 2004 11:07 am
Location: Finland
Contact:

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Postby SekoETC » Sat Sep 21, 2013 10:31 am

Oh, I forgot it was there. It does work.
Not-so-sad panda
User avatar
Bmot
Game Mechanics Chair / HR/PD Member
Posts: 2631
Joined: Sat Jun 30, 2012 3:59 pm
Location: The Hague - Netherlands

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Postby Bmot » Sat Sep 21, 2013 11:17 am

Is there any way to make the "pick/drop all" button work on my computer? I use Chrome...

EDIT: Oh, hey, now it works :roll:
Richard Dawkins wrote:We privileged few, who won the lottery of birth against all odds, how dare we whine at our inevitable return to that prior state from which the vast majority have never stirred?
User avatar
Bmot
Game Mechanics Chair / HR/PD Member
Posts: 2631
Joined: Sat Jun 30, 2012 3:59 pm
Location: The Hague - Netherlands

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Postby Bmot » Sun Sep 22, 2013 10:41 pm

Using the new version of CantrEnhanced for a few days now, I love the whisper-function :)
Richard Dawkins wrote:We privileged few, who won the lottery of birth against all odds, how dare we whine at our inevitable return to that prior state from which the vast majority have never stirred?
User avatar
Doug R.
Posts: 14857
Joined: Wed Mar 23, 2005 6:56 pm
Contact:

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Postby Doug R. » Tue Sep 24, 2013 4:12 pm

I can't bookmark buildings any longer.
Hamsters is nice. ~Kaylee, Firefly
User avatar
Bmot
Game Mechanics Chair / HR/PD Member
Posts: 2631
Joined: Sat Jun 30, 2012 3:59 pm
Location: The Hague - Netherlands

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Postby Bmot » Tue Sep 24, 2013 5:48 pm

Doug R. wrote:I can't bookmark buildings any longer.


Maybe something to do with the last changes? I read it had something to do with the events page, if I remember correctly...
Richard Dawkins wrote:We privileged few, who won the lottery of birth against all odds, how dare we whine at our inevitable return to that prior state from which the vast majority have never stirred?
User avatar
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

Postby Greek » Tue Sep 24, 2013 6:01 pm

Yep, it's because of b&v changes. I'll fix it later, so it'll go with other important changes.
‘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’
User avatar
SekoETC
Posts: 15523
Joined: Wed May 05, 2004 11:07 am
Location: Finland
Contact:

Re: GreaseMonkey'ing Cantr - customizing Cantr, clientside

Postby SekoETC » Tue Sep 24, 2013 6:38 pm

How difficult would it be to enable drop/pick up all for Finnish language?
Not-so-sad panda

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest