This script is popular a lot! I'm trying to do this script...Can I get some help with scripts? I would like 1st pokemon in party to follow player around like in hgss, but I have no idea how to do it. Help, please...
Open the RPG Maker XP editor, and press F11. You get the scripts window, with each section in a list on the left. Somewhere in there are the sections PokemonRoaming (towards the bottom) and PBExperience (just above the PokeBattle_SomethingSomething ones).Thanks Maruno. btw My game include Kanto, Orange Islands, Johto, Hoenn, Sinnoh, and two custom regions. Which is why I wanted to increase the max level. I understand that it gets harder to level up, which is why the level curve of enemy trainers also slows. Now when you say PB it's not the PBS folder apparently, cause there is no folder for it. I'm assuming I open RPG Maker and go to the script section...But thank you for your help. Sorry about asking a question that's been answered. I attempted to search the thread but I guess I missed it somewhere. Sorry.
You appear to have the same problem that was answered on the very same page you asked. You haven't defined the trainer type "LEADER_Brock". If you think you have, check the spelling and capitalisation.I have this error come up when i test my gym script in the game can someone pleaz help me
---------------------------
Pokemon
---------------------------
Exception: RuntimeError
Message: Script error within event 2, map 60 (Brock's Gym):
(eval) : 1 :in `pbExecuteScript'uninitialized constant PBTrainers::LEADER_Brock
***Full script:
pbTrainerBattle(PBTrainers::LEADER_Brock,"Brock",_I("I took you for granted, and so I lost. As proof of your victory, I confer on you this. The official Pokémon League Boulderbadge."))
Interpreter:238:in `pbExecuteScript'
Interpreter:789:in `eval'
Interpreter:238:in `pbExecuteScript'
Interpreter:789:in `command_111'
Interpreter:322:in `execute_command'
Interpreter:190:in `update'
Interpreter:104:in `loop'
Interpreter:195:in `update'
Scene_Map:100:in `update'
Scene_Map:98:in `loop'
Interpreter:279:in `pbExecuteScript'
Interpreter:789:in `command_111'
Interpreter:322:in `execute_command'
Interpreter:190:in `update'
Interpreter:104:in `loop'
Interpreter:195:in `update'
Scene_Map:100:in `update'
Scene_Map:98:in `loop'
Scene_Map:111:in `update'
Scene_Map:67:in `main'
This exception was logged in errorlog.txt.
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
You appear to have the same problem that was answered on the very same page you asked. You haven't defined the trainer type "LEADER_Brock". If you think you have, check the spelling and capitalisation.
I have defined the trainer type "LEADER_Brock" and the spelling and capitalization is all the same. I did this all before i posted. Thats the reason I did post because I don't know whats wrong. If some can help me fix it I would greatly appreciate it.
Pokemon
---------------------------
Exception: RuntimeError
Message: Script error within event 2, map 60 (Brock's Gym):
(eval) : 1 :in `pbExecuteScript'uninitialized constant PBTrainers::LEADER_Brock
***Full script:
pbTrainerBattle(PBTrainers::LEADER_Brock,"Brock",_I("I took you for granted, and so I lost."))
Interpreter:238:in `pbExecuteScript'
Interpreter:789:in `eval'
Interpreter:238:in `pbExecuteScript'
Interpreter:789:in `command_111'
Interpreter:322:in `execute_command'
Interpreter:190:in `update'
Interpreter:104:in `loop'
Interpreter:195:in `update'
Scene_Map:100:in `update'
Scene_Map:98:in `loop'
Interpreter:279:in `pbExecuteScript'
Interpreter:789:in `command_111'
Interpreter:322:in `execute_command'
Interpreter:190:in `update'
Interpreter:104:in `loop'
Interpreter:195:in `update'
Scene_Map:100:in `update'
Scene_Map:98:in `loop'
Scene_Map:111:in `update'
Scene_Map:67:in `main'
Here is the event script:
![]()
if $pbspecies="KYOGRE"
battlebg="Graphics/Pictures/battlebg8.png"
enemybase="Graphics/Pictures/enemybase8.png"
playerbase="Graphics/Pictures/playerbase8.png"
Audio.se_play("Audio/BGM/VS Groudon, Kyogre, Rayquaza.mid")
end
Can someone tell me whats wrong with this script? I placed it below Luka S.J.'s battlebg/enemybase/playerbase script that he made a while ago. The battlebg, enemybase and playerbase work fine. But the Audio part won't work. The battle just uses the default wild battle music.
HTML:if $pbspecies="KYOGRE" battlebg="Graphics/Pictures/battlebg8.png" enemybase="Graphics/Pictures/enemybase8.png" playerbase="Graphics/Pictures/playerbase8.png" Audio.se_play("Audio/BGM/VS Groudon, Kyogre, Rayquaza.mid") end
Any help will be appreciated.
P.S. The if $pbspecies="KYOGRE" was completely guessed, I didn't even think it would work xD, but it did =D. So if any is trying to make something happen or whatever for only a certain Pokemon. Then "if $pbspecies=" " is where you should start lol
It is giving you the error because you made a scripting paradox. If you tel is to "Audio.se_play" you are telling it to play a sound effect, which makes it browse for the file in the SE folder. what you should do is Audio.bgm_play("VS Groudon, Kyogre, Rayquaza.mid"). You dont need to type in the file directory, otherwise it is going to search for the directory inside the directory.
Anyways...that's not how you are supposed to play the BGM inside scripts. Just change the BGM using the event function. That's the easiest, because the method you are using is not right.
EDIT: I really recommend doing just the "Change Battle BGM" in the event editor and also in the event editor, go to "Script" and type "$PokemonGlobal.nextBattleBack=8", that is the easiest way, and doesnt require any scripting. What I've done for the script is if you want to add more automatic terrain battlebgs. You could also do that by just typing "id=whatever" for any of the specified terrains.
It'd be nice to see what scripts you've typed in to try to make this trade. All I can say at the moment is to read the notes, because in-game trades are explained there.Thank you Maruno! Your the first one to actually be polite to me on here. I mean tons of other people have helped me but they made me feel more like a burden than a person. I know I can create this game, if only I can get the help when I need it. I admit I am kinda newbish at RPGMakerXP, but I've been thinking and planning this game for years. Trust me it'll be a great game. And as soon as I can I'll post some info on it. I've decided to call it Pokemon Chrome: Overworld. Currently I've hit a snag on Route 2. There is a trainer there who wishes to trade a Mr. Mime for the players Abra. I read the noted and found the section on In-Game Trades. I even looked at the example in the demo. I set up my trade and play-tested it. It gave me an error sign and the demo closed. So any chance someone could explain how to make an in-game trade? The notes weren't to helpful cause he gave very little detail on that topic. Here is the info for the trade.
Player Pokemon= Abra
CPU Pokemon= Mr. Mime
CPU Pkmn Nickname= No Nickname (Mr. Mime)
Thanks in advance, and a special thanks to Maruno for his support.
~Sage Raziel
[COLOR=Red]pbChoosePokemon[/COLOR](1,2,
proc {|poke|
!poke.egg? and
poke.species==PBSpecies::ABRA
})
[COLOR=Red]pbStartTrade[/COLOR](
$game_variables[1],
PBSpecies::MR_MIME,
"MR. MIME",
"DAVE"
)
@>Change Battle BGM:'VS Groudon, Kyogre, Rayquaza',100,100
@>Play SE:'382Cry',80,100
@>Set Move Route: [Kyogre]
: :$>Through ON
: :$>Change Speed: 2
: :$>Move Down
: :$>Wait: 15 frame(s)
: :$>Move Down
@>Wait for Move's Completion
@>Script: pbWildBattle(382,50)
@>
This is what I have the change battle bgm in BUT...it never works.
I would really like to know why this doesn't work, everyone has said to "just use Change BGM to change the Battle BGM" but it just refuses to work.HTML:@>Change Battle BGM:'VS Groudon, Kyogre, Rayquaza',100,100 @>Play SE:'382Cry',80,100 @>Set Move Route: [Kyogre] : :$>Through ON : :$>Change Speed: 2 : :$>Move Down : :$>Wait: 15 frame(s) : :$>Move Down @>Wait for Move's Completion @>Script: pbWildBattle(382,50) @>
This is what I have the change battle bgm in BUT...it never works.
I would really like to know why this doesn't work, everyone has said to "just use Change BGM to change the Battle BGM" but it just refuses to work.HTML:@>Change Battle BGM:'VS Groudon, Kyogre, Rayquaza',100,100 @>Play SE:'382Cry',80,100 @>Set Move Route: [Kyogre] : :$>Through ON : :$>Change Speed: 2 : :$>Move Down : :$>Wait: 15 frame(s) : :$>Move Down @>Wait for Move's Completion @>Script: pbWildBattle(382,50) @>
def pbGetWildBattleBGM(species)
[COLOR="Red"] if $PokemonGlobal.nextBattleBGM
return $PokemonGlobal.nextBattleBGM.clone
end[/COLOR]
wildbgm=pbGetMetadata(0,MetadataWildBattleBGM)
if wildbgm
wildbgm="#{wildbgm}"
else
wildbgm="002-Battle02.mid"
end
return pbStringToAudioFile(wildbgm)
end
if $PokemonGlobal.nextBattleBGM
return $PokemonGlobal.nextBattleBGM.clone
end
def pbGetWildBattleBGM(species)
if $PokemonGlobal.nextBattleBGM
return $PokemonGlobal.nextBattleBGM.clone
end
wildbgm=pbGetMetadata(0,MetadataWildBattleBGM)
[COLOR="RoyalBlue"]if "whatever condition you want"
wildbgm="your song"[/COLOR]
elsif wildbgm
wildbgm="#{wildbgm}"
else
wildbgm="002-Battle02.mid"
end
return pbStringToAudioFile(wildbgm)
It didn't work for me.Well, I had this problem too, to solve it , I added the change BGM command in the beggining, in the middle and right before the battle event.
Nope, tried that. Still not working. This is really driving me nuts lol, I got the battlebg etc to work, but when it comes to the BGM....ugh.Well...go to line 535 (or somewhere around that) in PokemonUtilities and you should see something like this.
Now...I think the problem could be that you are missing theCode:def pbGetWildBattleBGM(species) [COLOR="Red"] if $PokemonGlobal.nextBattleBGM return $PokemonGlobal.nextBattleBGM.clone end[/COLOR] wildbgm=pbGetMetadata(0,MetadataWildBattleBGM) if wildbgm wildbgm="#{wildbgm}" else wildbgm="002-Battle02.mid" end return pbStringToAudioFile(wildbgm) end
code. If that is the case, just copy this and then try to change the battle bgm again, and I think it should work. If that doesn't work you could always go about editing that part of the script and do something likeCode:if $PokemonGlobal.nextBattleBGM return $PokemonGlobal.nextBattleBGM.clone end
That is the proper way of changing the battle bgm using scripts and not making it load another music within the battlebg and other commands.Code:def pbGetWildBattleBGM(species) if $PokemonGlobal.nextBattleBGM return $PokemonGlobal.nextBattleBGM.clone end wildbgm=pbGetMetadata(0,MetadataWildBattleBGM) [COLOR="RoyalBlue"]if "whatever condition you want" wildbgm="your song"[/COLOR] elsif wildbgm wildbgm="#{wildbgm}" else wildbgm="002-Battle02.mid" end return pbStringToAudioFile(wildbgm)