Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Arena Hero Choices
anon bot
#1 Posted : Sunday, February 1, 2015 9:11:21 PM(UTC)
Rank: Newbie

Groups: Registered
Posts: 9

Thanks: 4 times
Was thanked: 2 time(s) in 2 post(s)
I would like to be able to set hero choice preferences for arena picks. This is probably really easy to do considering there are only 9 heroes. If there is already a way to do this, could someone point me in the right place?
1 user thanked anon bot for this useful post.
cramos202 on 2/2/2015(UTC)
Golddieb
#2 Posted : Monday, February 2, 2015 2:41:16 AM(UTC)

Rank: Advanced Member

Groups: Registered
Posts: 147

Thanks: 39 times
Was thanked: 49 time(s) in 38 post(s)
anon bot;23322 wrote:
I would like to be able to set hero choice preferences for arena picks. This is probably really easy to do considering there are only 9 heroes. If there is already a way to do this, could someone point me in the right place?


If you can read/write C# code and want to use the default AI you can write your own draft bot for this.

Just take a look at the MyDummyDraftBot.cs and do the following (code is italic and highlighted):

- delete method CountDeckCardNum (line 65 to 95)

- delete line 37 to 61 (so you don't have to write your own card draw logic)

- change line 27:
e.handled = true; must be e.handled = e.is_hero_choices;

- modify the return values of the method GetHeroPriority according to your preferences (the lowerest value is the best)

- compile and enjoy ;)

1 user thanked Golddieb for this useful post.
anon bot on 2/2/2015(UTC)
anon bot
#3 Posted : Monday, February 2, 2015 4:17:22 AM(UTC)
Rank: Newbie

Groups: Registered
Posts: 9

Thanks: 4 times
Was thanked: 2 time(s) in 2 post(s)
Golddieb;23331 wrote:
If you can read/write C# code and want to use the default AI you can write your own draft bot for this.

Just take a look at the MyDummyDraftBot.cs and do the following (code is italic and highlighted):

- delete method CountDeckCardNum (line 65 to 95)

- delete line 37 to 61 (so you don't have to write your own card draw logic)

- change line 27:
e.handled = true; must be e.handled = e.is_hero_choices;

- modify the return values of the method GetHeroPriority according to your preferences (the lowerest value is the best)

- compile and enjoy ;)



I don't know C#, but I've taken an beginner's class on C++. I find I am okay with the logic in coding, but not the syntax/actually coding part. If I follow your instructions will it work or do I need to know C#? Do I need to compile the file afterward or can I just modify the file that you stated and just run the HearthRanger.exe? What program do you recommend me to use to modify the file and compile it afterward? Sorry for all the questions. I think you can see my inexperience, but it would be sweet to get this going :)
Golddieb
#4 Posted : Monday, February 2, 2015 4:31:30 PM(UTC)

Rank: Advanced Member

Groups: Registered
Posts: 147

Thanks: 39 times
Was thanked: 49 time(s) in 38 post(s)
If you follow my steps it should work to 99%. (no 100% because I didn't test it ;) )

If you have some experience in C++ you already know Visual Studio and that's the tool to use for compiling/editing.
You need to open the HSRangerCustomDraftBot.csproj file and build as deploy job.

You might get some error because you miss the HREngine.dll.
There are two ways to fix this:
a) download HR v2.8 and use the dll from the rar-archive
b) remove the dependency to the dll (because it is outdated)
Boths ways require little searching on how to do this with Visual Studio, but it shouldn't be a big problem and I leave it to you. ;)

The synthax of C# is easy and you don't have to worry.
Just take a look at the existing code and read the error messages the compiler provides.
Make sure you close every brace you open and each statement line ends with a semicolon.

It should be an easy task because you only delete some code, replace one statement and change some numbers.
(note: you don't have to change the order of the if-blocks according to the numbers. You can go like 4-2-9-7-5-3-1-..., Just make sure every hero has its own number!)
Considering this, the dll stuff should bug you the most.
2 users thanked Golddieb for this useful post.
JoyAdmin on 2/2/2015(UTC), anon bot on 2/19/2015(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.076 seconds.