Online now
Posted 1 Hour Ago
60 posts
290 Days
I m new plz tell what to do i donot know
Quit spamming.
And no, I'm not coding your game. You need to learn to do stuff by yourself. If you're not ready to do some scripting by yourself, then you're not ready to make your game. I have already given you enough hints to figure out what to do.

About your bugs though, this is a piece of code I gave you, so I'm helping you debug it.
Replace the code that I gave you with:
def pbMaxRaidBattleSimple(species, lvl, gmax)
  # species = PBSpecies constant (of the form: PBSpecies::KABUTOPS for example)
  # lvl = Pokémon level (will be converted to a rank level).
  # gmax = boolean
  pbResetRaidSettings
  setBattleRule("canLose")
  setBattleRule("cannotRun")
  setBattleRule("noPartner")
  setBattleRule(sprintf("%dv%d",MAXRAID_SIZE,1))
  
  s = pbGetSpeciesFromFSpecies(species)
  f,g = pbGetMaxRaidForm(s[0],rand(10),nil,nil)
  
  $game_switches[MAXRAID_SWITCH] = true 
  $game_variables[MAXRAID_PKMN] = [s[0], f, g, lvl,gmax]
  pbWildBattleCore(species, lvl)
  pbResetBattle
  pbResetRaidSettings
  $PokemonTemp.clearBattleRules
  for i in $Trainer.party; i.heal; end
end
Male
Bihar, India
Seen 5 Hours Ago
Posted 1 Day Ago
7 posts
6 Days
Can you post the whole code of your drawPageFour function?
def drawPageFour
overlay = @sprites["overlay"].bitmap
moveBase = Color.new(64,64,64)
moveShadow = Color.new(176,176,176)
ppBase = [moveBase, # More than 1/2 of total PP
Color.new(248,192,0), # 1/2 of total PP or less
Color.new(248,136,32), # 1/4 of total PP or less
Color.new(248,72,72)] # Zero PP
ppShadow = [moveShadow, # More than 1/2 of total PP
Color.new(144,104,0), # 1/2 of total PP or less
Color.new(144,72,24), # 1/4 of total PP or less
Color.new(136,48,48)] # Zero PP
@sprites["pokemon"].visible = true
@sprites["pokeicon"].visible = false
@sprites["itemicon"].visible = true
textpos = []
imagepos = []
# Write move names, types and PP amounts for each known move
yPos = 98
for i in [email protected]
[email protected][i]
if move.id>0
#=======================================================================
# Dynamax - Draws Max Move names and types.
#=======================================================================
movelist = drawDynamaxMoveSel(move,yPos,moveBase,moveShadow,moveToLearn)
imagepos.push(movelist[0])
textpos.push(movelist[1])
#=======================================================================
if move.totalpp>0
textpos.push([_INTL("PP"),342,yPos+32,0,moveBase,moveShadow])
ppfraction = 0
if move.pp==0; ppfraction = 3
elsif move.pp*4<=move.totalpp; ppfraction = 2
elsif move.pp*2<=move.totalpp; ppfraction = 1
end
textpos.push([sprintf("%d/%d",move.pp,move.totalpp),460,yPos+32,1,ppBase[ppfraction],ppShadow[ppfraction]])
end
else
textpos.push(["-",316,yPos,0,moveBase,moveShadow])
textpos.push(["--",442,yPos+32,1,moveBase,moveShadow])
end
yPos += 64
end
# Draw all text and images
pbDrawTextPositions(overlay,textpos)
pbDrawImagePositions(overlay,imagepos)
end

