User:Aichon/Userscripts: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
(Just a c/p from my Talk page)
 
No edit summary
Line 1: Line 1:
I have begun editing and creating a variety of userscripts to replicate the functionality of some of the Firefox extensions I've seen. Most of them are just minor aesthetic changes, but several of them greatly enhance the look and feel of the game to such an extent that it is hard to go back after having used them. Currently, these are the scripts I have developed.
I have begun editing and creating a variety of userscripts to replicate the functionality of some of the Firefox extensions I've seen. Most of them are just minor aesthetic changes, but several of them greatly enhance the look and feel of the game to such an extent that it is hard to go back after having used them. Currently, these are the scripts I have developed.


==Developed from Scratch==
==Original Releases==
# Urban Dead A-GPS Coordinates: Simply displays the GPS coordinates next to the suburb name above the minimap. Other userscripts provided similar functionality, but I noticed several logic errors in the one I was previously using and also felt that a rather brutish approach was used for parsing the page, when a much nicer one should have been used.
These userscripts were coded from scratch by me. Feel free to use them however you want. If you run into bugs, drop me a note on my [[User_talk:Aichon | talk]] page and I'll see what I can do for you.
# Urban Dead AP Recovery Time Indicator: Again, several other userscripts already provide this functionality (and use the same name as well, I believe), but I liked the implementation I saw in one particular Firefox extension, so I adapted it for use as a userscript. It's simple an unobtrusive and stays out of my way. I do like the feature that another userscript offers though, where it can calculate the time down to the minute. I may have to either add that myself, or else use that script instead, since that seems imminently useful.
# Urban Dead Survivor Aggregator: UDToolbar has a nice feature which, rather than displaying the names of survivors on the minimap, simply displays the number of survivors. I found that approach to be much better, since it declutters the display and lets you get at the useful information quickly. I simply replicated that functionality in a userscript by parsing the list of survivors at your present location, removing any names (or a "...") from the minimap, and then adding the survivor count to the minimap.


==Edited from Existing==
#[http://www.aichon.com/dumpbox/ud_userscripts/udagpscoordinates.user.js A-GPS Coordinates]: Like several other GPS scripts, it simply displays the GPS coordinates for your character next to the suburb name above the minimap. I like my version better since it doesn't appear to have any logical errors (as the one I previously used did), and it also uses a more elegant approach to determining the coordinates, I believe.
# QuickLinks: This userscript was designed to add a new menu bar to the top of the Urban Dead screen from which several contextually useful buttons could be selected. I found the concept to be good, but the space seemed like it was being wasted, so I moved all of the buttons that typically go on the left side of the screen (e.g. Wiki, FAQ, Logout, Settings, etc.) to the menu bar as well. It seems to make the screen much less cluttered, and it puts that space at the top to much better use as well.
#[http://www.aichon.com/dumpbox/ud_userscripts/udsamecharacterhighlighter.user.js Same Character Highlighter]: Mousing over a character will underline all links to that character on the page. It's especially useful in situations where you see a long list of "A zombie..." and don't know which zombies did what. Mousing over one of them while using this script will underline all of the links to the same zombie, allowing you to see just who was responsible for what.
# UDMap: A wonderful userscript that displays two additional minimaps that you can mouseover for information. I modified them to fill up the space at the bottom of the left column better, and then also corrected a slight error in the way that the GPS coordinates were calculated since the display was incorrect in about 10% of cases (I haven't gotten around to submitting the fix to the author yet). I also made a few other modifications to meet my personal taste, such as prioritizing the display of the "You are here" square over existing TRPs and displaying the name of the location next to "You are here" in the tooltip that appears on mouseover.
#[http://www.aichon.com/dumpbox/ud_userscripts/udsurvivoraggregator.user.js Survivor Aggregator]: When standing in an area that's crowded with survivors, rather than displaying the names of a handful of them, the minimap simply shows a count of how many survivors are at your current location (e.g. "23 Survivors"), very similarly to how zombies are displayed on the minimap. It doesn't count the survivors at neighboring blocks, just at your current block.
# Urban Dead Building State Colourizer: Love this userscript to death, but a few of the colors provided poor contrast against the background, or else "shouted" too loudly at the user when such wasn't necessary. Since I prefer to only be shouted at when necessary, I redid almost all of the colors, stripped the bolding from most of the text, and added an ability to underline text as well. The end result is a userscript that subtly points out information on the screen that is considered useful but not in need of action, while shouting out information that is in need of immediate action on the player's part.
#[http://www.aichon.com/dumpbox/ud_userscripts/udzerooutbuttons.user.js Zero Out Buttons]: Simply removes the buttons under the minimap to things like the Wiki, the FAQ, your Skills page, Contacts, etc. It's nice to have if you pair it up with QuickLinks or some other script that provides you access to those links anyway.
 
