Script Summary: Creates a "flat" list of the planet shortcuts in a table for easier selection
Version: 1.06
In the old design of OGame, the coordinates of the player's planets (plus any additional coordinates added by tools like FoxGame/NeoGame) were displayed in a flat table. This made it possible to select any one of them very fast - with just a single mouse click. In the redesign, the coordinates are in a dropdown listbox and selecting one of them is a much slower process. The player has to click on the listbox, in order to open it, then has to move the mouse over an entry on the list and click again to select it. This means at least one additional mouse click, plus maybe some additional mouse moves. Just one mouse click more doesn't sound like much, but it might mean the difference between a fleet crashed and a fleet saved in a tight spot. ;-)
Many people wanted to have the list of coordinates displayed in a "flat" form similarly to the old design. It took me a long time to figure out where exactly to put such a list - but I finally managed and the result is this little script. :-) Enjoy.
BTW, if you are using Antigame (without which the redesign is unplayable, IMNSHO) and have defined some custom shortcuts for coordinates other than those of your planets, make sure that you install this script after Antigame, if you want the custom coordinates to be present in the "flat" list.
Lastly, I would like to thank QuadDamage and Asiman from the Russian OGame forum for the various ideas they tossed around and which greatly helped this script to become a reality.
2010-07-12. Version 1.01. Change log:
- Improved a bit the styles of the table containing the coordinates.
- When a coordinate was clicked, the focus remained on the coordinates panel, so the Enter key no longer triggered the "NEXT" button. Fixed.
- The moons are highlighted as Antigame has been configured to highlight them. If it is not installed, or if it is not configured to highlight moons, they won't be highlighted. If you want this feature to work, this script must be installed after Antigame.
- When the mouse hovers over a coordinate, that coordinate is highlighted by boldfacing it.
- If the list of coordinates contained too long names (especially in the old universes that were converted to the redesign, where all moons have " (Moon)" appended to their name) the table was overflowing to the right. Fixed (hopefully) by changing the number of columns of the table, if it contains at least one very long name. Unfortunately, I can't test whether it works, because I don't have moons with long names in the old universes and the redesign will not let me change the name of a planet (or moon) to something very long.
- Unless the user had the picture on the page "minimized", the footer would run across the table of coordinates. Fixed.
2010-07-13. Version 1.02. Change log:
- The dynamic decision how many columns to have in the table, depending on the length of the planet names wasn't working, because I was taking the names from a place (the dropdown listbox) where they are written with a smaller font (and, therefore, are shorter). Turns out, there is no easy and elegant way of determining how many pixels a string will occupy on the screen. :-( Still, I think I managed to do it, using a horribly ugly kludge (don't look at the code, if you're faint-hearted) - but it seems to work.
- Version 1.01 was not working in Opera, because of a bug in Opera, sigh. I think I managed to circumvent it - but in that browser the table will always have 3 columns, no matter how short the planet names. Unless they fix the bug, of course.
- The "highlighting" of the coordinates when the mouse was hovering over them by making them boldface was causing annoying "visual jumping" (because a boldface string occupies more pixels on the screen and the table width changed). QuadDamage had the brilliant idea to "highlight" them by drawing a frame around them instead - so this is what I'm doing now.
- Minor style fixes here and there.
2010-07-17. Version 1.03. Change log:
- The number of columns was still not computed correctly in some cases. Hopefully, it's finally fixed.
- The script lists the coordinates vertically. That is, if you have the following 7 coordinates:
1 2 3 4 5 6 7
the script will fill a 4-column table with them like this:1|3|5|7| 2|4|6| |
if you find this counter-intuitive and prefer the more conventional horizontal (left-to-right) ordering
1|2|3|4| 5|6|7| |
then edit the script and change the line near the beginning that saysvar listVertically = true;
to
var listVertically = false;
Also, if you change the line (also near the beginning, right under the previous one) that says
var separateMoons = false;
to
var separateMoons = true;
then the table will be always a 2-column one, with the left column listing all non-moon coordinates and the right one listing all moon coordinates, with the moons listed immediately to the right of their corresponding planets (pretty much what FoxGame/NeoGame used to do in the old design).
BTW, I see that Antigame now has similar functionality. I think that my version is more visually appealing - but Antigame's is smaller and probably more suitable for narrow screens. So, I'll probably stop developing this script any further.
2010-08-09. Version 1.04. If the script was installed after Antigame, it wouldn't see the additional coordinates (for the current planet and the user-defined shortcuts) added by Antigame. This can't be helped but the bad part was that the additional coordinates screwed up the order of the list and this script was selecting the wrong planet. The latter is fixed now, but you are still strongly advised to install this script after Antigame, in order to have this script list also the additional coordinates added by Antigame. Although Antigame provides natively the functionality of this script now, so why would you use both scripts is beyond me. :-)
2010-08-09. Version 1.05. The author of Antigame game be a brilliant idea how to make sure that my script is executed after his, no matter in which order the two of them are installed. Implemented. Now my script should work correctly and should see all the additional coordinates added by Antigame.
2011-10-24. Version 1.06. Made the script compatible with version 2.3.0 of OGame (i.e., with the idiotic changes of all the URLs of all images, scripts and styles used by the game).



