Results 1 to 10 of 10

Thread: How o find models and textures ID's if there are a lot on the screen?

  1. #1
    Join Date
    Mar 2012
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default How o find models and textures ID's if there are a lot on the screen?

    the tutorial not showing methods for finding Id's if u get a lot on the screen and can't decide.

    Thanks.
    Last edited by moring; 11-26-2015 at 12:58 PM.

  2. #2
    Join Date
    Oct 2012
    Posts
    1,258
    Mentioned
    40 Post(s)
    Quoted
    588 Post(s)

    Default

    which tutorial? I assume you mean the pinned opengl one by clarity, in which case they did infact show a method of doing so.

    Quote Originally Posted by Clarity View Post
    The image below shows that visually debugging models isn't always easy:
    Figure 5.4

    Therefore, we need to resort to the debug window and use ogl.getModels() to its full potential - retrieving all models on screen. As you can see from Figure 2.3, there can be thousands of models on screen, so attempt to zoom in to narrow the search as much as possible and edit the script.
    Script 5.5
    Simba Code:
    program ogLib;
    {$i ogLib\lib\core\core.simba}

    var
      clientCenter: TPoint;

    procedure mainLoop;
    var
      allModels, trollBrutes: glModelArray;
    begin
      allModels := ogl.getModels();
      clearDebug;
      writeln(allModels);
      wait(250);
      {
      trollBrutes := ogl.getModels(403123861);
      if trollBrutes.isEmpty() then
        writeln('No Troll brutes found.')
      else
        mouse.click(clientCenter.closest(trollBrutes)[0].randomizePointEllipse(15));
      wait(random(1000, 2000));
      }

    end;

    begin
      ogl.setup([800, 600], [0, 0, 800, 600]);
      clientCenter := ogl.getClientMidPoint();
      repeat
        mainLoop;
      until false;
    end.

    Figure 5.5

    If done correctly, your debug window should contain something similar to the following figure. Copy the contents into Notepad or any text editor.
    Figure 5.5
    Code:
    [{ID = 487932993, TID = 107, X = -197, Y = 669}, {ID = 208265157, TID = 84, X = -28, Y = 591}, {ID = 528332493, TID = 195, X = 780, Y = 695}, {ID = 2410841246, TID = 121, X = 539, Y = 603}, {ID = 3258171939, TID = 53, X = 249, Y = 597}, {ID = 3587280739, TID = 248, X = 798, Y = 462}, {ID = 4105139511, TID = 59, X = 265, Y = 452}, {ID = 545440014, TID = 60, X = 277, Y = 326}, {ID = 403123861, TID = 706, X = -87, Y = 141}, {ID = 3097012422, TID = 135, X = 239, Y = 173}, {ID = 545440014, TID = 45, X = 93, Y = 135}, {ID = 4105139511, TID = 59, X = -1, Y = 143}, {ID = 2477500689, TID = 49, X = -68, Y = 66}, {ID = 427589626, TID = 80, X = 687, Y = 90}, {ID = 1580736461, TID = 57, X = 4, Y = -1}, {ID = 4105139511, TID = 29, X = 853, Y = 20}, {ID = 2297058922, TID = 62, X = 323, Y = -58}, {ID = 528332493, TID = 130, X = 450, Y = -72}, {ID = 1279548371, TID = 49, X = 827, Y = -36}, {ID = 0, TID = 0, X = 0, Y = 0}, {ID = 0, TID = 0, X = 2821, Y = -1545}, {ID = 403123861, TID = 706, X = 520, Y = 336}, {ID = 1452224228, TID = 21, X = 520, Y = 336}, {ID = 1212609603, TID = 1444, X = 400, Y = 331}, {ID = 2209194569, TID = 18, X = 45, Y = -122}, {ID = 0, TID = 0, X = -2278, Y = -5033}]

    We know the model ID of the troll and it appears to share the exact coordinate of the reticule, so first find the glModel entry belonging to the troll. In this case, you'll see that its coordinates are (520, 336). You can quite literally copy the "X = 520, Y = 336" and search the record for an exact match, belonging to the ID 1452224228.

  3. #3
    Join Date
    Mar 2012
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Thank you.
    I find it hard to understand all the functions in this library.
    there is a documentation of this library?
    I mean functions like RandomizePointEllipse. I can only guess what it does but more complicated functions are not understandable.

  4. #4
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

  5. #5
    Join Date
    Mar 2012
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by Clarity View Post
    Alternatively you can use this highlighting tool to debug IDs: https://villavu.com/forum/showthread...260&highlight=
    What functions are you not understanding?
    for example:
    randomizePointEllipse(15)
    I can guess this function returns a random point in a certain circular area with a diameter of 15. that's because I read the code of this function. but i'm not sure.

  6. #6
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

    Default

    Quote Originally Posted by moring View Post
    for example:
    randomizePointEllipse(15)
    I can guess this function returns a random point in a certain circular area with a diameter of 15. that's because I read the code of this function. but i'm not sure.
    In the includes, you can see:

    Simba Code:
    function glModel.randomizePointEllipse(funcDiameter: int32): tPoint;
    function glTexture.randomizePointEllipse(funcDiameter: int32): tPoint;
    function tPoint.randomizePointEllipse(funcDiameter: int32): tPoint;

    Any documentation for this function would simply restate the above, somewhat redundantly. However, we are working on documentation slowly for interfaces and such that might require further explanation

    Any more functions that are confusing you?

  7. #7
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    An ellipse with one diameter?

  8. #8
    Join Date
    Jun 2012
    Posts
    586
    Mentioned
    112 Post(s)
    Quoted
    296 Post(s)

    Default

    Quote Originally Posted by Citrus View Post
    An ellipse with one diameter?
    Circle = ellipse.

    But, I had it use a W and H for the ellipse but found I never used it. If people want it, it can obviously be added.




    Skype: obscuritySRL@outlook.com

  9. #9
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Quote Originally Posted by Obscurity View Post
    Circle = ellipse.

    But, I had it use a W and H for the ellipse but found I never used it. If people want it, it can obviously be added.
    I just found that funny for some reason.

    You can have any ellipse you want! As long as it's a circle.

  10. #10
    Join Date
    Mar 2012
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Just would be nice if we had a doc to make our life easier a bit.(Searching for a function you need in a long code is not ideal if you're not familiar with the code and you are not guy who wrote it).
    Thank you

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •