I mainly see it when dealing with logics that deal with pet health, I think enemy pet health more than anything. For example, I have some logics that will use CASTSPELL(N) when enemy health is above 75. Often I will see that spell used when the enemy pet health is much lower than 75. I see it on occasion with swapping out pets based on their own health. A pet well below the swap out health level, with no other effects on it preventing a swap, will not swap out but continuing to fight. When another action occurs, like the enemy pet dying, it seems to catch up and will then swap out. It certainly doesn't happen every time, but often enough to irritate me enough to look into it a bit. With the change I made I no longer have the problem, so I'm happy.
I love this bot. It works quite well with BattlePetSwapper, which it seems the plugin of Pokehbuddy was not. My concern, however, is that when using Ringer or Ringer2x mode in Battle Pet Swapper (to fight high level pets with two max level pets and a low level) is that the low level pets aren't swapped out after attacking once. I've searched every config file and page that I can, but still can't find what's causing it I've even changed the default logic, but that isn't working either. Could you tell me what I'm doing wrong?
You will have to mess with the pets logic. Use a variable that should change, whether that be your pets health or their pets health. I.E. if pets health is less than 90%, swap out. I haven't really used the ringer pet stuff the way you guys apparently do. I used the pet area plugin so that it would swap profiles according to the lowest level in the party.
It's all of them, really. And when I DO change the logic, I can't tell a difference. Mainly though, I want the logic for the first pet to be only one that's affected, OR I want the logic to indicate that it's the lowest level that's affected. I have 550 pets, 400 of which are low level, and I'd like to level them all. I know I can add the pet-specific logic files, but that would just be redundant, and I'd spend as much time editing all of those logics as I would leveling them by hand. Is there a line I can add to the default logic that states If the enemy pet is 4 levels or more higher than mine, then the low level pet casts one spell, then swaps out? If there is, that would make this bot simply perfect.
This is an ongoing request with the plugin, so not a new issue. One answer is to use meta logic to 'handle' the specific requirements for pet levelling, ie to code it into the normal combat logic, but not every pet has a cooldown, and the combat + logic system does not count each turn at all currently. The puppy logic system in the development version is an attempt to avoid meta-logic, ie a list of settings controlling how to swap between pets, what conditions to swap with, and what pets to swap from and to, outside of combat, and while in combat. To illustrate, meta-logic, ie swap - logic, for want of a better name, a set of variables would have to be parsed universally as part of every round, to determine if a swap should occur, every few ticks. Based on family vs family. Group health. Enemy timers/cc. Cooldowns. Counters. Rounds of combat, when to forfeit, etc. Much easier if it was limited to special situations where the results can be validated by others, ie complex trainer combat options with prearranged team builds. Essentially this would replace pet swapper, and also change the internal combat system as well, so it could handle the trainer fights at higher levels. Essentially a 30 line logic that considers which trainer pet is starting first, swaps to the appropriate pet, engages, forfeits if the situation breaks down or the enemy pet hasn't been hit, or the enemy swaps out, heals himself, etc. Coding the celestial tourney system needs to be that retentive, due to the strategy often applied while people attempt lowbie swaps in the tourney for 5k pet xp. Technically, you can't make every pet have a 1 turn swapout, just isn't logically possible as there are a handful that don't have cd's at level 5. Second option is to code a logic handler for levelling, just to identify a lowbie pet by petid, and override the standard logic for lowbie pets, so the normal logic is ignored, the pet swaps in, and is considered to be dead for the encounter once the round has completed or a cool down has completed. This option would require a few variables, the petid in each combat slot, a 'dive' variable with the petid to use when the petid identified has been sent in, and a round counter for all 3 pets. Both strategies can use the same multi logic system, or a straight single logic system, but one requires a few months of testing. And some migraine inducing logic handling.
Um. Ok. While I am not a complete stranger to coding, al of that is completely beyond me. I'm smart enough to look around and see and understand some of the basic IF AND TRUE/FALSE and whatnot, but all of that just said is a bit beyond me. However, I love teaching myself new things. What code is this written in, because I'd like to get familiar with it and attempt to make this work the way I want it. While it would be awesome if the bot author would add a "ringer" style default pet logic, I'm wouldn't ask it. I've compared the different logics from the plugin and the bot, and the only thing I can see in the plugin, that makes the plugin work how I want it to, is the Plugin/Pokehbuddy/Quick Settings/BoostPetSlot1Ringer.cs file, and I have no idea where or how to insert a similar code into the BOT's logic. Perhaps a pointer in the right direction?
The default logic for any pet loaded has a swapout at pet health less than 30, if you just edit that to be 95 than in the majority of cases the pet will swap out fine. This will not work however unless the pet you are using is able to take one rounds worth of damage from the enemy or if the enemy uses a debuff to prevent pet swapping. Editting the pet logic file is not time consuming as you suggest. @Sychotix: The default logic file does not appear to be loading properly. Is this something that could be looked into as a priority because having all pets load a "95% swap out" logic and then fixing the ringers would be a quicker methods to set up leveling logic. You have the xml file in there and I can see some code to use this file but I also think there is some legacy code left behind, which contains hardcoded default pet logic, that is causing problems. EDIT: For clarity
So, after some testing here's what I discovered. I deleted the entire bot folder, started with a new HB, new PB bot folder, etc. Before I ever launched, changed the default logic to swapout at 95. The bot did that. However, the log that it's importing to the PetSettings FOLDER is not at all what's in the default logic..not only that, but the bot isn't using the PetSettings logics at all. I might just not understand the way it works, and if that's the case I apologize, but even pets that already have logic files generated in the PetSettings folder aren't being followed - only the default logic is. So in other words, once all three pets (regardless of level) fall below 95%, they're all switching out. I'm pretty sure is that the pet logics in PetSettings FOLDER aren't being followed at all.
Where are you making this change, in the default logic window within the Bot Config, or are you editing the Default Logic.xml file? When you say "log", what do you mean? What are you expecting it to import, from where and to where? A brief summary of what should be happening: 1. You enter a pet battle and select a pet 2. PokehBuddy checks if you already have a file named <PetID>.xml within the PetSettings folder, where PetID is the ID associated with the pet you have chosen 2a. You can check the ID of a pet by selecting the refresh pet option on the logic tab 3. If the file already exists it loads that logic for use in the battle 4. If the file does not exists it will check if there is a file named <Pet Name>.xml, e.g. Adder.xml. If the file exists it will create the <PetID>.xml file refered to at step 2 and import the logic from <Pet Name>.xml 5. If neither file exists it will create <PetID>.xml using the default logic At this point I'm not sure where it is pulling the default logic from, it's one of: - Hardcoded into the PokehBuddy code - As entered by the user into the Logic tab of the Bot Config - Imported from the file: Default Logic.xml Given the explanation of how things should be working, could you be more specific as to what it is not doing that you think it should be please.
The 'Default Logic' settings on the 'Advanced Settings' page are really misnamed, I think it should be called "Common Logic". The logic contained in this edit box is applied to ALL pets BEFORE their pet-specific file is applied. If I recall, it was added so a lot of logic that applies to all pets could be entered once, without having to copy it to every pet settings files. For example, I use something like this to handle all my pet swapping, and turn passing when my pet is put to sleep or incapacitated in some manner: SWAPOUT Health(THISPET) ISLESSTHAN 99 $ EnemyPetLevel ISGREATERTHAN MyPetLevel + 2 //handles low level ringer switching SWAPOUT Health(THISPET) ISLESSTHAN 65 $ MyPetLevel ISLESSTHAN 25 // Still a ringer situation, but fighting something where the leveling pet can contribute a little SWAPOUT Health(THISPET) ISLESSTHAN 25 $ MyPetLevel EQUALS 25 // catch all PASSTURN HASBUFF(926) EQUALS true (lots of these for different debuffs...) The actual 'default logic' - the logic applied to a pet that has no specific ID file, and no species file - is hard-coded in the code itself. Open pokehbuddy.cs and search for "PetBattleSettings : Settings". I think the bit there is the true 'default logic'.
What TreeK said sounds correct. I don't plan on working on coding for this again until early next week. It is open source for a reason If you guys want something done, it doesn't have to be done by me. I'll look into these things then.
Ok, where then, exactly, do I add the lines you recommend Treek? I've done it in the hard coded logic, the DefaultLogic.xml, the PetID.xml files...and none of them are working. I could be missing something, but I really don't think I am. Are these working for you Treek, and if so, in the BOT? And I can't see where this bot is logging anything so I can't send a detailed log of the logic processes or I'd have that to go from.
From what I can tell so far, the problem lies with the code interpreting the Swapout when TWO conditions are met, rather than just the one. i.e. If I change the default logic to only swapout at 95, then it works. If I change the default logic to swapout at 95, but only pets under 25, then it does nothing but the coded logic (It seems to be the coded logic, but again, only works with one condition)
Add it using the UI, the logic I showed was copied from the "Default Logic" edit box on my "Advanced Settings" tab. The hard coded logic is only used if there are no SpeciesID.xml and PetID.xml files for a given pet. If either of these files exists, the hard coded logic is not parsed. I think the DefaultLogic.xml file is the file that contains the logic displayed in the Advanced Settings tab. If so, this is the logic that is run for EVERY pet, before the hard-coded logic/SpeciesID.xml/PetID.xml logic is parsed. The PetID.xml file is parsed after the logic displayed in the Advanced Settings tab is parsed. Yes, they are working for me on the bot base, I've leveled over 200 pets to 25 using this bot base over the last few weeks. If you want extra logging, add it in. At one point there was a lot of logging code in place, it was just commented out. Not sure if it is still in there or not as sychotix has cleaned up the code a lot, but it would not be hard to add it in if you want to see what is happening. If you do things this way - all the swapping/passing logic set on the Advanced Settings tab - then you do not put any swap/pass logic in the individual PetID.xml files. Remember, the logic shown on the Advanced Settings tab is parsed for EVERY pet, then the logic contained in the PetID.xml file is parsed. If a PetID.xml file does not exist, one is created and will copy the logic from the SpeciesID.xml if it exists, otherwise it will copy the hard-coded logic. Either way, the PetID.xml file is created and will from then on be parsed after the logic on the Advanced Settings page.
Something is causing the bot to ignore SWAPOUT logic. I changed DefaultLogic's very first behavior to SWAPOUT Health(THISPET) ISLESSTHAN 99 $ EnemyPetLevel ISGREATERTHAN MyPetLevel + 2 The very first default behavior for pets is default: SWAPOUT Health(THISPET) ISLESSTHAN 30 Yet when I've got 2 high level pets and a low level in Slot 1, it ignores all swapout logic and fights only using Attack 1 until the low level is dead. As soon as the low level is dead, the high level pets do fine (including swapping out and using other attacks).
I am confirming this observation. It is specific to the bot. Something is causing it to ignore the SWAPOUT statement. I put the swapping code from a few messages back into the plugin and it swaps out as expected. No other changes were made.
Can someone please help me use this. I have it downloaded along with petarea. I am trying to camp for emerald proto-whelps, nexus whelplings, and unborn val'kyrs. I am unsure how to use the plugin. Please help!!
Once you have the bot installed, select the bot. Load a profile that worked with the old plugin. You can check the plugin thread for more detailed information on how to run it. It is honestly very simple to do if you have ever used HB before.
I have used hb before, but for some reason I'm just not understanding how to do this. I can load a regular profile and whatnot, but like how do I make it so that the plugin maps the spawn areas of those 3 pets and battles them and catches ones that are rare? Do I need specific profiles for each?