WoW Vanilla 1.12.1 mod giving Classic style nameplate hiding behaviour and better TAB key functions and background notifications.
I don't take ANY responsibility if this mod is originate in Burning Legion, or it would crash you game, or some Turtle ban your account. USE AT YOUR OWN RISK.
UnitXP-SP3-with-loader.zip
from https://github.com/allfoxwy/UnitXP_SP3/releases/latestWoW.exe
UnitXP_SP3_Addon
into WoWclient/Interface/AddOns/Enable sideload-DLL.exe
WoW_sideload-DLL.exe
Additional tips:
Enable sideload-DLL.exe
after installation, it's a huge file because of Node.jsUnitXP_SP3.dll
itself works on elder Windows, you might try using VanillaFixes loader for it on elder Windows.This mod adds a few targeting functions to help you have a better TAB.
Currently when continuously trigger these functions, you may experience a small lag between switching target. I believe this is because game needs a server communication to obtain Target of Target information. I wish I could find a better way in future.
Functions could be accessed via Key Bindings menu, or via macro.
/script UnitXP("target", "nearestEnemy");
Return TRUE when found a target.
Target nearest enemy. It is the one and the only one nearest enemy. No bullshit. And it follows rules:
/script UnitXP("target", "nextMarkedEnemyInCycle");
/script UnitXP("target", "previousMarkedEnemyInCycle");
Return TRUE when found a target.
These functions only target mobs with a mark icon in order:
With following rules:
/script UnitXP("target", "nextEnemyConsideringDistance");
/script UnitXP("target", "previousEnemyConsideringDistance");
Return TRUE when found a target.
These functions are designed for melee:
/script UnitXP("target", "nextEnemyInCycle");
/script UnitXP("target", "previousEnemyInCycle");
Return TRUE when found a target.
These functions are designed for ranged:
/script UnitXP("target", "worldBoss");
Return TRUE when found a world boss.
World boss needs special attention:
"In front of player camera" is defined by a factor which could be adjusted with:
/script UnitXP("target","rangeCone", 2.2);
When this range cone factor in its minimum value 2, the cone is same as game's Field of View.
By default it's 2.2 . Increasing the factor would narrow the cone, so that only mobs in the center of vision would be targeted.
For example: "We target raid mark first. However when no mark, we cycle in magic range":
/script local _=(UnitXP("target","nextMarkedEnemyInCycle") or UnitXP("target","nextEnemyInCycle"));
This code works because targeting functions return TRUE or FALSE indicating if they got a target. Lua logic operators support short-cut evaluation, that is, they evaluate their second operand only when necessary.
Vanilla client only check distance for nameplates. This makes mobs behind wall/door also show up their nameplates.
This mod changes Vanilla behaviour to Classic style:
Lua nameplate addon would work out-of-box, no need to change anything.
By default this feature is enabled. You could toggle its switch:
/script UnitXP("modernNameplateDistance", "enable");
/script UnitXP("modernNameplateDistance", "disable");
/script local result = UnitXP("inSight", UNIT_ID, UNIT_ID);print(result);
UNIT_ID could be "player", "target"... also GUID string "0x12345"
Return TRUE for in sight, FALSE for NOT in sight, NIL for error.
This function has limitation:
/script local result = UnitXP("distanceBetween", UNIT_ID, UNIT_ID);print(result);
UNIT_ID could be "player", "target"... also GUID string "0x12345"
Return a number, or NIL for error.
/script UnitXP("notify", "taskbarIcon");
Flash would stop when game back to foreground.
To make this function link with certain game events like whisper/trade/invitation etc, we need the Lua Addon.
/script UnitXP("notify", "systemSound", "SystemDefault");
Only work when game is in background.
To make this function link with certain game events like whisper/trade/invitation etc, we need the Lua Addon.
/script local timerID = UnitXP("timer", "arm", 1000, 3000, "callbackFunctionNameString");
/script UnitXP("timer", "disarm", timerID);
Vanilla way doing periodic work is to use GetTime() in an OnUpdate() function and check if the time is come. This is basically doing busy waiting. And because of the game is single-threaded, these timer pulling call would cost FPS. Mostly these function call are useless. For example on a 60 Hz display, we need triggering an event every second, then there would be 59 useless function call before every 1 useful call. Blizz later added C_Timer facility in patch 6.0.2 to solve this problem.
This mod adding a new timer facility to the game. These timers are running in a serperated thread so that their pulling call would not block game thread. When a timer triggers, it would call the corresponding Lua callback in game thread. The callback is passed with a single parameter which is timer ID
. It is safe to arm
or to disarm
timers in callbacks.
The arm
method in above example has 2 numberic parameter: The first 1000
means the timer would goes off when 1000ms after the arm
method. The second 3000
means the timer would repeatly run every 3000ms after first trigger. If we pass a 0
to second numberic parameter, the timer would only goes off for once then disarm itself.
Beware that the timer is running in a seperated thread so game's /reload
would NOT disarm a repeating timer. AddOns need to take care of their own repeating timer in PLAYER_LOGOUT
or PLAYER_LEAVING_WORLD
event and call disarm
method to shut down cleanly.
Timer accuracy is decided by FPS: There would be at most 1 callback for each timer per frame. And because of operating system's scheduling decision it is possible that there could be no timer callback during a frame.
These only work with included vanilla-dll-sideloader, VanillaFixes loader skip them.
When mod loads, it adds some globals to Lua:
You could check their existance to tell if certain function is available.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.