small GUI mods (map toggle and serverlist autosort)
I made 2 small GUI mods.
1. A toggle-able map for in-game with a few changes from the default one.
I created this mod because I had difficulty to learn all the locations in the maps and always ended up pressing C ...
more details below.
Modified Files: GUIMinimap and GUIMarineHud
2. Serverlist autosorting
I always hated that I have to press ping twice to get the low ping servers (because first press sorts descending), so I spent some time looking into it.
Also if sorting is changed, then the following refreshes uses the new sorting for the current list.
Modified Files: GUIMainMenu
[attachment=36115:mod.zip]
Map Features:
Map can be toggled
high map transparency (stronger than default)
using spectator map texture (removes darker background behind map)
map transparency can be changed by hotkeys
location names always full visible (when map is active) and a bit larger (size 14 instead of 13)
larger map
Keys (currently hardcoded):
C - normal map (stronger transparency), if map is toggled, this makes the map more visible
shift-C - toggles map
P - increases visibility
L - deceases visibility
Note:
This was the first time I wrote lua code, so it might contain bugs.
Also the serverlist mod implementation wastes CPU power, because I didn't found a list loaded event (at least none that got called) and had to use an existing refresh call. which is called multiple times (and now causes multiple sorts), however it still works (at least on my system).
1. A toggle-able map for in-game with a few changes from the default one.
I created this mod because I had difficulty to learn all the locations in the maps and always ended up pressing C ...
more details below.
Modified Files: GUIMinimap and GUIMarineHud
2. Serverlist autosorting
I always hated that I have to press ping twice to get the low ping servers (because first press sorts descending), so I spent some time looking into it.
Also if sorting is changed, then the following refreshes uses the new sorting for the current list.
Modified Files: GUIMainMenu
[attachment=36115:mod.zip]
Map Features:
Map can be toggled
high map transparency (stronger than default)
using spectator map texture (removes darker background behind map)
map transparency can be changed by hotkeys
location names always full visible (when map is active) and a bit larger (size 14 instead of 13)
larger map
Keys (currently hardcoded):
C - normal map (stronger transparency), if map is toggled, this makes the map more visible
shift-C - toggles map
P - increases visibility
L - deceases visibility
Note:
This was the first time I wrote lua code, so it might contain bugs.
Also the serverlist mod implementation wastes CPU power, because I didn't found a list loaded event (at least none that got called) and had to use an existing refresh call. which is called multiple times (and now causes multiple sorts), however it still works (at least on my system).
Comments
Thank you.
Dear NS2 team, just add a toggle map option in game please? Thanks.