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.


Reply
 
Thread Tools
  #1    
Old June 27th, 2012, 10:01 AM
pokemongarnet's Avatar
pokemongarnet
CAT-BUS!
 
Join Date: Mar 2009
Gender: Male
Okay, I made a new battle box for my game, and I want to modify the fonts, and placement of the HP Bar/ Exp Bar as well as the position of the battle box itself. So if anyone could point me in the right direction or at least what section of the script to look in, it'd be a great help. Thanks.
__________________
Reply With Quote
  #2    
Old June 27th, 2012, 10:19 AM
xalien95's Avatar
xalien95
Creator of Pkmn Omicron [ITA]
 
Join Date: Jan 2011
Location: Italy, Monopoly
Age: 18
Gender: Male
Send a message via Skype™ to xalien95
You have to go to PokeBattle_ActualScene.. find the class PokemonDataBox and then the def refresh ;]
Reply With Quote
  #3    
Old June 27th, 2012, 10:53 AM
pokemongarnet's Avatar
pokemongarnet
CAT-BUS!
 
Join Date: Mar 2009
Gender: Male
Ok but from here which lines should I edit?
__________________
Reply With Quote
  #4    
Old June 27th, 2012, 11:23 AM
xalien95's Avatar
xalien95
Creator of Pkmn Omicron [ITA]
 
Join Date: Jan 2011
Location: Italy, Monopoly
Age: 18
Gender: Male
Send a message via Skype™ to xalien95
If you have basic rgss knowledges, to:
- change the font, you have to import the new font in the game (editing SpriteWindow and PokemonLoad) and call it with the command bitmap.font.name = ["name_of_the_new_font"]
- change coordinates of HP and EXP bar, you have to find something like this
Code:
# fill with HP color
    hpGaugeX=PokeBattle_Scene::HPGAUGE_X
    hpGaugeY=PokeBattle_Scene::HPGAUGE_Y
    expGaugeX=PokeBattle_Scene::EXPGAUGE_X
    expGaugeY=PokeBattle_Scene::EXPGAUGE_Y
    self.bitmap.fill_rect(@spritebaseX+hpGaugeX,hpGaugeY,hpgauge,2,hpcolors[hpzone*2])
    self.bitmap.fill_rect(@spritebaseX+hpGaugeX,hpGaugeY+2,hpgauge,4,hpcolors[hpzone*2+1])
    if @showexp
      # fill with EXP color
      self.bitmap.fill_rect(@spritebaseX+expGaugeX,expGaugeY,self.exp,2,PokeBattle_Scene::EXPCOLORSHADOW)
      self.bitmap.fill_rect(@spritebaseX+expGaugeX,expGaugeY+2,self.exp,2,PokeBattle_Scene::EXPCOLORBASE)
    end
and edit
- change coordinates of boxes, you have to find and edit this
Code:
if (@battler.index&1)==0 # if player's Pokémon
      @spritebaseX=34
    else
      @spritebaseX=16
    end
    yoffset=(Graphics.height-320)                       # Adjust for screen size
    if doublebattle
      case @battler.index
        when 0
          @databox=AnimatedBitmap.new("Graphics/Pictures/battlePlayerBoxD")
          @spriteX=224+Graphics.width-480
          @spriteY=102+yoffset
        when 1 
          @databox=AnimatedBitmap.new("Graphics/Pictures/battleFoeBoxD")
          @spriteX=-4
          @spriteY=2
        when 2 
          @databox=AnimatedBitmap.new("Graphics/Pictures/battlePlayerBoxD")
          @spriteX=236+Graphics.width-480
          @spriteY=162+yoffset
        when 3 
          @databox=AnimatedBitmap.new("Graphics/Pictures/battleFoeBoxD")
          @spriteX=-16
          @spriteY=62
      end
    else
      case @battler.index
        when 0
          @databox=AnimatedBitmap.new("Graphics/Pictures/battlePlayerBoxS")
          @spriteX=236+Graphics.width-480
          @spriteY=128+yoffset
          @showhp=true
          @showexp=true
        when 1 
          @databox=AnimatedBitmap.new("Graphics/Pictures/battleFoeBoxS")
          @spriteX=-16
          @spriteY=36
      end
    end
Reply With Quote
  #5    
Old June 27th, 2012, 12:26 PM
pokemongarnet's Avatar
pokemongarnet
CAT-BUS!
 
Join Date: Mar 2009
Gender: Male
Quote:
Originally Posted by xalien95 View Post
If you have basic rgss knowledges, to:
- change the font, you have to import the new font in the game (editing SpriteWindow and PokemonLoad) and call it with the command bitmap.font.name = ["name_of_the_new_font"]
- change coordinates of HP and EXP bar, you have to find something like this
Code:
# fill with HP color
    hpGaugeX=PokeBattle_Scene::HPGAUGE_X
    hpGaugeY=PokeBattle_Scene::HPGAUGE_Y
    expGaugeX=PokeBattle_Scene::EXPGAUGE_X
    expGaugeY=PokeBattle_Scene::EXPGAUGE_Y
    self.bitmap.fill_rect(@spritebaseX+hpGaugeX,hpGaugeY,hpgauge,2,hpcolors[hpzone*2])
    self.bitmap.fill_rect(@spritebaseX+hpGaugeX,hpGaugeY+2,hpgauge,4,hpcolors[hpzone*2+1])
    if @showexp
      # fill with EXP color
      self.bitmap.fill_rect(@spritebaseX+expGaugeX,expGaugeY,self.exp,2,PokeBattle_Scene::EXPCOLORSHADOW)
      self.bitmap.fill_rect(@spritebaseX+expGaugeX,expGaugeY+2,self.exp,2,PokeBattle_Scene::EXPCOLORBASE)
    end