def drawSelectedMove(moveToLearn,moveid)
# Draw all of page four, except selected move's details
drawMoveSelection(moveToLearn)
# Set various values
overlay = @sprites["overlay"].bitmap
base = Color.new(64,64,64)
shadow = Color.new(176,176,176)
@sprites["pokemon"].visible = false if @sprites["pokemon"]
@sprites["pokeicon"].pokemon = @pokemon
@sprites["pokeicon"].visible = true
@sprites["itemicon"].visible = false if @sprites["itemicon"]
# Get data for selected move
moveData = pbGetMoveData(moveid)
basedamage = moveData[MOVE_BASE_DAMAGE]
category = moveData[MOVE_CATEGORY]
accuracy = moveData[MOVE_ACCURACY]
#===========================================================================
# Dynamax - Displays Max Move data.
#===========================================================================
maxMoveData = pbGetMaxMoveData(moveToLearn,moveid)
if maxMoveData
basedamage = maxMoveData[0]
accuracy = maxMoveData[1]
moveid = maxMoveData[2]
end
#===========================================================================
textpos = []
# Write power and accuracy values for selected move
if basedamage==0 # Status move
textpos.push(["---",216,154,1,base,shadow])
elsif basedamage==1 # Variable power move
textpos.push(["???",216,154,1,base,shadow])
else
textpos.push([sprintf("%d",basedamage),216,154,1,base,shadow])
end
if accuracy==0
textpos.push(["---",216,186,1,base,shadow])
else
textpos.push([sprintf("%d%",accuracy),216+overlay.text_size("%").width,186,1,base,shadow])
end
# Draw all text
pbDrawTextPositions(overlay,textpos)
# Draw selected move's damage category icon
imagepos = [["Graphics/Pictures/category",166,124,0,category*28,64,28]]
pbDrawImagePositions(overlay,imagepos)
# Draw selected move's description
drawTextEx(overlay,4,218,230,5,
pbGetMessage(MessageTypes::MoveDescriptions,moveid),base,shadow)
end

def drawMoveSelection(moveToLearn)
overlay = @sprites["overlay"].bitmap
overlay.clear
base = Color.new(248,248,248)
shadow = Color.new(104,104,104)
moveBase = Color.new(64,64,64)
moveShadow = Color.new(176,176,176)
ppBase = [moveBase, # More than 1/2 of total PP
Color.new(248,192,0), # 1/2 of total PP or less
Color.new(248,136,32), # 1/4 of total PP or less
Color.new(248,72,72)] # Zero PP
ppShadow = [moveShadow, # More than 1/2 of total PP
Color.new(144,104,0), # 1/2 of total PP or less
Color.new(144,72,24), # 1/4 of total PP or less
Color.new(136,48,48)] # Zero PP
# Set background image
if moveToLearn!=0
@sprites["background"].setBitmap("Graphics/Pictures/Summary/bg_learnmove")
else
@sprites["background"].setBitmap("Graphics/Pictures/Summary/bg_movedetail")
end
# Write various bits of text
textpos = [
[_INTL("MOVES"),26,16,0,base,shadow],
[_INTL("CATEGORY"),20,122,0,base,shadow],
[_INTL("POWER"),20,154,0,base,shadow],
[_INTL("ACCURACY"),20,186,0,base,shadow]
]
imagepos = []
# Write move names, types and PP amounts for each known move
yPos = 98
yPos -= 76 if moveToLearn!=0
for i in 0...5
move = @pokemon.moves[i]
if i==4
move = PBMove.new(moveToLearn) if moveToLearn!=0
yPos += 20
end
if move && move.id>0
#=======================================================================
# Dynamax - Draws Max Move names and types.
#=======================================================================
movelist = drawDynamaxMoveSel(move,yPos,moveBase,moveShadow,moveToLearn)
imagepos.push(movelist[0])
textpos.push(movelist[1])
#=======================================================================
if move.totalpp>0
textpos.push([_INTL("PP"),342,yPos+32,0,moveBase,moveShadow])
ppfraction = 0
if move.pp==0; ppfraction = 3
elsif move.pp*4<=move.totalpp; ppfraction = 2
elsif move.pp*2<=move.totalpp; ppfraction = 1
end
textpos.push([sprintf("%d/%d",move.pp,move.totalpp),460,yPos+32,1,ppBase[ppfraction],ppShadow[ppfraction]])
end
else
textpos.push(["-",316,yPos,0,moveBase,moveShadow])
textpos.push(["--",442,yPos+32,1,moveBase,moveShadow])
end
yPos += 64
end
# Draw all text and images
pbDrawTextPositions(overlay,textpos)
pbDrawImagePositions(overlay,imagepos)
# Draw Pokémon's type icon(s)
type1rect = Rect.new(0,@pokemon.type1*28,64,28)
type2rect = Rect.new(0,@pokemon.type2*28,64,28)
if @[email protected]
overlay.blt(130,78,@typebitmap.bitmap,type1rect)
else
overlay.blt(96,78,@typebitmap.bitmap,type1rect)
overlay.blt(166,78,@typebitmap.bitmap,type2rect)
end
end
Online now
Posted 1 Hour Ago
60 posts
290 Days
<--CODE-->
Please next time, put long pieces of code inside [SPOILER] and [CODE] tags ^^

