• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Deluxe Battle Kit [v21.1]

Resource Deluxe Battle Kit [v21.1] v1.2.9

You can apply as many unique battle rules as you want to a single battle. They will just overwrite each other if they affect the same thing.

Like, applying both the "canRun" and "cannotRun" battle rules will overwrite each other. Applying the "weather" rule to Sun and then applying it again to set Rain will obviously overwrite the previous one. Same idea here.
Noted, thanks for your help Lucidious😂
 
Hi Lucidious!
I just installed your plugin and I'm loving it!
I have a small problem with the Mega Evolution animation because when a pokémon megaevolves, their sprite doesn't stay centered and I don't know why.
I can't attach images so taking this gif from your guide as reference (Gyarados Mega Evolution (Deluxe Battle Kit Tutorial)), when the Mega Gyarados appears, it is not centered, it appears either to the right or left, depending on the pokémon that just megaevolved.

I've been checking the plugin scripts but I don't know why they should move. I haven't found a comment discussing this here, so I don't know if it's a known issue or I just did something wrong installing it

I have other plugins installed: Bag Screen w/ Interactable party (by DiegoWT), Generation 9 Resource Pack (by Caruban)
Maybe the Gen 9 has something to do with the offset, but if so, I don't know if its the pokemon_metrics PBS or another thing.

Thanks a lot!
 
Hi Lucidious!
I just installed your plugin and I'm loving it!
I have a small problem with the Mega Evolution animation because when a pokémon megaevolves, their sprite doesn't stay centered and I don't know why.
I can't attach images so taking this gif from your guide as reference (Gyarados Mega Evolution (Deluxe Battle Kit Tutorial)), when the Mega Gyarados appears, it is not centered, it appears either to the right or left, depending on the pokémon that just megaevolved.

I've been checking the plugin scripts but I don't know why they should move. I haven't found a comment discussing this here, so I don't know if it's a known issue or I just did something wrong installing it

I have other plugins installed: Bag Screen w/ Interactable party (by DiegoWT), Generation 9 Resource Pack (by Caruban)
Maybe the Gen 9 has something to do with the offset, but if so, I don't know if its the pokemon_metrics PBS or another thing.

Thanks a lot!
Idk, without seeing what you're talking about I dont know what the issue is. Just use Imgur or something to share images.
 
I'm trying to figure out how the HP modifier for boss battles works. I'm realizing now that there's some strangeness that occurs the lower the opponent's HP is.

It seems like once they get into low red health, the bar barely drains at all for each attack. My assumption had been that it was purely a display issue and that the HP bar just was under-displaying the remaining health. However, doing some tests just now and using debug mode to track how much HP the opponent Pokémon had at any given time made it seem like the lower HP the opponent had, the less damage it was taking. A move that was causing over a hundred damage to a Pokémon without an HP multiplier was only dealing 10 to 20 damage against a low health Pokémon with it.

For a sanity check, I also artificially increased the species' base HP stat to give it even more HP than it would have had with the multiplier instead of using the multiplier, and it went down much faster and easier than it did with the multiplier, even though it had more HP.

Is there something off about this mechanic, or am I just misunderstanding how it's supposed to work?

EDIT: I also wanted to add that there's what I'm once again is assuming to be a visual bug, but when I declare an attack, the HP bar will jump higher before dealing damage. I am uncertain if this is related or not.
 
Last edited:
I'm trying to figure out how the HP modifier for boss battles works. I'm realizing now that there's some strangeness that occurs the lower the opponent's HP is.

It seems like once they get into low red health, the bar barely drains at all for each attack. My assumption had been that it was purely a display issue and that the HP bar just was under-displaying the remaining health. However, doing some tests just now and using debug mode to track how much HP the opponent Pokémon had at any given time made it seem like the lower HP the opponent had, the less damage it was taking. A move that was causing over a hundred damage to a Pokémon without an HP multiplier was only dealing 10 to 20 damage against a low health Pokémon with it.