and edit
- change coordinates of boxes, you have to find and edit this
Code:
if (@battler.index&1)==0 # if player's Pokémon
      @spritebaseX=34
    else
      @spritebaseX=16
    end
    yoffset=(Graphics.height-320)                       # Adjust for screen size
    if doublebattle
      case @battler.index
        when 0
          @databox=AnimatedBitmap.new("Graphics/Pictures/battlePlayerBoxD")
          @spriteX=224+Graphics.width-480
          @spriteY=102+yoffset
        when 1 
          @databox=AnimatedBitmap.new("Graphics/Pictures/battleFoeBoxD")
          @spriteX=-4
          @spriteY=2
        when 2 
          @databox=AnimatedBitmap.new("Graphics/Pictures/battlePlayerBoxD")
          @spriteX=236+Graphics.width-480
          @spriteY=162+yoffset
        when 3 
          @databox=AnimatedBitmap.new("Graphics/Pictures/battleFoeBoxD")
          @spriteX=-16
          @spriteY=62
      end
    else
      case @battler.index
        when 0
          @databox=AnimatedBitmap.new("Graphics/Pictures/battlePlayerBoxS")
          @spriteX=236+Graphics.width-480
          @spriteY=128+yoffset
          @showhp=true
          @showexp=true
        when 1 
          @databox=AnimatedBitmap.new("Graphics/Pictures/battleFoeBoxS")
          @spriteX=-16
          @spriteY=36
      end
    end
Ah, thank you for that but I know pretty much 0 RGSS. Alright, off to make some changes.
__________________
Reply With Quote
  #6    
Old June 28th, 2012, 11:03 AM
pokemongarnet's Avatar
pokemongarnet
CAT-BUS!
 
Join Date: Mar 2009
Gender: Male
Sorry for the double post, but is there any way that I could only move the player HP Bar? Because every time I change coordinates it does it for both.
__________________
Reply With Quote
  #7    
Old June 28th, 2012, 11:19 AM
xalien95's Avatar
xalien95
Creator of Pkmn Omicron [ITA]
 
Join Date: Jan 2011
Location: Italy, Monopoly
Age: 18
Gender: Male
Send a message via Skype™ to xalien95
You have to find HPGAUGE_X=102 and HPGAUGE_Y=40 in PokeBattle_ActualScene to edit coordinates ;]

Last edited by xalien95; June 28th, 2012 at 11:27 AM.
Reply With Quote
  #8    
Old June 29th, 2012, 04:28 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Quote:
Originally Posted by pokemongarnet View Post
Sorry for the double post, but is there any way that I could only move the player HP Bar? Because every time I change coordinates it does it for both.
The icon indicating shininess is in different places depending on which side that Pokémon is on. Use the same kind of thing to modify the coordinates of the bar.
__________________
Reply With Quote
  #9    
Old June 29th, 2012, 10:34 AM
pokemongarnet's Avatar
pokemongarnet
CAT-BUS!
 
Join Date: Mar 2009
Gender: Male
Sorry for my minimal scripting knowledge here, but I'm guessing that the shininess code that you're talking about is this... And that @battler.index&1 defines which pokemon it is?

Code:
if @battler.pokemon.isShiny?
      shinyX=206
      shinyX=-6 if (@battler.index&1)==0 # If player's Pokémon
      imagepos=[["Graphics/Pictures/shiny.png",@spritebaseX+shinyX,36,0,0,-1,-1]]
      pbDrawImagePositions(self.bitmap,imagepos)
    end
Or I would put something like this near line 1264 and make it like this:
Code:
# Position of HP gauge
  HPGAUGE_X=115
  HPGAUGE_X=90 if (@battler.index&1)==0 
  HPGAUGE_Y=40
  HPGAUGE_Y=70 if (@battler.index&1)==0
And that would make the HP coordinates for the Player's bar (90,70) While the opponent bar is at (115,70).

Again I have no idea what I'm doing. I've never guessed about something this much in my life.

EDIT: But I guess I would have to define the method battler.index&1 first.
__________________
Reply With Quote
  #10    
Old June 29th, 2012, 12:52 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Leave those constants alone. You want to edit the same method that the if (@battler.index&1)==0 appears in (i.e. def update). The change is exactly the same, except you change different variables instead. It's up to you to learn at least a little scripting in order to do this - it's really not difficult, since half the time just reading the code will give you an idea about what it's doing. For example, hpGaugeX does not mean "throw an octopus into the sink".

That red code doesn't need "defining" or messing around with in any way. It literally means "if the Pokémon is on the player's side". The comment right next to that code (which exists in the shiny icon bit) says as much.
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links
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 05:54 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.