OGame Redesign: Fix the Action Icons

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • OGame Redesign: Fix the Action Icons

      OGame Redesign: Fix the Action Icons
      • Info : Prevents the shifting of the action icons if no spy icon available and removes the IPM and spy icons if not applicable
      • Author : Vess
      • Website : userscripts.org/scripts/show/67948
      • Support : userscripts.org/scripts/discuss/67948
      • Download : userscripts.org/scripts/source/67948.user.js
      • Browser : FireFox + GM, Internet Explorer + IEPro, GoogleChrome + TM, Opera
      • Languages : All

        [spoiler=Description]
        Change log:

        Version 1.01. Modified the code to use a DOMNodeInserted event handler in all browsers that support it (which is everything but IE, sigh...). This is faster than the original method and the icons no longer "jump" one second after the Galaxy view page is loaded.

        Version 1.02. Now the "espionage" icon behaves like in the old design. If you run out of spy probes or fleet slots and switch to a new Galaxy page, the espionage icon doesn't disappear (well, it does, but the script puts it back). This allows you to just wait a bit until the probes have returned and send the next probe by clicking on the icon, instead of having to refresh the Galaxy first (which costs Deuterium).

        Version 1.03. In version 1.2 of the redesign, the "espionage" icon does not appear on the Galaxy page if the planet the player is currently on has no spy probes. This is stupid - the spy probes might be in flight and due to arrive soon. It is much better to always display the "espionage" icon and show an error message if the player tries to spy but there are no spy probes (or fleet slots) available. This version of the script fixes this stupidity.

        Version 1.04. Modified the code so that the script now works also in the old universes that are converted to the redesgin.

        Version 1.05. Added support for version 1.3 of the redesign. Now the icons for planet relocation in the Galaxy view look inactive, if the player does not have at least 240.000 Dark Matter. Instead of "Relocate", they have tooltips that say "Dark Matter < 240.000" (the exact wording depends on the language of the server). Although the icon looks inactive, it can still be clicked - but instead of initiating the planet relocation process, which would ultimately end with an error message (because of the insufficient Dark Matter), the player is taken to the Dark Matter purchasing page.

        Version 1.06. Replaced the "ghostly" images of the moons in Galaxy view with their proper pictures (as they appear on the fleet movement page). Strictly speaking, this isn't an "action icon" but I didn't feel like repeating the whole parsing of the Galaxy structure in a separate script when just a few additional lines in this one would do the job.

        Version 1.07. I had forgotten to replace the moon image in the pop-up menu for that moon. Fixed. Also, if you don't like the fact that the script is replacing the moon pictures, set the constant moonPics near the beginning of the script to false.

        Version 1.08. Made a small change to reflect the Christmas price reduction of the planet relocation (from 240.000 to 160.000 between 20th and 22nd of December, 2010).

        Version 1.09. The script was not removing the espionage icons from the planets, belonging to players that were too strong ("reverse-noob" protection). Fixed. Also, the script now removes the unnecessary menu items from the menus that pop up when hovering with the mouse over planets and moons belonging to players under noob protection ("Missile Attack") and players in vacation mode (all menu items - "Espionage", "Attack", "Missile Attack", "Transport").

        Version 1.10. The script now removes the espionage icons from planets that are too far away from the current one - so that they cannot be spied from the Galaxy view anyway, because the spy probes can't hold enough fuel for the trip. (Such planets have to be spied from the Fleet Dispatch pages, by sending the probes at speeds lower than 100%.) "Too far away" is defined as "either more than two galaxies away from the current planet, or exactly two galaxies away with the game settings set to send single probes only".

        Version 1.11. Bugfix. The script wasn't determining correctly the configured number of probes to send and was hiding espionage icons that it shouldn't have. Fixed.

        Version 1.12. The script now shows the activity of the player's own planets on the Galaxy page - just like the game shows it for the planets that belong to other players. Note, however, that the script will show only the activity of the planets. If you have one or more moons in a system, cause activity on those moons but not on their planets, when you view the Galaxy page for that system, only the activity of the planets will be shown. This is because the game provides no information about the activity information about one's own moons on the Galaxy page.

        Version 1.13. There was an obscure bug - if you were viewing the Galaxy page while standing on a moon, all positions in the same system higher than the one where your moon was, were not processed correctly. That is, the moons weren't replaced with pictures, the activity was not shown, the non-working menu items and action icons were not removed and so on. Since this occurred only when standing on a moon, only in the system where the moon was and only for positions higher than that moon, it is unlikely that you have encountered this bug. Anyway, it is fixed now.

        Version 1.14. Version 2.2.8 of the game changed the format of the Galaxy view (the activity is now in a separate field in the tooltip of the planet, instead of in its header) and broke my script (badly). Fixed. At least now it works in version 2.2.8. I hope I didn't break anything for those who are still stuck with an earlier version of the game, but I have no means of testing the script there.

        Version 1.15. Had forgotten that version 2.2.8 of the game also changes the format of the Dark Matter box (from where the script gets the text "Dark Matter" in a language-independent way, to be used in the tooltip of the planet relocation icon in Galaxy view). Fixed. Also, the script is now accounting for the cheaper planet relocation price between 2011-Aug-25 and 2011-Aug-26.

        Version 1.16. The script was made compatible with version 2.3.0 of OGame (i.e., with the idiotic changes of all URLs of all images, scripts and styles in it).

        Version 1.17. Apparently, version 2.3.0 made some additional changes to the contents of the Galaxy page - changes, which prevented the script from working correctly. Fixed now, hopefully.
        [/spoiler]