==Modified Releases==
These scripts are ones that I modified from existing code. I claim no credit for the original work and anyone is welcome to use my changes as they see fit. Most of them have incorrect comments at the top, since I didn't bother to add myself as an author or update the change logs with the modifications I made.
#[http://www.aichon.com/dumpbox/ud_userscripts/udaprecoverytimeindicator.user.js AP Recovery Time Indicator]: Displays an estimate (accurate to within 30 minutes) of when your AP will be fully recovered. I wish I could configure it to determine when the [[tick | AP tick]] would occur, but GreaseKit doesn't support the GM_* functions at the moment, so I don't see how I can program it to remember when the character's tick would occur. It borrows code from a few extensions and userscripts, though I'll probably rewrite it with entirely original code at some point.
#[http://www.aichon.com/dumpbox/ud_userscripts/udbuildingstatecolourizer.user.js Building State Colourizer]: Colorizes some of the text on the page pertaining to barricade levels, generator/radio statuses, and a handful of other useful events. A few of the color and style choices "shouted" too much for my tastes, so I've modified almost all of them to provide better contrast on the screen and also to only "shout" when necessary. I also added the functionality to underline text.
#[http://www.aichon.com/dumpbox/ud_userscripts/udbetternamecolorer.user.js Better Name Colorer]: Uses different colors for characters that are in your contacts list. Essentially, the colors are more muted (almost pastel) in color, which greatly increases the contrast and makes ready their names much easier, in my opinion. I'll probably be changing this into a general custom CSS loader eventually, rather than restricting it to just name colorizing. It borrows heavily from another userscript.
#<s>[http://www.aichon.com/dumpbox/ud_userscripts/udhpcolorizer.user.js HP Colorizer]: Colors the "HP" text next to a person's name based on how much health they have at the moment. Makes it easier to spot those in need of healing at a glance. I've modified the colors that are used slightly.</s> I've gone ahead and coded up my own version from scratch that cuts down on the clutter a bit, making it even easier to spot the ones in trouble. I'll post it at some point.
#[http://www.aichon.com/dumpbox/ud_userscripts/udmaplinks.user.js Map Links]: Displays links to the wiki and Red Rum  maps for the suburb you are currently in. The only change I made was to allow it to play nice with my A-GPS script.
#[http://www.aichon.com/dumpbox/ud_userscripts/udquicklinks.user.js QuickLinks]: Adds a menubar to the top of the UD screen, making it easier to select a few common actions. I've added quite a few additional buttons to the menubar, negating the need to have the buttons under the minimap for the Wiki, FAQ, Skills, Contacts, and others. I've also fixed a few minor bugs, changed the appearance slightly, and added it to a few more pages.
#[http://www.aichon.com/dumpbox/ud_userscripts/uditemcombinerorganizerandsorter.user.js Item Combiner, Organizer, and Sorter]: Makes your inventory usable by rearranging and combining buttons. I modified it slightly to hide some useless buttons that just waste your AP, and I'll be modifying it more as time goes on, but it's a great script.
#[http://www.aichon.com/dumpbox/ud_userscripts/udmap.user.js UDMap]: Displays an additional set of minimaps under the main map, allowing you to see your current suburb, as well as any other suburb. I modified the appearance slightly, have started adding Necrotech buildings to the dataset (currently about 40% done), and fixed an error in the way that it calculated your location.


