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
 
Thread Tools
  #1    
Old December 20th, 2012, 07:51 PM
MikeTwo2's Avatar
MikeTwo2
Unhatched Egg
 
Join Date: Apr 2012
Gender: Male

Advertise here
Hey guys,
Just looking for a bit of help with RMXP, I need to allow the player to be transported to a place of his/her choosing within an event (like the dungeon choosing in PMD)
My solution was to open up the fly screen so that players can fly to "dungeons" they've been to before, and there won't be any tacky choice screens. I soon realised this was tricky to do, however, without actually giving the player a Pokémon that knows Fly. As such have resorted to the forums.
Anyone know how I go about this?
Many thanks,
Mike

P.S. One last quick question: How do I copy across the variable catchRate into my own Script Section?
Reply With Quote
  #2    
Old December 21st, 2012, 02:59 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
If the only way the player can use Fly is through your event transport system, then you can edit its scripts so that it no longer requires that a player's Pokémon knows Fly in order to use it. That is, delete what you need to from HiddenMoveHandlers::CanUseMove.add(:FLY,proc (probably most of it; just return true like Sweet Scent's does).

Here is some stripped-down code which you can use to use Fly:
Code:
scene=PokemonRegionMapScene.new(-1,false)
screen=PokemonRegionMap.new(scene)
ret=screen.pbStartFlyScreen
if ret
  $PokemonTemp.flydata=ret
  Kernel.pbUseHiddenMove(nil,PBMoves::FLY)
end
You'll also want to remove the "Pidgeot used Fly!" message and the hidden move animation for using Fly, because they're not appropriate.

However, if you want to be able to use Fly normally as well, then you'll need to create a new method containing (mostly) the above code and Fly's effect (minus the message/animation as mentioned). Call this method from your event.


The catch rate for a species can be loaded with the following code:
Code:
dexdata=pbOpenDexData
pbDexDataOffset(dexdata,species,16)
catchrate=dexdata.fgetb
dexdata.close
You can use this anywhere, so long as you have a species to find the catch rate of.
__________________
Reply With Quote
  #3    
Old December 21st, 2012, 05:06 AM
MikeTwo2's Avatar
MikeTwo2
Unhatched Egg
 
Join Date: Apr 2012
Gender: Male
Quote:
Originally Posted by Maruno View Post
If the only way the player can use Fly is through your event transport system, then you can edit its scripts so that it no longer requires that a player's Pokémon knows Fly in order to use it. That is, delete what you need to from HiddenMoveHandlers::CanUseMove.add(:FLY,proc (probably most of it; just return true like Sweet Scent's does).

Here is some stripped-down code which you can use to use Fly:
Code:
scene=PokemonRegionMapScene.new(-1,false)
screen=PokemonRegionMap.new(scene)
ret=screen.pbStartFlyScreen
if ret
  $PokemonTemp.flydata=ret
  Kernel.pbUseHiddenMove(nil,PBMoves::FLY)
end
You'll also want to remove the "Pidgeot used Fly!" message and the hidden move animation for using Fly, because they're not appropriate.

However, if you want to be able to use Fly normally as well, then you'll need to create a new method containing (mostly) the above code and Fly's effect (minus the message/animation as mentioned). Call this method from your event.
I don't want to be able to Fly normally too, but what method do I call in the event?

Quote:
The catch rate for a species can be loaded with the following code:
Code:
dexdata=pbOpenDexData
pbDexDataOffset(dexdata,species,16)
catchrate=dexdata.fgetb
dexdata.close
You can use this anywhere, so long as you have a species to find the catch rate of.
This worked perfectly, thanks.
Which bit of this do I change to get base HP?
Code:
catchrate=dexdata.fgetb
Sorry for all the questions...

Thanks
Mike

Last edited by MikeTwo2; December 21st, 2012 at 05:20 AM.
Reply With Quote
  #4    
Old December 21st, 2012, 06:10 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
You can create a new method with the stripped-down code I gave you, and call that.

To get the base HP, use the same code as for catch rate but replace the 16 with 10.
__________________
Reply With Quote
  #5    
Old December 21st, 2012, 06:17 AM
MikeTwo2's Avatar
MikeTwo2
Unhatched Egg
 
Join Date: Apr 2012
Gender: Male
Quote:
Originally Posted by Maruno View Post
You can create a new method with the stripped-down code I gave you, and call that.

To get the base HP, use the same code as for catch rate but replace the 16 with 10.
Thanks for all your help :D
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 09:21 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.