• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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.

[Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

Status
Not open for further replies.
this actually helps me quite alot with one of my main problems (trying to create an actual moveset for the pokemon trainers i add in aside) so thanks! =D
 
How do I delete the stuff that's already there, like all those computers and doors that are in the room I start in?
 
How I can centralize the 160x160 sprites (like raptor)? If I put a 160x160 Sprite I need to put a big BattlerAltitude in all pokémon, and they became a little right positioned.
If this can work on 192x192, is better.
How would I extend the amount of "players?"
I've already edited module PokemonMetadata, and the code before that, but is there anything else that I need to do?
I also wondered this question.
 
Some interesting trivia: The only difference between a Pokémon and an egg is that an egg has a non-zero value for its eggsteps attribute. The game looks at this value and then decides how it behaves. eggsteps is, of course, the number of steps left until the egg hatches.

Incidentally, this is completely different to how the actual Pokémon games handle eggs. They lack a variable containing the exact number of steps the egg needs to hatch. Instead, a flag tells the game whether or not a Pokémon is an egg, and the happiness variable is set to a certain value when the egg is obtained (the steps needed to hatch/255). Each time the player takes 255 steps, the happiness of all eggs in the party is decreased by 1 (2 with Magma Armor or Flame Body), or if the egg's happiness is already 0, it hatches (and its happiness is reset to the Pokémon's base happiness). It's very similar to how a Pokémon's happiness increases as you walk around with it, except from that happiness increases happen every 128 steps.
 
Is there a way to speed up the whole battle process, such as text, the transition time between screen (like from the battle screen to the choose pokemon screen) and the attack speed?

Also, can I add some effect, such as flashing, or move left and right, when the player's pokemon make a move (attack using Tackle)?
 
Last edited:
Could somebody help me? I need to make a... REALLY long list of choices. Like, REALLY long. Specifically, a list of almost every unevolved Pokémon (not including Unown, Rotom (is that bugger legendary or not?), or legendaries).

Is there some way I could make a choice command like that? I don't want to immediately give the Pokémon, either, I just want to save the choice to a variable.
 
I feel pretty stupid asking this, but what graphic would I edit to change the New Game screen? I've searched, but I can't seem to find it.

There isn't one, can't remember the name of the graphic neither think it was something like Loadbg.png.
 
Weird. I don't have a loadbg.png in Essentials. I'll keep looking into that. But also, is there a way to remove the need for a border? when I use the screen at half size?

If you set the resolution to 240x160 (pres left once from default settings) you shouldn't have a border.

I don't have loadbg.png either, but I'm interested on how I'm supposed to change the new game screen myself. Let me know when you find out okay?
 
If you set the resolution to 240x160 (pres left once from default settings) you shouldn't have a border.

I don't have loadbg.png either, but I'm interested on how I'm supposed to change the new game screen myself. Let me know when you find out okay?
Essentials doesn't have that file by default. Just give an image that name and put it in the pictures folder, and it'll find it.

EDIT: ^ ninja'd.
 