For a sanity check, I also artificially increased the species' base HP stat to give it even more HP than it would have had with the multiplier instead of using the multiplier, and it went down much faster and easier than it did with the multiplier, even though it had more HP.

Is there something off about this mechanic, or am I just misunderstanding how it's supposed to work?

EDIT: I also wanted to add that there's what I'm once again is assuming to be a visual bug, but when I declare an attack, the HP bar will jump higher before dealing damage. I am uncertain if this is related or not.
Idk, ive never encountered either of these issues, nor can I seem to replicate either of them now. Do you have any other plugins or custom edits that affect the damage calc or HP calc formulas?

To test, I set up a wild Blissey with around 15,000 HP and attacked it with a move that dealt around 3k damage per hit. The move did consistent damage regardless if Blissey was in red HP or not.
 
Idk, ive never encountered either of these issues, nor can I seem to replicate either of them now. Do you have any other plugins or custom edits that affect the damage calc or HP calc formulas?

To test, I set up a wild Blissey with around 15,000 HP and attacked it with a move that dealt around 3k damage per hit. The move did consistent damage regardless if Blissey was in red HP or not.

You know, I didn't consider this as a possibility until your suggestion, and I feel silly for not checking if this was the source of the problem before asking you, but I actually ended up removing the plugin's Damage Calc Refactor, as I didn't need any of the changes made in it, and I've made a lot of changes to damage calc in Essential's script that I didn't want overridden, and it looked to me like it was nothing but tidying up. I just tested it with the refactor restored, and it worked perfectly fine. In hindsight, removing script from a plugin is a rather obvious source of issues that I should have considered first. Sorry to waste your time. Suppose I'll be putting some time into editing my changes into the refactor now.
 
You know, I didn't consider this as a possibility until your suggestion, and I feel silly for not checking if this was the source of the problem before asking you, but I actually ended up removing the plugin's Damage Calc Refactor, as I didn't need any of the changes made in it, and I've made a lot of changes to damage calc in Essential's script that I didn't want overridden, and it looked to me like it was nothing but tidying up. I just tested it with the refactor restored, and it worked perfectly fine. In hindsight, removing script from a plugin is a rather obvious source of issues that I should have considered first. Sorry to waste your time. Suppose I'll be putting some time into editing my changes into the refactor now.
Yeah, the damage calc refactor is dramatically important, both for DBK and every plugin that relies upon DBK. Almost nothing related to battles will work without it.
 
Lucidious89 updated Deluxe Battle Kit [v21.1] with a new update entry:

v1.2.7 Update

  • When the player triggers Mega Evolution while wearing an outfit, the animation will now properly display the trainer's current outfit during the animation.
  • Added the "battlerWish" midbattle command. This can be used to specifically set the Wish effect on a battler position.
  • Reorganized some of the plugin debug options.
  • Made many miscellaneous tweaks for compatibility with changes made to several other plugins.
  • Made several adjustments in preparation for...

Read the rest of this update entry...
 
I found that some codes related to Animated Pokemon System are still not updated properly.
 
Lucidious89 updated Deluxe Battle Kit [v21.1] with a new update entry:

v1.2.8 Update

  • Fixed a bug that could crash the game at the end of a battler's turn.
  • The ability Perish Body was previously overlooked when considering boss immunities to OHKO effects. This has now been fixed.
  • Tweaked and simplified the code related to boss immunities for all relevant moves and effects.
  • Reorganized the list of PBEffects compatible with this plugin's midbattle scripting.
  • Made additional adjustments in preparation for the Raid Battles add-on plugin.

Read the rest of this update entry...
 
Report: in def hasBossImmunity?, !immunities.is_a?(:Array) should be !immunities.is_a?(Array).
 
Report: in def hasBossImmunity?, !immunities.is_a?(:Array) should be !immunities.is_a?(Array).
Good catch. I fixed this oversight. Everyone please reinstall if you downloaded this yesterday.
 
