deityslayer
New Member
- Joined
- May 18, 2014
- Messages
- 23
- Reaction score
- 0
Does this bot support maps yet?
If you just ask me to help write a map bot, then there's nothing I can do for you, because you're basically asking me to write a map bot for you....................
....................
The "we don't have guides or examples" argument is no longer valid........
.................
However, what you don't understand, is that what you're asking for is for everything to be worked out for you, because the only thing you actually need, is the specific logic that uses the API. There's no "map" example to provide that doesn't involve being a working map bot.
Hey dude, thanks for the critique.pushedx, before I get into my more critical statements, I first thank you for your hard work.
I hope you get two things right first.
1) It was you on multiple occasions who said you would provide a simple example "soon". See one such occasion at https://www.thebuddyforum.com/exilebuddy-forum/exilebuddy-profiles/173808-request-plugin-maps.html
If you think providing an example is not a good idea, then state as such like you have in this thread. Making empty promises is never a good idea.
2) As I said in my post in this thread, we do not need anything to be worked out and an example map bot would be a great start. Then you made the claim that writing a map bot example, an idea which was introduced by you, is the same as writing a complete map bot that works on every map. I sincerely doubt such a claim. A general map bot will probably have to deal with specific situations on each specific map type (transitions, boss name(s) and location(s)). Writing a map bot example that works for the "Crypt Map" may not work well for the "Palace Map". If an example is provided, then we users can tweak the example for specific maps.
The logic for a map bot is not difficult or it is not hard to follow your steps listed, but the difficulty is that the documentation for the API is lacking. If I am wrong on this, I will appreciate you point me to the right place for a more complete documentation at one location. The trouble for me has been finding the names of the right functions to do what I need. When so many pieces come from so many places in the provided example plugins and bots, it is not easy to learn the API, at least for me.
Two part answer, first to the OP: BasicGrindBot does not contain the functionality to do maps. It's an overworld grinding bot only. There are no plans to add grinding maps to BasicGrindBot for the time being. The API fully supports maps and provides all the functionality required to run them. However, since it's not provided in BasicGrindBot, it is up to users to do it if they want it. Please see the Exilebuddy Project Guide for more information on the way EB is setup.
Now to what cyberbot said.
If people want to work on their own bots and not give them out, it's certainly in their right to do so. Our model is not to profit off of forcing people to dev stuff for our products and then share it. The Buddy store was added to further help incentivize people to contribute and get something in return. While EB doesn't have store support yet (as it is brand new, and being tested mostly with HB since it's the largest bot) I can certainly understand if people spend their time on this stuff and want to keep it private.
I don't know the actual status of the people trying to make a map bot, but no one that is actually trying has come to me with code that they needed help on or had issues with the current API that they needed something to be done differently. Anyone that needs help, gets it, as long as they have made an attempt and have something to show for it. If you just ask me to help write a map bot, then there's nothing I can do for you, because you're basically asking me to write a map bot for you.
The "we don't have guides or examples" argument is no longer valid. I personally made it a point of emphasis since I took over and did the beta rewrite. In fact, I was just talking about this yesterday in this reply. Trying to give users more dev resources by keeping things out of the bot itself is the main reason why BasicGrindBot is setup as oddly as it is right now.
If you need help understanding what is provided right now and how that is applicable to this topic, I can certainly clear that up for you in this reply. However, what you don't understand, is that what you're asking for is for everything to be worked out for you, because the only thing you actually need, is the specific logic that uses the API. There's no "map" example to provide that doesn't involve being a working map bot. All I can do, is tell you what you should already know or be doing to develop things with the API and programming in general.
A map bot can be thought of as 3 distinct parts:
1. Starting in town, withdrawing a map and traveling to the map room.
2. Inside the map room, activating a map and taking the portal.
3. Grinding the map itself.
Part 1
ExampleBot contains example code for what needs to be done for withdrawing and stashing. You have to add your own withdraw task that makes use of Coroutines.WithdrawItemsCoroutine (as noted). Existing tasks are provided you can use to get an idea of the task design. ExampleResurrectTask, for example, shows a really simple task that uses an API function that would be perfect to start with. For stashing, you can use the provided bot task, and implement your own logic in the user functions to not stash your maps or other things like currency if needed.
For traveling to the map room, look inside the Coroutines namespace for a provided function to help out. You want to take a waypoint to the map room, so you should be able to find something and get working. With the task based design, you'll be adding a TravelToMapRoom task that executes after your other town tasks are done. See the Task section in the BasicGrindBot Guide to follow the task flow of it for a better idea of order of operations.
Part 2
Now, you're in the map room at the waypoint. You need to interact with the Map Device to bring up the GUI for it. The Coroutines namespace provides a coroutine you can use to interact with an object. ExampleBot provides a few tasks that perform interaction, so check out ExampleLootItemsTask and ExampleOpenChestTask.
Once you have interacted with the map device, it's GUI pops up. Refer to the "Using Loki to interact with the client" section in the An Overview of Loki: Exilebuddy's API for Path of Exile to get an idea of which namespace contains the functions needed to interact with that GUI.
Likewise, you'll want to also find a section to interact with the main inventory as well. The process for starting a map is the same as you would do in game: pickup the map to the cursor, place the item into a map slot, activate the map device. The new Fast Move mechanic just added is not supported in the API because you can't control which slot the item will go in. It might be added later, but for now, it's not needed.
Once you have activated the device, you need to find the portal objects and take them. Check the Coroutines namespace for a coroutine you can use to take the closest portal. As with before, you want to make a task that executes when you're in the map room to take the portal. If you don't want to use the coroutine, you can implement one yourself by simply interacting with the found portal, after moving to it. This is the same as chest/loot stuff.
Part 3
Now, you're in the map. ExampleBot contains a lot of the code for showing how to do looting, opening chests, doors, combat, and exploring. The explore system simply runs though the area, and then exploration complete kicks in. As with the current BasicGrindBot implementation, you must add extra logic to take boss rooms or handle killing every single mob, because the CR by default doesn't, as explained in the guides. Look at the CorruptedAreaTweaks plugin for a simple way to do it.
Once the map is completed, you can implement the logic to go back to town and start all over. The Coroutines namespace contains a coroutine you can use to create and take a portal to town. Alternatively, you can just logout, or travel back to the starting portal for the area if you store it's position. Taking the existing portal is the same as you did for taking a portal to the map, you just need to move back there to close to it.
ExampleLootItemsTask does not contain logic to do a town run when the inventory is full, but that is part of the process for learning how to work with things. You'll want to go to town, and set a flag that you need to return from the portal rather than start a new map room trip. Using the same process as explained, you should be able to find functions that do what you need already. All you have to do is tie the logic together.
You don't have to do all those parts in order either. When it comes to development, you want to find simple ways to get the basics of what you want working, then look into expanding it into one concrete implementation. Start with a map in your inventory in the map room, and start with Part 2 to get a map created and taken. The ExampleBot implementation will take care of everything else in the map area, and just stop at the end. or when the inventory is full. As long as you don't die, that should be more than enough for you to work with. There's nothing to really customize or change, aside from rewriting all the bot functionality that is being provided to users (all the stuff in Coroutines, for example, or the existing Tasks exposed).
Once you do this stuff yourself, and start learning how to use the API, things will make more sense and you'll be able to actually rewrite provided functionality to work in ways better for you, rather than what's there.
That's basically the extents of bot programming using Exilebuddy. We give you a lot of the pieces you need, you just have to use them to do what you want. If those pieces aren't enough, or aren't useful because you don't have source to modify them, then you can start from the API we provide and build up something different or open instead.
pushedx
The main problem is that standard Explorer sucks on maps. It usually explores 60-70% of the whole area. I have written exploration based on monster pos before standard kicks in, but it has it's own draw backs you know. If you decrease standard exploration grid cell size, will that increase the "depth" of exploration? Now the size is 23, if I understood decompiled code right.
I didn't use VS to access the documentation. I didn't see the debugging page until now. Thanks for that.
One of selling points of using a script language is for its lightweight. Using something as heavyweight as VS is a bit slow.
Another question about debugging: If I have modified a plugin or a bot, do I have to close EB and restart it to load the modified code? Is there a faster way to have EB reload the modified code?
I am working on Map plugin in my spare time. Have to write map reroll logic and it will be ready for release.
[video=youtube;syOFMQexVzY]http://www.youtube.com/watch?v=syOFMQexVzY[/video]
The only problem is too big cells.
You're still missing the point I was making, but if you want to try and solve the problem though exploration, you certainly can, but it's not the appropriate way to do it.
In terms of using a number smaller than 23, the negative effect will be significantly more memory used for exploration, specifically in the larger areas, and the exploration process backtracking over known nodes to achieve more coverage since the tiles are now smaller, and the exploration vision is too.
Consider a map that is 111 C x 81 R, which was just a random instance of The Riverways. The actual map size is 111*23, 81*23, or 2553 x 1863. Let's say you use a cell size of 12 instead. You now have 213 x 156 nodes to process. Exploration slows down considerably, and any pre-processing tasks now take place in a much larger problem space due to the extra nodes.
You can't modify our GridExplorer to change the grid size or the exploration vision range though. You'll need to make your own grid explorer with virtual nodes, and implement your vision range the way you want if you want a system that is designed around using exploration as the means to trigger game interactions. Our GridExplorer is setup to avoid doing that, because I've found it's not the best way to handle the problem as I previously explained.
You're free to try to solve it that way though if you think it's better, but you'll have to do it though your explorer code.
No. I'm sorry to be negative, but numerous people claimed to be working on it and they eventually all became quiet about it. The bot API is supposed to be able to do this easily, and I hope an example will eventually be published. I'm not asking for everything to be worked out, but an example, which would serve as a start, does not exist. There is no reason for me personally to believe map support again unless I see it. Again, I'm sorry for sounding negative about this.