In the code of :
      #=======================================================================
      # Dynamax - Draws Max Move names and types.
      #=======================================================================
      movelist = drawDynamaxMoveSel(move,yPos,moveBase,moveShadow,moveToLearn)
      imagepos.push(movelist[0])
      textpos.push(movelist[1])
      #=======================================================================
replace the "moveToLearn" with "0". Tell us if another error shows up.
Male
Seen 1 Hour Ago
Posted 3 Hours Ago
59 posts
25 Days
Quit spamming.
And no, I'm not coding your game. You need to learn to do stuff by yourself. If you're not ready to do some scripting by yourself, then you're not ready to make your game. I have already given you enough hints to figure out what to do.

About your bugs though, this is a piece of code I gave you, so I'm helping you debug it.
Replace the code that I gave you with:
def pbMaxRaidBattleSimple(species, lvl, gmax)
  # species = PBSpecies constant (of the form: PBSpecies::KABUTOPS for example)
  # lvl = Pokémon level (will be converted to a rank level).
  # gmax = boolean
  pbResetRaidSettings
  setBattleRule("canLose")
  setBattleRule("cannotRun")
  setBattleRule("noPartner")
  setBattleRule(sprintf("%dv%d",MAXRAID_SIZE,1))
  
  s = pbGetSpeciesFromFSpecies(species)
  f,g = pbGetMaxRaidForm(s[0],rand(10),nil,nil)
  
  $game_switches[MAXRAID_SWITCH] = true 
  $game_variables[MAXRAID_PKMN] = [s[0], f, g, lvl,gmax]
  pbWildBattleCore(species, lvl)
  pbResetBattle
  pbResetRaidSettings
  $PokemonTemp.clearBattleRules
  for i in $Trainer.party; i.heal; end
end
Sorry I will not ask anything now.
Male
Seen 1 Hour Ago
Posted 3 Hours Ago
59 posts
25 Days
Quit spamming.
And no, I'm not coding your game. You need to learn to do stuff by yourself. If you're not ready to do some scripting by yourself, then you're not ready to make your game. I have already given you enough hints to figure out what to do.

About your bugs though, this is a piece of code I gave you, so I'm helping you debug it.
Replace the code that I gave you with:
def pbMaxRaidBattleSimple(species, lvl, gmax)
  # species = PBSpecies constant (of the form: PBSpecies::KABUTOPS for example)
  # lvl = Pokémon level (will be converted to a rank level).
  # gmax = boolean
  pbResetRaidSettings
  setBattleRule("canLose")
  setBattleRule("cannotRun")
  setBattleRule("noPartner")
  setBattleRule(sprintf("%dv%d",MAXRAID_SIZE,1))
  
  s = pbGetSpeciesFromFSpecies(species)
  f,g = pbGetMaxRaidForm(s[0],rand(10),nil,nil)
  
  $game_switches[MAXRAID_SWITCH] = true 
  $game_variables[MAXRAID_PKMN] = [s[0], f, g, lvl,gmax]
  pbWildBattleCore(species, lvl)
  pbResetBattle
  pbResetRaidSettings
  $PokemonTemp.clearBattleRules
  for i in $Trainer.party; i.heal; end
