PDA

View Full Version : DTM Tut by Starblaster100



Starblaster100
05-12-2006, 09:13 PM
DTM Tut by Starblaster100

What are DTM's?

Deformable Template Models (DTM's) are used a lot like bitmaps in SCAR. Basically they compare colors, and depending on what colors are found and how far away from eachother they are, the DTM will return a boolean. If the boolean is True, it will record its position.

How do i Use them?

With the Functions:


FindDTM(DTM : Longint; Var x, y : integer; xs, ys, xe, ye : integer))
FindDTMRotated(DTM : Longint; Var x, y : integer; xs, ys, xe, ye : integer; StartAngle, EndAngle, AngleStep : Extended; Var Angle : Extended))


How do i Make them?

Using the DTM editor. Hit Tools and the DTM Editor in Scar to access it.

What are they Best Used for?

I find they are most effective in finding specific Objects in the inventory. We have 'FindText' to look for specific text, 'FindSymbol' to Look for Symbols and 'RadialWalk' and 'LinearWalk' to walk long disances. Looking for Specific Items in the invenotry is basically the only option left!

The Tutorial Link:

Try this Link First (http://www52.megaupload.com/files/2c10a20f36b14aabe62c0895f49df3fc/DTM%20Tut%20by%20Starblaster100.swf)
Otherwise this one (http://www.megaupload.com/?d=A4B1MBIA)


If you have any question, do not hesitate to ask me

Starblaster100

phantombmx
05-12-2006, 11:26 PM
Very Nice tutorial star! Very VERY helpful!

also, may i ask what video system you are using? and how you made the boxes and whatnot?

Starblaster100
05-12-2006, 11:35 PM
Macromedia Captivate.

I could also make an interactive tutorial with it :D

Thanks for the comments

ub3r |<1||3r*1337*
05-12-2006, 11:36 PM
I must ask! where, and what screen recorder did you get!? that was very helpful. helped me with the tolerance :)

Nice Video! ++Rep!

Starblaster100
05-12-2006, 11:39 PM
^^^

My post above

Thanks, ill be making more soon ;)

Avaphi
05-13-2006, 03:47 AM
Very helpful, Couldnt I use a dtm to find the sparkling color, for fishing? Thanks again

db_cheater

Starblaster100
05-13-2006, 11:42 AM
Its an idea, but you would have to use DTM rotated with tolerances on all o fthe points, not just the parent. You would also have to increase the area size for each point

ub3r |<1||3r*1337*
05-13-2006, 12:12 PM
you should sticky all of your vid tuts. they are VERY helpful. or you can put all of the videos in one thread, and there would be a whole list of things!

btw, could you make a declareplayers tut? mabye even a forms tut.

did you buy captivate or did you get it free?

Wizzup?
05-13-2006, 12:59 PM
you should sticky all of your vid tuts. they are VERY helpful. or you can put all of the videos in one thread, and there would be a whole list of things!

btw, could you make a declareplayers tut? mabye even a forms tut.

did you buy captivate or did you get it free?

A forms tut would be very nice. :)

timmyboy
05-13-2006, 02:37 PM
Very helpfull tutorial, now I kinda understand DMT's =P

Starblaster100
05-13-2006, 05:01 PM
you should sticky all of your vid tuts. they are VERY helpful. or you can put all of the videos in one thread, and there would be a whole list of things!

btw, could you make a declareplayers tut? mabye even a forms tut.

did you buy captivate or did you get it free?

Thanks, glad i can help you. I may put them into one thread
I have the Trial of captivate


A forms tut would be very nice. :)

lol, im making a HUGE forms tut right now ;)
Looks out for it.

btw, what would you like to see it in?
So far i have:

Interactivity - Because we retain 60% of what we do ;)
Creating a basic form
Implimenting Buttons and making them work
Relaying Information from the Form to the script
Adding Pictures


Post if you would like anything more

Thanks for the feedback, hope all my tuts help

Star