Regarding the AI of Kit items when using Full Heal, it would be good to include an exception for when our opponent has a Pokémon with the ability Guts on the field, forcing them to ignore Full Heal and use a useful item instead. Since the negative status under these conditions causes a damage buff.
 
Regarding the AI of Kit items when using Full Heal, it would be good to include an exception for when our opponent has a Pokémon with the ability Guts on the field, forcing them to ignore Full Heal and use a useful item instead. Since the negative status under these conditions causes a damage buff.
It generally should, already. It all depends on the AI's skill level and other factors, of course.

This isnt really a DBK thing, though. Base Essentials already includes these AI checks.
 
It generally should, already. It all depends on the AI's skill level and other factors, of course.

This isnt really a DBK thing, though. Base Essentials already includes these AI checks.
I like to use a maximum of 255 for the best decisions, predicts haha
I found a solution to this problem for me, I just wouldn't say it's the best solution, but it worked for now.

Ruby:
Expand Collapse Copy
Battle::AI::Handlers::PokemonItemEffectScore.add(:FULLHEAL,
  proc { |item, score, pkmn, battler, move, ai, battle|
    old_score = score
    tryItems = []
    tryScores = []
    case pkmn.status
    when :BURN               then tryItems.push(:BURNHEAL)
    when :POISON             then tryItems.push(:ANTIDOTE)
    when :PARALYSIS          then tryItems.push(:PARALYZEHEAL)
    when :SLEEP, :DROWSY     then tryItems.push(:AWAKENING)
    when :FROZEN, :FROSTBITE then tryItems.push(:ICEHEAL)
    end
    opposes = battler.opposes?(ai.trainer)
    logName = (battler) ? battler.name : pkmn.name
    tryItems.push(:PERSIMBERRY) if battler && battler.effects[PBEffects::Confusion] > 0
    # Do not use Full Heal on the opponent if they have Guts and are in a "real" status.
    if opposes && (battler.pokemon.hasAbility?(:GUTS))
      has_real_status = battler.pokemon.status != :NONE
      if has_real_status
        score = Battle::AI::ITEM_USELESS_SCORE
        PBDebug.log_score_change(score - old_score, "avoid using Full Heal on opposing Guts user")
        next score
      end
    end
    if tryItems.empty?
      score = Battle::AI::ITEM_USELESS_SCORE
      PBDebug.log_score_change(score - old_score, "useless because #{logName} has no condition to heal")
    else
      items = battle.pbGetOwnerItems(ai.user.index)
      tryItems.each_with_index do |itm, i|
        itemData = GameData::Item.get(itm)
        if itm == :PERSIMBERRY
          tryScore = Battle::AI::Handlers.battler_item_score(itm, score, battler, ai, battle)
        else
          tryScore = Battle::AI::Handlers.pokemon_item_score(itm, score, pkmn, battler, move, ai, battle)
        end
        temp_score = tryScore
        if tryScore > Battle::AI::ITEM_USELESS_SCORE
          if !opposes && tryItems.length == 1 && items.include?(itm)
            tryScore -= 10
            PBDebug.log_score_change(tryScore - temp_score, "prefers to use #{itemData.name}")
          elsif i > 0
            (opposes) ? tryScore -= 10 : tryScore += 10
            PBDebug.log_score_change(tryScore - temp_score, "cures multiple conditions")
          end
        end
        tryScores.push(tryScore - old_score)
      end
      score += tryScores.sum
    end
    next score
  }
)

My addition was:
Ruby:
Expand Collapse Copy
    if opposes && (battler.pokemon.hasAbility?(:GUTS))
      has_real_status = battler.pokemon.status != :NONE
      if has_real_status
        score = Battle::AI::ITEM_USELESS_SCORE
        PBDebug.log_score_change(score - old_score, "avoid using Full Heal on opposing Guts user")
        next score
      end
    end

As you mentioned, it could be an error in SkillLevel 255... I'll study this a little more later.
 
I like to use a maximum of 255 for the best decisions, predicts haha
I found a solution to this problem for me, I just wouldn't say it's the best solution, but it worked for now.

Ruby:
Expand Collapse Copy
Battle::AI::Handlers::PokemonItemEffectScore.add(:FULLHEAL,
  proc { |item, score, pkmn, battler, move, ai, battle|
    old_score = score
    tryItems = []
    tryScores = []
    case pkmn.status
    when :BURN               then tryItems.push(:BURNHEAL)
    when :POISON             then tryItems.push(:ANTIDOTE)
    when :PARALYSIS          then tryItems.push(:PARALYZEHEAL)
    when :SLEEP, :DROWSY     then tryItems.push(:AWAKENING)
    when :FROZEN, :FROSTBITE then tryItems.push(:ICEHEAL)
    end
    opposes = battler.opposes?(ai.trainer)
    logName = (battler) ? battler.name : pkmn.name
    tryItems.push(:PERSIMBERRY) if battler && battler.effects[PBEffects::Confusion] > 0
    # Do not use Full Heal on the opponent if they have Guts and are in a "real" status.
    if opposes && (battler.pokemon.hasAbility?(:GUTS))
      has_real_status = battler.pokemon.status != :NONE
      if has_real_status
        score = Battle::AI::ITEM_USELESS_SCORE
        PBDebug.log_score_change(score - old_score, "avoid using Full Heal on opposing Guts user")
        next score
      end
    end
    if tryItems.empty?
      score = Battle::AI::ITEM_USELESS_SCORE
      PBDebug.log_score_change(score - old_score, "useless because #{logName} has no condition to heal")
    else
      items = battle.pbGetOwnerItems(ai.user.index)
      tryItems.each_with_index do |itm, i|
        itemData = GameData::Item.get(itm)
        if itm == :PERSIMBERRY
          tryScore = Battle::AI::Handlers.battler_item_score(itm, score, battler, ai, battle)
        else
          tryScore = Battle::AI::Handlers.pokemon_item_score(itm, score, pkmn, battler, move, ai, battle)
        end
        temp_score = tryScore
        if tryScore > Battle::AI::ITEM_USELESS_SCORE
          if !opposes && tryItems.length == 1 && items.include?(itm)
            tryScore -= 10
            PBDebug.log_score_change(tryScore - temp_score, "prefers to use #{itemData.name}")
          elsif i > 0
            (opposes) ? tryScore -= 10 : tryScore += 10
            PBDebug.log_score_change(tryScore - temp_score, "cures multiple conditions")
          end
        end
        tryScores.push(tryScore - old_score)
      end
      score += tryScores.sum
    end
    next score
  }
)

My addition was:
Ruby:
Expand Collapse Copy
    if opposes && (battler.pokemon.hasAbility?(:GUTS))
      has_real_status = battler.pokemon.status != :NONE
      if has_real_status
        score = Battle::AI::ITEM_USELESS_SCORE
        PBDebug.log_score_change(score - old_score, "avoid using Full Heal on opposing Guts user")
        next score
      end
    end

As you mentioned, it could be an error in SkillLevel 255... I'll study this a little more later.
Hmm, I'll look into this a bit as well. Im looking over the vanilla AI code, and im seeing a lot that I may have missed.
 
I might just be confused, I don’t know how to install this plugin correctly I don’t think. I’m trying add some of the add ons like the intro trainer animations, but I don’t even know if I installed anything correctly because there are no changes to essentials. I have all the up to date things like the hot fixes but I don’t know where to put the files from DBK into Essentials, then where to put the add ons. There’s no really tutorial that I can find anywhere. Can someone help? (If it means anything, I’m using Wineskin on a Mac, and not a windows, so there’s no option to merge, extract etc, it’s just drag files and drop files)
 
Back
Top