• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.
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...
 
Hi! I need some help. When any pokemon or trainer battle starts, it flashes gray a couple of times before executing the transition.. I've looked through the scripts and I can't seem to find something to stop it. Could anybody tell me where I go in the scripts so I can change this so I can stop it flashing altogether? Can you PM me on how to do this?

Thanks, I appreciate it!
 
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
---------------------------
 
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.
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).

Good luck with that mega-game you're planning. Greater men and women than you have yet to complete games with just one region, but don't let that put you off. Half a mega-game is still more than half a one region game.


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.
 
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:
[PokeCommunity.com] [Archive] Pokemon Essentials: Starter Kit for RPG Maker XP
 
Last edited:
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:
[PokeCommunity.com] [Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

Ahhhh...I think this question has been answered like a billion of times. You can't just create the trainer in the editor, and then try to call it with an event. The data still won't be transfered. That's why the editor has a little function called compile data which does exactly that. You need to compile data after using the editor, because some things won't be processed automatically.
 
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
 
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.
 
Last edited:
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.

The branch should be 'if @battle.battlers[1].species==PBSpecies::KYOGRE', I believe.
 
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
 
Yeah, I fixed the Audio.bgm_play but when I was about to post saying I fixed that. Pokecommunity went down (for me anyway). And the reason I'm doing it that way is because the Change BGM never works for me, or the change battle background.
 
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
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.

Code:
[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"
)
Something like that.
 
This is what I have the change battle bgm in BUT...it never works.
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)
@>
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.
 
This is what I have the change battle bgm in BUT...it never works.
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)
@>
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.

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.
 
This is what I have the change battle bgm in BUT...it never works.
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)
@>
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.

Well...go to line 535 (or somewhere around that) in PokemonUtilities and you should see something like this.
Code:
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
Now...I think the problem could be that you are missing the
Code:
if $PokemonGlobal.nextBattleBGM
       return $PokemonGlobal.nextBattleBGM.clone
    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 like
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)
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.
 
Okay dokie, Maruno. I read the section in the notes, but didn't get it. So I looked at the example in the demo. Then I copy/pasted it to my trade event. Next I simply changed the Pokemon names. Now that you've given me the correct code, I can compare what I wrote with what I should've wrote. Thanks again man. Btw, it appears that I wrote MR.MIME instead of MR._MIME. Thank you for the help. Where would I post a demo once I get it ready?
 
Need some help.

I'm trying to start a new game but the screen is just black and nothing is showing up. It works fine when I continue a game though.
 
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.
It didn't work for me.

Well...go to line 535 (or somewhere around that) in PokemonUtilities and you should see something like this.
Code:
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
Now...I think the problem could be that you are missing the
Code:
if $PokemonGlobal.nextBattleBGM
       return $PokemonGlobal.nextBattleBGM.clone
    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 like
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)
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.
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.
 
Hey, all. I'm not much at RGSS or Ruby, so I'm pretty much incapable of fixing this myself. I know I already asked, but I was never replied to...

Whenever I open my Pokedex, I get this error:

---------------------------------
Exception: NameError
Message: undefined local variable or method `center' for #<Window_Pokedex:0x9cd1538>
PokemonPokedex:62:in `refresh'
PokemonPokedex:45:in `each'
PokemonPokedex:45:in `refresh'
PokemonPokedex:21:in `commands='
PokemonPokedex:412:in `pbRefreshDexList'
PokemonPokedex:295:in `pbStartScene'
PokemonPokedex:873:in `pbStartScreen'
PokemonMenu:145:in `pbStartPokemonMenu'
PokemonMenu:142:in `pbFadeOutIn'
PokemonMenu:142:in `pbStartPokemonMenu'
------------------------------------------------------------------

I'm using the most recent version of Pokemon Essentials, so I'm confuzzled. Any help? Please?
 
Status
Not open for further replies.
Back
Top