• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

Hardy Har Har

Oh dear, oh my...
258
Posts
16
Years
  • Hello, everyone.
    I attempted a dual screen script and I ended up with this:
    error-1.png

    What I did is add a few lines of scripting, then changing the resolution. Any ideas to fix this?
     
    401
    Posts
    19
    Years
    • Age 29
    • Seen Dec 4, 2016
    Hello, everyone.
    I attempted a dual screen script and I ended up with this:
    error-1.png

    What I did is add a few lines of scripting, then changing the resolution. Any ideas to fix this?
    I don't think you'll be getting any help mate, people who have achieved the dual screen in RMCP probably won't want to share any secrets. But just to aid you, pbTextBottom (or I think its called that) may set you on track ;)
     
    401
    Posts
    19
    Years
    • Age 29
    • Seen Dec 4, 2016
    Its a method that sets the location of a command box/text box. I can't remember if that is it's name. The bottom text box in the intro is affected by this method ;)
     
    489
    Posts
    16
    Years
  • Try putting an additional "end" between lines 2482 and 2483.
    Code:
    2478  facingEvent=$game_player.pbFacingEvent
    2479  if facingEvent
    2480   if facingEvent.name=="Whirlpool"
    2481    Kernel.pbWhirlpool
    2482   return
    2483  end
    In lines 2479 AND 2480 it says "if", but there is only one "end".
    So try this:
    Code:
    2478  facingEvent=$game_player.pbFacingEvent
    2479  if facingEvent
    2480   if facingEvent.name=="Whirlpool"
    2481    Kernel.pbWhirlpool
    2482   return
    2483  end
    2484 end
    Hope this solves your problem.

    Thanks, it worked. Now to test and finish the Whirlpool script lol
     
    489
    Posts
    16
    Years
  • Ok, the Whirlpool is working, but there is one problem. It won't erase with pbEraseThisEvent
    Here is what I have

    @>Conditional Branch: Script: Kernel.pbWhirlpool
    @>Script: pbEraseThisEvent
    @>
    : Else
    @>
    : Branch End
    @>

    After it asks me if I want to use Whirlpool, it goes through the usual, like what happens with Cut and Rocksmash e.g Do you want to use Whirlpool? Yes/No. ??? used Whirlpool.
    Then it just won't erase.
    The modified PokemonField script is below for reference.
     
    10
    Posts
    14
    Years
  • Ok, the Whirlpool is working, but there is one problem. It won't erase with pbEraseThisEvent
    Here is what I have

    @>Conditional Branch: Script: Kernel.pbWhirlpool
    @>Script: pbEraseThisEvent
    @>
    : Else
    @>
    : Branch End
    @>

    After it asks me if I want to use Whirlpool, it goes through the usual, like what happens with Cut and Rocksmash e.g Do you want to use Whirlpool? Yes/No. ??? used Whirlpool.
    Then it just won't erase.
    The modified PokemonField script is below for reference.

    The whirlpool you used, have you added the whirlpool tile to the event or directly placed on your map.
    Make a sea in your map and add the tile of the whirlpool to your event. That way, the whirlpool tile will be removed too.
     

    partyghoul2000

    Intermediate Game Designer
    175
    Posts
    18
    Years
    • Age 36
    • USA
    • Seen Jun 24, 2014
    Since you mention the Safari Zone/Bug Catching Contest, take a look at how they're handled. When you're in either the Safari Zone or the Bug Catching Contest, it replaces the "Save" command with "Quit" (as in, leave the Safari Zone/Contest).

    Also, when in the Safari Zone, a window pops up showing you the number of steps taken and the number of Safari Balls you have left. When in the Contest, that window shows how many Park Balls you have plus the last Pokémon that you caught's name/level.

    Below is the part of the code that does this.

    Why is "Save" replaced during a Safari game or a Contest? Because the official games do it, I suppose (and it also reduces cheating and was probably impossible to record information during these things anyway). I'm sure you could edit it to be able to save during a Safari game/Contest, but that'd be a lot of hassle and it's probably not worth it anyway.

    Code:
      [COLOR=Red]if pbInSafari?[/COLOR]
       @scene.pbShowInfo(_INTL("[COLOR=DarkOrchid]STEPS: {1}/600\nBALLS: {2}[/COLOR]",pbSafariState.steps,pbSafariState.ballcount))
       commands[cmdQuit=commands.length]=_INTL("[COLOR=DarkOrchid]QUIT[/COLOR]")
      [COLOR=Red]elsif pbInBugContest?[/COLOR]
       [COLOR=SeaGreen]if pbBugContestState.lastPokemon[/COLOR]
         @scene.pbShowInfo(_INTL("[COLOR=DarkOrchid]CAUGHT: {1}\nLEVEL: {2}\nBALLS: {3}[/COLOR]",
              PBSpecies.getName(pbBugContestState.lastPokemon.species),
              pbBugContestState.lastPokemon.level,
              pbBugContestState.ballcount))
       [COLOR=SeaGreen]else[/COLOR]
         @scene.pbShowInfo(_INTL("[COLOR=DarkOrchid]CAUGHT: None\nBALLS: {1}[/COLOR]",pbBugContestState.ballcount))
       [COLOR=SeaGreen]end[/COLOR]
       commands[cmdQuit=commands.length]=_INTL("[COLOR=DarkOrchid]QUIT[/COLOR]")
      [COLOR=Red]else[/COLOR]
       commands[cmdSave=commands.length]=_INTL("[COLOR=DarkOrchid]SAVE[/COLOR]") if !$game_system || !$game_system.save_disabled
      [COLOR=Red]end[/COLOR]
    I coloured in a few things to make it more distinctive. The red commands decide whether you're in a Safari game or a Contest or just out being a trainer, the green commands decide if you've already caught a Pokémon in the Contest or not, and the things that are shown on screen are in purple.


    Now, I don't know exactly what you want to do (i.e. how you want to change the menu depending on whatever), because that would be too easy. All I can say is that you can do something similar to the above, but replace the "if pbInSafari?" line with "if $game_map[42] || $game_map[99]" or something similar. This line will mean the menu is changed only if you're on either map 42 or map 99. You could also use a switch here ("if $game_switches[42]"), but then you'd have to faff around making sure it gets switched on and off at the right times (including during Fly/Teleport/Escape Rope/Dig out of the area), which is rather more tedious.

    And by "replace" I mean copy-paste the quoted code above and modify to your own liking. Don't replace the existing code if you still want a Safari Zone/Bug Catching Contest in your game (and even if you don't you might as well just leave it alone, because it's not doing any harm).

    i somewhat understand but i think i might have said it wrong. im looking to add two more sets of menus like safari/bug catching but with alot less. one menu, i just want to show the player name, a quit function like safari zone that takes place of the save, options and exit. and the other menu varation i want to just show save, options and exit. how do i block out the rest of the options? where exactly would i place the $game_switches in the menu script?
     
    489
    Posts
    16
    Years
  • The whirlpool you used, have you added the whirlpool tile to the event or directly placed on your map.
    Make a sea in your map and add the tile of the whirlpool to your event. That way, the whirlpool tile will be removed too.

    I have added the graphic and done everything that you do for like Cut or Rocksmash. Including the Action trigger and the Graphic, and naming the event "Whirlpool"
    (without the "). It still won't work.
     

    Fraot

    Researcher & Game Developer
    322
    Posts
    15
    Years
  • Well, I need to know something:
    I have looked for this and didn't find any results... is there any way to make a fishing animation for each protagonist? Also, is it possible to make a bike animation for both characters?
    I'm focusing more on scripting now but those issues will give me a headache on the future...
     
    2,048
    Posts
    16
    Years
    • Seen Sep 7, 2023
    I have added the graphic and done everything that you do for like Cut or Rocksmash. Including the Action trigger and the Graphic, and naming the event "Whirlpool"
    (without the "). It still won't work.
    Maybe there's a problem with your pbWhirlpool method... Make sure that it returns 'true' after completion.
     
    489
    Posts
    16
    Years
  • Well this is what I have for pbWhirlpool.

    def Kernel.pbWhirlpool
    if $DEBUG || $Trainer.badges[BADGEFORWHIRLPOOL]
    movefinder=Kernel.pbCheckMove(PBMoves::WHIRLPOOL)
    if $DEBUG || movefinder
    if Kernel.pbConfirmMessage(_INTL("Would you like to use Whirlpool?"))
    speciesname=!movefinder ? PBSpecies.getName(0) : movefinder.name
    Kernel.pbMessage(_INTL("{1} used Whirlpool!",speciesname))
    pbHiddenMoveAnimation(movefinder)
    return true
    end
    else
    Kernel.pbMessage(_INTL("It's a powerful whirlpool. A Pokémon may be able to get past it."))
    end
    else
    Kernel.pbMessage(_INTL("It's a powerful whirlpool. A Pokémon may be able to get past it."))
    end
    return false
    end

    I assume you mean "return true"? I'm not much of a scripter, so...all I could do was look at what was done with Rocksmash (excluding the Random Encounter) and replaced Dive.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    i somewhat understand but i think i might have said it wrong. im looking to add two more sets of menus like safari/bug catching but with alot less. one menu, i just want to show the player name, a quit function like safari zone that takes place of the save, options and exit. and the other menu varation i want to just show save, options and exit. how do i block out the rest of the options? where exactly would i place the $game_switches in the menu script?
    You mean that replace the pause menu (that usually contains the Pokédex, party, trainer card, bag, etc. options) entirely with either trainer card/leave safari/options/exit (4 options) or save/options/exit (3 options)? That is, rather than just replace the "save" with a "quit"/info box on left while leaving the rest of the options intact.

    This is certainly possible. If you look at the coloured-in script above, have a look to see how the "if" statement works. It starts with "if something" and end with "end" - anything in between those two happens only if that "if" statement is true.

    Lines 114 to 137 in PokemonMenu is the following:

    Code:
      commands[cmdPokedex=commands.length]=_INTL("[COLOR=DarkOrchid]POKéDEX[/COLOR]") [COLOR=Red]if $Trainer.pokedex[/COLOR]
      commands[cmdPokemon=commands.length]=_INTL("[COLOR=DarkOrchid]POKéMON[/COLOR]") [COLOR=Red]if $Trainer.party.length>0[/COLOR]
      commands[cmdBag=commands.length]=_INTL("[COLOR=DarkOrchid]BAG[/COLOR]") [COLOR=Red]if !pbInBugContest?[/COLOR]
      commands[cmdPokegear=commands.length]=_INTL("[COLOR=DarkOrchid]POKéGEAR[/COLOR]") [COLOR=Red]if $Trainer.pokegear[/COLOR]
      commands[cmdTrainer=commands.length]=$Trainer.name
      [COLOR=SeaGreen]if pbInSafari?[/COLOR]
       @scene.pbShowInfo(_INTL("[COLOR=Blue]STEPS: {1}/600\nBALLS: {2}[/COLOR]",pbSafariState.steps,pbSafariState.ballcount))
       commands[cmdQuit=commands.length]=_INTL("[COLOR=DarkOrchid]QUIT[/COLOR]")
      [COLOR=SeaGreen]elsif pbInBugContest?[/COLOR]
       [COLOR=SeaGreen]if pbBugContestState.lastPokemon[/COLOR]
         @scene.pbShowInfo(_INTL("[COLOR=Blue]CAUGHT: {1}\nLEVEL: {2}\nBALLS: {3}[/COLOR]",
              PBSpecies.getName(pbBugContestState.lastPokemon.species),
              pbBugContestState.lastPokemon.level,
              pbBugContestState.ballcount))
       [COLOR=SeaGreen]else[/COLOR]
         @scene.pbShowInfo(_INTL("[COLOR=Blue]CAUGHT: None\nBALLS: {1}[/COLOR]",pbBugContestState.ballcount))
       [COLOR=SeaGreen]end[/COLOR]
       commands[cmdQuit=commands.length]=_INTL("[COLOR=DarkOrchid]QUIT[/COLOR]")
      [COLOR=SeaGreen]else[/COLOR]
       commands[cmdSave=commands.length]=_INTL("[COLOR=DarkOrchid]SAVE[/COLOR]") [COLOR=Red]if !$game_system || !$game_system.save_disabled[/COLOR]
      [COLOR=SeaGreen]end[/COLOR]
      commands[cmdOption=commands.length]=_INTL("[COLOR=DarkOrchid]OPTION[/COLOR]")
      commands[cmdDebug=commands.length]=_INTL("[COLOR=DarkOrchid]DEBUG[/COLOR]") [COLOR=Red]if $DEBUG[/COLOR]
      commands[commands.length]=_INTL("[COLOR=DarkOrchid]EXIT[/COLOR]")
    Again, coloured in a bit. What you need to do is take the idea of having an "if" section and put it around all of this, like so:

    Code:
    [COLOR=Red]if pbInSafari?[/COLOR]
      commands[cmdTrainer=commands.length]=$Trainer.name
      commands[cmdQuit=commands.length]=_INTL("[COLOR=DarkOrchid]QUIT[/COLOR]")
      commands[cmdOption=commands.length]=_INTL("[COLOR=DarkOrchid]OPTION[/COLOR]")
      commands[cmdDebug=commands.length]=_INTL("[COLOR=DarkOrchid]DEBUG[/COLOR]") [COLOR=SeaGreen]if $DEBUG[/COLOR]
      commands[commands.length]=_INTL("[COLOR=DarkOrchid]EXIT[/COLOR]")
    [COLOR=Red]elsif pbInBugContest?[/COLOR]
      commands[cmdSave=commands.length]=_INTL("[COLOR=DarkOrchid]SAVE[/COLOR]") [COLOR=SeaGreen]if !$game_system || !$game_system.save_disabled[/COLOR]
      commands[cmdOption=commands.length]=_INTL("[COLOR=DarkOrchid]OPTION[/COLOR]")
      commands[cmdDebug=commands.length]=_INTL("[COLOR=DarkOrchid]DEBUG[/COLOR]") [COLOR=SeaGreen]if $DEBUG[/COLOR]
      commands[commands.length]=_INTL("[COLOR=DarkOrchid]EXIT[/COLOR]")
    [COLOR=Red]else[/COLOR]
      commands[cmdPokedex=commands.length]=_INTL("[COLOR=DarkOrchid]POKéDEX[/COLOR]") [COLOR=SeaGreen]if $Trainer.pokedex[/COLOR]
      commands[cmdPokemon=commands.length]=_INTL("[COLOR=DarkOrchid]POKéMON[/COLOR]") [COLOR=SeaGreen]if $Trainer.party.length>0[/COLOR]
      commands[cmdBag=commands.length]=_INTL("[COLOR=DarkOrchid]BAG[/COLOR]")
      commands[cmdPokegear=commands.length]=_INTL("[COLOR=DarkOrchid]POKéGEAR[/COLOR]") [COLOR=SeaGreen]if $Trainer.pokegear[/COLOR]
      commands[cmdTrainer=commands.length]=$Trainer.name
      commands[cmdSave=commands.length]=_INTL("[COLOR=DarkOrchid]SAVE[/COLOR]") [COLOR=SeaGreen]if !$game_system || !$game_system.save_disabled[/COLOR]
      commands[cmdOption=commands.length]=_INTL("[COLOR=DarkOrchid]OPTION[/COLOR]")
      commands[cmdDebug=commands.length]=_INTL("[COLOR=DarkOrchid]DEBUG[/COLOR]") [COLOR=SeaGreen]if $DEBUG[/COLOR]
      commands[commands.length]=_INTL("[COLOR=DarkOrchid]EXIT[/COLOR]")
    [COLOR=Red]end[/COLOR]
    As far as I can tell, that's what you want. The first lot (trainer card/quit/options/exit) is displayed if you're in a Safari game (i.e. if pbInSafari? is true). The second lot (save/option/exit0 is displayed if you're in a Bug Catching Contest (i.e. if pbInBugContest? is true). If you're not in either of these, then the regular menu is shown.

    I put the Debug options in each of them because it's always handy, just in case you need them. They won't be shown when you're just playing the game; they're to help you when you're designing the game and sorting things out.



    Well, I need to know something:
    I have looked for this and didn't find any results... is there any way to make a fishing animation for each protagonist? Also, is it possible to make a bike animation for both characters?
    I'm focusing more on scripting now but those issues will give me a headache on the future...
    Certainly. Fishing involves editing the "fishing000.png", "fishing001.png", etc. pictures in Graphics/Characters. For cycling, you'll need to edit/create the picture files you've associated with each protagonist in the metadata.txt file (by default onbike.png for both protagonists, but you'll want to change this because each protagonist will look different).

    The fishing is a little more complex if you want to make it work properly (which you will do, obviously). At the moment it plays the same animation regardless of which direction you're facing, so you'll need to edit the script (PokemonField, defs starting at lines 1256 and 1271) to check which direction the player is facing, and use certain sprites from the files depending on that direction. Since fishing uses 5 separate sprites, you can't fit them all into a single sprite sheet (4x4=16 sprites), so you'll need to modify the script to allow the use of at least two sprite sheets per protagonist, and use one or the other depending on the direction they're facing at the time.

    A relatively minor fix, but tricky to get your head around.
     

    Fraot

    Researcher & Game Developer
    322
    Posts
    15
    Years
  • The fishing is a little more complex if you want to make it work properly (which you will do, obviously). At the moment it plays the same animation regardless of which direction you're facing, so you'll need to edit the script (PokemonField, defs starting at lines 1256 and 1271) to check which direction the player is facing, and use certain sprites from the files depending on that direction. Since fishing uses 5 separate sprites, you can't fit them all into a single sprite sheet (4x4=16 sprites), so you'll need to modify the script to allow the use of at least two sprite sheets per protagonist, and use one or the other depending on the direction they're facing at the time.

    A relatively minor fix, but tricky to get your head around.
    Well, I'll look for it, thanks Maruno. Sounds easy for me, but I don't know how to edit the array of the sprites for fishing. I'll ask help again if i need it. Thank you!
     
    81
    Posts
    15
    Years
    • Seen Apr 8, 2021
    can someone help me with this? i was trying to search in the pokedex and that error popped.... i didnt edit the dex yet...
    Code:
    Exception: NameError
    Message: undefined local variable or method `dexdata' for #<PokemonPokedexScene:0x8a0ae70>
    PokemonPokedex:436:in `pbSearchDexList'
    PokemonPokedex:435:in `find_all'
    PokemonPokedex:435:in `each'
    PokemonPokedex:435:in `find_all'
    PokemonPokedex:435:in `pbSearchDexList'
    PokemonPokedex:745:in `pbDexSearch'
    PokemonPokedex:716:in `loop'
    PokemonPokedex:771:in `pbDexSearch'
    PokemonPokedex:833:in `pbPokedex'
    PokemonPokedex:810:in `loop'
     
    5
    Posts
    14
    Years
    • Seen Aug 30, 2009
    Hello everyone.
    I searched for this answer but didnt see exactly what I was looking for so i apologise ahead of time if it has already been asked.

    But I am working on my title screen and I am using a gif image. When I start the game the image looks fine but it has been sped up. Is there a way I can slow this down?
     

    venom12

    Pokemon Crystal Rain Relased
    476
    Posts
    17
    Years
    • Age 33
    • Seen Dec 28, 2023
    Hey, someone have idea how i can make 2 frames of pokemons? Like in Pokemon Diamond or Pearl?
     
    Status
    Not open for further replies.
    Back
    Top