The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.


Reply
 
Thread Tools
  #1    
Old March 20th, 2013, 11:10 PM
Yusshin's Avatar
Yusshin
♪ Yggdrasil ♪
 
Join Date: Jul 2009
Location: Quebec, Canada
Age: 21
Nature: Brave
Spent about an hour using Search and going through the Wiki, using terms like "Uncatchable Pokemon," "Force Pokemon Battle," etc. and finally landed on "Event Encounters."

Now I look through the Wiki and I've searched here, terms such as "can't catch," "can't capture," "prohibit capture," etc. and nothing pops up, so I shall ask:

http://pokemonessentials.wikia.com/w...ent_encounters

Quote:
Invent certain battle conditions that depend on a Global Switch being ON (e.g. all Poké Balls used will always fail, or the weather randomly changes every turn), and turn that Switch ON just before the battle (and OFF again afterwards, of course). In this way, you can customise certain wild encounters to make them unique/harder.
How do I make a switch like that, where you are prohibited from using PokeBalls? I don't want the player to be able to capture a Pokemon; just defeat it.

A quick ALT+F search for "Pokeball" here:

http://pokemonessentials.wikia.com/wiki/Events

Indicates it's a customized switch and not a pre-implemented one.

Thanks.
__________________


Polaret | Fourette | Ecuret | Axew | Zorua | Nanette [Shiny]
"My scar makes me sassy, child!"
The Big Bang Theory Fan Club - Click To Join!
The French Club

Last edited by Yusshin; March 22nd, 2013 at 07:11 PM. Reason: New Title for New Problem
Reply With Quote
  #2    
Old March 21st, 2013, 06:58 AM
Nickalooose
--------------------
 
Join Date: Mar 2008
Gender: Female
Basically, within the script section on RPGMaker, you need to put a switch-script in there.

So first things first, find where you will edit... The script that already does this, exists already, so we'll use that as a base and a place to start:

Code:
    if @opponent && (!pbIsSnagBall?(ball) || !battler.isShadow?)
      @scene.pbThrowAndDeflect(ball,1)
      pbDisplay(_INTL("The Trainer blocked the Ball!\nDon't be a thief!"))
    else
That there is an already working script that we can use... To find it, press CTRL+SHIFT+F, type "don't be a thief", viola.

Now we'll want to add our "own" script to make our battles do what we want:

Code:
    if @opponent && (!pbIsSnagBall?(ball) || !battler.isShadow?)
      @scene.pbThrowAndDeflect(ball,1)
      pbDisplay(_INTL("The Trainer blocked the Ball!\nDon't be a thief!"))
    else
    if $game_switches[227]==true
    @scene.pbThrowAndDeflect(ball,1)
    pbDisplay(_INTL("The Pokémon attacked the Ball!\nSeems it cannot be caught!"))
    return
    end
So we'll enter our own script directly underneath the already working script... Now within the event you want to use this new script, turn switch 227, on before the battle.

You can also do this with wild Pokémon such as legendaries that you don't want to be caught at a certain time:

Code:
    if @opponent && (!pbIsSnagBall?(ball) || !battler.isShadow?)
      @scene.pbThrowAndDeflect(ball,1)
      pbDisplay(_INTL("The Trainer blocked the Ball!\nDon't be a thief!"))
    else
    if $game_switches[450]==true
      @scene.pbThrowAndDeflect(ball,1)
      pbDisplay(_INTL("Seems \n{1} doesn't want to be caught!",wildpoke.name))
      return
    end
Notice the green part, that will call the opposing Pokémons name where {1} exists... Again, turn switch 450, on before the battle.

There is no limit to how many you can use, just keep adding them directly under the original and/or after your new "script".

Have fun.
Reply With Quote
  #3    
Old March 21st, 2013, 06:51 PM
Yusshin's Avatar
Yusshin
♪ Yggdrasil ♪
 
Join Date: Jul 2009
Location: Quebec, Canada
Age: 21
Nature: Brave
Hey Nick, I really appreciate you answering me on this :D but it's a lot of information to apply, and I'm still a bit confused.

Spoiler:
I think I kinda get it better. I approached this wrong...

I went into Script Database and I found this in PokeBattle_Battle:

end
if @opponent && (!pbIsSnagBall?(ball) || !battler.isShadow?)
@scene.pbThrowAndDeflect(ball,1)
pbDisplay(_INTL("The Trainer blocked the Ball!\nDon't be a thief!"))
else
pokemon=battler.pokemon
species=pokemon.species
if !rareness
dexdata=pbOpenDexData
pbDexDataOffset(dexdata,species,16)
rareness=dexdata.fgetb # Get rareness from dexdata file
dexdata.close
end

So where do I put this:

