r/TagproScripts • u/Ronding • Jun 04 '15
r/TagproScripts • u/laevus • Nov 19 '15
TagPro userscripts and themes are currently scattered on /r/tagpro, /r/tagproscripts and /r/tagpro/wiki. I would like to discover them more easily, with screenshots, tags/categories, working status, sorted by age or popularity etc. Should we make this happen? Is it even worth it?
Some attributes that could be shown for every userscript:
Stuff that can be parsed (and periodically polled?) from the userscript itself:
name
version
author
description
Links
Reddit post(s)
author's Reddit account
GitHub project
Related and superseding userscripts (submitted by users? deduced by tags?)
Last update time
Screenshots and Videos (submitted by author, maybe user-submitted as well?)
Categories / Tags (possibly user-defined like in Steam?)
Stars / Upvotes (5-point ratings seem discouraging)
Comments (could use Reddit Oauth2 for authentication, or maybe it's possible to just show comments from Reddit threads)
I'm not really fond of the idea of Yet Another TagPro Site which gets launched and then goes stale in a few weeks because noone has time to update it, but it's quite difficult to discover cool userscripts from /r/tagpro/wiki/modding, /r/tagproscripts etc. Maybe there's some existing community wiki/cms system that has ways to list, vote and sort user-submitted items?
Listing userscripts as cards with a thumbnail, title and description in 2 or 3 columns would probably work well, e.g.:
r/TagproScripts • u/[deleted] • May 07 '15
Userscript drag n drop texture replacer
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.
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 • u/cfginn • May 02 '15
[Request] Script that tells you whether your earliest game on your rolling 300 was a win or a loss
r/TagproScripts • u/nabbynz • May 17 '15
Rolling 300 Timeline & Streak
Script: https://gist.github.com/nabbynz/23a54cace27ad097d671
Screenshot: http://imgur.com/WzXLhlc
Uses the official data from the server.
Hopefully the screenshot is self-explanatory!
r/TagproScripts • u/snaps_ • Apr 29 '15
Discussion Understanding TagPro Client Code
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.
Get a copy of the
global-game.jsscript. 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 visithttp://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."Prettify" the
global-game.jsscript. Once you have the code, we need to make it look better. Install the npm packagejeb(site with additional information) and transform the downloadedglobal-game.jsfile by runningjeb global-game.jsfrom 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.
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.
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.jsin place of the one on loaded from the server. For me, the process of understanding is a little shorter when I can pop aconsole.loginto 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 • u/IupvotestupidCRAP • Mar 14 '15
Request Fufilled [REQUEST] A timer which appears after 20 seconds counting down from 10 when you are afk
I assume this would be very useful for people who sit on re and don't have to worry about pressing space bar or getting kicked.
r/TagproScripts • u/Wilcooo • Feb 22 '19
I finally did it! Updated all my scripts to work with the SWJ
I've never postponed anything for so long.*
A handful of scripts now also use TPUL, which means that they can be configured from the homepage (like this) and the scoreboard.
All scripts should work again, but I'm not 100% sure because I haven't tested each script thoroughly. Please let me know if you find any bugs.
List of scripts that I updated:
I'll update the Groups on Home script as well when I have the time (that one is most affected by the SWJ)
*figuratively
r/TagproScripts • u/TagProKo • Nov 22 '18
TagPro on Mobile (bèta)
I'm working on a userscript that makes TagPro touchscreen-friendly, which I call Tag on the Go. It's not finished, but some parts are working and feedback is always good to have.
Some of the functions:
A "touchscreen" analog stick to move around (working, but still ugly)
Automatic fullscreen (working, click anywhere on the screen)
Buttons to open chat and scoreboard (not yet implemented)
Maybe
To play, use a browser that supports userscripts, like FireFox on Android with the Tampermonkey add-on.
Install FireFox for Android
In Firefox, go to tampermonkey.net and click download -> install -> install
Install the Tag on the Go userscript from this link, just click install twice.
Go to tagpro.gg and choose your server. If you see a green square button somewhere above the "play now" button, the script is properly installed (that button is the options button).
I don't think it is possible on iOS as browsers are forced to use the Safari engine, with no access to the page itself. This browser claims to accept userscripts, but I haven't tested it. You'll probably have to jailbreak in order to install a userscript.
For those wondering, yes I'm u/wilcooo, but reddit closed my account because my password was weak, and I can't remember what e-mail address I used :(
r/TagproScripts • u/ldhertert • Jan 18 '16
[Meta] What would you guys think about working on a tagpro-contrib project to simplify mod creation and use
So I'm not particularly active on here (FYI I'm buttsnake) , but I dabble in writing scripts and keep an eye on activity. A handful of things have stuck out to me as pain points for both mod creators and users:
There are a lot of scripts that have either the same basic types of functionality, or dependent logic that are either re-implemented or copy-pasted from script to script.
The tagpro API is powerful enough to do some fantastic stuff, however in my experience it is exposed in a way that you have to do quite a bit of work to manipulate it to do the things that could be simple with a better designed API (see dependent logic above)
There is no gallery for scripts, no way to rate scripts, comment, etc outside of reddit.
There is no standard way to collaborate between scripts, or to have script dependencies.
There is no standard way to distribute/install/manage texture packs
There is no standard way to integrate third party services with tagpro, due to lack of any sort of official oauth mechanism. Various tools have been left to implement this independently (see the flairbot, tagpro-stats)
These are all things that I think could be addressed or improved if the modding community could agree upon some standards and have a shared tagpro-contrib project that contains some or all of the following (plus I'm sure more):
Standalone projects
Script/Texturepack package repository (honestly I'd recommend using something that already exists like NPM)
Script/Texturepack gallery (dependent on package repo). Allows users to view/upload/install/etc scripts & texturepacks
Script/Texturepack mod manager plugin. I love the current userscript based script mechanism. They are simple to write and work cross browser. That said, there are a couple issues with it. 1) There are limitations to userscripts. I'm not sure how frequently people run into them, so maybe this really isn't a big issue. 2) There isn't a great way to make scripts play nice with each other and enable dependencies, etc. A shared mod plugin could also could give a better experience for the UI for the user. For example, there could be a standard widget framework for rendering widgets (for example, take the rolling 300 plugin). It would provide a standard experience across plugins, and allow the user to customize what gets displayed & where.
OAuth server. Unless the tp devs are interested in providing oauth for third parties, then it would be nice to have a single place that third party services could connect to. It would require a user to create an account on said server, and then go through some sort of tagpro (and maybe reddit, mumble?) account linking process similar to the flair bot or tagpro-stats. It also would be a resource server that would be a proxy to allow third party services to the following scopes: basic profile info (registered name, degree, flair, maybe allow user to set preferred server), detailed profile info (profile url?), rolling 300, stats (either integrate with tp stats or implement something similar). For a bonus, it would allow third party services to receive SNS notifications (or similar) when something changes for a user profile.
Competitive player helper utility. This is the area that I know the least about, however every time I've done anything other than pubs, I've been shocked at how complex and disconnected things are. The whole dance of creating a private group, communicating the url for that private group to players, telling them what mumble room to join, trying to get people to move to the teams in the private group, moving people to different rooms in mumble, then finally trying to regroup and repeat afterwards seems like something the community has come to expect, however as a developer and outsider to the competitive world, I feel like there has to be a better way. A third party app that you can create a page for an event with a single url, and that app has permissions to create private groups, games, mumble rooms, move users to rooms in mumble, take users to the appropriate pages when a game is started/finished (would have to integrate with the mod manager plugin) seems like it would be a game changer for the competitive community. Maybe I'm overstating how big of a problem this is, or underestimating the complexity of dealing with the issue, but this seems like it would be super useful.
Shared libraries
Script host - basic hooks for when the script should run. Would handle domain restrictions (if necessary), and expose the basic script lifecycle hooks (game start, game end, non-game page loaded, etc)
Gameplay hook logic - Lots of scripts depend on common things that are complex to detect. For example, the "detect when user leaves regrab" logic in /u/RonSpawnsonTP's recent script. We could have event hooks or whatever for gameplay events.
Chat/Player logic - I started working on a chat script that I never finished, and man is it a pain in the butt to hook into certain things. For example, I saw about 40 different implementations of detecting when a user joins/leaves a room. It also would be super nice to have some sort of standard interface for chat plugins to hook into. For example, I use Tapro Chat Enhancer chrome plugin, which is really a bunch of scripts rolled into one. Let's take two of that plugins functions - macros and the custom chat UI. It would be great if a user could install whatever macro plugin they want and have it work with whatever chat UI plugin they want.
UI mod logic - api access to all the random stuff that scripts tweak with the UI... player name rendering, ball overlays, honestly I don't know what the common ones are but I feel like I see script requests all the time
So yeah, I know this is long, but it's something I've been thinking about for a while. I'd be curious to know if this is something people think would be useful, or if I'm missing anything, or if I should just GTFO.
r/TagproScripts • u/snaps_ • Dec 23 '15
Another Timer Userscript
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.
Example images here.
r/TagproScripts • u/laevus • Oct 04 '15
[Userscript] TagPro Balls 3D - help me test this, it's really fun!
r/TagproScripts • u/Moosemaster21 • Mar 21 '15
[Request] Map components calculator (a script that tells me how many spikes/bombs/boosts/width/height etc that a map has when I open it on unfortunate or jukejuice or even the map editor, for example).
I have a script I'd like to be made, but it seems rather complicated. I want to be able to open a map on unfortunate-maps or jukejuice.com (preferably both, but meh) or even the unfortunate or peterreid map editors and have a script that gathers basic statistics about the map. Here are the statistics I'd like compiled:
The map's width
The map's height
The % of that area occupied by ANYTHING other than a black background tile.
Total number of spikes.
Total number of boosts (and if possible, how many are red/blue/neutral).
Total number of bombs.
OPTIONAL:
Total number of team tiles.
Total number of 45° walls.
Total number of standard 90° walls.
Total tile perimeter of the map. (Seems hard to do)
Total number of blank (white) tiles.
Total number of gate tiles (and if possible, how many are red/blue/green/gray).
Total number of buttons.
Total number of portals (and if possible, how many entrance only vs how many exit only. The "if possible" part seems extremely hard and can probably be done manually just as easily).
Shortest distance from flag to flag (this seems extremely hard because you have to account for walls separating them and can probably be done manually just as easily. So probably ignore this).
Is this script that I have in mind at all possible? In all eventuality what I'd like to do is compile a spreadsheet with all this information for maps that are in the current rotation, and display the averages. It would be fun to eventually make a completely average map lol, but mostly, I just want to use it to have mapmakers with really outlandish/imbalanced maps be able to compare their creations to the "meta," so to speak.
r/TagproScripts • u/orlandoduran • Jan 11 '16
[request] script that plays the curb your enthusiasm theme after a tie game
this is the best idea i have ever had. i'll split the profits with whoever makes it.
EDIT: right before the game ends, instead of "three, two, one" i want those first three tuba notes to play
r/TagproScripts • u/RonSpawnsonTP • Jan 08 '16
Userscript that yells at you when you get off of regrab
r/TagproScripts • u/[deleted] • May 18 '15
[Request] A script that puts the 'collect game stats?' checkbox on the main page (also maybe in the joiner)
r/TagproScripts • u/Moosemaster21 • 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.
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 • u/snaps_ • Apr 13 '15
Userscript TagPro Neomacro Plus
Submitting for feedback. This macro userscript revolves around using the numpad for making entering repetitive information easier. You can find much more information on the README in the repository and install it from here to test. It is supposed to be compatibly with Watball's scripts as well as TagPro Neomacro, assuming you haven't assigned anything to the numpad keys.
Any ideas for how to, or advice on whether it's a good idea to try to, generalize this to accommodate non-numpad-having and non-WASD-using players would be appreciated.
See examples here. Just to be clear, these aren't "smart macros", just average ones. There isn't anything in output messages that doesn't require user input.
r/TagproScripts • u/Wilcooo • Mar 28 '18
ModFather: every TagPro mod right on the homepage; categorized; tech-noob friendly and an easy to submit to underlying database
^ That's the plan, and I'm well on my way now - the basic functionality functions. You can try out this bèta version to help.
But why though?
For giving every single person - even the most ignorant/lazy/non-technical - the opportunity to use mods with the least amount of effort
To quickly find the right mods for you using tags
To give modmakers a way to get their creations to more people, even those who happen to miss the reddit post. (There'll be "new" and/or "updated" sections)
To get more insight in how often a mod is installed, and how often it's upvoted. There are links to reddit posts as well so there will naturally be more feedback.
I hope that ModFather will ultimately raise the presence of mods in TagPro, and inspire more programmers (or newbies!) to create more of them!
So, what do you think? How can I make it more user-friendly? And what features would make it better?
Btw, there's extra info on GitHub
r/TagproScripts • u/laevus • Aug 19 '16
I created a "typescript declaration file" that helps with auto-completion of the global `tagpro` object. It works in both JavaScript and TypeScript files.
r/TagproScripts • u/[deleted] • Feb 08 '16
[Request] Different textures for carried flag and flag in base.
I'd love to have the option of showing the flag hitbox while it's in base but not while someone's carrying the flag.
Like this: http://i.imgur.com/lddF4WU.png
r/TagproScripts • u/Moosemaster21 • Jul 11 '15
[REQUEST] A script or extension that makes it easier to swap reserved names across multiple accounts.
Okay I'm not sure if the title explains it well enough, but here's my issue... I have a few reserved names that I like to hang onto across multiple google accounts. My current process if I want my main account to adopt another account's reserved name:
1.) Log out of account #1.
2.) Log into account #2.
3.) Change its reserved name.
4.) Log out of account #2.
5.) Log into account #1.
6.) Change reserved name to account #2's old reserved name.
7.) Save and log out of account #1.
8.) Log into account #2.
9.) Change account #2's reserved name to account #1's old name so I can save it for later.
10.) Log out of account #2.
11.) Log back into account #1 and play.
I feel like it's ridiculous to have a 10+ step process to do this. I know it might seem weird, like you might be wondering why I even do this. But sometimes I just want to have an account name that is reserved that nobody recognizes so people think it's a legit user and not a smurf, but I still want to keep working on stats for my main while doing this.
Anyway, long story short, if someone could create a userscript or extension that basically allows you to add all your accounts, then click a button or two to "swap" the reserved names, that would be soooooo great.
Again, sorry for the silly request.
r/TagproScripts • u/kunmeh13 • Jul 10 '15
Userscript Use different texture packs for the day and night, so you can choose a dark themed pack so you're not straining your eyes.
r/TagproScripts • u/[deleted] • Jul 09 '15
[REQUEST] An audio script that reads off the seconds of the clock every 10 seconds
If the title was confusing - the script would say "Ten," "Twenty," "Thirty," "Fourty," etc every time the clock was xx:10, xx:20, and so on in ten second increments.
Side note: would this be banned in competitive?
r/TagproScripts • u/Blupopsicle • Jun 16 '15
[Request] Pokemon-like chat
So a script that makes typed out text appear like pokemon. It's hard to describe but the letters appear one at a time, but very fast.
I need it for a movie im about to start, thanks in advance!