Avaphi
05-13-2006, 05:42 PM
Could you add a button that clicks color just like normal scar in your form? Then you can give them directions on what color to click on or what Item, Or even a in game screenshot as form background pointing to what color to grab. heh just an Idea

Starblaster100
05-13-2006, 05:57 PM
Could you add a button that clicks color just like normal scar in your form? Then you can give them directions on what color to click on or what Item, Or even a in game screenshot as form background pointing to what color to grab. heh just an Idea

unfortunately im very confused to what you want here. please explain more, or differently?

Thanks

phantombmx
05-13-2006, 09:14 PM
i think he means when you click a button named Color Setup, it will pop up another form or a pop-up, with a picture for every color.. as in you can just use a color picker inside the form.. i doubt its possible tho..

CamHart
10-19-2006, 01:07 AM
Thanks a lot

SoupyBastrd
10-19-2006, 01:36 AM
WOW

thanx Star

Xorg
10-24-2006, 01:38 PM
Thank you very much this will help me alot <3

IronTeapot
10-24-2006, 11:07 PM
Wow, this tutorial is amazing!!! I went from knowing almost nothing, to be being able to use it in most of my scrips :) Great job.

xxlegitxx
12-27-2006, 07:07 PM
It's very nice. But I must disagree with your opinion that it is only useful for objects in the inventory. Making a procedure to find your location using the minimap would require DTM's; I can't see what else it could use.

Starblaster100
12-27-2006, 09:29 PM
It's very nice. But I must disagree with your opinion that it is only useful for objects in the inventory. Making a procedure to find your location using the minimap would require DTM's; I can't see what else it could use.

Yes, i agree actually.

This tut was made quite a while ago :) Many people use it to find locations now

xxlegitxx
12-28-2006, 01:40 AM
Oh lol good point. From May.

lee666
12-29-2006, 08:29 PM
Cheers star.

wickedboy141
01-04-2007, 02:17 PM
its a good tut but i seem to be lost
i did the whole thing with a log and i get a error
i attached the picture with the error and if possible can u plz tell we wht is wronG?
TY

error:
Failed when compiling
Line 8: [Error] (8:39): Invalid number of parameters in script

script:
program New;

var
x,y,LogDTM : integer;

procedure FindDTM;
begin
If(FindDTM(LogDTM,x,y,555,200,705,497))then
Writeln('DTM found');
end;

Procedure LoadDTM;
begin
LogDTM := DTMFromString('78DA632C62626078C68002B2830CC134239 4C' +
'F9809547317554D46803EAA9A3CA09A3B0C688011554D09A6 9A50' +
'27755435354035B70898530B54F388809A46A09AD7A82A0C1 4145' +
'0D59401D5BC4555D3986C83AA2607A8E603AA9ACA3039CCF0 7983' +
'AA26CE4914554D3250CD73026E4E03AA7980AA22C4CB1A450 D000' +
'8A016D0');
end;

begin
LoadDTM;
FindDTM;
end.

Hobbit
01-22-2007, 05:35 AM
ummm i know this is a very noob question....but what program do i view it in...ive downloaded and re downloaded everything i can from macromedia and i tried downloading captivate to see if i can open in there....then i researched...but nothing works!@!!!!!!!!!!!!!!!!!!!!!!!!! how do i view the .swf file???????:confused:

madmoon
01-26-2007, 10:59 PM
ummm i know this is a very noob question....but what program do i view it in...ive downloaded and re downloaded everything i can from macromedia and i tried downloading captivate to see if i can open in there....then i researched...but nothing works!@!!!!!!!!!!!!!!!!!!!!!!!!! how do i view the .swf file???????:confused:

I had the same problem, I found that it worked in Internet Explorer.


Would somebody be able to expand on the, X1, Y1, X2, Y2 for me?

Thanks

Hobbit
01-26-2007, 11:49 PM
ok thnx...they x1, y1,x2,y2 is just the area u need to specify for it too look for the dtm...and so it will look inbetween those and once its found it returns coords as x y

