Dark: Random Guy
Professional Coin Flipper
- 21
- Posts
- 14
- Years
- Seen Mar 1, 2011
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
I also wondered this question.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?
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.
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.
Yeah, just change the loadbg.png in your Pictures folder to whatever you want, keeping in mind to keep the same dimensions.
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?
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.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?
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'
Create a Event like event 6 on test map 2. Put every conditional branch for the number of choices or more, like a 500.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.
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
Alright I think I found the right section of code.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.
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
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?
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?Set the terrain tags for those tiles to 6.