Fuzzy building A-Bot


#1

Hi again,

Thanks for all the help @Viir
Og so I tried by downloading visual studio, cloned A-Bot from github and tried to insert the code mentioned from @Terpla to make it orbit.
Getting the following errors, appreciate any help to resolve these:

1>------ Build started: Project: Sanderling.ABot, Configuration: Debug|AnyCPU ------
Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1987,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “WindowsInput, Version=1.0.4.0, Culture=neutral, PublicKeyToken=9b287f7dc5073cad, processorArchitecture=MSIL”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
< \A-Bot ORBIT\src\Sanderling.ABot\Bot\Task\Module.cs(52,49,52,58): error CS0012: The type ‘VirtualKeyCode’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘WindowsInput, Version=1.0.4.0, Culture=neutral, PublicKeyToken=9b287f7dc5073cad’.
<
\A-Bot ORBIT\src\Sanderling.ABot\Bot\Task\Module.cs(55,29,55,51): error CS0012: The type ‘VirtualKeyCode’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘WindowsInput, Version=1.0.4.0, Culture=neutral, PublicKeyToken=9b287f7dc5073cad’.
<
\A-Bot ORBIT\src\Sanderling.ABot\Bot\Task\Combat.cs(44,43,44,71): error CS1501: No overload for method ‘ClickMenuEntryByRegexPattern’ takes 3 arguments


Eve Online Anomaly Ratting Bot Release
Pikacuq is tweaking A-Bot :)
#2

Here is the modified file, naming is off as I copied it to rename it to .txt
Combat - Copy.txt (4.9 KB)


#3

Seeing the error message you quoted raises following question:
Did the code you changed contain VirtualKeyCode?

Some ways we could progress with this:

  • You could add a reference to the assembly WindowsInput to the project Sanderling.ABot and then test if this builds successful.
  • You could upload a commit with your changes to github and post a link to the commit here, then I could take look at that to find out more.

#4

Hello @Viir,

No I didn’t add anything else beside the modified combat.cs linked in my previous post after the cloned the latest version from github.
I tried to search for “virtual” in the project but it came up empty…
When I double click on the error messages it referees to line 44 in combat.cs :
yield return Broken.FirstOrDefault().ClickMenuEntryByRegexPattern(bot, “Orbit”, “30 km”);
along with 52 and 55 respectively in the module.cs file?

Oh and could you pretend you are talking to a 5 year old that has never programmed before, because that’s the level I am at when it comes to adding things you ask for, most of the time have no clue beside copy paste something specific :blush:

Edit:
I tried to commit but I might have done something wrong, anyway got the following error

Opening repositories:
A-Bot ORBIT
Commit 1086ed19 created locally in repository \A-Bot ORBIT
Remote: Permission to botengine-de/A-Bot.git denied to user.
Error encountered while pushing to the remote repository: Git failed with a fatal error.
fatal: unable to access ‘https://github.com/botengine-de/A-Bot.git/’: The requested URL returned error: 403
Pushing to https://github.com/botengine-de/A-Bot.git


Eve Online Anomaly Ratting Bot Release
#5

Sorry, i guess it’s my fault. I modified Menu.cs:
My version now looking as

Summary
static public class MenuTaskExtension
{
	static public MenuPathTask ClickMenuEntryByRegexPattern(this IUIElement rootUIElement,
		Bot bot, string menuEntryRegexPattern)
	{
		return ClickMenuEntryByRegexPattern(rootUIElement, bot, menuEntryRegexPattern, "");
	}


	static public MenuPathTask ClickMenuEntryByRegexPattern(this IUIElement rootUIElement,
		Bot bot,
		string menuEntryRegexPattern, string menuNextStep)
	{
		if (null == rootUIElement)
			return null;

		return new MenuPathTask
		{
			Bot = bot,
			RootUIElement = rootUIElement,
			ListMenuListPriorityEntryRegexPattern = new[] { new[] { menuEntryRegexPattern }, new[] { menuNextStep } },
		};
	}
}

PS: what tag for code on this forum?


#6

With Terplas latest post, it looks like we have some new info about what he did. With the new info, I will wait to hear from you what the new situation is.

Sure, why not.