madmoon
01-27-2007, 02:24 AM
ok thnx...they x1, y1,x2,y2 is just the area u need to specify for it too look for the dtm...and so it will look inbetween those and once its found it returns coords as x y

So, X1 and Y1 should be the top left corner? and X2 and Y2 should be the bottom left corner?

Hobbit
01-27-2007, 05:49 AM
So, X1 and Y1 should be the top left corner? and X2 and Y2 should be the bottom left corner?

ok i think its liek this....you know how in like paint or something to make a box...u click 1 point then drag diagonally to the other point..then it makes a box? i think its like that x1,y1 is the top left corner of the box and x2,y2 are the bottom right corner...that how i've been suing it in my scripts....if it isnt like that...then its a mirical that my scripts run lol;)

madmoon
01-27-2007, 05:56 AM
ok i think its liek this....you know how in like paint or something to make a box...u click 1 point then drag diagonally to the other point..then it makes a box? i think its like that x1,y1 is the top left corner of the box and x2,y2 are the bottom right corner...that how i've been suing it in my scripts....if it isnt like that...then its a mirical that my scripts run lol;)

Sorry that was a typo, I did mean bottom right corner. Thanks for the help :)

Hobbit
01-27-2007, 06:00 AM
your welcome im glad i could help...i kinda thought it might be a typo but wasnt sure ;)

gsquare567
03-17-2007, 03:57 AM
sorry for reviving this but i downloaded the tut and wanna watch it but i dunno how to run it. i just dled flash player but how do i open it with it?

Mjordan
03-17-2007, 04:00 AM
sorry for reviving this but i downloaded the tut and wanna watch it but i dunno how to run it. i just dled flash player but how do i open it with it?

hey no worries about bumping this, its an awesome tut. and to run it, just click on the link and it will download and open in media player or whatever your default player is.

Hobbit
03-17-2007, 05:47 AM
thats not how it worked for me...cause he made it in adobe captiveate and saved as an animation file (.svf or something like that) so what i had to do was get adobe captivate 2 make a 1 slide project then i added it in as a animation and did view project and it played..

gsquare567
03-17-2007, 02:20 PM
ok thanks i'll try that hobbit. i tried in wmp but no good.

Mjordan
03-18-2007, 01:10 AM
well it played in media player for me.

lefamaster
03-20-2007, 06:47 PM
error:
Failed when compiling
Line 8: [Error] (8:39): Invalid number of parameters in script

script:
program New;

var
x,y,LogDTM : integer;

procedure FindDTM;
begin
If(FindDTM(LogDTM,x,y,555,200,705,497))then
Writeln('DTM found');
end;



same problem here. Nice tut, went through just as it said, but there is something qrong with line 8. Please advise.

EL_TYCHO
04-17-2007, 04:51 PM
I love your tut, but Im trying to make a dtm of Lowe's head (the varrock arrowshop guy) but the prob is, he doesnt have any black lines on his head :s
What should I do?

Starblaster100
04-17-2007, 05:03 PM
Make all the points have a decent tolerance. About 20-40 i would say (Trial and error)

Increase the area size of each point to about 2-5 (Trial and error again)

Try then and see what you get.

DTMs are all about trial and error

EL_TYCHO
04-17-2007, 05:50 PM
Ok ill try that :) Ty, but maybe I could use the brown floor color in stead of the black?

alfonso1024
08-05-2007, 02:04 AM
the video wont work it says want to open with what?
intrnet
amd program

XabdullahX
05-30-2009, 03:31 AM
Just being clear :)

If you cant open it: OPEN with firefox (or ie lol)

btw. thx for tut :)
but what is finddtmrotated ?

jakeyboy29
05-30-2009, 04:01 AM
when the mini map rotates, isent it?
not looked into it, only guessing.

XabdullahX
05-30-2009, 05:16 AM
lol @ warning :(:(:(

At least i search :(