end
Should it fix that two error
Male
Bihar, India
Seen 5 Hours Ago
Posted 1 Day Ago
7 posts
6 Days
Please next time, put long pieces of code inside [SPOILER] and [CODE] tags ^^

In the code of :
      #=======================================================================
      # Dynamax - Draws Max Move names and types.
      #=======================================================================
      movelist = drawDynamaxMoveSel(move,yPos,moveBase,moveShadow,moveToLearn)
      imagepos.push(movelist[0])
      textpos.push(movelist[1])
      #=======================================================================
replace the "moveToLearn" with "0". Tell us if another error shows up.
thanks now its working but it doesnt shows dynamax level
Male
Seen 5 Hours Ago
Posted 1 Day Ago
500 posts
6.8 Years
well in debug mode i just removed all filters of max raid data base and while searching i found this do you have any idea about this
Your Mega Slowbro form is most likely using form 1. The Dynamax script is designed assuming you're using the Gen 8 project, or v18.dev where Galarian Slowbro is form 1 instead, and Mega Slowbro is form 2. Swap these Slowbro forms in your PBS/graphics and you won't have this problem.

This is actually my fault, since I labeled this thread as a v18.1 project, which it is. But for compatibility with Gen 8 content, I swapped the Slowbro forms.
Male
Bihar, India
Seen 5 Hours Ago
Posted 1 Day Ago
7 posts
6 Days
Check this post.
Sir sorry to disturb I tried to fix this error myself but its again and again showing the syntax error I did all possible editing at line 1363. But it again and again shows the syntax error in the last line. Sir please teach me how can I fix this error myself.
# Show shininess star
    if @pokemon.shiny?
      imagepos.push([sprintf("Graphics/Pictures/shiny"),2,134])
    end
    #===========================================================================
    # Dynamax - Displays Dynamax Levels and G-Max Factor
    #===========================================================================
    pbDisplayGMaxFactor if defined?(@pokemon.dynamax?)
    pbDisplayDynamaxMeter if defined?(@pokemon.dynamax?)
    #===========================================================================
def pbStartChooseMoveScreen(party,partyindex,message)
    ret = -1
    @scene.pbStartForgetScene(party,partyindex,0)
    pbMessage(message) { @scene.pbUpdate }
    loop do
      ret = @scene.pbChooseMoveToForget(0)
      if ret<0
        pbMessage(_INTL("You must choose a move!")) { @scene.pbUpdate }
      else
        break
      end
    end
    @scene.pbEndScene
    return
  end
end
Age 20
Male
India
Seen 21 Minutes Ago
Posted 1 Day Ago
17 posts
11 Days
Your Mega Slowbro form is most likely using form 1. The Dynamax script is designed assuming you're using the Gen 8 project, or v18.dev where Galarian Slowbro is form 1 instead, and Mega Slowbro is form 2. Swap these Slowbro forms in your PBS/graphics and you won't have this problem.

This is actually my fault, since I labeled this thread as a v18.1 project, which it is. But for compatibility with Gen 8 content, I swapped the Slowbro forms.
Oh thanks i got it
Online now
Posted 1 Hour Ago
60 posts
290 Days
Sir sorry to disturb I tried to fix this error myself but its again and again showing the syntax error I did all possible editing at line 1363. But it again and again shows the syntax error in the last line. Sir please teach me how can I fix this error myself.
You're very lucky you screenshot your error!
Right before "class PokemonSummaryScreen", one "end" is missing.
Online now
Posted 1 Hour Ago
60 posts
290 Days
[Lucidious89]
Friend, sorry for the inconvenience, it is me again because it will be that I give a mega stone to a pokemon and in combat it does not come out to mega evolve, it only comes out for dynamax ...... Sorry for my bad English is that I speak Spanish
Are you using v18.dev?
If yes, then it's a known bug. Here's the fix.