Ok thats some progress, now I have a better understanding of effort required to go a route involving pushing a commit to github.
Let’s first see if it works after applying the new info from Terpla.


#7

Hello,

Thanks @Terpla and @Viir for the help so far!
I tried to insert the new version of MenuTaskExtension, is it correct to just replace mine with the ones posted here in Menu.cs?
When I did that and build/debug I get the following error now:

Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1987,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “WindowsInput, Version=1.0.4.0, Culture=neutral, PublicKeyToken=9b287f7dc5073cad, processorArchitecture=MSIL”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

A-Bot ORBIT\src\Sanderling.ABot\Bot\Task\Module.cs(52,49,52,58): error CS0012: The type ‘VirtualKeyCode’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘WindowsInput, Version=1.0.4.0, Culture=neutral, PublicKeyToken=9b287f7dc5073cad’.

A-Bot ORBIT\src\Sanderling.ABot\Bot\Task\Module.cs(55,29,55,51): error CS0012: The type ‘VirtualKeyCode’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘WindowsInput, Version=1.0.4.0, Culture=neutral, PublicKeyToken=9b287f7dc5073cad’.


#8

I moved this conversation to a new topic to avoid cluttering the announcement thread.


#9

@Fuzzy, can you successfully build the visual studio solution when you do not make any changes to the code?


#10

Hi,

I tried to download a new clone from github, but I get the same error message as before.
I have to admit I am not 100% sure how to use Visual Studio, is there anything specific I need to do to build the project beside opening one of the files and click on Build -> Build Solution?

Edit: Typo :blush:
Just to add, I downloaded .net from the link but it said I had a newer version and aborted.


#11

forgot to mention you guys :slight_smile:
@Viir and @Terpla


#12

Then we need to sort out building the unmodified clone first, before attempting to modify the source code.

Follow these steps to get us more info:

  • Use the command Rebuild Solution
  • Copy the complete build output (from the Output window) and post it here.
  • In the Solution Explorer, open contextmenu on the node representing the solution and in the contextmenu click the entry labeled Restore NuGet Packages.
  • Copy the output from the Output window and post it here.
  • Use the command Rebuild Solution
  • Copy the complete build output (from the Output window) and post it here.

#13

Hi @Viir ,

Lets see if this worked:
1>------ Rebuild started: Project: Sanderling.ABot, Configuration: Debug|AnyCPU ------
Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1987,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “WindowsInput, Version=1.0.4.0, Culture=neutral, PublicKeyToken=9b287f7dc5073cad, processorArchitecture=MSIL”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
\A-Bot Original\src\Sanderling.ABot\Bot\Task\Module.cs(52,49,52,58): error CS0012: The type ‘VirtualKeyCode’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘WindowsInput, Version=1.0.4.0, Culture=neutral, PublicKeyToken=9b287f7dc5073cad’.
\A-Bot Original\src\Sanderling.ABot\Bot\Task\Module.cs(55,29,55,51): error CS0012: The type ‘VirtualKeyCode’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘WindowsInput, Version=1.0.4.0, Culture=neutral, PublicKeyToken=9b287f7dc5073cad’.
========== Rebuild: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I am however not seeing the Restore NuGet Packages you mention anywhere, the only options I have are these on the folders:
image

Or on the files:
image

The ReBuild Solution doesn’t give any different output when I use it again.


#14

Looks like I need to add another step to the instructions for Restore NuGet Packages:

Looking at your screenshot, I am not sure if that context menu was opened on the solution item.

Therefore in solution explorer, first switch to solution view as shown in the screenshot below:

Then the solution item should become visible in the tree view as in the screenshot below:

On that solution node, you should see a context menu different from the one you showed earlier. Do you have an entry labeled Restore NuGet Packages in there?


#15

Ah I see, thanks @Viir! Awesome explenation, sorry for being a total newb here…

Here is the output:
Restoring NuGet packages…
NuGet package restore finished.
Time Elapsed: 00:00:04.1905562
========== Finished ==========

And the rebuild: (I removed the path from the output before, I guess it doesn’t matter)

1>------ Rebuild All started: Project: Sanderling.ABot, Configuration: Debug Any CPU ------
1> Sanderling.ABot -> D:\My Downloads\Eve Online\A-Bot Original\src\Sanderling.ABot\bin\Debug\Sanderling.ABot.dll
2>------ Rebuild All started: Project: Sanderling.ABot.UI, Configuration: Debug Any CPU ------
2> Sanderling.ABot.UI -> D:\My Downloads\Eve Online\A-Bot Original\src\Sanderling.ABot.UI\bin\Debug\Sanderling.ABot.UI.dll
3>------ Rebuild All started: Project: Sanderling.ABot.Exe, Configuration: Debug Any CPU ------
4>------ Rebuild All started: Project: Sanderling.ABot.Test.Exe, Configuration: Debug Any CPU ------
3> Fody: Fody (version 1.29.4.0) Executing
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\Bib3.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\Bib3.FCL.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\Bib3.RefNezDif.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\Bib3.Terz.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\BotEngine.Common.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\BotEngine.Interface.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\BotEngine.UI.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\BotSharp.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\BotSharp.UI.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\src\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\src\packages\fasterflect.2.1.3\lib\net40\Fasterflect.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\src\packages\AvalonEdit.5.0.3\lib\Net40\ICSharpCode.AvalonEdit.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\src\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\src\packages\protobuf-net.2.1.0\lib\net451\protobuf-net.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\src\Sanderling.ABot\bin\Debug\Sanderling.ABot.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\src\Sanderling.ABot\bin\Debug\Sanderling.ABot.pdb’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\src\Sanderling.ABot.UI\bin\Debug\Sanderling.ABot.UI.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\src\Sanderling.ABot.UI\bin\Debug\Sanderling.ABot.UI.pdb’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\Sanderling.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\Sanderling.Interface.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\Sanderling.MemoryReading.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\lib\Sanderling.UI.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\src\packages\InputSimulator.1.0.4.0\lib\net20\WindowsInput.dll’
3> Fody/Costura: Embedding ‘D:\My Downloads\Eve Online\A-Bot Original\src\packages\WpfAutoGrid.1.4.0.0\lib\net45\WpfAutoGrid.dll’
3> Fody: Finished Fody 1656ms.
3> Sanderling.ABot.Exe -> D:\My Downloads\Eve Online\A-Bot Original\src\Sanderling.ABot.Exe\bin\Debug\Sanderling.ABot.Exe.exe
3> Fody: Skipped Verifying assembly since it is disabled in configuration
3> Fody: Finished verification in 4ms.
4> Sanderling.ABot.Test.Exe -> D:\My Downloads\Eve Online\A-Bot Original\src\Sanderling.ABot.Test.Exe\bin\Debug\Sanderling.ABot.Test.Exe.dll
========== Rebuild All: 4 succeeded, 0 failed, 0 skipped ==========


#16

Looks like Restoring NuGet packages the key to make it build successfully.

:tada:
Congrats, you now have your own A-Bot executable.

Since you can now build from the original source code, you can continue with applying your changes to the source code. :rocket:


#17

Thanks for the help with this @Viir, I’ll try out the code changes and see how it goes! :slight_smile:


#18

Ok actually seems to be working! Even with my changes! Orbits like a champ :slight_smile:

However I see one issue,

  1. Its a bit slow to initiate the orbit rutine, meaning it will do so after everything else thus getting pummeled up quite a bit before the speed kicks up.
    Ideally it should orbit first then activate afterburner/MWD to get up to speed then do the drone and targeting rutine. Is it possible to change this so it orbits first?

  2. Doesnt seem to activate “Medium Armor Repair II” so it will eventually die, is it not supported or set to a really low threshold I could change somewhere?
    I looked in the main thread and saw a few mentons of capital armor repairs and the use of “ModuleActivePermanentSetTitlePattern” But that would be inefective as I’d need to refit quite a bit to make it stable with always on.


#19

Good to know it works.

You can configure it to activate any module you want.
Try this configuration:

{
  "ModuleActivePermanentSetTitlePattern": ["name of module as it appears in module tooltip"]
}

#20

Alright I’ll try it out, in what file and where do I need to add this part? I’m guessing its in the bot.config so I’ll try that.

But is there anyway to have it trigger on a % of armor left for example?