• posted a message on _Cursor

    Open [Location of your World of Warcraft folder]/World of Warcraft/Intercace/Addons/Cursor/_Cursor.lua

     

    You can edit it with any text editor you please. I prefer Notepad++, but the plain ol' Notepad that ships with Windows will work too.

     

    The lines of interest are between 68 and 158. All the models _Cursor has are listed here, along with their scale factors and offsets.

     

    One such line looks like this:

    ["Weather, cloudy"] = "spells\\goblin_weather_machine_cloudy|1.5|2.1|11|-9",

    What you're interested in tinkering with are the last four numbers. They are listed in a specific order, separated by vertical bars. From left to right, they are: Scale factor, default rotation (should be safe to just leave alone), X offset, and Y offset. This particular model uses a scale factor of 1.5, a default rotation of 2.1 radians, an X offset of 11, and a Y offset of -9.

     

    Some lines omit some of these values. A couple examples:

    ["Sparks, periodic healing"] = "spells\\lifebloom_state|||8|-8",
    ["Sparks, red"] = "spells\\immolationtrap_recursive|4",

    The first line here is missing a scale factor and a rotation, as denoted by no number where one should be. It has a scale factor of 1, rotation of 0, X offset of 8, and Y offset of -8. The second line is missing a rotation and offsets, as denoted by simply ending early. It has a scale factor of 4, rotation 0, X offset 0, and Y offset 0.

     

    If the scale factor is missing, it defaults to 1. If rotation, X offset, or Y offset are missing, they default to 0.

     

    To actually test your tweaks, you'll need to save your new _Cursor.lua, then open WoW. If WoW is already open, you can type /reload to load the most-recently-saved file.

    Link Removed
  • posted a message on _Cursor

    Good news, bad news time!

     

    The good news is, I've determined the problem, and, for some definition, "fixed" _Cursor.

     

    The bad news is, it's going to take some work to properly fix it.

     

    There were two major problems keeping _Cursor from doing anything post-7.2. The first, I've already covered. SetPosition() takes arguments in the order (z, x, y) now, instead of (x, y, z).

     

    The second problem is that _Cursor was making a frame of type "Model", which I believe changed name to (or perhaps was made obsolete by) the frame type "PlayerModel".

     

    So, the first fix is as follows. Both changes are in _Cursor.lua.

     

    Change line 426 from
    model:SetPosition(posX, posY, 0)
    to
    model:SetPosition(0, posX, posY)
    
    Change line 523 from
    model = _G.CreateFrame("Model", "CursorModel" .. index, self)
    to
    model = _G.CreateFrame("PlayerModel", "CursorModel" .. index, self)

     Doing this will cause the models to once again appear on screen. But there's a problem; they don't sync up with the cursor.

     

    As it turns out, every single model that _Cursor offers has its own unique offsets and scale factors that let them follow the cursor perfectly. These offsets are no longer accurate and will need to be tweaked. This is more work than I am willing to do.

    Link Removed
  • posted a message on _Cursor

    That shouldn't be a problem. _Cursor works by adding PlayerModel frames. If they broke those, then 3D models in nearly all unitframe addons would be broken, but SUF (at the very least) is fine. It doesn't do anything with nameplates.

     

    Like I said before, PlayerModel:SetPosition seems to want arguments in the order (z, x, y) instead of (x, y, z), which seems to be a new change in 7.2. Unfortunately, rearranging the arguments in this call doesn't visibly work. If it did, I'd have fixed it.

     

    I'm 100% sure it's fixable. I just don't know how. Blizz is really bad about documenting changes to their API.

     

    And I wouldn't be so quick to call Kaydo9 a liar. Things like this are common in programming; a single user gets a weird result that nobody else can reproduce. Literally any combination of standard Blizzard settings and other addons could cause it.

    Link Removed
  • posted a message on _Cursor

    No luck, I'm afraid. Couldn't reproduce what you showed me.

     

    Thanks though!

    Link Removed
  • posted a message on _Cursor

    I might be able to fix it with more information.

     

    Which model can you see? Where do you see it on screen when your mouse is where? And what settings (scale, facing, x and y offsets) does it have?

    Link Removed
  • posted a message on _Cursor

    I've successfully nerd-sniped myself to insanity trying to fix _Cursor. Unfortunately, I have failed in fixing it.

     

    This isn't an easy nut to crack. _Cursor isn't throwing any errors, so it's difficult to find what's causing the problem. For what it's worth though, PlayerModel:SetPosition seems to take arguments in the order (z, x, y) now, instead of (x, y, z) as _Cursor is coded.

     

    Right now, I'm making do with a weak aura. I made a texture aura, set it to anchor to my mouse, and animated it to be as obnoxious as I wanted. Unfortunately, this doesn't allow for any trails or particle effects following the wake of mouse movement.

     

    I've tried making a model weak aura to duplicate the trail effect, with limited success. I ultimately managed to get a trail-leaving model under the cursor, but the model seems to like to jump around the screen whenever I click any button.

     

    It's clearly not an unsolvable problem, but it might take a while to fix.

     

    For those interested, here are the weak auras I mentioned:

     

    Cursor texture aura (works fine): https://pastebin.com/dYDcqNG9

    Cursor trail aura (is finicky, doesn't work as desired): https://pastebin.com/aD1WbmAy

    Link Removed
  • To post a comment, please or register a new account.