r/TagproScripts • • Apr 27 '15

Userscript Update [UserScript Update]: Win/Loss Timeline with Options Menu

6 Upvotes

Script: http://pastebin.com/EisCbfq8
Screenshot: http://imgur.com/LCf71iy

Adds an options menu, and some other small improvements.

NOTE: You shouldn't lose any of your current saved games with this update.


How to install Userscripts (using Chrome)...

  1. Install the TamperMonkey extension (http://tampermonkey.net)

  2. Once it's installed, click the icon (looks like 2 circles inside a rectangle) and choose "Add a new script"

  3. Delete any text already in the editor.

  4. Copy/Paste the new Userscript text - it starts with: // ==UserScript==

  5. Click Save.

  6. Done! The script will now automatically run whenever your on the webpage/s it's designed for.


r/TagproScripts • • Apr 19 '15

Userscript MapInfo extension - create your own metrics

Thumbnail
reddit.com
4 Upvotes

r/TagproScripts • • May 03 '15

[Request] A Script that crawls all the daily/weekly/monthly leaderboard posts on /r/TagPro to find the ones you've been in.

7 Upvotes

I think the title explains it well enough. Would this be possible? I'm just curious about the days I ended up in the 80's/90's or whatever without even knowing it.


r/TagproScripts • • May 07 '15

Userscript drag n drop texture replacer

14 Upvotes

You can drag locally stored files onto a tagpro page to change your textures (like Gecko Tools).

Images must be .png files and have one of the following in their names for this to work:

  • tiles

  • speedpad

  • speedpadred

  • speedpadblue

  • portal

  • splats

Case doesn't matter, and those keywords just need to appear somewhere in the file's name (e.g., a file called "THIS_IS_MY_TILES_IMAGE.png" would still set the tiles texture). Just drag the files onto the main tagpro screen and they'll automatically be applied.

Here's a video.

Here's the script.


edit: It now replaces the background image as well. Any .png image that isn't detected to be a texture image will be assumed to be a background image.


r/TagproScripts • • Apr 29 '15

Discussion Understanding TagPro Client Code

10 Upvotes

To develop extensions and userscripts it can be helpful to be able to take a look at the TagPro client code. The TagPro source isn't available, so we have to make do with the minified code. Obviously we can't use the minified code as-is, so I've laid out some resources here that will hopefully make things easier/less time consuming. I tried to keep things simple, so there's only two steps (if you don't count the sub-steps)!

Step 1: Get Good-Looking Code

First things first, we need to actually get the code to look at. There's two sub-steps here.

  1. Get a copy of the global-game.js script. This is the script that contains the game interface, and it's what we care about for userscripts that operate in-game. You can get a copy from any of the servers, just visit http://servername/compact/global-game.js (e.g. http://tagpro-radius.koalabeast.com/compact/global-game.js), right-click and select "Save As...". Beware: The version of the code may be different from server to server. The version present on Newcompte's servers has several differences, but there may also be differences between servers if a new version is in the process of being rolled out.

  2. "Prettify" the global-game.js script. Once you have the code, we need to make it look better. Install the npm package jeb (site with additional information) and transform the downloaded global-game.js file by running jeb global-game.js from the command line in the directory you saved the script. Next, open the file in a text edit and copy the entire contents to the text area on this site and click "Beautify JavaScript or HTML". It may take a few moments, but it will fix some of the spacing and indentation in the JavaScript, which will make it easier to understand. Copy the prettified code back into your text editor and save the file.

Step 2: Understand Good-Looking Code

Once we've got the better-looking code, how do we deal with it? There's another two sub-steps here.

  1. Understand. Large projects (like TagPro) are organized into individual components, which in JavaScript are known as modules. Having code in separate modules makes development easier for a large number of reasons, but also creates a conflict. Developers want their sites to load quickly, but if the browser has to download a bunch of small files the site is going to take longer to load than downloading a single larger file. To overcome this, tools like browserify include utilities that take code organized into modules and bundle them up into a single file (which is usually run through a minifier like uglify to make the file smaller).

    What this has to do with TagPro: When you open up the final "pretty" version of the code, it can seem like ~33,000 lines of "what do I do now". Don't worry. This file is huge, but only because it also includes the source for jQuery, Box2D, PIXI.js, Modernizr, and beaverbird. The actual source that we care about is only about 5500 lines long, and you can write off probably 1000 lines that are already available, and another 1500 which are just tile definitions.

  2. Use a good text editor. Even though we know that our goal of understanding the code is attainable, there's still the question of how. That comes down to what you're using to browse the code. I generally use Sublime Text, but there are a ton of other editors out there. Whatever you choose, the one feature I really wanted to emphasize is "code folding". This capability lets you hide blocks of code, allowing you to concentrate on what matters to you at a given moment. You can see an example of code folding in Sublime Text here.

Hopefully with all that your code browsing experience from this to something more like this.

Other tools:

  • The Chrome Developer tools has pretty-print functionality built-in. Results won't be as readable as above, but it's good in a pinch.

  • tagpro-script-replacer is a very very small chrome extension I put together that allows you to load a local copy of global-game.js in place of the one on loaded from the server. For me, the process of understanding is a little shorter when I can pop a console.log into the code and see what comes out. This helps with that.

That's it for now. Let me know if anything isn't clear, or if you've got some tips of your own! Learning can be hard enough on its own without doing it alone. :)


r/TagproScripts • • Dec 23 '15

Another Timer Userscript

9 Upvotes

So I've been working on this on and off (mostly off) for a bit and wanted to get feedback/bug reports.

This has powerup/bomb/boost timers. The text over the tiles looks clean and I also put floating indicators along the edge of the screen to indicate times (if known) for off-screen powerups.

Another neat feature is that in some circumstances it can figure out when a powerup was taken even if you didn't necessarily see it.

It may also crash your game if you don't move around enough to narrow down the powerup time possibilities.

Script here. Repository here.

Example images here.


r/TagproScripts • • May 02 '15

[Request] Script that tells you whether your earliest game on your rolling 300 was a win or a loss

14 Upvotes

r/TagproScripts • • Apr 18 '15

[Request] A script that automatically follows the FC in spec mode.

4 Upvotes

I'm looking to stream with multiple windows, and to do that, I need to not touch one of them. Since my focus will be on the main, zoomed out window, I would appreciate it if someone whipped up a quick script that would follow a random player (when there's no FC), and when flag is taken, follow the FC. If someone could do this I would be so happy.


r/TagproScripts • • Apr 30 '15

[userscript bug] TagPro tiles.png(and more) replacer

2 Upvotes

http://www.reddit.com/r/TagPro/comments/1f5gf8/new_and_improved_texture_pack_userscript/

I install it and it doesn't work. No idea why. Is there any reason it's not working? I like to just put in the link instead of having to save it as a .png, so I find this script more useful.


r/TagproScripts • • Apr 24 '15

Userscript Update [Userscript] YAIS (update): Options Menu + Leaderboard Popup

3 Upvotes

Options Button Screenshot: http://i.imgur.com/NVqnAF3.png
Options Menu Screenshot: http://i.imgur.com/qNB2Td0.png
Leaderboard Popup Screenshot: http://i.imgur.com/ocyD67Z.png
Script: http://pastebin.com/6ULUbDET


How to install Userscripts (using Chrome)...

  1. Install the TamperMonkey extension (http://tampermonkey.net)

  2. Once it's installed, click the icon (looks like 2 circles inside a rectangle) and choose "Add a new script"

  3. Delete any text already in the editor.

  4. Copy/Paste the new Userscript text - it starts with: // ==UserScript==

  5. Click Save.

  6. Done! The script will now automatically run whenever your on the webpage/s it's designed for.


r/TagproScripts • • Apr 22 '15

Userscript Update Two updates in one post: Random Flair and Favicon Flair

5 Upvotes

Both my random flair userscript and my favicon flair userscript have been updated to support the new win rate flairs. First to 300 games gets to bug test for me!


r/TagproScripts • • Apr 21 '15

[Request] 300 game tracker

4 Upvotes

Not sure if this would be possible, but something like this:

http://imgur.com/8hVLtjY for the rolling 300 games would be great. Or if the individual past 300 games could jut be added to your profile page (in a script), that would be great!

Also, I am not familiar with userscript making, so this might not be possible. Please let me know/make one if you can.


r/TagproScripts • • Dec 12 '15

Userscript My first userscript: Back to group button

Thumbnail
gist.github.com
5 Upvotes

r/TagproScripts • • Aug 17 '15

[Help] What's wrong with my textures?

3 Upvotes

I've been trying to do a tagpro texture pack, but I seem to be off to a bad start.

Here's the tiles that I've been working on. http://i.imgur.com/YcmVLhh.png

However, on some maps (renegade, platypus), there's 1 or 2 pieces of lines that are missing.

What am I doing wrong here?

Edit: Images of the problems in action: http://imgur.com/a/14ngQ


r/TagproScripts • • Aug 11 '15

[Userscript] TagPro Stats Player Chart - add radar/bar charts to player profiles on tagpro-stats.com

Thumbnail
github.com
4 Upvotes

r/TagproScripts • • Mar 10 '16

[Help] I'm trying to write a script that would easily turn your stats on or off via button available site wide.

5 Upvotes

I tried looking at a bunch of example userscripts, and spent a half hour looking through the api. I've been on the the irc a couple times but can't seem to talk to anyone there. I just have a few questions, it would be fantastic if someone who is experienced with this could answer a few of them ;)

Thanks :D


r/TagproScripts • • Aug 13 '15

[Request] Can anyone make a script that records what place you were in the leaderboard?

5 Upvotes

r/TagproScripts • • Aug 06 '17

Help for 2 scripts..

1 Upvotes

Hi,

I had problems with youtube+ script on videos for youtube, that's why i uninstalled it, but i'd still like to use a function of that script, could anyone please try to locate & exctract it for me, to use on a separate script ?

I think it's either: GEN_GRID_SRCH : "part_grid_search", or GEN_CMPT_TTLS : "part_compact_titles",

When you install that script below, & use for example: "snap links plus" addon on firefox or pale moon:

The portion of the script that i need, allows me to open several videos found in searches into a new page video per video, while the structure of youtube itself without the script, makes me grab 5 links per result, & doesn't allow me to properly open videos on each new tab..

https://openuserjs.org/scripts/ParticleCore/YouTube_+/source & userscript: https://greasyfork.org/en/scripts/9932-youtube

without the youtube+ script portion that i need:

http://matrixjo.com/upload/store/bogus.jpg

& with the script installed, you can see on the status bar 2 links grabbed & a grid like clean structure:

http://matrixjo.com/upload/store/correctgrabbing.jpg

That would be nice if anyone could exract the code that does it in the whole script to use it independently without the bugs i face from his video related "fixes"..


finally,

This is found on youtube+ as well as independently, but the author discontinued it & doesn't update it.

https://greasyfork.org/en/scripts/7360-playlist-autoplay-control-for-youtube

it adds a play button in the youtube playlists, to allow a user based selection & not having it played automatically..

But... if you click on that play button, the expected result is effective but the icon remains the same & doesn't change, so you don't always know when it's active or not..

What i'd love is to change the play icon in a square when it's turned off. or.. a green icon turned on & a black icon turned off.

that would be nice.


r/TagproScripts • • Sep 24 '16

[Userscript] TagPro Game Notification

5 Upvotes

Gives you a notification when a game is about to start and you're not in the tab to see it happen.

Helps against being kicked for AFK. For example when; you got distracted in between games (browsing reddit for example, why not? :P ), or when some fool is launching an old group without telling you. Also, it's not your fault you turned off the in-game sounds, and started blasting music from your speakers.

The script gives you a notification 5 of seconds before the game starts. (Because we sure as hell aren't going to wait the default 20 seconds waiting time) You can also change it to some other value. And when you join an active game, it gives a notification immediately. Clicking the notification brings you to the game.

Here it is: http://pastebin.com/qSKhC6fb

Keep in mind I'm still pretty noob at coding, so don't blame me if your rig explodes.

Cheers.


r/TagproScripts • • Aug 16 '15

[Userscript] Chat Beep (beep on chat area activity)

Thumbnail gist.githubusercontent.com
3 Upvotes

r/TagproScripts • • Aug 17 '15

[Request] Exit confirmation script

3 Upvotes

I'm looking for a script that will require an extra click to exit a game. Something along the lines of a pop up box asking "are you sure you want to exit this game?"


r/TagproScripts • • Aug 18 '15

[Request] tagpro.eu -> TSV (M/NLTP format) script

2 Upvotes

I don't really need it, I just thought it would be cool to have.

Alternatively, maybe Ronding would be interested in an "export" button on each page too...


r/TagproScripts • • Aug 23 '15

Automatic CSV adding

Thumbnail
reddit.com
3 Upvotes

r/TagproScripts • • Jan 28 '18

Switch HotKey (default `Z` change the key inside the script)

Thumbnail gist.github.com
1 Upvotes

r/TagproScripts • • May 05 '16

[REQUEST] Script to change displayed name every few seconds

1 Upvotes

Also a way to change the time between the switch. I searched the sub first but it looks like the script is gone now.