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.


Advertise here

Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #1    
Old August 28th, 2013, 03:18 PM
Giu's Avatar
Giu
 
Join Date: Jan 2010
Gender: Male
Nature: Modest

Advertise here
Hello everyone,

Does anyone knows where in the scripts can I find the part where it prevents you from having an encounter if you have no pokemon with you? How would I go to relax this condition if a certain switch was on?

Thank you in advance!

Giu
Reply With Quote
  #2    
Old August 28th, 2013, 08:39 PM
dexter1o6
 
Join Date: Jul 2013
Age: 26
Gender: Male
If I remember correctly, there is a definition called 'pbOnStepTaken' or something probably in PokemonField. I recon that's where you will find your answer. Let me know if you can find it, because I've seen this part of the script somewhere and I might be able to have a look for you.
Reply With Quote
  #3    
Old August 29th, 2013, 04:33 AM
Nickalooose
--------------------
 
Join Date: Mar 2008
Gender: Female
Dexter is right, almost.
Code:
def pbBattleOnStepTaken
  if $Trainer.party.length > 0
    encounterType=$PokemonEncounters.pbEncounterType
    if encounterType>=0
      encounter=$PokemonEncounters.pbGenerateEncounter(encounterType)
      if $PokemonEncounters.isEncounterPossibleHere?()
        encounter=EncounterModifier.trigger(encounter)
        if $PokemonEncounters.pbCanEncounter?(encounter)
          if $PokemonGlobal.partner
            encounter2=$PokemonEncounters.pbEncounteredPokemon(encounterType)
            pbDoubleWildBattle(encounter[0],encounter[1],encounter2[0],encounter2[1])
          else
            pbWildBattle(encounter[0],encounter[1])
          end
        end
        EncounterModifier.triggerEncounterEnd()
      end
    end
  end
end
In PokemonField.
Reply With Quote
  #4    
Old August 29th, 2013, 05:09 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
That's definitely not the only thing you'd need to play with in order to actually make the battle work. A Pokémon battle very much depends on the player having a Pokémon they can use, and if you don't, there's going to be so many bits of code which don't work. I can't imagine what you want to do with such a feature will be worth the effort of making it work.

The "easiest" solution is to turn such wild battles into Safari Zone battles, but then you'll run into different issues relating to how Safari Zone battles trigger, occur and appear (e.g. Safari Zone battles are hardcoded to use Safari Balls). Not as many issues as above, but they'd still need to be resolved.

It may be easier to just turn your starter selection process into a mini-Safari Zone itself, rather than trying to take some aspects from it or make something new.
__________________
Reply With Quote
  #5    
Old August 29th, 2013, 07:59 AM
Giu's Avatar
Giu
 
Join Date: Jan 2010
Gender: Male
Nature: Modest
Quote:
Originally Posted by Maruno View Post
That's definitely not the only thing you'd need to play with in order to actually make the battle work. A Pokémon battle very much depends on the player having a Pokémon they can use, and if you don't, there's going to be so many bits of code which don't work. I can't imagine what you want to do with such a feature will be worth the effort of making it work.

The "easiest" solution is to turn such wild battles into Safari Zone battles, but then you'll run into different issues relating to how Safari Zone battles trigger, occur and appear (e.g. Safari Zone battles are hardcoded to use Safari Balls). Not as many issues as above, but they'd still need to be resolved.

It may be easier to just turn your starter selection process into a mini-Safari Zone itself, rather than trying to take some aspects from it or make something new.
I think Nickalooose's part of the code is what I'm looking for.
Maruno, that's exactly what I'm trying to do. The problem is that Safari Zone Battles doesn't trigger unless you have at least one pokemon.
Thank you all for your help!
Reply With Quote
  #6    
Old August 29th, 2013, 11:16 AM
Nickalooose
--------------------
 
Join Date: Mar 2008
Gender: Female
In the past I started a battle with 0 Pokémon, script, was meant to be used for the "old man" skit, I'm pretty sure I gave Maruno the scripts I used... But it works anyway... Why do you want such a battle?
Reply With Quote
  #7    
Old August 29th, 2013, 10:37 PM
Giu's Avatar
Giu
 
Join Date: Jan 2010
Gender: Male
Nature: Modest
My plan was to make a little Safari Game before you receive a pokemon.
Reply With Quote
  #8    
Old August 30th, 2013, 02:45 AM
Nickalooose
--------------------
 
Join Date: Mar 2008
Gender: Female
So, is that how you catch your starter?
Because with this information, we can help a lot more, since I don't know about Maruno, but I thought you just wanted your player to get ambushed and beat up lol.
Reply With Quote
  #9    
Old August 30th, 2013, 05:29 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
I'd already guessed he wanted a Safari area for catching a starter in, and I've mentioned a few things he'll need to consider.
__________________
Reply With Quote
  #10    
Old September 30th, 2013, 12:22 PM
icherich
 
Join Date: Sep 2013
So is there a way to end a safari game after one pokemon has been catched, or reduce the balls amount to 1 while increasing their catch rate to 100%? I'm interested in this as well, at the moment I'm trying to produce a script checking for your party members, then removing all your steps left after you got your first pokemon...
Reply With Quote
  #11    
Old October 1st, 2013, 11:07 AM
Nickalooose
--------------------
 
Join Date: Mar 2008
Gender: Female
Modifying the capture rate is easiest and is located in PokemonBalls;
Code:
BallHandlers::ModifyCatchRate.add(:SAFARIBALL,proc{|ball,catchRate,battle,battler|
   next (catchRate*3/2).floor
})
Make it look something like
Code:
BallHandlers::ModifyCatchRate.add(:SAFARIBALL,proc{|ball,catchRate,battle,battler|
   catchRate=(catchRate*3/2).floor
   catchRate=255 if $game_switches[x]
   next catchRate
})
This should make your SafariBall catch any Pokémon, providing you turn switch X, on... X is the switch number you set it as.

Ending the "safari game" in PokeBattle_Battle would be easiest, around line 210, make the if pbIsSnagBall?, part, look like this:
Code:
          if pbIsSnagBall?(ball) && @opponent
            pokemon.pbUpdateShadowMoves rescue nil
            @snaggedpokemon.push(pokemon)
          else
            pbStorePokemon(pokemon)
            pbSafariState.decision=1 if $game_switches[x]
          end
Again, X, is the same switch as you set earlier... This is untested.
Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
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 07:09 AM.


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.