Using yGather data to create waypoints...
Re: Using yGather data to create waypoints...
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
gimme a night to i can think about all this to give a better opinion
Re: Using yGather data to create waypoints...
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.
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
Re: Using yGather data to create waypoints...
Hmm small bug in sorting, corrected
- Attachments
-
- database.lua
- (3.06 KiB) Downloaded 136 times
Re: Using yGather data to create waypoints...
hi,
how i use the database.lua-file?
Cid
how i use the database.lua-file?
Cid
Re: Using yGather data to create waypoints...
mostly hardcoded yet, plan to have as preprocessor to generate waypoints
- 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...
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.
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.
My RoM Bot toys:
- Object Viewer: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2619
Teleporter Functions: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2605
Waypoint Finder: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2616
Mail Functions: http://www.solarstrike.net/phpBB3/viewt ... =27&t=2612
Equipment Swapper(TempFixed): http://www.solarstrike.net/phpBB3/viewt ... =27&t=2571
Re: Using yGather data to create waypoints...
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.
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.
-
- Posts: 316
- Joined: Wed Jun 16, 2010 8:16 am
Re: Using yGather data to create waypoints...
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
Re: Using yGather data to create waypoints...
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.
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Using yGather data to create waypoints...
You can. HARVEST_DISTANCE in profile options. Add it if it does not exist.
Re: Using yGather data to create waypoints...
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?
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Using yGather data to create waypoints...
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.
Re: Using yGather data to create waypoints...
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 worksAdministrator 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.
-
- Posts: 316
- Joined: Wed Jun 16, 2010 8:16 am
Re: Using yGather data to create waypoints...
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
Re: Using yGather data to create waypoints...
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
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
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 );
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
Who is online
Users browsing this forum: No registered users and 5 guests