==To Do and Ideas==
==To Do and Ideas==
# QuickLinks: I'd love to make it contextually aware for if the player is a zombie or a survivor at the time. For instance, providing a ?rise link is of little use to survivors, just as providing a "cade" link is useless to zombies. It'd be nice if it only showed the links that were useful at any given time. Honestly though, the script's code is messy enough that I might just trash it and write my own at this point, rather than investing more time in it.
#A new menubar/HUD: While I've managed to modify QuickLinks to meet my needs for now, it's code is ugly and rather hackish. I'd love to take some time to rewrite it from scratch with better modularity and the ability to add or remove buttons more easily. Making it contextually aware would be a nice bonus too, since you don't always need all of the buttons displayed, and I'd really love to move the status info (i.e. HP, AP, XP, name) up there as well, just to clear up some more space.
# Urban Dead Building State Colourizer: Again, contextual awareness. While having the doors open and the barricades down might be something calling for red text for survivors, it might be better to have green for zombies. Other similar examples exist. For instance, if a building is already in ruins, zombies don't need to have it shouted at them since it requires no further action on their part.
#Caddy Healer: There's already a script that's supposed to do this (where "this" is displaying a list of the lowest HP people in a convenient location), but it doesn't seem to work in Safari. I figure I can write one without too much difficulty. Might be fun to make a Caddy Killer as well for PKers. Hmm...
# Urban Dead Survivor Table Sorter: UDToolbar had another wonderful feature that allowed it to sort the list of survivors at the current location by their activity. I fully intend to implement this feature at some point, since I found it to be the best feature in UDToolbar. After seeing how easy it was to grab the list of survivors, I'm sure I won't have any trouble implementing a bare bones version in a few minutes' time.
#Building State Colourizer: Again, contextual awareness. While having the doors open and the barricades down might be something calling for red text for survivors, it might be better to have green for zombies. Other similar examples exist. It might require a complete rewrite though. Not sure.
# A Group-wide UDBrain: UDBrain was a great extension, but it suffered from a major flaw in that the information could be easily shared with others. Furthermore, the timestamps that were present made things even more dangerous for survivors, since it could paint a path directly to the survivor for any zombies that wanted to follow. I've been toying with the idea of using a server to handle something like this, but only allowing trusted sources to submit or request information, and keeping a tight rein on it all. I'm not sure that I'm up for developing it at the moment, but if I did, it would offer a better way for groups to communicate the state of the suburbs that they patrol. I might also extend the idea to track zombies as well, given how easy that would be to add on top of the other features.
#Survivor Table Sorter: UDToolbar had awonderful feature that allowed it to sort the list of survivors at the current location by their activity. I fully intend to implement this feature at some point, since I found it to be the best feature in UDToolbar. I've got a basic (i.e. buggy) version running right now, but haven't had a chance to work on it in the last few days.
# Restructure the information under the minimap: UDToolbar provides the graphical display, and while that's nice, I think a simple text-based one that didn't rely on full sentences would be just as useful. I might even integrate that information into a revamped QuickLinks menu bar, that way it's entirely out of the way.
#A way of coordinating recon within a group: UDBrain allows anyone using it to share data. It'd be nice if they had something like that, but just for groups. I don't think it's possible in Safari with just userscripts though, given the way that they lock things down.
# Provide a quick character change: I'd have to look into the feasibility, but it might be possible to provide a quick menu for logging out of your current character and into another character of your choice without any additional interaction. It'd be nice if we could skip that home screen every time we wanted to check another character's status.

Revision as of 21:58, 10 September 2009

I have begun editing and creating a variety of userscripts to replicate the functionality of some of the Firefox extensions I've seen. Most of them are just minor aesthetic changes, but several of them greatly enhance the look and feel of the game to such an extent that it is hard to go back after having used them. Currently, these are the scripts I have developed.

Original Releases

These userscripts were coded from scratch by me. Feel free to use them however you want. If you run into bugs, drop me a note on my talk page and I'll see what I can do for you.

  1. A-GPS Coordinates: Like several other GPS scripts, it simply displays the GPS coordinates for your character next to the suburb name above the minimap. I like my version better since it doesn't appear to have any logical errors (as the one I previously used did), and it also uses a more elegant approach to determining the coordinates, I believe.
  2. Same Character Highlighter: Mousing over a character will underline all links to that character on the page. It's especially useful in situations where you see a long list of "A zombie..." and don't know which zombies did what. Mousing over one of them while using this script will underline all of the links to the same zombie, allowing you to see just who was responsible for what.
  3. Survivor Aggregator: When standing in an area that's crowded with survivors, rather than displaying the names of a handful of them, the minimap simply shows a count of how many survivors are at your current location (e.g. "23 Survivors"), very similarly to how zombies are displayed on the minimap. It doesn't count the survivors at neighboring blocks, just at your current block.
  4. Zero Out Buttons: Simply removes the buttons under the minimap to things like the Wiki, the FAQ, your Skills page, Contacts, etc. It's nice to have if you pair it up with QuickLinks or some other script that provides you access to those links anyway.

