Page 1 of 15 12311 ... LastLast
Results 1 to 25 of 360

Thread: Object DTMs: A Walking/Positioning System

  1. #1
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default Object DTMs: A Walking/Positioning System

    -Object DTMs-
    -A walking and positioning system-


    - Please note, this is very outdated. -

    The Object DTM Include is an include file developed to offer an easy and accurate way to walk and position your Runescape character.


    An Object DTM is a set of sub-points anchored to a main-point, with an optional defined area polygon. The sub-points are objects found on the minimap, such as:


    Here is a screenshot showing an Object DTM being debugged on-screen:


    The green circles indicate sub-points. This particular Object DTM has two trees, and two ladders as sub-points. The red polygon is the defined area polygon that is a part of this particular Object DTM. If this Object DTM is found on the minimap, the position of the area polygon will be immediately known, relative to the Object DTM. This means that you can define an Object DTM for specific areas, and easily know if you are in the area.

    The include features:

    • - Finding an Object DTM, like a normal DTM
    • - Walking to a single point
    • - Walking a path
    • - Able to check if player is within a very precise area
    • - Works with the compass rotated
    • - Fast, and not heavy on the CPU


    A Couple of Notes:

    How To Install!
    -------------------------------------------

    - Download 'ObjectDTM.sex' at the bottom of this post.


    - Move the file to 'Simba/Extensions'. ("Simba" being the install location of Simba. On windows, usually at "C:\")

    - If you have Simba open, close it.

    - Open Simba.

    - go to 'View>Extensions'.

    - enable 'ObjectDTM.sex'.

    - go to 'ODTM>Check For Update'.

    - if it says "No ODTM update available", then go to ODTM > Settings > and check the 'Override Update' option

    - after that is done, go to ODTM > Update.
    -------------------------------------------

    How Do I Utilize This Include in My Scripts?
    I'm glad you asked! Please visit this thread to learn all about how to use the Object DTM Include.
    -------------------------------------------

    Revision Log:

    Code:
    -Version 00.1: New host, courtesy of [J]ustin.  As a result, the version number
                   has been reset.
                   Added ferns to list of useable minimap objects (MM_FERN).
                   Updated NPC dot record due to reports of NPC occasionally failing
                   to be located. 
    
    -Version 10.3: Made compatible with newest SMART and changes within SRL.
    
    -Version 10.2: Optimised object-finding code and fixed a bug that could have
                   been the root cause of many false positives.  Removed the
                   'T2DStringArray' type declaration as it was for an older planned
                   revision of the include, future plans now do not include
                   multi-dimensional strings, and it was causing duplicate errors.
                   Improved the ground level check.Fixed certain coordinates in the
                   Generation Tool that have been affected by the addition of a
                   toolbar at the top of the RS client.  Removed 'ObjectDebug', as
                   it is obsolete.  Changed the include lines at the top,
                   $DEFINEPAINT is no longer needed.
    
                   Sorry for the lack of updates this year, am trying to get back
                   on track with this and hope to be producing some exciting
                   features soon.           
    
    -Version 10.0: Updated the minimap object record for dead trees (MM_DEADTREE).
                  Fixed the bug in 'ObjDTM_WalkPath' when the first node was not
                  found and the include threw an out-of-range error.
                  Added three new global variables: 'ObjDTM_TextDebug',
                  'ObjDTM_XRand', and 'ObjDTM_YRand'.  By default,
                  'ObjDTM_TextDebug' is set to false, and the include will rarely,
                  if ever, write something to the debug box.  After calling
                  'ObjDTM_Setup' in your script, you can set this to true in order
                  to restore text debugging.  'ObjDTM_XRand' and 'ObjDTM_YRand' are
                  integers that specify the randomness with which the include will
                  click at the main-point of an Object DTM. By default, these
                  values are set to 2.  After calling 'ObjDTM_Setup' in your script,
                  you can set these to determine click randomness.  
    
    -Version 9.9: Added the function 'ObjDTM_WalkPath'.  The include now
                  contains a function to easily walk paths contained within
                  TStringArrays.  Tweaked minimap object record for ladders
                  to account for the strange half-ladders that crop up on
                  occasion.  Removed the function 'ObjDTM_Generate' and removed
                  the function 'ObjDTM_PathRecorder' these two have been
                  rendered obsolete with the new generation tool shipped with
                  the include.  'FindObjDTM' and 'ObjDTMWalk' will be removed
                  in the next version.  If they are being used in your scripts
                  please update to use 'ObjDTM_Find' and 'ObjDTM_Walk' instead.
    
    -Version 9.8: Added 'Delete ODTM' button to tool, adding ability to
                  delete and clear the current Object DTM.
    
    -Version 9.7: Fixed form bugs in generation tool.     
    
    -Version 9.6: The generation tool is now part of the 'ODTM' menu, for
                  ease of access. 
    
    -Version 9.5: Added NPC dots to list of useable minimap objects (MM_NPC).
                  Please note that only stationary NPC's, like bankers, should
                  be used.  Created a new generation tool.  Super exciting.
                  Please see:
                  'Simba/Includes/ObjectDTM/Object DTM Generation Tool.simba'
                  So far, only the 'Single' tab, and the 'Path' tab are
                  functional.  These two will allow you to make single Object
                  DTMs, and paths.
    
    -Version 9.4: Fancy hackish stuff implemented to switch people over to
                  new extension without having to manually download. 
    
    -Version 9.3: Stopped scripters from crashing script when trying
                  to use area-related methods with an Object DTM with
                  no area information.  Fixed the Minimap Object Record for
                  Cactus (MM_CACTUS).  The include should now be useable
                  in the desert.
                  Phased out 'InObjDTMArea', use 'ObjDTM_InArea'
                  Phased out 'GenerateObjDTM', use 'ObjDTM_Generate'
                  Would like to:
                  Phased out 'LoadObjects' and 'SetupODTMI', use 'ObjDTM_Setup'
                  Phased out 'ObjDTMWalk', use 'ObjDTM_Walk'
                  Phased out 'FindObjDTM', use 'ObjDTM_Find'
    
    -Version 9.2: Added extension updater!  Hooray!
    
    -Version 9.1: Removed SRL4 support since SRL5 is now standard.
            New on-SMART guide for generation tool.
            Fixed duplicate identifier errors.       
                                                               
    -Version 8.9: Fixed a bug that caused 'ObjDTM_Walk' to be more
            unreliable than it would otherwise be.  Commenting out
            Multi Object DTM related code until I can properly fix it. 
    
    -Version 8.8: Added the ability to delete sub-points while using
            the 'ObjDTM_Generate' function.  Added 'ObjDTM_PathRecorder',
            which allows you to easily create paths.  
    
    -Version 8.7: Bug fix to 'ObjDTMToString', bug caused the area to be
            nulled.  Added the 'ObjDTM_Generate' function.  This is a new
            interactive Object DTM generation tool.  You need SRL5 to use it.
    
    -Version 8.6: Support for SRL5 added.
    
    -Version 8.5: More small bug fixes/speed improvements, the function additions
            in Version 8 still aren't really functional.  Sorry :/.  Added
            'ObjDTM_InAreaEx' Which allows you to specify a specific point to
            check to see if it is in the Object DTM's area. There is now
            paint debugging, useable by setting the variable
            'ObjDTM_Debug' to true in the setup of your script.
            Trying to standardize the names of everything.  Not there yet.
    
    -Version 8: bug fix in finding function.  Overall speed improvements.  Added
            'Multi-Object DTMs' which allow for multiple Object DTMs to be
            defined in a string array, to use in the same way as single
            Object DTMs, but if one fails, the code will try the next.  Path-
            walking function.  All of these additions are untested.  Will
            try to get testing done soon.  So this update is mostly for
            the bug fix/speed improvement.  But feel free to try the new stuff.
            Haven't added comments, code is messy, real sorry about all of
            this.  Will be resolved in Rev 8.1.
    
            Added:
            ObjDTM_MultiWalk;
            ObjDTM_InMultiArea;
            ObjDTM_PathWalk;
            ObjDTM_InAreaEx;
            
            None of which are really functional at the moment, except ObjDTM_InAreaEx.
    
    -Version 7.8: Changed the single use of SplitTPAEx to SplitTPAExWrap, as
            I heard that it can cause memory leaks?
    
    -Version 7.7: Changed a few things with how updates work.  Now has the
            ability to force a roll-back in case I broke something.
    
    -Version 7.4/5/6: Changing naming convention for ease-of-updating purposes.
            Switched to new numbering system to facilitate move towards
            auto-installation and updating.  Include installer now attached
            to bottom of project post.  The include should now auto-update
            whenever a script using it is run.
    
    --------------------------------------------------------------------------------  
    -Rev7c: Updated minimap object record for boulders (MM_BOULDER), it never
            got updated with the rest of the records in Rev 5.  Fixed a small
            issue with the minimap object record for ladders (MM_LADDER), causing
            ladder finding to fail on rare occasions.  Realized that main-point
            tracking in the walking function was never implemented- now actually
            functional.  Added a check to catch if a script writer has failed
            to call "LoadObjects" before using code from the include.   
    
    -Rev7b: Fixed a bug in the 'ObjDTMToString' and 'ObjDTMFromString' functions that resulted in an out-of-range error.  
    
    -Rev7a: Added maple trees, and rocks to list of useable minimap objects
            (MM_MAPLE), (MM_ROCK).  
    
    -Rev 7: Added cacti to list of useable minimap objects (MM_CACTUS).
            Fixed a rather grievous oversight on my part, and made sure that
            SMART related code isn't actually compiled if SMART isn't defined
            in the script.  Added the rather verbosely-named
            'PrintObjDTMRecFromString' This allows you to pass an Object DTM
            in string-form, and have the record form print out in the debug.
            This makes it easy to change the contents of string-form Object DTMs. 
    
    -Rev 6: Added the henge object (stone circle columns) to list of useable
            minimap objects (MM_HENGE). Implemented polygonal areas.
            Convex/Concave polygons can now be defined for Object DTM areas,
            allowing for very specific area boundaries.
    
    -Rev 5: I think color-finding has been improved in this revision, meaning
            from now on the finding of objects is less likely to break. 
    
    -Rev 4: Added the function 'PointInPolygon' which now allows for accurate
            implementation of the 'InObjDTMArea' function. 
    
    -Rev 3a: couple of bug fixes.  The 'InObjDTMArea' function is now somewhat
                 operational.
    
    -Rev 3: Added the functions 'ObjDTMFromString' and 'ObjDTMToString' these
            supplement the new, more compact string-form of Object DTMs.  Updated
            minimap object records for trees, ladders, and plants.  All functions and
            procedures now require the string-form of Object DTMs to be passed.
            Alternatively, you can put ObjDTMToString(ObjectDTM) in place of the string. 
    
    -Rev 2: Fixed minimap object record for dead trees.  Added first version of
            the Object DTM generator.
    
    -Rev 1: Basic functionality to assist in the creation of Object DTMs, can find
            Object DTMs at any angle, and includes a simple walking function, and
            location check.
    Current Revision number is: 00.1 (1)
    Attached Files Attached Files
    Last edited by euphemism; 04-22-2014 at 09:03 PM.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  2. #2
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Looks good! DTMs are very reliable way to walk.
    When it comes to positioning in larger scale, it can harldly be used to find yourself in the whole rs world.
    I've tried this and found it's too slow and unreliable when there aren't usable object around.

    Used individually in scripts though, this looks great!

  3. #3
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Quote Originally Posted by marpis View Post
    Looks good! DTMs are very reliable way to walk.
    Thanks the core is TPA-based, though. The DTM-like aspect comes into play after the objects are found and identified. The code checks the center point and type of object when comparing. Meaning, as long as it reliably finds the objects, it is less likely to fail, compared to an actual DTM.

    E: yes, I don't think it would scale well. However, the farthest distance I have tested so far is walking from the Lumbridge courtyard to the Varrock west bank.

    E2: Also, speed hasn't been an issue, as it is quite fast.
    Last edited by euphemism; 11-23-2011 at 12:31 PM.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  4. #4
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Ha looks good, euphemism. I made a prototype DTM walker and I used just regular DTMs printed from the DTM editor. I also uses MM objects as the subpoints, but I always had problems when NPCs/Items/Players/symbols would obstruct the object on the MM. Also because I used DTMRotated to find the points sometimes it would give inaccurate results.

    I look forward to seeing how you did it! Great job, in either case.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  5. #5
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Looks neat, and seems like it would be very accurate. Nice work!

  6. #6
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Psst, side note.. use TMDTMs!

    Just a thought..

    Looks good though, I will check out the code later. Bug me about it.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  7. #7
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Looking good mate. Great to see that you finished it!

    Looking forward to see the sauce!

    ~Home

  8. #8
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Updated first post with the code, and added some more information.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  9. #9
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Looks great, I'm gonna give it a try and see what I come up with.

    By the way to clarify my DTM walker was just regular DTMs with the parent point having a super high tolerance and each subpoint only used a single color from objects on the MM.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  10. #10
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Added the functions 'ObjDTMFromString' and 'ObjDTMToString'. These
    supplement the new, more compact string-form of Object DTMs. Updated
    minimap object records for trees, ladders, and plants. Small changes to the pseudo-guide withing the main post.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  11. #11
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Awesome code, awesome commentary - something so many of us leave out.
    This looks very promising, and I'm sure will soon be adopted!
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  12. #12
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Thanks much! Also, small fixes, and now the 'InObjDTMArea' function works somewhat.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  13. #13
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Really great work here euphemism. I really enjoyed reading through your code. Will be watching very closely to see how this develops.

  14. #14
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Thanks, ReadySteadyGo. I hope future developments please you.

    Added the function 'PointInPolygon' which now allows for accurate implementation of area boxes via the 'InObjDTMArea' function.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  15. #15
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    This is very interesting!

    Keep on going, and this could turn into something great
    (I remember we had DDTM path walking at some point in SRL.. probably still there somewhere, you could search for it if you'd like )

  16. #16
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    This is very interesting!

    Keep on going, and this could turn into something great
    (I remember we had DDTM path walking at some point in SRL.. probably still there somewhere, you could search for it if you'd like )
    Could you point me to where it is located? I found path.scar, but I am not sure that is what you are referencing.

    Updated to Revision 4a, Improved accuracy of 'PointInPolygon', base code to allow for polygon areas added. Updated minimap record for ladders.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  17. #17
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Yes, path.scar is what I was talking about. IIRC Fawki posted a thread about using this tool too (long time ago...)

  18. #18
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Hmmm, okay. It does have a few interesting things in it. Do you have any suggestions to add to this project?

    E: Revision 5 is out! The object-finding function the entire include relies on should now be much more reliable (colors would occasionally break and need updating. This should happen much less often now). An example path script has been uploaded for you to test! Walks from the Lumbridge courtyard to the Varrock West Bank.

    E2: Released Revision 6. Added the henge object (stone circle columns) to list of useable minimap objects (MM_HENGE). Implemented polygonal areas. Convex/Concave polygons can now be defined for Object DTM areas, allowing for very specific area boundaries.

    It would be nice to have more feedback so that I don't have to keep deleting and re-posting this post :/
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  19. #19
    Join Date
    Aug 2007
    Location
    Hawaii
    Posts
    3,880
    Mentioned
    7 Post(s)
    Quoted
    152 Post(s)

    Default

    Bro. I think you may have finally made it possible to solve Dungeoneering mazes.
    Faith is an oasis in the heart which will never be reached by the caravan of thinking.

  20. #20
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    You're doing a great job I'll test this when I get home from school

  21. #21
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Quote Originally Posted by kingarabian View Post
    Bro. I think you may have finally made it possible to solve Dungeoneering mazes.
    I think you will find there is a lack of these objects on the minimap when doing dungeoneering, not to mention that dungeons are dynamically created every time you start one. That means that object DTMs are not really applicable for dungeoneering: however, what is it you are finding difficult with navigating a dungeon?

    Quote Originally Posted by Zyt3x View Post
    You're doing a great job I'll test this when I get home from school
    Thanks, that would be most appreciated.

    E: points are automatically rotated to account for compass direction. If the compass related code is still broken, the finding function may have problems finding the object DTMs.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  22. #22
    Join Date
    Nov 2006
    Posts
    2,369
    Mentioned
    4 Post(s)
    Quoted
    78 Post(s)

    Default

    Wouldn't it be even possible to make a script to automatically generate ObjectDTM's with this?

    Like this:
    1) MoveMouse to the position you want to walk
    2) Press f1
    3) DTM created and printed to String.

    Sounds awsome. Too bad there are no Objects everywhere.
    Quote Originally Posted by DeSnob View Post
    ETA's don't exist in SRL like they did in other communities. Want a faster update? Help out with updating, otherwise just gotta wait it out.

  23. #23
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Quote Originally Posted by weequ View Post
    Wouldn't it be even possible to make a script to automatically generate ObjectDTM's with this?

    Like this:
    1) MoveMouse to the position you want to walk
    2) Press f1
    3) DTM created and printed to String.

    Sounds awsome. Too bad there are no Objects everywhere.
    I think you will find that there is always at least one object, somewhere.
    Currently, I have a generating function where you specify a main point, and visible objects for sub-points, and it picks objects, and generates one for you, and prints out the string . If you nest it in the walking function, you can generate one and walk to it in one go, ready to make the next one. I am going to improve it so you specify the number of sub-points, and how many unique objects to use. Finding the mouse's position would be an option, but would have to be done in the browser.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  24. #24
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Wow, this seems awesome, will have to check it out
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  25. #25
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Quote Originally Posted by Camo Developer View Post
    Wow, this seems awesome, will have to check it out
    Please do so! I haven't received much feedback on actual usage.

    Revision 7 release:

    • Added cacti to list of useable minimap objects (MM_CACTUS).
    • Fixed a rather grievous oversight on my part, and made sure that SMART-related code isn't actually compiled if SMART isn't defined in the script (Making the include browser-compatible).
    • Added the rather verbosely-named 'PrintObjDTMRecFromString' - This allows you to pass an Object DTM in string-form, and have the record form print out in the debug. This makes it easy to change the contents of string-form Object DTMs during the writing of your scripts.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

Page 1 of 15 12311 ... LastLast

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
  •