Map tweaks (alliances, hide personal info,...)


#1

So, I’ve been working on few scripts which tweak the way the map is drawn, such as to recolour the stars to match the alliance or to hide certain things when you are making a screenshot and want to share it.

Due to recent changes, they are not working any more, HOWEVER, Jay made awesome move and it is now easier to do these things!

#USAGE:
To use the script you will need to make an URL like this one:
http://triton.ironhelmet.com/game/1234567890123456#[[1,2,3],[4,5,6],[],[],[7]]
It stands for [[alliance1],[alliance2]]

The numbers are player IDs and they can be calculated from Intel.

Circles   Blue -> Purple :  0 - 7
Squares   Blue -> Purple :  8 - 15
...

The script itself can be turned on and off by pressing a.

There are also three options to set low, high, off.
low and high are the amounts of “shine” to use for the alliance circles. Allowed values 0-5.
off can be 1 or 0 to force faint highlights even when the script is turned off.

#Bookmarklet [size=9]How to create bookmarklet?[/size]

[size=11]Don’t forget to remove the leading +[/size]

+javascript:var set={low:1,high:3,off:1}; /*by Qwerty*/ eval(atob('Ly8gQG5hbWVzcGFjZSAgICBodHRwOi8vY3Fwcm9qZWN0Lm5ldC8NCi8vIEBhdXRob3IgICAgICAgVml0ZXpzbGF2IEZlcmtvIChRd2VydHkpLCBxd2VydHlAY3Fwcm9qZWN0Lm5ldA0KLy8gQGNvcHlyaWdodCAgICAyMDE0KywgVml0ZXpzbGF2IEZlcmtvIChRd2VydHkpDQovLyBAbGljZW5jZSAgICAgIFJlbGVhc2VkIHVuZGVyIE1JVCBsaWNlbmNlDQovLyAgICAgICAgICAgICAgIFBlcm1pc3Npb24gaXMgaGVyZWJ5IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmluZyBhIGNvcHkgb2YgdGhpcyBzb2Z0d2FyZSBhbmQgYXNzb2NpYXRlZCBkb2N1bWVudGF0aW9uIGZpbGVzICh0aGUgIlNvZnR3YXJlIiksDQovLyAgICAgICAgICAgICAgIHRvIGRlYWwgaW4gdGhlIFNvZnR3YXJlIHdpdGhvdXQgcmVzdHJpY3Rpb24sIGluY2x1ZGluZyB3aXR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YWxsKGxpc3QpICE9ICJbb2JqZWN0IEFycmF5XSIgKSByZXR1cm4gMDsNCg0KDQogICAgZm9yICh2YXIgaSBpbiBOZXB0dW5lc1ByaWRlLnVuaXZlcnNlLmdhbGF4eS5wbGF5ZXJzKQ0KICAgICAgICBOZXB0dW5lc1ByaWRlLnVuaXZlcnNlLmdhbGF4eS5wbGF5ZXJzW2ldLmFsbGlhbmNlID0gdW5kZWZpbmVkOw0KDQogICAgUVEuYWxsaWFuY2VzLmxpc3QgPSBbXTsNCiAgICBmb3IgKCB2YXIgayBpbiBsaXN0ICkgew0KICAgICAgICBRUS5hbGxpYW5jZXMubGlzdFtrXSA9IFtdOw0KICAgICAgICBmb3IgKCB2YXIgaiBpbiBsaXN0W2tdKSB7DQogICAgICAgICAgICBpZiAoIHR5cGVvZiBsaXN0W2tdW2pdID09ICJudW1iZXIiICkgew0KICAgICAgICAgICAgICAgIFFRLmFsbGlhbmNlcy5saXN0W2tdLnB1c2gobGlzdFtrXVtqXSk7DQogICAgICAgICAgICAgICAgTmVwdHVuZXNQcmlkZS51bml2ZXJzZS5nYWxheHkucGxheWVyc1tsaXN0W2tdW2pdXS5hbGxpYW5jZSA9IGs7DQogICAgICAgICAgICB9DQogICAgICAgIH0NCiAgICB9DQp9KSgpDQoNCkNydXguY3J1eC50cmlnZ2VyKCJtYXBfcmVidWlsZCIpOw0K'))

[size=11]Download full source code here.[/size]

#Any suggestions?
I am no graphic designer. I need you guys, to make some suggestions, draw some images, whatever, regarding to how should the alliances look on the map. I could possibly do [size=20]anything[/size], draw custom shapes, texts, remove stars, add new objects, change colour of anything what exists already, add external images…

This is what I am using now. Pretty lame, right?

And this is Jay’s


How to make screenshot without any personal info?
Playing with Triton Data
#2

How to create Bookmarklet?


Bulk Upgrade: Mouse Selection Tool