Modified Releases

These scripts are ones that I modified from existing code. I claim no credit for the original work and anyone is welcome to use my changes as they see fit. Most of them have incorrect comments at the top, since I didn't bother to add myself as an author or update the change logs with the modifications I made.

  1. AP Recovery Time Indicator: Displays an estimate (accurate to within 30 minutes) of when your AP will be fully recovered. I wish I could configure it to determine when the AP tick would occur, but GreaseKit doesn't support the GM_* functions at the moment, so I don't see how I can program it to remember when the character's tick would occur. It borrows code from a few extensions and userscripts, though I'll probably rewrite it with entirely original code at some point.
  2. Building State Colourizer: Colorizes some of the text on the page pertaining to barricade levels, generator/radio statuses, and a handful of other useful events. A few of the color and style choices "shouted" too much for my tastes, so I've modified almost all of them to provide better contrast on the screen and also to only "shout" when necessary. I also added the functionality to underline text.
  3. Better Name Colorer: Uses different colors for characters that are in your contacts list. Essentially, the colors are more muted (almost pastel) in color, which greatly increases the contrast and makes ready their names much easier, in my opinion. I'll probably be changing this into a general custom CSS loader eventually, rather than restricting it to just name colorizing. It borrows heavily from another userscript.
  4. HP Colorizer: Colors the "HP" text next to a person's name based on how much health they have at the moment. Makes it easier to spot those in need of healing at a glance. I've modified the colors that are used slightly. I've gone ahead and coded up my own version from scratch that cuts down on the clutter a bit, making it even easier to spot the ones in trouble. I'll post it at some point.
  5. Map Links: Displays links to the wiki and Red Rum maps for the suburb you are currently in. The only change I made was to allow it to play nice with my A-GPS script.
  6. QuickLinks: Adds a menubar to the top of the UD screen, making it easier to select a few common actions. I've added quite a few additional buttons to the menubar, negating the need to have the buttons under the minimap for the Wiki, FAQ, Skills, Contacts, and others. I've also fixed a few minor bugs, changed the appearance slightly, and added it to a few more pages.
  7. Item Combiner, Organizer, and Sorter: Makes your inventory usable by rearranging and combining buttons. I modified it slightly to hide some useless buttons that just waste your AP, and I'll be modifying it more as time goes on, but it's a great script.
  8. UDMap: Displays an additional set of minimaps under the main map, allowing you to see your current suburb, as well as any other suburb. I modified the appearance slightly, have started adding Necrotech buildings to the dataset (currently about 40% done), and fixed an error in the way that it calculated your location.

To Do and Ideas

  1. A new menubar/HUD: While I've managed to modify QuickLinks to meet my needs for now, it's code is ugly and rather hackish. I'd love to take some time to rewrite it from scratch with better modularity and the ability to add or remove buttons more easily. Making it contextually aware would be a nice bonus too, since you don't always need all of the buttons displayed, and I'd really love to move the status info (i.e. HP, AP, XP, name) up there as well, just to clear up some more space.
  2. Caddy Healer: There's already a script that's supposed to do this (where "this" is displaying a list of the lowest HP people in a convenient location), but it doesn't seem to work in Safari. I figure I can write one without too much difficulty. Might be fun to make a Caddy Killer as well for PKers. Hmm...
  3. Building State Colourizer: Again, contextual awareness. While having the doors open and the barricades down might be something calling for red text for survivors, it might be better to have green for zombies. Other similar examples exist. It might require a complete rewrite though. Not sure.
  4. Survivor Table Sorter: UDToolbar had awonderful feature that allowed it to sort the list of survivors at the current location by their activity. I fully intend to implement this feature at some point, since I found it to be the best feature in UDToolbar. I've got a basic (i.e. buggy) version running right now, but haven't had a chance to work on it in the last few days.
  5. A way of coordinating recon within a group: UDBrain allows anyone using it to share data. It'd be nice if they had something like that, but just for groups. I don't think it's possible in Safari with just userscripts though, given the way that they lock things down.