• 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.

thepsynergist

Vinemon: Sauce Edition Programmer and Composer
795
Posts
15
Years
  • Custom Event Battle

    Ok, so I have this issue where I want to make a conditional branch of a wild Pokemon battle where it branches off when you either kill the Pokemon, catch it or escape. The code I have is as it appears in the attachment.

    I want to make it so that the event resets if Celebi is knocked out, or if the character escapes. The caught script is already handled, but this is a big issue for me. Please help someone.
     
    2,048
    Posts
    16
    Years
    • Seen Sep 7, 2023
    The 4 in your pbWildBattle method call is actually a variable ID. That variable will then contain the result of the battle, and you can use standard conditional branches for each case. The possible results are:
    1: Win
    2: Loss
    3: Run
    4: Capture
     
    102
    Posts
    15
    Years
    • Seen Jul 19, 2017
    Hi, I'm trying to set up a script so it changes the sprite for Nidoran depending on whether it is male or female. I have the female sprite (024.png) set as the default and the following code in PokemonUtilities:

    Code:
       elsif isConst?(species,PBSpecies,:NIDORAN)
       d=pokemon.gender==0
       begin
         return BitmapCache.load_bitmap(
          sprintf("Graphics/Battlers/%03d%s%smale.png",species,
           pokemon.isShiny? ? "s" : "",
           back ? "b" : "", d)
        )
        rescue
        # Load plain bitmap as usual
      end
    However all this code does is make the male sprite which is named 024male.png always appear in battle and the default female sprite only appears in the dex. Does anybody have any suggestions?
     

    Luka S.J.

    Jealous Croatian
    1,270
    Posts
    15
    Years
  • Ok...I have been editing the scripts for various things ever since I changed the resolution to DS size, and I have been having trouble finding where some things are located in the scripts. I haven't looked at every script, but help would be nice as I am busy editing and importing all 493 pokemon sprites and editing the PBS pokemon.txt file accordingly. I don't know where to find the script that manages the scene in the beginning where you enter in your name, and It desperately needs attention. Also, I wondered if anyone has added all the pockets in the bag from DPPt, and if so, I wondered if that person would be willing to give me the script for it, with credit of course. Thanks for helping, it would mean a lot.

    And I just though of something else. Is there a way to make a new option in the visual editor that only incorporates running? Hence, running inside buildings would be possible without setting it to outdoor and making the tints change? That would be amazing if some one could help with that.

    AND...sorry I just thought of something again.
    How do you change the placement of the circle of light inside any dark cave so that it is centered on the DS size screen?

    -PokeJosh

    PS Does anyone have a problem with the PokeDex's search engine? I have been having a few glitches.

    The beginning scene is handled in the first map of the whole game called "Intro". There is an autorun even in the top left corner of the map which is the one that handles the event, so that's where you want to edit.

    To enable running in indoor places you should set cave encounters into that map. Just leave everything to Bulbasaur and set the encounter density of all to 0. So now that you have cave encounters in an indoor map, you should be able to run. (Also check that entering of the doors doesn't disable running shoes)

    As for your last question, somewhere around line 856 in the script PokemonField you should find a code like this:
    Code:
    class DarknessSprite < SpriteWrapper
     attr_reader :radius
     def initialize(viewport=nil)
      super(viewport)
      @darkness=Bitmap.new(Graphics.width,Graphics.height)
      @radius=48
      self.bitmap=@darkness
      self.z=9999
      refresh
     end
     def dispose
      @darkness.dispose
      super
     end
     def radius=(value)
      @radius=value
      refresh
     end
     def refresh
      @darkness.fill_rect(0,0,Graphics.width,Graphics.height,Color.new(0,0,0,255))
      cx=240
      cy=160
      cradius=@radius
      for i in cx-cradius..cx+cradius
        diff2 = (cradius * cradius) - ((i - cx) * (i - cx));
        diff = Math.sqrt( diff2);
        @darkness.fill_rect(i,cy-diff,1,diff*2,Color.new(0,0,0,0))
      end
     end
    end
    Edit the cx and cy values to change the position of the radius of the light circle. The first @radius changes the size of the radius of the circle.
     
    81
    Posts
    15
    Years
  • So earlier I was fiddling about with the TrainerCard area of the script in an attempt to make it so it appears ona transaprent background (so yo ucan see the game behind it) during this i was deleting bits a nd bobs, but when it went to put them back in- it didn't work. cna anyone tell me what this should look like.
    @sprites["background"]=Plane.new(@viewport)
    @sprites["background"].bitmap=BitmapCache.load_bitmap("Graphics/Pictures/trcardbg.png")
    @sprites["card"]=Sprite.new(@viewport)
    @sprites["card"].bitmap=BitmapCache.load_bitmap("Graphics/Pictures/trcard.png")
    @sprites["overlay"]=Sprite.new(@viewport)
    @sprites["overlay"].bitmap=Bitmap.new(Graphics.width,Graphics.height)
    pbSetSystemFont(@sprites["overlay"].bitmap)

    if $PokemonGlobal.trainerRecording
    Even if you don't know much about scripting you could just look in your script (and c+p it here so i know where things should go.)
     

    lx_theo

    Game Developer
    958
    Posts
    14
    Years
    • Seen Nov 2, 2013
    How can I set the players name to something specific without using the name entry screen. Like how the games would have Red or Gold or all those other choices that you can just press and have it set to that name.
     
    1
    Posts
    14
    Years
    • Seen Jul 25, 2009
    hi im new here
    i have a problem with adding a shiny pokemon straight into the party, i copyed the script in notes to an event but i get an error like
    Spoiler:


    and the event looks like
    Spoiler:


    can anyone tell me what im doing wrong?
     
    12
    Posts
    14
    Years
    • Seen Aug 13, 2010
    Hey guys i need help !!!

    How can i make one event??? in the internet like Darkrai in D/P/PT

    (sry for my stupid question --')

    Another question

    When i put my log and pass , i wait and then it says: cannot connect to the server (timed out) what do i do now?
     
    Last edited:

    ~PokeJosh~

    Pimpatune
    19
    Posts
    15
    Years
  • The beginning scene is handled in the first map of the whole game called "Intro". There is an autorun even in the top left corner of the map which is the one that handles the event, so that's where you want to edit.

    Thanks, all the other stuff worked, but what I really wanted to know about the name entering script is how to edit things like the placement of letters and the icons where you enter you name. Where is the script that deals with pbTrainerName?
     

    thepsynergist

    Vinemon: Sauce Edition Programmer and Composer
    795
    Posts
    15
    Years
  • The 4 in your pbWildBattle method call is actually a variable ID. That variable will then contain the result of the battle, and you can use standard conditional branches for each case. The possible results are:
    1: Win
    2: Loss
    3: Run
    4: Capture

    The problem with that is that I do not know the ID number of the variable...If I did I would probably not have this problem. Does the result of the win stay in the variable after battle? Because if it does, I'll be able to find the value of the variable in the debug menu and find the ID that way based on the win... If not, then I hope Flameguru or Poccil can tell me what ID the variable is for a wild battle win condition...
     
    Last edited:

    PokemonPlatnum

    nomnomnom.
    257
    Posts
    16
    Years
  • I made a new script, first testing it in a blank project it works perfectly but when imported into RMXP it gives me the following error:
    Script 'AchievementScript' line 34: TypeError occurred.
    undefined superclass 'Window_Base'
    Please Help!
     
    2,048
    Posts
    16
    Years
    • Seen Sep 7, 2023
    The problem with that is that I do not know the ID number of the variable...If I did I would probably not have this problem. Does the result of the win stay in the variable after battle? Because if it does, I'll be able to find the value of the variable in the debug menu and find the ID that way based on the win... If not, then I hope Flameguru or Poccil can tell me what ID the variable is for a wild battle win condition...
    It's variable 4 in your instance. The variable ID is the third argument to pbWildBattle.
    I made a new script, first testing it in a blank project it works perfectly but when imported into RMXP it gives me the following error:
    Script 'AchievementScript' line 34: TypeError occurred.
    undefined superclass 'Window_Base'
    Please Help!
    Poccil replaced the standard Window scripts with SpriteWindow scripts. Change line 34 of your script to say SpriteWindow_Base instead of WindowBase.
     

    PokemonPlatnum

    nomnomnom.
    257
    Posts
    16
    Years
  • That got that problem out of the way so thanks!
    But now, I get another error...:
    Script 'AchievementScript' line 121: NameError occurred.
    undefined method 'command_new_game' for class 'Scene_Title'

    Here is line 121:
    Code:
    class Scene_Title
      alias re_new_game command_new_game
      def command_new_game
        $achieve = Achievements.new
        re_new_game
      end
    end

    Help again, lol.
     
    2,048
    Posts
    16
    Years
    • Seen Sep 7, 2023
    I'm guessing you got that script from RMXP.org or something. Most scripts won't work with Essentials, since Essentials redefines many of the classes and functions in standard RMXP scripts. If you post the whole script, I might be able to help...
     
    12
    Posts
    14
    Years
    • Seen Aug 13, 2010
    Hey guys i need help !!!

    How can i make one event??? in the internet like Darkrai in D/P/PT

    (sry for my stupid question --')

    Another question

    When i put my log and pass , i wait and then it says: cannot connect to the server (timed out) what do i do now?
     

    PokemonPlatnum

    nomnomnom.
    257
    Posts
    16
    Years
  • Hey guys i need help !!!

    How can i make one event??? in the internet like Darkrai in D/P/PT

    (sry for my stupid question --')

    Another question

    When i put my log and pass , i wait and then it says: cannot connect to the server (timed out) what do i do now?
    What?
    I'm confused...are you using Pokémon Essentials?
     
    12
    Posts
    14
    Years
    • Seen Aug 13, 2010
    yes,is like this,

    when i go to the woman tha connects me to the internet, i put my log, and pass, then it says "server timed out" something like that...
     
    2,048
    Posts
    16
    Years
    • Seen Sep 7, 2023
    You have to set up the server settings first. And to make a Mystery Gift system, you'll need some good knowledge of RGSS and network programming (probably), which (no offense) you seem to lack.
     
    12
    Posts
    14
    Years
    • Seen Aug 13, 2010
    Hey but i use hamachi, and i alredy set up the server settings....

    Now can you please me explain the mystery gift plz...
     
    Status
    Not open for further replies.
    Back
    Top