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

Maruno

Lead Dev of Pokémon Essentials
5,286
Posts
16
Years
    • Seen May 3, 2024
    This may be a silly problem, but I'm new to Pokemon Essentials and don't have much coding experience.

    I wanted to change the resolution of the game screen, so I look around in the Notes and found that I had to change the @@width and @@height lines in Sprite Resizer. I did so, and got this problem:

    EDIT: I just realised that I can't insert images which are hosted on Photobucket into my posts until I have made 15 posts or more, so it has been attached as a .pgn.

    As you can see, the menus and text size/text boxes are too large and cover almost the entire screen, and you can't see the battle screen at all aside from a cropped look at Pikachu. Does anyone have any way for me to fix the menus, boxes, battle screen and text size? Or should I avoid changing the resolution until I either learn more about coding or get help from someone who knows RPGXP's language?
    You can halve the size of all the message windows and the battle screen by going into SpriteResizer, finding the line "$ResizeFactor=1.0" and changing it to equal 0.5 instead.

    There's a part of this problem that I'm confused by, though. The bottom left screenshot shows the maps have already been resized, but the message boxes have not. Either you've done more to the scripts that you're not telling us, or something dodgy's going on. Either way, don't change the screen size in the in-game Options menu, because that will just confuse things.
     

    Minorthreat0987

    Pokemon Tellurium
    462
    Posts
    18
    Years
    • Seen Jan 28, 2021
    So I did a little bit of research and the whole no day/night encounter thing has been around since like the January 13th release, but I was able to re-implement it so if any one wants it just replace your PokemonEncounter Script with this script!

    To re-implement different encounters depending on the time of day replace your PokemonEncounter Script with this.

    Code:
    module EncounterTypes
     Land=0
     Cave=1
     Water=2
     RockSmash=3
     OldRod=4
     GoodRod=5
     SuperRod=6
     HeadbuttLow=7
     HeadbuttHigh=8
     LandMorning=9
     LandDay=10
     LandNight=11
     BugContest=12
     Names=[
       "Land",
       "Cave",
       "Water",
       "RockSmash",
       "OldRod",
       "GoodRod",
       "SuperRod",
       "HeadbuttLow",
       "HeadbuttHigh",
       "LandMorning",
       "LandDay",
       "LandNight",
       "BugContest"
      ]
      EnctypeChances=[
       [20,20,10,10,10,10,5,5,4,4,1,1],
       [20,20,10,10,10,10,5,5,4,4,1,1],
       [60,30,5,4,1],
       [60,30,5,4,1],
       [70,30],
       [60,20,20],
       [40,40,15,4,1],
       [30,25,20,10,5,5,4,1],
       [30,25,20,10,5,5,4,1],
       [20,20,10,10,10,10,5,5,4,4,1,1],
       [20,20,10,10,10,10,5,5,4,4,1,1],
       [20,20,10,10,10,10,5,5,4,4,1,1],
       [20,20,10,10,10,10,5,5,4,4,1,1]
      ]
    end
    
    class PokemonEncounters
     def initialize
      @enctypes=[]
      @density=nil
     end
     def stepcount
      return @stepcount
     end
     def clearStepCount
      @stepcount=0
     end
     def hasEncounter?(enc)
      return false if @density==nil || enc<0
      return @enctypes[enc] ? true : false  
     end
     def isCave?
      return false if @density==nil
      return @enctypes[1] ? true : false
     end
     def isGrass?
      return false if @density==nil
      return (@enctypes[0] || @enctypes[9] || @enctypes[10] || @enctypes[11] || @enctypes[12]) ? true : false
     end
     def isEncounterPossibleHere?
      if $PokemonGlobal && $PokemonGlobal.surfing
       return true
      elsif self.isCave?
       return true
      elsif self.isGrass?
       return pbIsGrassTag?($game_map.terrain_tag($game_player.x,$game_player.y))
      else
       return false
      end
     end
     def pbEncounterType
      if $PokemonGlobal && $PokemonGlobal.surfing
       return EncounterTypes::Water
      elsif self.isCave?
       return EncounterTypes::Cave
     elsif self.isGrass?
       hour=Time.now.hour
       enctype=EncounterTypes::Land
       if pbInBugContest?
        if self.hasEncounter?(EncounterTypes::BugContest)
         enctype=EncounterTypes::BugContest
        end
       elsif hour<6 || hour>=20
        if self.hasEncounter?(EncounterTypes::LandNight)
         enctype=EncounterTypes::LandNight
        end
       elsif hour<12
        if self.hasEncounter?(EncounterTypes::LandMorning)
         enctype=EncounterTypes::LandMorning
        end
       else
        if self.hasEncounter?(EncounterTypes::LandDay)
         enctype=EncounterTypes::LandDay
        end
       end
       return enctype
      else
       return -1
      end
     end
     def setup(mapID)
      @density=nil
      @stepcount=0
      @enctypes=[]
      begin
       data=load_data("Data/encounters.dat")
       if data.is_a?(Hash) && data[mapID]
        @density=data[mapID][0]
        @enctypes=data[mapID][1]
       else
        @density=nil
        @enctypes=[]
       end
      rescue
       @density=nil
       @enctypes=[]
      end
     end
     def pbMapHasEncounter?(mapID,enctype)
      data=load_data("Data/encounters.dat")
      if data.is_a?(Hash) && data[mapID]
        enctypes=data[mapID][1]
        density=data[mapID][0]
      else
        return false
      end
      return false if density==nil || enctype<0
      return enctypes[enctype] ? true : false  
     end
     def pbMapEncounter(mapID,enctype)
      if enctype<0 || enctype>EncounterTypes::EnctypeChances.length
       raise ArgumentError.new(_INTL("Encounter type out of range"))
      end
      data=load_data("Data/encounters.dat")
      if data.is_a?(Hash) && data[mapID]
        enctypes=data[mapID][1]
      else
        return nil
      end
      return nil if enctypes[enctype]==nil
      chances=EncounterTypes::EnctypeChances[enctype]
      rnd=rand(100)
      chosenpkmn=0
      chance=0
      for i in 0...chances.length
       chance+=chances[i]
       if rnd<chance
        chosenpkmn=i
        break
       end
      end
      encounter=enctypes[enctype][chosenpkmn]
      level=encounter[1]+rand(1+encounter[2]-encounter[1])
      return [encounter[0],level]
     end
     def pbEncounteredPokemon(enctype)
      if enctype<0 || enctype>EncounterTypes::EnctypeChances.length
       raise ArgumentError.new(_INTL("Encounter type out of range"))
      end
      return nil if @enctypes[enctype]==nil
      chances=EncounterTypes::EnctypeChances[enctype]
      rnd=rand(100)
      chosenpkmn=0
      chance=0
      for i in 0...chances.length
       chance+=chances[i]
       if rnd<chance
        chosenpkmn=i
        break
       end
      end
      encounter=@enctypes[enctype][chosenpkmn]
      return nil if !encounter
      level=encounter[1]+rand(1+encounter[2]-encounter[1])
      return [encounter[0],level]
     end
     def pbGenerateEncounter(enctype)
      if enctype<0 || enctype>EncounterTypes::EnctypeChances.length
       raise ArgumentError.new(_INTL("Encounter type out of range"))
      end
      return nil if @density==nil
      return nil if @density[enctype]==0 || !@density[enctype]
      return nil if @enctypes[enctype]==nil
      @stepcount+=1
      return nil if @stepcount<=3 # Check three steps after battle ends
      encount=@density[enctype]*16
      if $PokemonGlobal.bicycle
       encount=(encount*4/5)
      end
      if $PokemonMap.blackFluteUsed
       encount/=2
      end
      if $PokemonMap.whiteFluteUsed
       encount=(encount*3/2)
      end
      if $Trainer.party.length>0
       if isConst?($Trainer.party[0].item,PBItems,:CLEANSETAG)
        encount=(encount*2/3)
       else
        if isConst?($Trainer.party[0].ability,PBAbilities,:STENCH)
         encount=(encount*1/2)
        elsif isConst?($Trainer.party[0].ability,PBAbilities,:ILLUMINATE)
         encount=(encount*2/3)
        end
       end
      end
      return nil if rand(2874)>=encount
      encpoke=pbEncounteredPokemon(enctype)
      return nil if !encpoke
      if $PokemonGlobal.repel>0 && 
         $Trainer.party.length>0 &&
         encpoke[1]<=$Trainer.party[0].level
       return nil
      end
      return encpoke
     end
    end

    However let it be known, I haven't been able to make it so you can add LandMorning/LandDay/LandNight encounters using the Editor, so you must add them by hand.

    I hope this helps anyone who was having issues with that whole thing.
     

    ~Frozen Darkness~

    It's watching you...
    503
    Posts
    16
    Years
  • Still looking for an answer to my question on the previous page, since Crazyninjaguy's idea didn't work. It gave me a NoMethod Error for "onStartBattle"

    Question:

    Is it possible to use the PokemonShadow and PokemonPurifyChamber scripts in an older version? (Late 2009)
     

    Mrchewy

    nom nom nom
    361
    Posts
    16
    Years
  • Hey folks, I've been recently trying to edit my battle scene to allow for Pokémon animations. I've had somewhat limited success, so was wondering if anyone could offer any suggestions.

    Basically, I want the sprite of the enemy Pokémon, once it slides in/pops out of its ball, to alternate between it second frame (which has the prefix "ani_" in the battlers folder) 2-3 times. The actual scripting seemed fairly simple, but after almost two hours of tweaking I've experienced little luck working it out.
     

    Mrchewy

    nom nom nom
    361
    Posts
    16
    Years
  • That was... entirely unexpected =o. I've never seen such third-party documentation for the SK before, lol.

    I got -very- close to successful replicating this effect by the looks of things. This system is a lot better, however xD. Many thanks Crazyninjaguy.
     
    53
    Posts
    15
    Years
    • Seen Jan 9, 2011
    Hi

    What is the best way to have a NPC walking to some place, followed by another NPC, followed by the player ?
    I usually use the "set moveroute" event, but is there a simpler way (or another way) ?
     

    Minorthreat0987

    Pokemon Tellurium
    462
    Posts
    18
    Years
    • Seen Jan 28, 2021
    does anyone know how to change the screen size of the editor? I changed my game screen size to the DS size, but the editor is still GBA size.
     
    664
    Posts
    16
    Years
  • does anyone know how to change the screen size of the editor? I changed my game screen size to the DS size, but the editor is still GBA size.

    Do you really need the editor DS size lol?
    If you resize it, it wont be any different, just longer.

    But if you really want to, then do this:

    1. Go into the Data folder.
    2. Rename Scripts.rxdata to ScriptsORIGINAL.rxdata
    3. Rename EditorScripts.rxdata to Scripts.rxdata
    4. Load up the project.
    5. Edit the scripts.
    6. Rename the .rxdata files until they are as they were.
     
    102
    Posts
    15
    Years
    • Seen Jul 19, 2017
    Checked all of that and updated, nothing changed.

    @CrazyNinjaGuy: I don't really know how to do that, it just made the player be stuck in one spot not moving...

    I thought I'd give an image example of the problem:
    [Archive] Pokemon Essentials: Starter Kit for RPG Maker XP

    When you were making the map did you put something on the third layer and use a blank tile to cover it up. If you do that RMXP reads the top most passage settings for the tile. Try deleting the house on layer 3 and putting it back in on layer 2. I once ruined an entire map by trying to fix errors by putting blank tiles on the third layer.
     

    Minorthreat0987

    Pokemon Tellurium
    462
    Posts
    18
    Years
    • Seen Jan 28, 2021
    Do you really need the editor DS size lol?
    If you resize it, it wont be any different, just longer.

    But if you really want to, then do this:

    1. Go into the Data folder.
    2. Rename Scripts.rxdata to ScriptsORIGINAL.rxdata
    3. Rename EditorScripts.rxdata to Scripts.rxdata
    4. Load up the project.
    5. Edit the scripts.
    6. Rename the .rxdata files until they are as they were.

    It just makes using the Reposition sprite feature in the editor more accurate which is important because I would hate to have to edit all those by hand using trial and error. Thank you for the help though! :)

    Anyway new question, does anyone know how to fix this?

    [Archive] Pokemon Essentials: Starter Kit for RPG Maker XP


    When the opponent pokemon dies it goes infront of the Hero's hp bar for the most part which is cosmetically unappealing...Thanks for the help!
     
    664
    Posts
    16
    Years
  • Again, i haven't tested this but it should work.

    1. Find this script part in Pokebattle_ActualScene (line 497 - 533)

    Code:
      if doublebattle
       case @battler.index
        when 0
         @databox=AnimatedBitmap.new("Graphics/Pictures/doublePlayerBox")
         @spriteX=256
         @spriteY=124+yoffset
        when 1 
         @databox=AnimatedBitmap.new("Graphics/Pictures/doubleEnemyBox")
         @spriteX=26
         @spriteY=10+yoffset
         @spritebaseX=0
         @spritebaseY=0
        when 2 
         @databox=AnimatedBitmap.new("Graphics/Pictures/doublePlayerBox")
         @spriteX=280
         @spriteY=174+yoffset
        when 3 
         @databox=AnimatedBitmap.new("Graphics/Pictures/doubleEnemyBox")
         @spriteX=2
         @spriteY=60+yoffset
       end
      else
       case @battler.index
        when 0
         @databox=AnimatedBitmap.new("Graphics/Pictures/singlePlayerBox")
         @spriteX=254
         @spriteY=148+yoffset
         @showhp=true
         @showexp=true
         @statusCX=40
         @statusY=44
        when 1 
         @databox=AnimatedBitmap.new("Graphics/Pictures/singleEnemyBox")
         @spriteX=26
         @spriteY=32+yoffset
       end
      end

    2. Replace it with this:

    Code:
      if doublebattle
       case @battler.index
        when 0
         @databox=AnimatedBitmap.new("Graphics/Pictures/doublePlayerBox")
         @databox.z = 999999999
         @spriteX=256
         @spriteY=124+yoffset
        when 1 
         @databox=AnimatedBitmap.new("Graphics/Pictures/doubleEnemyBox")
         @databox.z = 999999999
         @spriteX=26
         @spriteY=10+yoffset
         @spritebaseX=0
         @spritebaseY=0
        when 2 
         @databox=AnimatedBitmap.new("Graphics/Pictures/doublePlayerBox")
         @databox.z = 999999999
         @spriteX=280
         @spriteY=174+yoffset
        when 3 
         @databox=AnimatedBitmap.new("Graphics/Pictures/doubleEnemyBox")
         @databox.z = 999999999
         @spriteX=2
         @spriteY=60+yoffset
       end
      else
       case @battler.index
        when 0
         @databox=AnimatedBitmap.new("Graphics/Pictures/singlePlayerBox")
         @databox.z = 999999999
         @spriteX=254
         @spriteY=148+yoffset
         @showhp=true
         @showexp=true
         @statusCX=40
         @statusY=44
        when 1 
         @databox=AnimatedBitmap.new("Graphics/Pictures/singleEnemyBox")
         @databox.z = 999999999
         @spriteX=26
         @spriteY=32+yoffset
       end
      end

    So yeah, should work but i haven't tried it.
     

    Mrchewy

    nom nom nom
    361
    Posts
    16
    Years
  • Well a script for that really isn't needed, just add a shadow below the sprite on the Charsets.

    Well, I was trying to do this recently and at first I thought it was the easy solution... until I realized that it looks ridiculous whenever you jump a ledge (the shadow sticks with you). A script for this would be great.
     
    Status
    Not open for further replies.
    Back
    Top