Map scale info? menu

Shout-Out

User Tag List

Results 1 to 12 of 12
  1. #1
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Map scale info?

    So is there a map scale factor that I'm missing somewhere, maybe in the DBC's?

    The reason I ask is that consistently I'm getting spells that should be in range, telling me that they're out of range, according to the game. I go by the max range per the tooltip (and DBC), and yet the game is still throwing out of range errors consistently until I move in.

    I've tested and it seems like the range is off consistently by a factor of about 1.25 -- that is, for every 1 unit I think that I am from the target, the game seems to think that I'm 1.25 units away. This same scale value applied for three different spell ranges all in the same zone -- the storm peaks -- so I'm wondering if there is some kind of zone-wide scaling I have to apply to my calculated distances?

    If this is an easy searchable question, sorry, but I googled and used the search here, with no luck.

    Anyone know?
    Don't believe everything you think.

    Map scale info?
  2. #2
    Megamike55's Avatar Active Member
    Reputation
    23
    Join Date
    Oct 2010
    Posts
    49
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've not hit any problem like what you describe but I have encountered the following:

    1) Lag. My client thinks I'm in range, so bot starts casting spell, but server thinks I'm still too far away. I put in a good 400 MS delay to cover the fact that from the time I think I'm in range, to when the server thinks so, can be quite a bit of time.

    2) Calculating distance in 2d vs 3d. I used to calculate distance to my target in only 2d. On hills / steep areas of the game, the actual distance to target can be quite a bit off.

    these are kind of obvious problems, but sometimes even the best of us skip over them. Were either of these the problem?

  3. #3
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I never really noticed this behaviour, but I've just done some simple distance tests and there definatly is a difference between the ingame 'yards' and my calculated distances (using pythagoras' theorem). What's even more intriguing, the exact opposite of what you describe happened to me.

    Zone: Sholazar Basin, Class: Priest 0 talents, Spell: Holy Fire (30 yards): depending on terrain, can stand anywhere between 31 and 34 units away.

    I'll jump by in Storm Peaks later today.

    Could it be related with how mob pathing works?
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  4. #4
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll try calculating the 3D distance to see if that's the issue. If that's not it, I guess it's just yet another "multiply by this random variable that nobody knows where it comes from" case -- I can deal with it by coding in some wiggle room, but it's just frustrating.

    Thanks!

    Edit: Nah, it's not the 3D distance/2D distance thing, and it's not constant, either. One area of Storm Peaks was producing a consistent 1.16 variation, another was 1.07. It's not lag based, because I'm picking non-pathing mobs and giving my character a few seconds to "settle" before testing the distances, either.

    In the short term, I can fix this by just relying upon IsSpellInRange -- which seems to work more consistently to tell me when I can cast a ranged spell, but which doesn't help me with minimum ranges (IE, if a spell has both a min range and a max range, IsSpellInRange won't tell me which range I'm out of... but I can guess). I guess we'll have to pick apart this Lua function to get a better idea of how the client does change checks, if we want to get yard-precise range checks.
    Last edited by amadmonk; 11-29-2010 at 11:30 AM.
    Don't believe everything you think.

  5. #5
    Bobbysing's Avatar Member
    Reputation
    192
    Join Date
    Jan 2009
    Posts
    36
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by amadmonk View Post
    I'll try calculating the 3D distance to see if that's the issue. If that's not it, I guess it's just yet another "multiply by this random variable that nobody knows where it comes from"
    What even made you think that they don't use the 3D distance, were players ever able to kill each other when one of them was flying 1000 units above the other? I'd suggest to actually have a look at the clientside-checks, they're not that complicated!

  6. #6
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, I was always assuming they were using 3D checks. Since 90% of my fights/testing was happening on flat ground, however, I used the lazy way and was doing the 2D distance. I've changed my main distance calculation method to use 3D distance now, so that's not going to be an issue. Unfortunately, as my above post points out, it still isn't matching what the client reports for IsSpellInRange.

    I'll work on reversing the Lua function tonight, but ... it's NOT a trivial function. There's a switch/case with at least 20 branches in it (once you get into the actual "range check" function, which is one level down from IsSpellInRange). Since my IDA/HexRays is a bit old and doesn't do all the SSE niceness that current versions do, it may take a while.

    One thing I'm curious about is that there are now two different "get position" VMT methods. I don't remember what they are called, but I'm using the one that's not a "map position" (or whatever) -- I was assuming that that did the map scaling (from 0-1.0), but I never verified that assumption. So -- to the group -- does the other "map" VMT position method return something more interesting than the map coordinates?
    Don't believe everything you think.

  7. #7
    Kryso's Avatar Active Member
    Reputation
    40
    Join Date
    Jul 2009
    Posts
    97
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My guess would be that it has something to do with models. I think wow doesn't do spell distance check between XYZ of entities but between XYZ+something (possibly only increased Z). That would explain two different "get position" methods. Next possibility would be that it doesn't do distance checks between points, but between some kind of edges of model - that would suit Robkes description where he has bigger range than expected. Or maybe combination.
    Tea and cake or death?!

  8. #8
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, that's a good point. It might be model scale... my tests where I got 1.16/1.07 were against two different types of mobs -- one very large, "giant-like" creature, and one small humanoid (specifically, the yetis and snobolds in Storm Peaks, if anyone wants to replicate my results).

    Edit: namreeb had a really good -- and simple (the best kind) -- idea: I should use traceline instead of simple Pythagorean range checks. I think traceline returns distance to intersection, doesn't it? Plus, doing this -- right now I'm not even calling traceline -- will give me LOS checks for free.
    Last edited by amadmonk; 11-29-2010 at 01:58 PM.
    Don't believe everything you think.

  9. #9
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't have the problem you describe, rather I have a wiggle room of +1-5 units depending on Mob pathing and lag.


  10. #10
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, but remember, this was checking with non-moving mobs and a non-moving toon (and not moving for 3-5 seconds, which is more than enough time for the client's estimation of the position to catch up with the server's guess). It wasn't lag-based; there's something fundamentally wrong with the assumption that a spell of range 40 will always work if your Pythagorean distance (2D or 3D) between object points is 39.9. Building in "wiggle room" might well be the best solution from a bot standpoint, since it's very simple and "usually" works. But since I want my bots to grind instances 24/7, I want to get something that almost always works and doesn't get stuck in that blind spot where the bot thinks it's in range but the game doesn't...
    Don't believe everything you think.

  11. #11
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What I meant by my post is that, if my spell range is 35 I can go a distance of 35-40 (If a mob isn't moving) and be in range. If the mob is moving away or I'm lagging, it will say i'm in range then change it's mind once the spell has "Casted".


  12. #12
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, I understand. The problem I'm having is that the "if my spell range is 35 I can go a distance of 35 ... and be in range." Using both 2d and 3d distance, many of my tests show that I'm NOT in range of an unmoving mob. This is with 0 lag. Again, this isn't a delay or lag-based issue. Here's a test; go to the Storm Peaks, target a yeti, go to a distance of JUST under 35 yards according to the 2d/3d distance between your position and the mob's position. Try to cast a 35 yard range spell; I'm 99% certain that you'll find that wow still says you're out of range.

    I'm pretty sure that the money shot for IsSpellInRange is this method:

    _DWORD __cdecl sub_814570(void *pFromObj, WGUID toGuid)

    Only iffy bit is that it's a custom calling convention; it expects eax to have the spell ID coming in. I'll do the little bit of assembly needed to wrap this up and see if it's what we need to reverse.

    Edit: grr... it's not the bounding radius. It's not the OBJECT_FIELD_SCALE_X value (which always seems to be 1.0). Still poking...
    Last edited by amadmonk; 11-29-2010 at 10:49 PM.
    Don't believe everything you think.

Similar Threads

  1. Map pack 4 Info **5 NEW ZOMBIE MAPS**
    By lxhackdxl in forum Call of Duty Cheats,Glitches, Hacks and Exploits
    Replies: 1
    Last Post: 07-26-2012, 03:01 AM
  2. [Request on Info] Map Changing.
    By pant in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 05-24-2008, 03:47 PM
  3. Collected Naxx info
    By impulse102 in forum World of Warcraft General
    Replies: 1
    Last Post: 06-04-2006, 01:44 AM
  4. Info on taking Ragnaros (And other MC general info)
    By Cush in forum World of Warcraft Guides
    Replies: 4
    Last Post: 05-28-2006, 03:53 AM
  5. Cuergo's Treasure Map No wait Timer!
    By Matt in forum World of Warcraft Exploits
    Replies: 1
    Last Post: 05-03-2006, 01:59 AM
All times are GMT -5. The time now is 10:47 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search