• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Bot] Prosto_Pets: Battle Pets 4 in 1, and more

    Discussion in 'Botbases' started by Prostak, Jan 7, 2015.

    1. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      I am planning to do the necessary steps internally. Will not be soon though.
      Renaming should help. Have you changed both pet name and abilities and restarted HB?
       
    2. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      We have a lot of pets coded in Pets\ directory.
      There can be two cases:
      1. No logic for your pet
      2. Bad (primitive) logic for your pet

      In case 1 you should create the logic (see topic under the first post re how to do it), in the second one you may optimize it.
       
    3. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      This is strange. Crimson Whelpling has a simple but rather OK logic:
      Code:
                  else if (petName == "Crimson Whelpling" || petName == "Onyxian Whelpling" || petName == "Spawn of Onyxia")
                      dragonkin_abilities = new List<AandC>() 
      		{
      			new AandC( "Healing Flame",  () =>hp < 0.75 ),	// Slot 2
      			new AandC( "Lift-Off" 		),	// Slot 3
      			new AandC( "Breath" 			),	// Slot 1
      			new AandC( "Tail Sweep" 		),	// Slot 1
      			new AandC( "Scorched Earth" 	),	// Slot 2
      			new AandC( "Deep Breath" 	),	// Slot 3
      		}
      
      Are you sure you are using an English client? Can I have the log?

      Upd: Kovok, on the other hand has just a placeholder:
      Code:
                  else if (petName == "Kovok")
                      beast_abilities = new List<AandC>() 
      		{
      			new AandC("Poison Fang" 	),	// Slot 1
      			new AandC("Body Slam" 		),	// Slot 1
      			new AandC("Pheromones" 		),	// Slot 2
      			new AandC("Digest Brains" 	),	// Slot 2
      			new AandC("Black Claw" 		),	// Slot 3
      			new AandC("Puncture Wound" 	),	// Slot 3
      		};
      
      I may look into it closer to the weekend, or you may try to modify it's logic yourself - see the instructions under the first post how to do so.
       
      Last edited: Jan 13, 2015
    4. Studio60

      Studio60 Well-Known Member Buddy Store Developer

      Joined:
      Sep 3, 2014
      Messages:
      3,411
      Likes Received:
      48
      Trophy Points:
      48
      Good job with this plugin. It seems a lot easier to handle than other solutions available.

      I do have a few questions though:

      1. Is there any reason why pets are identified by their names? This seems very inconvenient due to a) localization and b) custom pet names. I usually give my pets names once they reach level 25. But if I do, the available tactics are no longer recognized. Same goes for Attack Names. I don't know why you chose to go this route. Maybe you could elaborate. As a fellow code monkey, I am curious about this.

      2. Are you planning to implement a feature where we can build teams and implement tactics specifically for daily pet trainers, the garrison daily and the beasts of fable? Enemies like Archimedes are perfect to level a huge amount of pets in a short time and the fight has very few variables in it. It should be possible to use your existing ability behavior system to implement this.

      3. Is there a way to make the bot use pet treats if I have them in my inventory?
       
    5. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      Thank you for you questions. That's nice to have such a level of discussion.

      I would not say using names is inconvenient, rather "it creates problems". I've chosen it for two reasons:
      1. It is actually convenient - for a human. Just imagine that all these tables are filled with numbers, not names. It would be a terrible thing to understand, support and maintain.
      2. I've already had all these tables from my MyPetBattles days coded in this way, just not in C#, but in Lua. Translation was done by applying some editor script :)
      Note that 1 is actually a stronger reason for me. I would rather translate numbers into strings than to have maintain these tables in numbers. As you can already see maintaining these tables will be much longer work than creating a code - people are already asking about their missing pets.

      And to be honest I have completely missed these localization and personal names problem. That seems not a big deal though: we'll just add kind of reverse dictionary that will give us an id based on a name. Just need to nurture the thing in the mind for a while and it should work in no time. Drawback will be some time needed at startup to load a dictionary, but no delays will be noticed in the work cycle.

      Yes, I am planning to automate the things that bore me when I do them manually. And creating a team (once again and once again!) for a specific opponent is surely boring (strangely, fighting itself does not look so boring yet - will we be stealing the frill of the battle from the users?).
      I am still not sure about the design yet: where to put the code for team selection and fighting, but I am more and more inclined that profile is the right place: coordinates of the opponent, team - which is dependent on the pets you have, tactics - which is dependent on the team, all seem to be grouped together rather naturally. And there are ways to invoke C# compiler for parts of a profile, so probably we can escape the need to write an interpreter.

      Are you sure Garrison elite fights are a proper way to level pets? I've tried to do this manually but have noticed diminishing returns. May be just me. Well, Pandaria is still there.

      In my life I choose to stoically ignore them rather than to get used to the convenience and be frustrated when it's gone. (Safari Hat is another thing, it does not end :)).
      But why not. Are you sure though that the hassle of "where is that f... checkbox that I need to press" is worth it? Spartan GUI has its advantages.
       
    6. feskins

      feskins Member

      Joined:
      Jul 24, 2013
      Messages:
      179
      Likes Received:
      0
      Trophy Points:
      16
      Hi Just tested it out again and seen the problems, I had renamed my pets lol so I set them back to default names and it seems fine except for one pet. Here is log: View attachment 6176 2015-01-13 17.21.txt
       
    7. Madcatz

      Madcatz Member

      Joined:
      May 17, 2011
      Messages:
      752
      Likes Received:
      7
      Trophy Points:
      18
      id love to try this out but the Svn link might be broken im gettin a 404 error

      EDIT:yeah i clicked the link said it had a 404 error but erased a line or 2 in the web-site link an found the Svn Respatory ty
       
      Last edited: Jan 13, 2015
    8. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      I've reproduced your situation and can confirm now that there are actually 2 bugs in the code:
      1. Dead (as in "soon to be revived") pets are not considered available even when in some conditions they should; actually they are blacklisted, which exacerbates the next problem;
      2. Pet journal is not updated on manual pet revival. So pets blacklisted in step 2 remain blacklisted until HB restart.

      2 seems rather easy to fix. Fixing 1 will reveal the next problem though. Some careful changes are needed.

      I want to thank you for helping to uncover these problems. I would probably never found them myself, since I am using a bit different team selection approach.
       
    9. feskins

      feskins Member

      Joined:
      Jul 24, 2013
      Messages:
      179
      Likes Received:
      0
      Trophy Points:
      16
      Just tested my Enchanted Broom and Unborn Val'kyr, Spirit Crab, they only used button 1 like Kovok :(
       
      Last edited: Jan 13, 2015
    10. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      You may want to look at "Known Limitations", item 4:
      4. Draenor and other rare pets (and probably some not so rare) are not yet in the tactics table (will use "1" button). We will fill tactics for all needed pets I hope. Or you can do it yourself - see "Creating and Modifying Pet Tactics" topic below.
       
    11. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      I do not see any problems in this log, except that
      [22:23:31.465 N] [Pets] Alert: Unknown magic pet: Servant of Demidos
      Not sure what other pets were used (locked pet names are not printed, but all of them have used some not-1 ability):
      Code:
      [22:23:42.814 N] [Pets] Using Flamethrower, button 3
      [22:23:49.968 N] [Pets] Using Magma Trap, button 2
      [22:23:59.618 N] [Pets] Pet to Swap In: 3
      [22:24:06.121 N] [Pets] Using Lift-Off, button 3
      [22:24:18.759 N] [Pets] Using Healing Flame, button 2
      [22:24:23.585 N] [Pets] Using Breath, button 1
      
       
    12. Valpsjuk

      Valpsjuk Member

      Joined:
      Nov 10, 2014
      Messages:
      397
      Likes Received:
      4
      Trophy Points:
      18
      If I may suggest...

      Keep the "front" page of the GUI Spartan as you say, add a new "tab" with "various not so often used settings".
       
    13. Studio60

      Studio60 Well-Known Member Buddy Store Developer

      Joined:
      Sep 3, 2014
      Messages:
      3,411
      Likes Received:
      48
      Trophy Points:
      48
      You are probably right. Humans will have a better time working with real names than IDs and I do understand the legacy code part. I guess my programmer mind is usually not thinking about "non-programmers" adding code to my software. About the personal names though... If I do give a pet a personal name it shows both the personal name and the standard pet name in the game UI. Is there maybe a value we could get from the client that is always the standard pet name? I guess they must both be in there somewhere in the pet attributes even though I have next to no experience developing LUA.

      You can very easily level pets on a few of those fights. I have done it at times for four hours straight without diminishing returns and it takes 5-7 battles to get a pet from 1-25 (with buffs). Especially the Archimedes fight is simple and fast. It would be a matter of locking a team in ProstoPets, making the character heal/revive pets and the NPC next to the pet battle arena after every battle and then creating an override tactic if a specific enemy is active. For this you would just need to extend your PetTacticsBase.cs a bit to include static members like "nameEnemy" and maybe "round". It might also be awesome to get the remaining cooldown of an enemy attack (there are ingame addons that track these, so it should be possible to read those values). We also would need a way to swap pets on one of those conditions. I don't think it would be too difficult to save those tactics and then use them instead of standard behavior whenever opponent of name "x" is faced.

      I do like a clean GUI as much as the next guy and boy have I seen some bad GUIs in my day. I guess what could be done is a "Garrison Battle" tab in addition to relative, ringerx2 etc. This mode would be able to revive pets after every battle (because the player is already standing within 5 meters of the stable master and it would keep override tactics exclusive to this mode... I hope I can convey what I mean...
       
    14. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      Version 0.9.8: to Edacra with thanks
      - dead pets in the current team no longer stop the bot (it will wait for Revive CD) (Edacra issue 1)
      - reload pet journal on Start (Edacra issue 2)
      - movement from the indoor area corrected
      - names of the locked pets are printed
      - Waterfly tactics corrected
       
    15. banzai014

      banzai014 New Member

      Joined:
      Dec 24, 2014
      Messages:
      6
      Likes Received:
      5
      Trophy Points:
      0
      Hi Prostak,

      Thanks a lot for the elite pet update! This makes it much easier to level up characters. This is a really great mod, I love how easy it is to add user pet tactics and zone profiles, and how you've thought of a lot of things like swapping out the carrying pets (for people who have lots of moths for instance) when they are on low health instead of waiting on bandages.

      And regarding the garrison/menagerie pet battle thing: yeah, its extremely fast to level pets that way. The 3 pet team battles give insane xp and have quite simple tactics. e.g you can read some of the strats here:
      (Archimedes fight) Garrison Daily: Jahan, Samm, Archimedes. Farm for pet XP - WarcraftPets Forum
      Generally speaking, google "carry" + "name of enemy pet" and you can find a strat (warcraftpets site is most reliable) that lets you level pets via the menagerie.

      For instance the Archimedes fight is very simple:
      Nexus Whelping - Mana Surge
      Swap to non 25 pet for a round
      Swap to other 25 to finish the fight.
      Gives like 3x the xp of normal pet battles and infinitely repeatable (+ pet healer is right next to the fight)

      If there could be a way to program set strategies for certain pet battles, that would make this the ultimate character and pet leveling mod.

      EDIT: also one other problem I noticed, I was using ringerx2 mode with favorite pets and ringers only set so that it would level up my favourite sub-25 pets to level 24 using my favorited "optimal" ringer level 25 pets. However it would sometimes choose sub-25 pets for the ringer slots, like level 23 pets. Do you know what's causing that?
       
      Last edited: Jan 14, 2015
    16. feskins

      feskins Member

      Joined:
      Jul 24, 2013
      Messages:
      179
      Likes Received:
      0
      Trophy Points:
      16
      Last edited: Jan 14, 2015
    17. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      Code:
      [00:57:44.775 N] [Pets] Alert: Profile with Hotspots Needed for Auto navigation. Current profile: ''
      [00:57:44.775 Q] Bot stopping! Reason: Bot conditions not met: Profile with Hotspots needed.
      
      Looks like it does not remember the profile between HB sessions. Will fix shortly.
       
    18. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      Ok, yall convinced me. I still want to check myself that returns are not diminishing. Anyway, great plus is that the Garrison is un-observable by other players, love such places.
      But there are a couple of relatively big things ahead of this one. I'll probably need to publish a roadmap to make plans clear.

      Current design will TRY to use healthy pets and if not able - it will try to lower health and level requirements. Just not to waste time.
      If it uses 23 when healthy fav-25 is available - then it's a bug and I would like to look at the log.
      I am not completely sure that using a lower level is better than using 25 non-favs - generally speaking. But me sticking to Favs gives YOU more control I think.
       
    19. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      Roadmap.

      Please consider the following as sharing intentions, but not as making promises. This tool is just a hobby.

      0. Fixing serious problems found by you. ETA as soon as understood, fixed and tested. (Attaching a full log helps to speed up this item greatly).
      1. Ground profiles for EK and Kalimdor. Will add stability to non-flying toons. ETA this weekend.
      2. Adding more explanations to GUI. ETA after this weekend.
      3. Support for other languages. Need a couple of weeks: create tools for an automated dictionary extraction, create the dictionary, integrate the dictionary, test.
      4. Battling fixed opponents, with priority to Garrison Menagerie. Needed: design profiles (I still think the profile is a proper place), add needed functions to Base, find a proper way to put a tactics into the profile. Interpreter will be needed if un-avoidable.
      5. I will try to add tactics for the pets you've mentioned in the comments. Most I can promise is 1 pet per update, though.
       
    20. Valpsjuk

      Valpsjuk Member

      Joined:
      Nov 10, 2014
      Messages:
      397
      Likes Received:
      4
      Trophy Points:
      18
      Great going! As for number 5, I really hope that people will start sharing their tactics, it's not as if you are sharing your favorite fighting spots :)

      I tried starting on a Tactic for Bronze Whelpling, but I'm still a bit unsure about how the tactics works, and I haven't found a good place to check really
       

    Share This Page