Using yGather data to create waypoints...

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
wil32
Posts: 36
Joined: Tue Jun 01, 2010 9:21 pm

Re: Using yGather data to create waypoints...

#21 Post by wil32 » Sat Jun 12, 2010 7:38 pm

sorry i was out for a couple of days, you guys seems to have gone foward pretty fast!!

gimme a night to i can think about all this to give a better opinion

dx876234
Posts: 188
Joined: Sat Jul 24, 2010 6:13 am

Re: Using yGather data to create waypoints...

#22 Post by dx876234 » Wed Aug 18, 2010 8:20 am

Bringing up a dead discussion, I've been looking into combining the yGather data into harvesting.

First step has been to prototype a preprocessor which will take waypoints and the SaveVariables file as input and output a new waypoints file.

This new file will contain the original waypoints with the yGather points inserted by following criteria:

1. The normal from yGather point down to line between waypoint(n) and waypoint(n+1) should "hit" the line between the points
2. Said normal should have a length less than a given radius
3. Points within these criteria will be sorted by shortest distance from previous point.

This results is a new waypoint file with all resources within the given radius inserted and a "sensible" traversal of this - ofc not accounting barriers.

Result can be seen on attached graph.

Next step is to do this dynamically, add as userfunction and onLoad which includes all harvestables into waypoint list, this is work in progress.

Now, goal should be to have harvestables detected same way as we do targets (in mobs config) to dynamically detect during waypoint traversal - I have not looked into the internal bot code to validate if its possible yet, so far on the idea stage.
Attachments
database.lua
(3.03 KiB) Downloaded 134 times
map.jpg

dx876234
Posts: 188
Joined: Sat Jul 24, 2010 6:13 am

Re: Using yGather data to create waypoints...

#23 Post by dx876234 » Wed Aug 18, 2010 8:45 am

Hmm small bug in sorting, corrected
Attachments
database.lua
(3.06 KiB) Downloaded 136 times
map.jpg

Cid
Posts: 7
Joined: Thu Aug 19, 2010 1:27 pm

Re: Using yGather data to create waypoints...

#24 Post by Cid » Thu Aug 19, 2010 1:30 pm

hi,

how i use the database.lua-file?

Cid

dx876234
Posts: 188
Joined: Sat Jul 24, 2010 6:13 am

Re: Using yGather data to create waypoints...

#25 Post by dx876234 » Thu Aug 19, 2010 1:40 pm

mostly hardcoded yet, plan to have as preprocessor to generate waypoints

User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: Using yGather data to create waypoints...

#26 Post by MiesterMan » Thu Aug 19, 2010 1:56 pm

Since the changes to harvesting that no longer requires you to target nodes with the camera have been implemented I haven't really looked at this but I recalled the real issues I ran into when attempting this. First, as stated near the start of the thread the maps don't scale. I got them close but it was still scewed. Second, the obstacles that aren't recorded by ygather make it near imposible to plot a course without some function that makes you bot walk around trees and such to get to nodes. Third, kicking the other ideas aside and just using the minimap and map to map a course for gathering you still have the issue of not knowing which nodes you've already gone to when making a nice big harvesting file.

The only real solution I can think of to effectively make ygather a useful plotting tool is to make a second add-on that will mark on your map where you've already plotted while creating a path. I also looked into this but my intelligence just slips off the bricks, out of my reach.

dx876234
Posts: 188
Joined: Sat Jul 24, 2010 6:13 am

Re: Using yGather data to create waypoints...

#27 Post by dx876234 » Fri Aug 20, 2010 4:16 am

Yes, the obstacle issue is a problem - my suggested solution to this is to:

1. make a waypoint list manually as today, navigating through an area as usual
2. define a radius around this list for filtering in which resources recorded by yGather will be traversed
3. preprocess the waypointlist, inserting the filtered waypoints from yGather

This is pretty much the same as the mobs setup, only the mob setup is dynamically determined at runtime while the code Im working on is for now a preprocessor - although the ideal solution would be to detect the resources dynamically at runtime and go for them.

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: Using yGather data to create waypoints...

#28 Post by swietlowka » Fri Aug 20, 2010 4:26 am

it would be much simpler if we could target any harvestable in range like mobs... i think that should be possible now since targeting changed a lot

dx876234
Posts: 188
Joined: Sat Jul 24, 2010 6:13 am

Re: Using yGather data to create waypoints...

#29 Post by dx876234 » Fri Aug 20, 2010 10:35 am

Absolutely, as far as I know the harvestables is scanned in-memory now, this should enable discovery/targeting them using simular mechanisms as the "mobs" configuration.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Using yGather data to create waypoints...

#30 Post by Administrator » Fri Aug 20, 2010 10:46 am

You can. HARVEST_DISTANCE in profile options. Add it if it does not exist.

dx876234
Posts: 188
Joined: Sat Jul 24, 2010 6:13 am

Re: Using yGather data to create waypoints...

#31 Post by dx876234 » Fri Aug 20, 2010 2:45 pm

I though HARVEST_DISTANCE only is from a harvest point, i.e. points in the waypoint file. It will not include any harvestables found during the traversal from point to point or have I misunderstood?

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Using yGather data to create waypoints...

#32 Post by Administrator » Fri Aug 20, 2010 2:59 pm

That is correct. And you'd be placing harvest waypoints near the nodes themselves, not in random locations, so I don't see the problem.

Valleyguy
Posts: 100
Joined: Wed Aug 04, 2010 11:34 pm
Location: Canada

Re: Using yGather data to create waypoints...

#33 Post by Valleyguy » Fri Aug 20, 2010 8:33 pm

Administrator wrote:That is correct. And you'd be placing harvest waypoints near the nodes themselves, not in random locations, so I don't see the problem.
I think what they are getting at is you never really get to make a good path to all nodes so if you monitored nodes along the path and something springs up you would still get it if its within the harvest distance between point A and point B like the mobs targeting works
Image

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: Using yGather data to create waypoints...

#34 Post by swietlowka » Sat Aug 21, 2010 6:18 am

yup thats just what i meant, to change the way harvest is done, like put a swithc in profil to harvest or not, ane when the bot enocounter any harvestable during run (without any harvest points) it just goes to it and harvest, it should be possible to do this since we allready scan the in-memory

siegmund
Posts: 5
Joined: Mon Sep 19, 2011 10:54 am

Re: Using yGather data to create waypoints...

#35 Post by siegmund » Sun Oct 09, 2011 9:52 am

Hi,
I've managed to combine ingamefunctions and ygather.
After spotting a resource location ygather calls ifg_OnEvent( this, "myevent", resourcelocx, resourcelocy).

After trying a lot of calulations (world position <-> map position) I've decided to post map coordinates (i.e 33,832 62,345) (not satisfied with that solution anymore)

In my script I'm waiting for the event and putting the locations in a local list.
I've tried to use

Code: Select all

WorldMap_AutoMove( this.mapID, this.mapX, this.mapY );
but rom just answers "Can't find the way" (whatever the text is in the english version).
When I'm trying to "automove" on the map that doesn't work, too so I think perhaps it's a bug at the moment or the game is just confused by my changes ;-)

The best would be if I could post the same coordinates rombot uses, so the existing script function to find a waypoint near me is working.

Has somebody found a working calulation formula meanwhile?
Or is there an api call which I can use in yGather to use the same coordinate system as rom bot?

Thank for your help
Siegmund

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests