• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script: Deluxe Battle Kit [v21.1]

1,404
Posts
10
Years
  • Age 35
  • Seen today
The calculation of hp from base stats done by the calchp code in the Pokémon-Pokémon section of the Essentials scripts. It happens everywhere, constantly. I am determining this by using the same script with and without the Deluxe Battle Kit added to my game.

No matter what you change the numbers to in the return section, it does not change how much hp the pokémon has.

# @return [Integer] the maximum HP of this Pokémon
def calcHP(base, level, iv, ev)
return 1 if base == 1 # For Shedinja
iv = ev = 0 if Settings::DISABLE_IVS_AND_EVS
return (((base * 2) + iv + (ev / 4)) * level / 100).floor + level + 10
end
Oh, so the issue isn't that DBK is overwriting stat calculations. The issue is that *you* are trying to overwrite stat calculations, and your overwrites aren't being recognized.

This is because DBK overwrites calcHP to allow for Boss/Dynamax HP. So youll have to make your edits in the plugin.
 
1
Posts
26
Days
  • Seen Apr 23, 2024
I followed the instructions for installing this (and enhanced UI) multiple times, but the sprites for mega evolved pokemon are still missing in my files. What part did I miss? Grateful for help.
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
I followed the instructions for installing this (and enhanced UI) multiple times, but the sprites for mega evolved pokemon are still missing in my files. What part did I miss? Grateful for help.
This plugin doesn't include any Pokemon sprites.
 
24
Posts
1
Years
  • Age 20
  • Seen today
Report:In a battle with "battleBGM" rule I set a custom BGM but after low HP music fades it returns to default battle BGM.
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
Minor Update (v1.1.1)
  • Fixed damage calculations related to certain Gen 9 abilities.
  • Removed Relic Castle link from the meta file.
 

WaterIsNice

Water Enjoyer
7
Posts
36
Days
  • Age 15
  • Seen Apr 11, 2024
Hello again, I believe I may have run into a problem with using the variables feature. I was making a battle with speech playin after the player sends out a grass type pokemon, which works, but I decided to try out the variable feature. I couldn't make it work, so I decided to make another trainer battle using the code in the Gitbook tutorial, and it worked. I'm not sure if I messed something up, so help will be appreciated.

Ruby:
setBattleRule("Single")
setBattleRule("midbattleScript", {
  "RoundStartCommand" => {
   "setVariable" => 1
  },
  "AfterSendOut_GRASS_player_repeat" => {
    "speech"   => "Works!", 
    "addVariable" => 1   
  },
  "Variable_2" => {
    "speech"   => "Works again!" 
  }
})
TrainerBattle.start(:YOUNGSTER, "Ben")
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
Hello again, I believe I may have run into a problem with using the variables feature. I was making a battle with speech playin after the player sends out a grass type pokemon, which works, but I decided to try out the variable feature. I couldn't make it work, so I decided to make another trainer battle using the code in the Gitbook tutorial, and it worked. I'm not sure if I messed something up, so help will be appreciated.

Ruby:
setBattleRule("Single")
setBattleRule("midbattleScript", {
  "RoundStartCommand" => {
   "setVariable" => 1
  },
  "AfterSendOut_GRASS_player_repeat" => {
    "speech"   => "Works!",
    "addVariable" => 1  
  },
  "Variable_2" => {
    "speech"   => "Works again!"
  }
})
TrainerBattle.start(:YOUNGSTER, "Ben")
Can you clarify what is and isn't working? I copy/pasted your code and it works fine for me. I'm not sure what the problem is, exactly.
 
6
Posts
4
Years
  • Age 37
  • Seen Apr 6, 2024
hi wondering if you could help me, i keep getting this error code when fighting gastly, haunter and gengar. ive worked out that it seems to be when they've learnt SPITE. i thought it was the dbk z power but deleting that hasnt got rid of it.


ive now deleted spite from gastly and everything is working fine for the time being
this is the pbs file which seems normal and the error is attached.
thanks
#-------------------------------
[SPITE]
Name = Spite
Type = GHOST
Category = Status
Accuracy = 100
TotalPP = 10
Target = NearOther
FunctionCode = LowerPPOfTargetLastMoveBy4
Flags = CanProtect,CanMirrorMove,ZPower_HealUser
Description = The user unleashes its grudge on the move last used by the target by cutting 4 PP from it.
#-------------------------------

Untitled.png
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
hi wondering if you could help me, i keep getting this error code when fighting gastly, haunter and gengar. ive worked out that it seems to be when they've learnt SPITE. i thought it was the dbk z power but deleting that hasnt got rid of it.


ive now deleted spite from gastly and everything is working fine for the time being
this is the pbs file which seems normal and the error is attached.
thanks
#-------------------------------
[SPITE]
Name = Spite
Type = GHOST
Category = Status
Accuracy = 100
TotalPP = 10
Target = NearOther
FunctionCode = LowerPPOfTargetLastMoveBy4
Flags = CanProtect,CanMirrorMove,ZPower_HealUser
Description = The user unleashes its grudge on the move last used by the target by cutting 4 PP from it.
#-------------------------------

View attachment 157588
Seems like it might just be an Essentials bug, tbh. Because nothing plugin related seems to be called here. Ill take a look later.
 

WaterIsNice

Water Enjoyer
7
Posts
36
Days
  • Age 15
  • Seen Apr 11, 2024
Can you clarify what is and isn't working? I copy/pasted your code and it works fine for me. I'm not sure what the problem is, exactly.
Hello, sorry for not clarifying. My problem is that when the first speech starts, it increases the variable to 2 which will trigger another speech, but it does not happen.
 
1,404
Posts
10
Years
  • Age 35
  • Seen today
Hello, sorry for not clarifying. My problem is that when the first speech starts, it increases the variable to 2 which will trigger another speech, but it does not happen.
Yeah but like I said, the code you posted works perfectly fine for me though, which is why I'm not understanding what the problem is that you're having.

>Every time a Grass-type is switched in, the message "Works!" appears.
>When the variable reaches 2, the message "Works again!" appears.

What else are you expecting to happen that isn't happening?
 
Back
Top