Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Resizing Battle Skills Window (easy?)

Pretty much what the subject says, but more specifically I am looking to resize the skill window in battle to half of the default width.  I've already managed to get my skills pushed over to the left side of the screen in one column, so now I have giant space with absolutely nothing there.

If anyone could point me in the right direction to getting that sorted out, I would be forever grateful!

Best Regards,

King Matthew
 

Haki

Member

I Window_Skill script, find the "initialize" method and change the line
Code:
super(0,128,640,352)

into

Code:
if $scene.is_a?(Scene_Battle)
  super(160, 128, 320, 352)
else
  super(0, 128, 640, 352)
end
 
Thank you Haki, the placement is now PERFECT!

However, something strange happens now, all the skills are messed up.  Some of them don't even show, and the ones that do have other skills' descriptions.  For example, if I select "Hurricane," then "Feint Attack" would be performed.

Here's a screenie for convenience(?):
http://i19.photobucket.com/albums/b168/ ... Battle.jpg

If you do not wish to continue to help, that's fine too. =D But thank you anyway for the placement code, it helped a lot!

Best Regards,

King Matthew
 
Yes, I am, but that was a fresh project I just put it into....Hmmm, I tried it again, but it's still doing that...weird...

Oh, well, don't worry about it! Maybe I can find another way to customize!

Thanks again!
 

Haki

Member

I know what's the problem.
Find the method "draw_item" inside the Window_Skill script and replace
Code:
      x = 4 + index % 2 * (288 + 32)

with
Code:
    if $scene.is_a?(Scene_Battle)
      x = 4
    else
      x = 4 + index % 2 * (288 + 32)
    end
 

Haki

Member

My mistake, I forgot to do this:
Find the line
Code:
   y = index / 2 * 32

and replace with this in both Window_Skill an Window_Item scripts

Code:
if $scene.is_a?(Scene_Battle)
   y = index  * 32
else
   y = index / 2 * 32
end
 

Haki

Member

Ok, this is the final edit to the scripts.
In the initialize method of both scripts, replace
Code:
    @column_max = 2
with
Code:
    if $scene.is_a?(Scene_Battle)
       @column_max = 1
    else
       @column_max = 2
    end

I hope this is it.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top