What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Couple of questions about making a plugin and the exilebuddy API.

realBlue

New Member
Joined
Jun 10, 2018
Messages
11
Reaction score
0
First: How do I include default packages such as EXtensions in my visual studio project?

Second: I'm also a little confused about how "tasks" work, as in how do I stop the execution of other plugins and get control of the character for my needs. Example: stop mapping and go buy rare items from a vendor.

Third: Is there support for parties/inviting players to your party/accepting party invites? Only info I could find was from the [Outdated]Loki thread, where it said that it will be implemented later.
 
Last edited:
1: Make sure to see the "[3.0+] Developers Guide To Setting Up A Project" on how to setup a project.

You have two options:
- "Link" the source files directly to your project (Add as Link), replicating the folder structure of the plugin itself.
- "Reference" a compiled Default assembly that gets generated from loading EB. "3rdParty\_CONFIGS_\<ConfigName>\Default\Compiled-<##>"


2. Tasks execute in-order, based on simple condition checks. Where you place your task, will determine what it can interrupt other code from doing, and what other code can interrupt your code from doing. However, interrupting code and trying to change the flow of execution arbitrarily can lead to nasty side effects. You'll have to be really careful of the current state of things to have things work out how you intend.

Look at any plugin included that uses tasks to see an example of how they do it. Some will just use a common task message to execute while others adds a task to the current bot's task list. Don't forget, since you have full access to the bot logic we use, you can fork the code, make minor changes to make adding your feature easier, then just keep updating as the code will get overwritten each bot update.

For your example, I assume you mean run vendor buying logic after you finish your current map, and not quite literally stop mapping and go buy items, right? As in, let's check vendors for new items to buy after level up. If so, you'd most likely want two tasks, the first will be inserted directly before "TakeMapTask", to set a flag for your logic to know a new map run is about to start. Your second task will need to be ran before any other town related tasks or tasks that might interfere with what you want to do with the items, so before "IdTask" should work. In this task, you'd simply run your logic to go where you needed to go, and do what you needed to do and then set a logic flag so your logic doesn't run anymore, and tasks after it will then resume.

Tasks are executed in order until a Run coroutine returns true. Then, the next Tick task execution starts off from the start again.


3. Yes, it's supported but there are no public plugins that I know of that show complete examples, but it's pretty straight forward since people use it for private trade bots and stuff. You'll want to make use of VS intellisense and the help/documentation.chm file!

The API mirrors what you see in game. InGameState.SocialUi allows you to SwitchToPartyTab if !IsPartyTabSelected then you can use InviteToParty or if you want to wait for a party invite you can use HandlePendingPartyInvite. ChangeItemAllocationMode can be used to change party settings and LeaveCurrentParty can be used to leave the party from that ui.

For accepting party invites, it might also be better to just use the in-game notification API instead, InGameState.NotificationHud can be used to process those popups you see in the bottom right corner of the screen if they are enabled in your game settings. HandleNotificationEx is the main function that you poll to process those notifications, your logic loop is basically to sleep and call it often and let the callback handler you pass execute and make sure you're accepting the invite from someone you intended.

Mess around with it, and if you can't get it working show me some code and I'll point you in the right direction. :)
 
1: Make sure to see the "[3.0+] Developers Guide To Setting Up A Project" on how to setup a project.

You have two options:
- "Link" the source files directly to your project (Add as Link), replicating the folder structure of the plugin itself.
- "Reference" a compiled Default assembly that gets generated from loading EB. "3rdParty\_CONFIGS_\<ConfigName>\Default\Compiled-<##>"


2. Tasks execute in-order, based on simple condition checks. Where you place your task, will determine what it can interrupt other code from doing, and what other code can interrupt your code from doing. However, interrupting code and trying to change the flow of execution arbitrarily can lead to nasty side effects. You'll have to be really careful of the current state of things to have things work out how you intend.

Look at any plugin included that uses tasks to see an example of how they do it. Some will just use a common task message to execute while others adds a task to the current bot's task list. Don't forget, since you have full access to the bot logic we use, you can fork the code, make minor changes to make adding your feature easier, then just keep updating as the code will get overwritten each bot update.

For your example, I assume you mean run vendor buying logic after you finish your current map, and not quite literally stop mapping and go buy items, right? As in, let's check vendors for new items to buy after level up. If so, you'd most likely want two tasks, the first will be inserted directly before "TakeMapTask", to set a flag for your logic to know a new map run is about to start. Your second task will need to be ran before any other town related tasks or tasks that might interfere with what you want to do with the items, so before "IdTask" should work. In this task, you'd simply run your logic to go where you needed to go, and do what you needed to do and then set a logic flag so your logic doesn't run anymore, and tasks after it will then resume.

Tasks are executed in order until a Run coroutine returns true. Then, the next Tick task execution starts off from the start again.


3. Yes, it's supported but there are no public plugins that I know of that show complete examples, but it's pretty straight forward since people use it for private trade bots and stuff. You'll want to make use of VS intellisense and the help/documentation.chm file!

The API mirrors what you see in game. InGameState.SocialUi allows you to SwitchToPartyTab if !IsPartyTabSelected then you can use InviteToParty or if you want to wait for a party invite you can use HandlePendingPartyInvite. ChangeItemAllocationMode can be used to change party settings and LeaveCurrentParty can be used to leave the party from that ui.

For accepting party invites, it might also be better to just use the in-game notification API instead, InGameState.NotificationHud can be used to process those popups you see in the bottom right corner of the screen if they are enabled in your game settings. HandleNotificationEx is the main function that you poll to process those notifications, your logic loop is basically to sleep and call it often and let the callback handler you pass execute and make sure you're accepting the invite from someone you intended.

Mess around with it, and if you can't get it working show me some code and I'll point you in the right direction. :)

Thanks a lot! I succesfully set up a working prototype, though I had to set my plugin to the front of the tasklist. I'll have to take a look at TaskManager.tasklist and see if I can find a slot for the plugin. help/documentation.chm file was a great help, seems like you guys keep pretty extensive API documentation!
 
Back
Top