#1 2015-12-20 06:42:16

Euk
Member
Registered: 2015-08-05
Posts: 4

AIO PvM Toolkit

What it would listen for?
Chat messages, text on action bar, etc.

These are just some of the highlights, all should include unique sound effects - some stock, some custom.
Example: Overload sound effect will be same as in game, same with prayer. This is due to users disabling in-game sounds. Excalibur could be a custom one, maybe 4 beeps or a pop sound, there are so many sound effects out there.

Popups for:
• Overload - shows "OVERLOAD!" when your overload has 5-30* seconds left. Listens for "Your overload is about to run out..." text then starts a countdown in the background (this is due to debuff timers being inaccurate).
• Prayer - shows "PRAYER!" when less than 100* prayer points are left. Based off text on action bar.
• Summoning - shows "FAMILIAR!" when familiar is about to run out. Listens for messages like "Your familiar is about to drop all of its items..." and immediately triggers the popup.
• Etc. more features could be introduced as ideas flow in.

Static overlay for:
• Enhanced excalibur - Triggers a 5 minute countdown timer next to enhanced excalibur to give a visual of when to use it again.
• Etc. more features could be introduced as ideas flow in.


* Setting can be controlled via a slider.
** Also would verify by the game filter icon in game (NIS and legacy) whether or not the player has it set to OFF. If it's off, obviously the toolkit won't work properly since it can't listen for game messages.

Edit: I could work with you on images/sfx for the popups/alerts.

Last edited by Euk (2015-12-20 08:22:45)

Offline

#2 2015-12-20 09:48:23

Skillbert
Administrator
Registered: 2014-12-30
Posts: 1,058

Re: AIO PvM Toolkit

Most of this should be possible. I've been wanting to do some of them for a long time but they weren't possible due to missing support for the chat logger.

There is still one large problem with the chat reader tho, it can only read from a predefined set of colors (it has about 25 colors right now). Almost every player title uses a different color. I tried to make it read around it but that ended up taking a lot of processing power.
In short, it's impossible to read lines with a player name+title in it like the excalibur line.

Reading hp/pray/dren from ability bar should be easy and cheap, as well as the buf icons.

Offline

#3 2015-12-20 20:15:16

Euk
Member
Registered: 2015-08-05
Posts: 4

Re: AIO PvM Toolkit

Skillbert wrote:

Most of this should be possible. I've been wanting to do some of them for a long time but they weren't possible due to missing support for the chat logger.

There is still one large problem with the chat reader tho, it can only read from a predefined set of colors (it has about 25 colors right now). Almost every player title uses a different color. I tried to make it read around it but that ended up taking a lot of processing power.
In short, it's impossible to read lines with a player name+title in it like the excalibur line.

Reading hp/pray/dren from ability bar should be easy and cheap, as well as the buf icons.

