A Comprehensive Set of Tutorials For
-Object DTMs-
-A walking and positioning system-
Introduction and Generation
The Object DTM Include is an include file developed to offer an easy and accurate way to walk and position your Runescape character.
Please direct yourself here to read what it's all about, and how to get it installed before proceeding.
-----------------------------
First Post Contents:
- What Is An Object DTM?
.- How to Setup Your Script With the Include
.- How to Generate an Object DTM
-How to Start the Generation Tool
-A quick overview of the buttons and tabs
.- How to Generate a Single Object DTM
-A few notes on creating Object DTMs
.- How to Generate a Multi-Object DTM
.- How to Generate a Path
-A few notes on Object DTMs for paths
.- How to Generate a Multi-Path
-What Is An Object DTM?-
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.
-----------------------------
-How to Setup Your Script With the Include-
I am going to assume you have followed the link at the top of this post, and have gotten the updater extension installed, and have successfully downloaded the latest version of the include.
The first thing you need to do, is add an include statement to the top of your script. An example set of include statements would be:
Simba Code:program Script;
{$DEFINE SMART}
{$i SRL\SRL.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
The Object DTM Include will automatically include the PaintSmart file, used to paint on the SMART canvas. If for some reason you want it included in your script anyway, your include statements will have to look like this:
Simba Code:program Script;
{$DEFINE SMART}
{$DEFINE PAINT}
{$i SRL\SRL.simba}
{$i SRL\SRL\Misc\PaintSmart.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
Before any methods from the include are used, the setup procedure needs to be called. A good practice is calling it right after you call 'SetupSRL' in your script. A barebones script setup showing how to properly include and setup the Object DTM Include is:
Simba Code:program Script;
{$DEFINE SMART}
{$i SRL\SRL.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Member := True;
Players[0].Active := True;
Players[0].Pin := '';
end;
begin
Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
ClearDebug;
SetupSRL;
ObjDTM_Setup;
DeclarePlayers;
if (not LoggedIn) then
LoginPlayer;
end.
That is all there is to getting the include ready to use with a script.
-----------------------------
-How to Generate an Object DTM-
-How to Start the Generation Tool-
The first step is to open up the Object DTM Generation Tool:
After clicking "Generation Tool" the tool's script file should automatically open and run.
At this point, you can stop it, and comment out {$DEFINE SMART} if you would rather not use the tool with SMART.
Once Runescape has finished loading, you need to enter your username and password and login. Run the tool's script after logging in, and you will be presented with this:
A quick overview of the buttons and tabs:
------------------------
'Single' tab: This tab contains all the components of the tool that are needed to generate single Object DTMs.
------------
Contained within the tab:
- The minimap area: This area is where the minimap is displayed, and where you interact to create your Object DTMs.
- Instructions box: This field displays instructions relevant to the current open tab in order to assist the creation process.
- Output box: Below the instruction box, this box is where printed Object DTM strings appear.
- 'Grab Minimap': This button grabs the current view of the minimap, and shows it on the minimap area.
- 'Clear Minimap': This button clears any paint off of the minimap area in case you need a better view.
- 'Delete ODTM': This button deletes the current Object DTM in memory if you want to start over.
- 'Print Object DTM': This button prints out the string form of the Object DTM in the output box, and in Simba's debug box.
- 'Print Record' check box: If checked, this prints the record form, along with the string form of the Object DTM, in Simba's debug box.
------------
Properties panel: This is the panel on the form with the tabs 'Sub-points', 'Main-point', and 'Area'. This panel contains all the tool components for editing and modifying an Object DTM.
------------
------------------------
'Sub-Points' tab: This tab contains a list of all viable minimap objects, and a button to gather them. You can only interact with sub-points on the minimap area when this tab is active.
------------
Contained within the tab:
- Objects list: Scroll through the list, and click on an object type in preparation of gathering the selected object.
- 'Gather Object': When clicked, this button finds the selected object in the objects list on the minimap, and paints white circles around all found instances.
------------
------------------------
'Main-Point' tab: This tab contains the current coordinates of the main-point, and a button to reset the point to the center. You can only modify the main-point when this tab is active.
------------
Contained within the tab:
- Main-point Coordinates: Displays current X and Y of the main-point.
- 'Reset Main-point': When clicked, this button resets the main-point to the center of the minimap.
------------
------------------------
'Area' tab: This tab contains the current view of the area polygon of the Object DTM, and buttons to delete the area, or remove the last added point.
------------
Contained within the tab:
- 'Delete Area': When clicked, this button completely removes the area polygon from the Object DTM in memory.
- 'Undo Last Point': When clicked, this button removes the last point of the area polygon.
------------------------
'Multi' tab: Nothing to see here!
------------------------
'Path' tab: This tab contains all the components of the tool that are needed to generate Object DTM paths.
------------
Contained within the tab:
Everything the 'Single' tab has, with the following additions:
- 'Add Path Node': This button, when clicked, adds the current Object DTM in memory to the stored path, closes the form, and walks to it. After walking, the form opens up again, grabs the new view of the minimap, and waits for input.
- 'Finish Path': This button, when clicked, closes the form, stops the tool, and prints out the stored path as a string array in Simba's debug box.
------------------------
'Multi-path' tab: Nothing to see here!
------------------------
-How to Generate a single Object DTM-
Now that you somewhat understand how the interface works, I will walk you through the generation of an Object DTM.
A few notes on creating Object DTMs:
- It is preferable that you pick sub-points closer to the center of the minimap.
- Try to choose sub-points that are far from symbols, as symbols can drift over the objects, making your Object DTM fail.
- 3-5 sub-points is usually enough, unless you are in an area with many of the same object. In these cases, if you have too few sub-points, or not enough variety in your chosen objects, there is a chance that false positives will be found, causing an incorrect point to be returned.
Clicking 'Grab Minimap' will grab the current view of the minimap and display it on the minimap area:
You should click this button before you start making an Object DTM, but not during, as the minimap may shift, and you don't want that to happen while you are in the process of editing.
-
Select an object from the objects list, and click 'Gather Object'. In this example, I have chosen trees:
Clicking within the circles will add that object as a sub-point and turn the circle green. Clicking again will remove the sub-point, and turn the circle red. I selected a few trees, then picked boulders from the objects list, clicked 'Gather Object' and selected one of them:
-
Moving over to the 'Main-point' tab, you can see that the main-point defaults to the center of the minimap:
-
With the 'Main-point' tab active, mousing over the minimap area will cause yellow lines to be drawn to your mouse cursor:
These lines connect the sub-points to your mouse, showing where the prospective main-point is.
-
Clicking will set the new main-point:
-
Moving on to the 'Area' tab, this is where you can define an area polygon for the Object DTM. Clicking on the minimap area with this tab active will add points, and the polygon will be dynamically drawn as you do this:
Clicking 'Delete Area' will completely remove the area, and clicking 'Undo Last Point' will remove the last vertex in the polygon, you can undo as many times as there are vertices.
-
The resulting Object DTM looks like this:
Clicking 'Print Object DTM' prints it out into the output box, and Simba's debug box. The record form will also be printed in Simba's debug box if 'Print Record' is checked. Here is the resulting code:
-----------------------------Simba Code:Object DTM string converted to record form:
-------------------------------------------
with ObjectDTM do
begin
MainPoint.x := 33;
MainPoint.y := 71;
NumOfPoints := 6;
SetLength(SubPoints, NumOfPoints);
SubPoints[0].Base := MM_TREE;
SubPoints[0].Drift :=7;
SubPoints[0].Point.x := 108;
SubPoints[0].Point.y := 45;
SubPoints[1].Base := MM_TREE;
SubPoints[1].Drift :=7;
SubPoints[1].Point.x := 108;
SubPoints[1].Point.y := 75;
SubPoints[2].Base := MM_TREE;
SubPoints[2].Drift :=7;
SubPoints[2].Point.x := 61;
SubPoints[2].Point.y := 124;
SubPoints[3].Base := MM_TREE;
SubPoints[3].Drift :=7;
SubPoints[3].Point.x := 108;
SubPoints[3].Point.y := 113;
SubPoints[4].Base := MM_TREE;
SubPoints[4].Drift :=7;
SubPoints[4].Point.x := 57;
SubPoints[4].Point.y := 49;
SubPoints[5].Base := MM_BOULDER;
SubPoints[5].Drift :=7;
SubPoints[5].Point.x := 128;
SubPoints[5].Point.y := 49;
NumOfAreaPoints := 6;
SetLength(Area, NumOfAreaPoints);
Area[0].x := 82;
Area[0].y := 74;
Area[1].x := 82;
Area[1].y := 114;
Area[2].x := 70;
Area[2].y := 134;
Area[3].x := 41;
Area[3].y := 134;
Area[4].x := 41;
Area[4].y := 57;
Area[5].x := 68;
Area[5].y := 58;
end;
'33:71:6:1:7:108:45:1:7:108:75:1:7:61:124:1:7:108:113:1:7:57:49:5:7:128:49:6:82:74:82:114:70:134:41:134:41:57:68:58'
-How to Generate a Multi-Object DTM-
Come back another time!
-----------------------------
-How to Generate a Path-
Generating a path is much like generating a single Object DTM. Please reference how to generate a single Object DTM before looking here.
A few notes on Object DTMs for paths:
- It is preferable that you pick sub-points closer to the center of the minimap.
- It is also preferable that your main-point be at least 10px away from the edge of the minimap.
- 3-5 sub-points is usually enough, unless you are in an area with many of the same object. In these cases, if you have too few sub-points, or not enough variety in your chosen objects, there is a chance that false positives will be found, causing your character to walk away from the intended destination.
If you stick to these three guidelines, your paths will be more stable than they may otherwise be.
Click over to the 'Path' tab to begin making a path. A path is made up of nodes, and each node is an Object DTM. So, for each node you walk to, you need an Object DTM.
Make the first node the same way you make an Object DTM. When you are done, click 'Add Path Node'.
The form will close, and your character will walk to the node. After walking, the form will open back up- ready for you to create the next node. When you are finished creating your path, click 'Finish Path'. That is really all there is to it.
The string array from the path above:
-----------------------------Simba Code:Object DTM Generation Tool: Generated path:
['64:17:5:1:7:91:53:1:7:109:47:1:7:128:72:1:7:123:93:1:7:44:116', '139:88:5:0:7:89:26:0:7:64:21:1:7:95:79:1:7:117:67:1:7:92:63', '98:142:3:5:7:71:92:1:7:62:58:1:7:83:62', '27:58:2:5:7:80:105:0:7:27:70']
-How to Generate a Multi-Path-
Come back another time!
-----------------------------