if $game_switches[227]==true
@scene.pbThrowAndDeflect(ball,1)
pbDisplay(_INTL("The Pokémon attacked the Ball!\nSeems it cannot be caught!"))
return
end

I know you said right underneath, but there's already stuff underneath it! so does it go underneath that stuff, or above it, and how do I preserve the already-conditional'd branch in the script?

I did this:



but I can still catch the Pokemon, even when I add this script to true above the Pokemon battle:

$game_switches[227]==true

It just ignores what I added in the script...


I misunderstood what a Global Switch meant! I just call them Switch and Self-Switch so I figured Global Switch was an internal Pokemon Essentials thing.

Thanks Nick :D
__________________


Polaret | Fourette | Ecuret | Axew | Zorua | Nanette [Shiny]
"My scar makes me sassy, child!"
The Big Bang Theory Fan Club - Click To Join!
The French Club

Last edited by Yusshin; March 22nd, 2013 at 07:02 PM.
Reply With Quote
  #4    
Old March 22nd, 2013, 06:09 PM
Yusshin's Avatar
Yusshin
♪ Yggdrasil ♪
 
Join Date: Jul 2009
Location: Quebec, Canada
Age: 21
Nature: Brave
I have a new issue now.

The reason the Pokemon is uncatchable is because of its moveset.

I'm trying to edit in in PokemonEncounterModifiers, as per the Wiki, into this:

Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
if $game_switches[79]
pbAutoLearnMove(poke,PBMoves::BUBBLEBEAM)
pbAutoLearnMove(poke,PBMoves::THUNDERWAVE)
pbAutoLearnMove(poke,PBMoves::EMBER)
pbAutoLearnMove(poke,PBMoves::THUNDERSHOCK)
end
}

But I get an error in-game that says:

Spoiler:
---------------------------
PKMN
---------------------------
Exception: RuntimeError

Message: Script error within event 3, map 35 (Power Plant):

Exception: NameError

Message: Section087:11undefined local variable or method `poke' for nil:NilClass

***Full script:

pbWildBattle(PBSpecies::PIKACHU,18)


Interpreter:243:in `pbExecuteScript'

PokemonEncounterModifiers:8:in `call'

PBEvent:54:in `trigger'

PBEvent:49:in `each'

PBEvent:49:in `trigger'

PokemonField:956:in `pbGenerateWildPokemon'

PokemonField:980:in `pbWildBattle'

(eval):1:in `pbExecuteScript'

Interpreter:1600:in `eval'

Interpreter:243:in `pbExecuteScript'



Interpreter:276:in `pbExecuteScript'

Interpreter:1600:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:103:in `update'

Scene_Map:101:in `loop'

Scene_Map:114:in `update'

Scene_Map:68:in `main'



This exception was logged in

C:\Users\Irene\Saved Games/PKMN/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------


What's wrong? I know it can learn moves outside its set, because it tried to add these to my Oshawott when I added poke=$Trainer.party[0]

I tried adding these inside the script (after the game switch is turned on):

poke=$Trainer.party[0]
poke=pbFirstAblePokemon
poke=pbGetPokemon(1)
* Tried the third one as poke=pbGetPokemon(PIKACHU) and it did not work either

The first one edits MY Pokemon; the other two turn up as Run-Time errors when initiating the battle.
__________________


Polaret | Fourette | Ecuret | Axew | Zorua | Nanette [Shiny]
"My scar makes me sassy, child!"
The Big Bang Theory Fan Club - Click To Join!
The French Club

Last edited by Yusshin; March 22nd, 2013 at 07:20 PM.
Reply With Quote
  #5    
Old March 23rd, 2013, 07:27 AM
TACHAN
 
Join Date: Jan 2010
Gender: Female
Use this:

Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
if $game_switches[79]
pbAutoLearnMove(pokemon,PBMoves::BUBBLEBEAM)
pbAutoLearnMove(pokemon,PBMoves::THUNDERWAVE)
pbAutoLearnMove(pokemon,PBMoves::EMBER)
pbAutoLearnMove(pokemon,PBMoves::THUNDERSHOCK)
end
}
Reply With Quote
  #6    
Old March 23rd, 2013, 07:45 AM
Yusshin's Avatar
Yusshin
♪ Yggdrasil ♪
 
Join Date: Jul 2009
Location: Quebec, Canada
Age: 21
Nature: Brave
That worked :D Thanks a lot, guys
__________________


Polaret | Fourette | Ecuret | Axew | Zorua | Nanette [Shiny]
"My scar makes me sassy, child!"
The Big Bang Theory Fan Club - Click To Join!
The French Club
Reply With Quote
Reply
Quick Reply

Sponsored Links


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 12:08 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.