• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

Battle Box Font?!

korjamer

Pixel Artist
  • 19
    Posts
    14
    Years
    • Seen Jun 3, 2016
    Does anyone know how to change the font of just the battle boxes in essentials? I'm planning on making them outlined Like in Black and White. (It helps make them more readable if you have a small or transparent box.) There has gotta be a line of code some where in PokeBattle_ActualScene that could be changed. I have a font that would work very nicely I just don't know how to change ONLY the name, level, and HP. A little help? I'm stuck. :(
     
    Thank you so much! It worked! :D
    I have one question though...
    there is a command (<outln>...</outln>)
    that causes the text in a message to have an outline rather than a shadow. How would I apply that to the battle box font?
    Also, how would I change the color of the outline/text?
    Thanks again!
     
    Thank you so much! It worked! :D
    I have one question though...
    there is a command (<outln>...</outln>)
    that causes the text in a message to have an outline rather than a shadow. How would I apply that to the battle box font?
    Also, how would I change the color of the outline/text?
    Thanks again!
    Search for BOXTEXTBASECOLOR and BOXTEXTSHADOWCOLOR.

    The outline is a little complex to explain, but the effect is done by:
    Code:
           bitmap.draw_text(ch[1],ch[2],ch[3]+2,ch[4],ch[0])
           bitmap.draw_text(ch[1],ch[2]+1,ch[3]+2,ch[4],ch[0])
           bitmap.draw_text(ch[1],ch[2]+2,ch[3]+2,ch[4],ch[0])
           bitmap.draw_text(ch[1]+1,ch[2],ch[3]+2,ch[4],ch[0])
           bitmap.draw_text(ch[1]+1,ch[2]+2,ch[3]+2,ch[4],ch[0])
           bitmap.draw_text(ch[1]+2,ch[2],ch[3]+2,ch[4],ch[0])
           bitmap.draw_text(ch[1]+2,ch[2]+1,ch[3]+2,ch[4],ch[0])
           bitmap.draw_text(ch[1]+2,ch[2]+2,ch[3]+2,ch[4],ch[0])
    Where:
    ch[0]=graphic ? graphic : textchars[position],
    ch[1]=x+xStart
    ch[2]=texty
    ch[3]=width+extraspace
    ch[4]=lineheight

    Take a look in DrawText script to see where each variable comes.
    The ch[1] gets +1 before the actual text is draw.
     
    Okay... Yeah I probably should learn ruby before I dive any deeper into this...
    I'm pretty confused lol.

    Should I just paste the code into the same place I put the code that allowed me to change the font...? Because that doesn't seem to work as it gives me an error.

    Is there an easier way to apply the code? I really do appreciate your help.
     
    No.
    You need to see DrawText script to see where each of this five variable 'ch' comes, then use equivalent on script. This require some script knowledge.
    Picks ch[2] as example, in the script it comes from texty that is the y-distance and in this script the equivalent is '@spritebaseY+6' ('@spritebaseY+40' in HP case).
    Now I going to make some otimizations that beginners scripters can't follow, and all that you need to do is to change the second line 'pbDrawTextPositions(self.bitmap,textpos)' in PokeBattle_ActualScene to:
    Code:
      oldfontcolor=self.bitmap.font.color
      for position in textpos 
        textsize=self.bitmap.text_size(position[0])
        ch=[position[0],position[3] ? position[1]-textsize.width : position[1],
            position[2],textsize.width,textsize.height]
        self.bitmap.font.color=shadow
        self.bitmap.draw_text(ch[1],ch[2],ch[3]+2,ch[4],ch[0])
        self.bitmap.draw_text(ch[1],ch[2]+1,ch[3]+2,ch[4],ch[0])
        self.bitmap.draw_text(ch[1],ch[2]+2,ch[3]+2,ch[4],ch[0])
        self.bitmap.draw_text(ch[1]+1,ch[2],ch[3]+2,ch[4],ch[0])
        self.bitmap.draw_text(ch[1]+1,ch[2]+2,ch[3]+2,ch[4],ch[0])
        self.bitmap.draw_text(ch[1]+2,ch[2],ch[3]+2,ch[4],ch[0])
        self.bitmap.draw_text(ch[1]+2,ch[2]+1,ch[3]+2,ch[4],ch[0])
        self.bitmap.draw_text(ch[1]+2,ch[2]+2,ch[3]+2,ch[4],ch[0])
        self.bitmap.font.color=base
        self.bitmap.draw_text(ch[1]+1,ch[2],ch[3],ch[4],ch[0])
      end
      self.bitmap.font.color=oldfontcolor
     
    I tried the same with pbDrawTextPositions in UI-Party, but it wont work. Anyone know what the problem could be?
     
    Back
    Top