Last edited:
I get this error when trying to open the PokeGear. Could some tell what this means and how to fix it?
Code:
Exception: NoMethodError
Message: undefined method `bitmap=' for nil:NilClass
SpriteWindow:2554:in `privRefresh'
SpriteWindow:2553:in `each'
SpriteWindow:2553:in `privRefresh'
SpriteWindow:2251:in `visible='
PokemonUtilities:1964:in `pbHideVisibleObjects'
PokemonUtilities:1961:in `each_object'
PokemonUtilities:1961:in `pbHideVisibleObjects'
PokemonUtilities:1999:in `pbLoadRpgxpScene'
PokemonMenu:149:in `pbStartPokemonMenu'
PokemonMenu:139:in `loop'
 
Could somebody help me? I need to make a... REALLY long list of choices. Like, REALLY long. Specifically, a list of almost every unevolved Pokémon (not including Unown, Rotom (is that bugger legendary or not?), or legendaries).

Is there some way I could make a choice command like that? I don't want to immediately give the Pokémon, either, I just want to save the choice to a variable.
Create a Event like event 6 on test map 2. Put every conditional branch for the number of choices or more, like a 500.

use a method like this (I don't test, but if you get the idea...).
Code:
def checknumber(n)
  case n
  when 150
    return false
  when 151
    return false
  when 249
    return false
  when 250
    return false
  when 251
    return false
  else
    return true
  end
  #Put one for each number that you didn't want to put (like 150 for Mewtwo above)
end

def pokemonlister
  s="\ch[1,-1"
  t=""
  cont=1;
  while(cont<MAXNUMBER)#Change MAXNUMBER for the max number (like 500)
    if(checknumber(cont))
      t=PBSpecies.getName(cont)
      s+=","+t
    end
  end
  s+="]"
  $game_variables[2]=s
end

Put a text message with $game_variables[2] (\v[2]) . To scroll for top to bottom will be much boring...

Someone can answer my question on page top?
 
I haven't messed around too much with the battle system, since it's fairly complex, but I think I may have an idea of the problem. This code you have here determines who gains experience, and from what you've said, it works just fine. However, you should look for the code that handles learning moves after level up. Since it works in individual battles (as far as I know), it's probably just that a couple lines of code that check for new moves to learn and try to add them weren't put in the section for double battles. The fix is likely a copy/paste, just finding the lines that are in the single battle portion that are absent from the double battle portion and putting them in there. It'll probably be close by too, so you shouldn't have to look too far.
Alright I think I found the right section of code.

Code:
def pbLearnMove(pkmnIndex,move)
 pokemon=@party1[pkmnIndex]
 return if !pokemon
 pkmnname=pokemon.name
 battler=pbFindPlayerBattler(pkmnIndex)
 movename=PBMoves.getName(move)
 for i in 0..3
  if pokemon.moves[i].id==move
   return
  end
  if pokemon.moves[i].id==0
   pokemon.moves[i]=PBMove.new(move)
   battler.moves[i]=PokeBattle_Move.pbFromPBMove(self,pokemon.moves[i]) if battler
   pbDisplayPaused(_INTL("{1} learned {2}!",pkmnname,movename))
   return
  end
 end
 loop do
  pbDisplayPaused(_INTL("{1} is trying to learn {2}.",pkmnname,movename)) #Replaces current/total PP
  pbDisplayPaused(_INTL("But {1} can't learn more than four moves.",pkmnname))
  if pbDisplayConfirm(_INTL("Delete a move to make room for {1}?",movename))
   pbDisplayPaused(_INTL("Which move should be forgotten?"))
   [email protected](pokemon,move)
   if forgetmove >=0
    oldmovename=PBMoves.getName(pokemon.moves[forgetmove].id)
    pokemon.moves[forgetmove]=PBMove.new(move)#Replaces current/total PP
    battler.moves[forgetmove]=PokeBattle_Move.pbFromPBMove(self,pokemon.moves[forgetmove]) if battler
    pbDisplayPaused(_INTL("1,  2, and... ... ..."))
    pbDisplayPaused(_INTL("Poof!"))
    pbDisplayPaused(_INTL("{1} forgot {2}.",pkmnname,oldmovename))
    pbDisplayPaused(_INTL("And..."))
    pbDisplayPaused(_INTL("{1} learned {2}!",pkmnname,movename))
    return
   elsif pbDisplayConfirm(_INTL("Should {1} stop learning {2}?",pkmnname,movename))
    pbDisplayPaused(_INTL("{1} did not learn {2}.",pkmnname,movename))
    return
   end
  elsif pbDisplayConfirm(_INTL("Should {1} stop learning {2}?",pkmnname,movename))
   pbDisplayPaused(_INTL("{1} did not learn {2}.",pkmnname,movename))
   return
  end
 end
end

def pbGainEXP
 return if !@internalbattle
 successbegin=true
 for i in 0..3 # Not ordered by priority
  if !@doublebattle && pbIsDoubleBattler?(i)
   @battlers[i].participants=[]
   next
  end
  if pbIsOpposing?(i) && @battlers[i].participants.length>0 && @battlers[i].hp<=0
   dexdata=pbOpenDexData
   battlerSpecies=@battlers[i].species
   # Current species, not original species; also using R/S base EXP
   pbDexDataOffset(dexdata,battlerSpecies,17)
   baseexp=dexdata.fgetb
   level=@battlers[i].level
   dexdata.close
   # First count the number of participants
   partic=0
   expshare=0
   for j in @battlers[i].participants
    @participants[j]=true # Add participant to global list
   end
   for j in @battlers[i].participants
    next if !@party1[j] || !pbIsOwner?(0,j)
    partic+=1 if @party1[j].hp>0 && !@party1[j].egg?
   end
   for j in [email protected]
    next if !@party1[j] || !pbIsOwner?(0,j)
    expshare+=1 if @party1[j].hp>0 && !@party1[j].egg? && 
          isConst?(@party1[j].item,PBItems,:EXPSHARE)
   end
   # Now calculate EXP for the participants
   if partic>0
    if !@opponent && successbegin && pbAllFainted?(@party2)
     @scene.pbWildBattleSuccess
     successbegin=false
    end
    for j in [email protected]
     thispoke=@party1[j]
     next if !@party1[j] || !pbIsOwner?(0,j)
     ispartic=0
     level=@battlers[i].level
     haveexpshare=(isConst?(thispoke.item,PBItems,:EXPSHARE)) ? 1 : 0
     for k in @battlers[i].participants
      ispartic=1 if k==j
     end
     if thispoke.hp>0 && !thispoke.egg?
      exp=0
      if expshare>0
       exp=((level*baseexp/7).floor/2).floor
       exp=(exp/partic).floor*ispartic+(exp/expshare).floor*haveexpshare
      elsif ispartic==1
       exp=((level*baseexp/7).floor/partic).floor
      end
      isOutsider=(thispoke.trainerID!=self.pbPlayer.id || (thispoke.language!=0 && thispoke.language!=self.pbPlayer.language))
      exp=(exp*3/2).floor if @opponent
      exp=(exp*3/2).floor if isOutsider
      exp=(exp*3/2).floor if isConst?(thispoke.item,PBItems,:LUCKYEGG)
      growthrate=thispoke.growthrate
      newexp=PBExperience.pbAddExperience(thispoke.exp,exp,growthrate)
      exp=newexp-thispoke.exp;
      if exp > 0
       if isOutsider
        pbDisplayPaused(_INTL("{1} gained a boosted\r\n{2} Exp. Points!",thispoke.name,exp))
       else
        pbDisplayPaused(_INTL("{1} gained\r\n{2} Exp. Points!",thispoke.name,exp))
       end
       #Gain effort value points, using RS effort values
       totalev=0
       for k in 0..5
        totalev+=thispoke.ev[k]
       end
       dexdata=pbOpenDexData
       pbDexDataOffset(dexdata,battlerSpecies,23)
       for k in 0..5
        evgain=dexdata.fgetb
        if isConst?(thispoke.item,PBItems,:MACHOBRACE)
         evgain*=2
        end
        if evgain>0
         # Can't exceed overall limit
         if totalev+evgain>510
          # Bug Fix: must use "-=" instead of "="
          evgain-=totalev+evgain-510
         end
         # Can't exceed stat limit
         if thispoke.ev[k]+evgain>255
          # Bug Fix: must use "-=" instead of "="
          evgain-=thispoke.ev[k]+evgain-255
         end
         # Add EV gain
         thispoke.ev[k]+=evgain
         if thispoke.ev[k]>255
          print "Single-stat EV limit 255 exceeded.\r\nStat: #{k}  EV gain: #{evgain}  EVs: #{thispoke.ev.inspect}"
          thispoke.ev[k]=255
         end
         totalev+=evgain
         if totalev>510
          print "EV limit 510 exceeded.\r\nTotal EVs: #{totalev} EV gain: #{evgain}  EVs: #{thispoke.ev.inspect}"
         end
        end
       end
       newlevel=PBExperience.pbGetLevelFromExperience(newexp,growthrate)
       tempexp=0
       curlevel=thispoke.level
       thisPokeSpecies=thispoke.species
       if newlevel<curlevel
        debuginfo="#{thispoke.name}: #{thispoke.level}/#{newlevel} | #{thispoke.exp}/#{newexp} | gain: #{exp}"
        raise RuntimeError.new(
         _INTL("The new level ({1}) is less than the Pokémon's\r\ncurrent level ({2}), which shouldn't happen.\r\n[Debug: {3}]",
         newlevel,curlevel,debuginfo))
        return
       end
       if thispoke.respond_to?("isShadow?") && thispoke.isShadow?
        thispoke.exp+=exp
       else
        tempexp1=thispoke.exp
        tempexp2=0
        # Find battler
        battler=pbFindPlayerBattler(j)
        loop do
         #EXP Bar animation
         startexp=PBExperience.pbGetStartExperience(curlevel,growthrate)
         endexp=PBExperience.pbGetStartExperience(curlevel+1,growthrate)
         tempexp2=(endexp<newexp) ? endexp : newexp
         thispoke.exp=tempexp2
         @scene.pbEXPBar(thispoke,battler,startexp,endexp,tempexp1,tempexp2)
         tempexp1=tempexp2
         curlevel+=1
         break if curlevel>newlevel
         oldtotalhp=thispoke.totalhp
         oldattack=thispoke.attack
         olddefense=thispoke.defense
         oldspeed=thispoke.speed
         oldspatk=thispoke.spatk
         oldspdef=thispoke.spdef
         thispoke.calcStats
         battler.pbUpdate if battler
         @scene.pbRefresh
         if battler.pokemon && @internalbattle
          battler.pokemon.happiness+=2
          battler.pokemon.happiness=255 if battler.pokemon.happiness>255
         end
         pbDisplayPaused(_INTL("{1} grew to Level {2}!",thispoke.name,curlevel))
         @scene.pbLevelUp(thispoke,battler,oldtotalhp,oldattack,
             olddefense,oldspeed,oldspatk,oldspdef)
         # Finding all moves learned at this level
         atkdata=pbRgssOpen("Data/attacksRS.dat","rb")
         offset=atkdata.getOffset(thisPokeSpecies-1)
         length=atkdata.getLength(thisPokeSpecies-1)>>1
         atkdata.pos=offset
         for k in 0..length-1
          atklevel=atkdata.fgetw
          move=atkdata.fgetw
          if atklevel==thispoke.level
           # Learned a new move
           pbLearnMove(j,move)
          end
         end
         atkdata.close
        end
       end
      end
     end
    end
   end
   # Now clear the participants array
   @battlers[i].participants=[]
  end
 end
end

Unfortunately I'm still very new to Ruby, I still need to get a hang of the syntax.

Now, when the active pokemon levels up, they learn new moves just fine, it's only when a pokemon that levels up while not being the active pokemon that they don't learn new moves.
 
Character Reflection

If you are surfing on water the tiles reflect the character. Is there an event command for this reflection I could use for other tiles?
 
Set the terrain tags for those tiles to 6.
I've set this tag to puddles, but it still allows me to surf on it. Is there a way to remove the fact that you can use surf on the tiles while still see your reflection?



I was also wandering: How can you start a battle with an opponent's pokemon not at full health??
 
Status
Not open for further replies.
Back
Top