• 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.
489
Posts
16
Years
  • New problem, I keep getting a syntax error at line 2498 and I have no idea why. I tried deleting a few "ends" but I still kept getting the error.
    HTML:
    2483 def pbThrowAndDeflect(ball,targetBattler)
    2484 end
    2485 def pbThrow(ball,shakes,targetBattler)
    2486  @briefmessage=false
    2487  pokeballThrow(ball,shakes,targetBattler)
    2488 end
    2489 def pbThrowSuccess
    2490  if !@opponent
    2491   @briefmessage=false
    2492   $game_system.bgm_play("../ME/PkmRS-Caught.mid")
    2493   frames=(3.5*Graphics.frame_rate).to_i
    2494   frames.times do
    2495    pbGraphicsUpdate
    2496    pbInputUpdate
    2497  end
    2498 end
    2499
    Any help will be appreciated.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,285
    Posts
    16
    Years
  • 2.) How can you store all of the pokemon that you have in your party to a variable (a.k.a bug catching contest) so that you have no pokemon in your party, and you can call them back by using another script command or something. I want to have my character go into the past, and have no pokemon in his party that he had in the future, just so you can get the right idea. Maybe Maruno or OblivionMew can help me with this...?
    2) I presume you want the player to pick up and use new pokémon after he's (temporarily) lost his old team. Now, looking at the Bug Catching scripts, this catches my eye:

    Code:
         @otherparty=[]
         chosenpkmn=$Trainer.party[@chosenPokemon]
    
         for i in 0...$Trainer.party.length
          if i!=@chosenPokemon
           @otherparty.push($Trainer.party[i])
          end
         end
    
         $Trainer.party=[chosenpkmn]
    The "chosenpkmn" is whichever one you chose to use before you entered the Contest. The "if" statement copies all the information about all the non-chosen pokémon to an array called "@otherparty" (defined as blank at the beginning). Finally, the trainer's party is redefined to be only the chosen pokémon. At the end of the Contest, the rest of the party is added back.

    So that sounds simple enough. Create an array called "@futurepkmn", and when you time travel, do the "if" statement stuff to copy all the party pokémon into it, then say "$Trainer.party=[]" to make it blank.

    The recovery part of the script (that gives you your pokémon back) is equally simple, but you can look for that yourself (hint: search for "@otherparty"). Do (a variation of) that when you want to get your future pokémon back. You can do other things with that array instead, if you want (and can imagine).


    I wanted to make it so that in order to pass certain areas all pokemon had to be at a certain level, (that way you can't just easily use only one pokemon to defeat the gyms, elite 4, and champion). I tried using
    Code:
    $Trainer.party.level
    ,but I can't seem to use it right, I don't know what I'm doing wrong or if that can even help prevent using just one or two pokemon. If that doesn't help is there a way I can do that?
    $Trainer.party[0].level

    That is the level of the leading pokémon in your party (the party pokémon are numbered 0-5 inclusive). After a quick bit of imagining, I came up with the following:

    Code:
    tempvar=0
    for i in 0...$Trainer.party.length-1
      if $Trainer.party[i].level>=42
        tempvar+=1
      end
    end
    if $Trainer.party.length==tempvar
      [COLOR=Red]You may pass.[/COLOR]
    else
      [COLOR=Red]You cannot pass.[/COLOR]
    end
    Make sure you're happy with figuring out what's going on. If you want a walkthrough of it, ask me in a PM - I'm feeling nice.
     
    41
    Posts
    14
    Years
    • Seen Apr 12, 2023
    New problem, I keep getting a syntax error at line 2498 and I have no idea why. I tried deleting a few "ends" but I still kept getting the error.
    HTML:
    2483 def pbThrowAndDeflect(ball,targetBattler)
    2484 end
    2485 def pbThrow(ball,shakes,targetBattler)
    2486  @briefmessage=false
    2487  pokeballThrow(ball,shakes,targetBattler)
    2488 end
    2489 def pbThrowSuccess
    2490  if !@opponent
    2491   @briefmessage=false
    2492   $game_system.bgm_play("../ME/PkmRS-Caught.mid")
    2493   frames=(3.5*Graphics.frame_rate).to_i
    2494   frames.times do
    2495    pbGraphicsUpdate
    2496    pbInputUpdate
    2497  end
    2498 end
    2499
    Any help will be appreciated.

    Looks to me like you might need one more "end" after line 2498; however, I'm new at this so I don't know for sure.
     
    Last edited:

    thepsynergist

    Vinemon: Sauce Edition Programmer and Composer
    795
    Posts
    15
    Years
  • 2) I presume you want the player to pick up and use new pokémon after he's (temporarily) lost his old team. Now, looking at the Bug Catching scripts, this catches my eye:

    Code:
         @otherparty=[]
         chosenpkmn=$Trainer.party[@chosenPokemon]
    
         for i in 0...$Trainer.party.length
          if i!=@chosenPokemon
           @otherparty.push($Trainer.party[i])
          end
         end
    
         $Trainer.party=[chosenpkmn]
    The "chosenpkmn" is whichever one you chose to use before you entered the Contest. The "if" statement copies all the information about all the non-chosen pokémon to an array called "@otherparty" (defined as blank at the beginning). Finally, the trainer's party is redefined to be only the chosen pokémon. At the end of the Contest, the rest of the party is added back.

    So that sounds simple enough. Create an array called "@futurepkmn", and when you time travel, do the "if" statement stuff to copy all the party pokémon into it, then say "$Trainer.party=[]" to make it blank.

    The recovery part of the script (that gives you your pokémon back) is equally simple, but you can look for that yourself (hint: search for "@otherparty"). Do (a variation of) that when you want to get your future pokémon back. You can do other things with that array instead, if you want (and can imagine).

    You Maruno are a life saver, that was racking my brain for about a week now, Thx a bunch.
     
    8
    Posts
    14
    Years
  • Anyone found a workaround yet for the issue with the latest Pokémon Essentials release - that crashes every time a Pokémon evolves?

    I assume it's not just me that's having this problem... :P
     
    23
    Posts
    14
    Years
    • Seen Jul 16, 2010
    Anyone found a workaround yet for the issue with the latest Pokémon Essentials release - that crashes every time a Pokémon evolves?

    I assume it's not just me that's having this problem... :P
    Well, I haven't gotten that far into my game, but I bet that will be a problem, so can someone help us out?
     
    91
    Posts
    14
    Years
    • Seen May 4, 2011
    Would it be that hard to make a Caterpillar system close to the Pokemon Heart Gold and Soul Silver one ?
     

    The Smell

    Doof-Man
    212
    Posts
    17
    Years
  • Would it be that hard to make a Caterpillar system close to the Pokemon Heart Gold and Soul Silver one ?

    It'd be a matter of adding a Script that grabs the Pokedex number of the Pokemon that is first in your party, then uses it's Pokedex number to grab a charset and attach to an event that repeats the moves that you do. Then you could script extra stuff so that when you talk to the Pokemon, it does it's cry or something. :)
     
    91
    Posts
    14
    Years
    • Seen May 4, 2011
    It'd be a matter of adding a Script that grabs the Pokedex number of the Pokemon that is first in your party, then uses it's Pokedex number to grab a charset and attach to an event that repeats the moves that you do. Then you could script extra stuff so that when you talk to the Pokemon, it does it's cry or something. :)

    That sounds.. perfect.

    The thing is, i don't know how to script though :(

    But i do have the Pokemon OverWorlds for all the Pokemons, and the only thing that really interested me would be the Pokemon following the Trainer.

    Here is a Script made by a friend for Pokemon to follow the Trainer, but even i am having some problems understanding it. Can you guys understand it ?

    Code:
    TRAIN_ACTOR_TRANSPARENT_SWITCH = false 
    TRAIN_ACTOR_TRANSPARENT_SWITCH = true 
     
    TRAIN_ACTOR_TRANSPARENT_SWITCHES_INDEX = 20 
     
    DOWN_LEFT = 1 
    DOWN_RIGHT = 3 
    UP_LEFT = 7 
    UP_RIGHT = 9 
    JUMP = 5 
     
    class Game_Party_Actor > Game_Character 
    def initialize 
    super() 
    @through = true 
    end 
    def setup(actor) 
    if actor != nil 
    @character_name = actor.character_name 
    @character_hue = actor.character_hue 
    else 
    @character_name = "" 
    @character_hue = 0 
    end 
    @opacity = 255 
    @blend_type = 0 
    end 
    def screen_z(height = 0) 
    if $game_player.x == @x and $game_player.y == @y 
    return $game_player.screen_z(height) - 1 
    end 
    super(height) 
    end 
    def move_down(turn_enabled = true) 
    if turn_enabled 
    turn_down 
    end 
    if passable?(@x, @y, Input:: DOWN) 
    turn_down 
    @y += 1 
    end 
    end 
    def move_left(turn_enabled = true) 
    # ×ó¤òÏò¤¯ 
    if turn_enabled 
    turn_left 
    end 
    if passable?(@x, @y, Input::LEFT) 
    turn_left 
    @x -= 1 
    end 
    end 
    def move_right(turn_enabled = true) 
    if turn_enabled 
    turn_right 
    end 
     
    if passable?(@x, @y, Input::RIGHT) 
    turn_right 
    @x += 1 
    end 
    end 
    def move_up(turn_enabled = true) 
    if turn_enabled 
    turn_up 
    end 
    if passable?(@x, @y, Input::UP) 
    turn_up 
    @y -= 1 
    end 
    end 
    def move_lower_left 
    unless @direction_fix 
    @direction = (@direction == Input::RIGHT ? Input::LEFT : @direction == Input::UP ? Input:: DOWN : @direction) 
    end 
    if (passable?(@x, @y, Input:: DOWN) and passable?(@x, @y + 1, Input::LEFT)) or 
    (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input:: DOWN)) 
    @x -= 1 
    @y += 1 
    end 
    end 
    def move_lower_right 
    unless @direction_fix 
    @direction = (@direction == Input::LEFT ? Input::RIGHT : @direction == Input::UP ? Input:: DOWN : @direction) 
    end 
    if (passable?(@x, @y, Input:: DOWN) and passable?(@x, @y + 1, Input::RIGHT)) or 
    (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input:: DOWN)) 
    @x += 1 
    @y += 1 
    end 
    end 
    def move_upper_left 
    unless @direction_fix 
    @direction = (@direction == Input::RIGHT ? Input::LEFT : @direction == Input:: DOWN ? Input::UP : @direction) 
    end 
    if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::LEFT)) or 
    (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::UP)) 
    @x -= 1 
    @y -= 1 
    end 
    end 
    def move_upper_right 
    unless @direction_fix 
    @direction = (@direction == Input::LEFT ? Input::RIGHT : @direction == Input:: DOWN ? Input::UP : @direction) 
    end 
    if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::RIGHT)) or 
    (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::UP)) 
    @x += 1 
    @y -= 1 
    end 
    end 
     
    def set_move_speed(move_speed) 
    @move_speed = move_speed 
    end 
    end 
     
    class Spriteset_Map 
    def setup_actor_character_sprites? 
    return @setup_actor_character_sprites_flag != nil 
    end 
    def setup_actor_character_sprites(characters) 
    if !setup_actor_character_sprites? 
    index_game_player = 0 
    @character_sprites.each_index do |i| 
    if @character_sprites[i].character.instance_of?(Game_Player) 
    index_game_player = i 
    break 
    end 
    end 
    for character in characters.reverse 
    @character_sprites.unshift( 
    Sprite_Character.new(@viewport1, character) 
    ) 
    end 
    @setup_actor_character_sprites_flag = true 
    end 
    end 
    end 
     
    class Scene_Map 
    def setup_actor_character_sprites(characters) 
    @spriteset.setup_actor_character_sprites(characters) 
    end 
    end 
     
    class Game_Party 
    def set_transparent_actors(transparent) 
    @transparent = transparent 
    end 
    def setup_actor_character_sprites 
    if @characters == nil 
    @characters = [] 
    for i in 1 .. 4 
    @characters.push(Game_Party_Actor.new) 
    end 
    end 
    if @actors_chach == nil 
    @actors_chach = [] 
    end 
    if @actors_chach != @actors 
    @actors_chach = @actors.clone 
    for i in 1 .. 4 
    @characters[i - 1].setup(actors[i]) 
    end 
    end 
    if $scene.instance_of?(Scene_Map) 
    $scene.setup_actor_character_sprites(@characters) 
    end 
    end 
    def update_party_actors 
    setup_actor_character_sprites 
    transparent = $game_player.transparent 
    if transparent == false 
    if TRAIN_ACTOR_TRANSPARENT_SWITCH 
    transparent = $game_switches[TRAIN_ACTOR_TRANSPARENT_SWITCHES_INDEX] 
    else 
    transparent = $game_player.transparent 
    end 
    end 
    for character in @characters 
    character.transparent = transparent 
    character.set_move_speed($game_player.get_move_speed) 
    character.update 
    end 
    end 
    def moveto_party_actors( x, y ) 
    setup_actor_character_sprites 
    for character in @characters 
    character.moveto( x, y ) 
    end 
    if @move_list == nil 
    @move_list = [] 
    end 
    for i in 0 .. 10 
    @move_list[i] = nil 
    end 
    end 
    def move_party_actors 
    if @move_list == nil 
    @move_list = [] 
    for i in 0 .. 10 
    @move_list[i] = nil 
    end 
    end 
    @move_list.each_index do |i| 
    if @characters[i] != nil 
    case @move_list[i].type 
    when Input:: DOWN 
    @characters[i].move_down(@move_list[i].args[0]) 
    when Input::LEFT 
    @characters[i].move_left(@move_list[i].args[0]) 
    when Input::RIGHT 
    @characters[i].move_right(@move_list[i].args[0]) 
    when Input::UP 
    @characters[i].move_up(@move_list[i].args[0]) 
    when DOWN_LEFT 
    @characters[i].move_lower_left 
    when DOWN_RIGHT 
    @characters[i].move_lower_right 
    when UP_LEFT 
    @characters[i].move_upper_left 
    when UP_RIGHT 
    @characters[i].move_upper_right 
    when JUMP 
    @characters[i].jump(@move_list[i].args[0],@move_list[i].args[1]) 
    end 
    end 
    end 
    end 
    class Move_List_Element 
    def initialize(type,args) 
    @type = type 
    @args = args 
    end 
    def type() return @type end 
    def args() return @args end 
    end 
    def add_move_list(type,*args) 
    @move_list.unshift(Move_List_Element.new(type,args)).pop 
    end 
    def move_down_party_actors(turn_enabled = true) 
    move_party_actors 
    add_move_list(Input:: DOWN,turn_enabled) 
    end 
    def move_left_party_actors(turn_enabled = true) 
    move_party_actors 
    add_move_list(Input::LEFT,turn_enabled) 
    end 
    def move_right_party_actors(turn_enabled = true) 
    move_party_actors 
    add_move_list(Input::RIGHT,turn_enabled) 
    end 
    def move_up_party_actors(turn_enabled = true) 
    move_party_actors 
    add_move_list(Input::UP,turn_enabled) 
    end 
    def move_lower_left_party_actors 
    move_party_actors 
    add_move_list(DOWN_LEFT) 
    end 
    def move_lower_right_party_actors 
    move_party_actors 
    add_move_list(DOWN_RIGHT) 
    end 
    def move_upper_left_party_actors 
    move_party_actors 
    add_move_list(UP_LEFT) 
    end 
    def move_upper_right_party_actors 
    move_party_actors 
    add_move_list(UP_RIGHT) 
    end 
    def jump_party_actors(x_plus, y_plus) 
    move_party_actors 
    add_move_list(JUMP,x_plus, y_plus) 
    end 
    end 
     
    module Game_Player_Module 
    def update 
    $game_party.update_party_actors 
    super 
    end 
    def moveto( x, y ) 
    super 
    $game_party.moveto_party_actors( x, y ) 
    end 
    def move_down(turn_enabled = true) 
    if passable?(@x, @y, Input:: DOWN) 
    $game_party.move_down_party_actors(turn_enabled) 
    end 
    super(turn_enabled) 
    end 
    def move_left(turn_enabled = true) 
    if passable?(@x, @y, Input::LEFT) 
    $game_party.move_left_party_actors(turn_enabled) 
    end 
    super(turn_enabled) 
    end 
    def move_right(turn_enabled = true) 
    if passable?(@x, @y, Input::RIGHT) 
    $game_party.move_right_party_actors(turn_enabled) 
    end 
    super(turn_enabled) 
    end 
    def move_up(turn_enabled = true) 
    if passable?(@x, @y, Input::UP) 
    $game_party.move_up_party_actors(turn_enabled) 
    end 
    super(turn_enabled) 
    end 
    def move_lower_left 
    if (passable?(@x, @y, Input:: DOWN) and passable?(@x, @y + 1, Input::LEFT)) or 
    (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input:: DOWN)) 
    $game_party.move_lower_left_party_actors 
    end 
    super 
    end 
    def move_lower_right 
    if (passable?(@x, @y, Input:: DOWN) and passable?(@x, @y + 1, Input::RIGHT)) or 
    (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input:: DOWN)) 
    $game_party.move_lower_right_party_actors 
    end 
    super 
    end 
    def move_upper_left 
    if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::LEFT)) or 
    (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::UP)) 
    $game_party.move_upper_left_party_actors 
    end 
    super 
    end 
    def move_upper_right 
    if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::RIGHT)) or 
    (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::UP)) 
    $game_party.move_upper_right_party_actors 
    end 
    super 
    end 
    def jump(x_plus, y_plus) 
    new_x = @x + x_plus 
    new_y = @y + y_plus 
    if (x_plus == 0 and y_plus == 0) or passable?(new_x, new_y, 0) 
    $game_party.jump_party_actors(x_plus, y_plus) 
    end 
    super(x_plus, y_plus) 
    end 
     
    def get_move_speed 
    return @move_speed 
    end 
    end 
     
    #End of Script.
     
    class Game_Player 
    include Game_Player_Module 
    end
     
    Last edited:

    Maruno

    Lead Dev of Pokémon Essentials
    5,285
    Posts
    16
    Years
  • New problem, I keep getting a syntax error at line 2498 and I have no idea why. I tried deleting a few "ends" but I still kept getting the error.
    HTML:
    2483 def pbThrowAndDeflect(ball,targetBattler)
    2484 end
    2485 def pbThrow(ball,shakes,targetBattler)
    2486  @briefmessage=false
    2487  pokeballThrow(ball,shakes,targetBattler)
    2488 end
    2489 def pbThrowSuccess
    2490  if !@opponent
    2491   @briefmessage=false
    2492   $game_system.bgm_play("../ME/PkmRS-Caught.mid")
    2493   frames=(3.5*Graphics.frame_rate).to_i
    2494   frames.times do
    2495    pbGraphicsUpdate
    2496    pbInputUpdate
    2497  end
    2498 end
    2499
    Any help will be appreciated.
    That looks like it's at the very end of PokeBattle_ActualScene (at least, it is in mine, give or take a few lines). I have 4 "end"s in a row at the end of mine (your quoted bit has 2, for comparison).

    I believe I had this problem a while back, and it turned out the problem was either a missing or an extra "end" much earlier in the class. That missing/extra "end" meant the rest of the defs weren't being read properly, which for some reason translates to a syntax error at the end of the class.

    Look at whatever you've changed in PokeBattle_ActualScene and see if the number of "end"s match up. I assume you've added something because your line numbering is 30 ahead of mine (February release, unedited).
     

    Short Range

    Chargin' mah Solarbeam!
    270
    Posts
    16
    Years
  • In the servers.txt file, it's safe to delete "127.0.0.1:4000,fdsfdsfd" and replace it with your own server, right? ^_^;
     

    The Smell

    Doof-Man
    212
    Posts
    17
    Years
  • OK, so in the Intro section there is the script:
    pbShowPicture(2,pbGetPlayerGraphic,1,230,160)

    I want it to show the graphic, but how can I make it disappear, because when I go into the first Map, the picture stays there...

    NOTE: I did edit the Intro text and stuff.

    EDIT: Oops, I realized it makes it count as Picture 2... Never mind guys!
     
    Last edited:
    10
    Posts
    14
    Years
  • When starting a playtest, i recieve the following massage:

    Code:
    ---------------------------
    Pokémon: Digital invasion
    ---------------------------
    Script 'PokeBattle_MoveEffects' line 5049: NameError occurred.
    
    undefined local variable or method `element' for PokeBattle_Move_F5::PokeBattle_Move_11C:Class
    ---------------------------
    OK   
    ---------------------------


    What's wrong with my script (posted below)?
    Spoiler:
     
    23
    Posts
    14
    Years
    • Seen Jul 16, 2010
    Well, I guess that I should ask this now: How do I get certain Pokémon to appear in the grass? Let me still tell everyone that I am no expert in this yet, but I will be once I finish my game.
     
    521
    Posts
    15
    Years
    • Seen Sep 11, 2013
    I want to display a animated gif sprite.
    I have never done this before and so I put in this code.
    What did I do wrong.

    setBitmap("Graphics/Pictures")
    GifSprite.new(Male Character)
    update


    Here is the error:

    ---------------------------
    Pokemon Sandstone Version
    ---------------------------
    Exception: RuntimeError

    Message: Script error within event 25, map 1 (Seaside Village):

    (eval):1:in `pbExecuteScript'undefined method `setBitmap' for #<Interpreter:0x4ff6148>

    Interpreter:238:in `pbExecuteScript'

    Interpreter:1623:in `eval'

    Interpreter:238:in `pbExecuteScript'

    Interpreter:1623:in `command_355'

    Interpreter:467: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:250:in `pbExecuteScript'

    Interpreter:1623:in `command_355'

    Interpreter:467: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
    ---------------------------
     

    Pitaelitmaster

    The Master Of Puppets
    41
    Posts
    14
    Years
    • Seen Oct 11, 2009
    Well, I guess that I should ask this now: How do I get certain Pokémon to appear in the grass? Let me still tell everyone that I am no expert in this yet, but I will be once I finish my game.


    1.Open editor.exe
    2.Go to set encounters
    3.Then choose new dentisy and choose land
    4.After that you click on land and you will see pokemons where you can edit which one you want and what level and how often they will appear.

    I think thats about it.
     

    Fraot

    Researcher & Game Developer
    322
    Posts
    15
    Years
  • So...
    In other words, how do I initialize a move effect? Do you remember my post? did anyone at least read my post? What script should I modify to have my own effects, I never tested them before and I'm having problems at the time I want to test them in battle.
     
    Status
    Not open for further replies.
    Back
    Top