Firstly, thanks Skillbert for such a quick to reply! (Pm me in game if you'd like, rsn is "Bren Z")

What do you mean different colors? I don't think you can change game message colors. Also, don't go off debuff timers if you do, they are always inaccurate due to framerate lag pushing timers behind. Can't you use the horizontal line as a reference instead of the player's RSN and title? It seems there are 2 horizontal lines, actually, the other being a separator for the upper portion of the chat box.

Edit: I see what you mean now. You're talking about the "For Camelot!" text. And there's no way to reference the user's display name and title from under that horizontal line and minus that out?

Also, you could at least do it for overloads and familiars right? Those are just game messages using 1 static color. Oh, I just thought of another one. Dreadnips. That too, is a static color without the display name.

Last edited by Euk (2015-12-20 20:24:45)

Offline

#4 2015-12-20 22:12:45

Skillbert
Administrator
Registered: 2014-12-30
Posts: 1,058

Re: AIO PvM Toolkit

Any combination of colors in the same line can be read, as long as they are exactly one of te predefined colors. Almost anything in the chatbox will be detected correctly, the only problem is when a player title is encountered. It won't be able to read unknown colors so that will simply be seen as the end of the line.

Detecting stuff like overloads and dreadnips works fine, it just won't work for excalibur as the player title displayed in the line.

Offline

#5 2015-12-20 22:22:54

Euk
Member
Registered: 2015-08-05
Posts: 4

Re: AIO PvM Toolkit

Well, our titles on rs wiki match the color of the in game titles, so if you want to rip those hex codes, go for it. I don't even know if this would be of any help to you. Only issue is if a new title is released, it will require maintenance.

Edit: Could you just ignore the title and go off the display name, then up to quick chat bubble? I'm sure this crossed your mind but idk, you made the API, you're more familiar. I personally would love to make the app, but it would be spaghetti. I'm not all that great with js.

Last edited by Euk (2015-12-20 22:30:39)

Offline

#6 2015-12-21 20:42:21

Niken
Member
Registered: 2015-10-08
Posts: 4

Re: AIO PvM Toolkit

Just ignore the title problem if you need to, people can take off their title if they want the function lol.

Also I think i asked this before but, Could you / would it be possible, to make a overload timer, so that it counts when the overload stat refresh is about to happen so that you can use sarabrews losslessly,It's a 15second cycle. two ways to do this, either look for when the potion is taken, or watch the stats for when they jump up(as in positive change of 18/19)?

Would be really awesome, Probably the best feature for DPS'ers that you could do smile

Offline

#7 2015-12-21 21:57:35

Skillbert
Administrator
Registered: 2014-12-30
Posts: 1,058

Re: AIO PvM Toolkit

I think a better way around it might be detecting every rightclick option that is clicked. Alt1 is already detecting the box itself whenever you right-click in-game. It uses that to hide part of apps that are covering the menu to make it seems like the rightclick menu is on top of Alt1. It wouldn't be that hard read whatever is under the cursor when you left click inside the box determined earlier. Btw, reading the rightclick font is infinitely easier as it always has a solid background and isn't transparent itself. Reading one character of that font takes 7!! pixel checks, the chat font takes about 4000 if position and color is known.

Checking the stats shouldn't be that hard either. I really like the overload thing, i have attempted it before with timers before alt1 but it never really worked.

I'm working on a fairly large non-alt1 project right now. I'm not sure if/when i might start on this one.

Offline

#8 2016-02-07 01:52:06

Nikenn
Guest

Re: AIO PvM Toolkit

Hi Skillbert . wondering if you have had time to do any of the suggestions on this page, I understand you are busy and doing lots of other stuff.

Atm I've got quite a bit of free time, if you haven't started it(or no plans to) I could have a look into it. It's something that every pvmer would love, specially the more intense guys going for records and such. or people like me that like to optimize their boss kills.

I saw you added a timer app (don't know how new it is but i only found it recently(also any you could add a lap button to that please , that you can get splits from))

I've had a very brief look at the development page, and see all the resources there. Is that all I'd need or anything more?

thanks (tyvm)

#9 2016-02-07 12:17:46

Skillbert
Administrator
Registered: 2014-12-30
Posts: 1,058

Re: AIO PvM Toolkit

I don't think i will be working on this in the near future so go ahead.
The page is a little dated (again) however the actual resources are up to date. However the api doc is dated, i've since made alt1 generate those from the source code, you can view it in the alt1 browser here: [strike]alt1://browser/http://runeapps.org/apps … t1api.html[/strike] Actually, not yet. I uploaded the output of alt1 1.3 here. There is also a Visual Studio Intellisense file here to make autocomplete etc work in Visual Studio.

Also, the basic program flow to detect thing is: (You might want to copy/paste to something with syntax highlighting)

  1. Find some 2d interface part that always stays fixed in relation that the data you're after, i would use the summoning item or collapse button to get the action bar.

  2. Generate an 'InterfaceTracker' object

    • Paste a screenshot of the game in http://runeapps.org/apps/random/imganalysis/

    • Select the filter 'findsubimg'

    • Click 'mainimg' and select an area in the screenshot for the img to search for

    • Click 'bounds' and select the area that you're interested in, this will mainly set the coordinate system

    • Click 'generate' and press ctrl-v to copy the code

    • Make this code run and assign it to a variable after imagedetect.js has been loaded

  3. Call youInterfaceTracker.find() to get the coords or the interface

  4. You can now use the other function to get information out of it.

Your code will look something like:

var yourInterfaceTracker=new InterfaceTracker("imagedata:afdlksdjfskjhwer",new Rect(0,0,100,100));//Generated
var img=a1lib.bindFullRs();//Will capture the full client area and return a reference to it.
var loc=yourInterfaceTracker.find(loc);//return the first position where your interface is found in the image
//To get raw image data
var buffer=img.toData(loc.x,loc.y,width,height);//Puts a part of the image into js memory in form of a ImageBuffer object
var pixindex=x*4+y*buffer.width*4;//4values/pixel(rgba) all rows of the image are stacked next to eachother (so 4*buffer.width*y and 4*x)
var pix=[buf.data[pixindex],buf.data[pixindex+1],buf.data[pixindex+2],buf.data[pixindex+3]//=[r,g,b,a]
//To read text
var x,y;//Coord somehere inside the text
var str=alt1.bindReadString(img.handle,"chat",x,y)//read the string and auto detecting color from a list of common colors, and of the
//font "chat" (used for most things including the prayer/hp/etc on the bar)
var str2=alt1.bindReadColorString(img.handle, "chat", a1lib.mixcolor(255, 255, 255), x, y);//only tries to read a single given color, is more reliable when you know what
//you're reading. The color is the brightest color you'll find in the text, for the action bar text it's 255,255,255 (pure white). I use the color multitool to find these things. 

Last edited by Skillbert (2016-02-07 13:12:36)

Offline

Board footer

Powered by FluxBB