Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> SBS Battler Window
Logan110
post Jul 28 2011, 07:11 PM
Post #1


Level 15
Group Icon

Group: Revolutionary
Posts: 271
Type: Event Designer
RM Skill: Advanced




I was originally making a project in XP but decided to try out VX a little bit. While on VX I liked the Tankentai Battle Status window better and wanted to transfer that to XP. I spent awhile trying to go through the code to find where it was at but couldn't. Anyway is it possible to transfer the style to XP via copy and paste or will it take extra coding to be compatible?

Here is an example of the window on mine.




Here is what I want the bottom window to look like




Here is a copy of the vx demo if needed
http://www.mediafire.com/?u2d88czx6f2md48


__________________________
Fishing Tutorial - Twitch Skill

[Show/Hide] Picture

Waiting for that event sub forum...

Go to the top of the page
 
+Quote Post
   
Night_Runner
post Jul 29 2011, 01:34 AM
Post #2


Level 50
Group Icon

Group: +Gold Member
Posts: 1,523
Type: Scripter
RM Skill: Undisclosed




Give this a try:

Night_Runner's VX Window_BattleStatus for ENU's SBS
CODE
#==============================================================================
# ■ Night_Runner's VX Window_BattleStatus for ENU's SBS
# History:
#  Date Created: 29/07/2011
#  Created for: Logan110
#   @> http://www.rpgrevolution.com/forums/index.php?showtopic=51937
#==============================================================================


#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle
  #--------------------------------------------------------------------------
  alias nr_VXWindowBattle_create_viewport  create_viewport  unless $@
  def create_viewport(*args)
    # Run the original create_viewport
    nr_VXWindowBattle_create_viewport(*args)
    # Make the party command window a normal options
    @party_command_window.dispose
    @party_command_window = Window_Command.new(160, ["Fight", "Escape"])
    @party_command_window.height = 160
    @party_command_window.back_opacity = 160
    # Move the actor command window
    @actor_command_window.y = 480 - @actor_command_window.height
    @actor_command_window.x = 640
    @party_command_window.x = 0
    @party_command_window.y = 480 - @party_command_window.height
  end
  #--------------------------------------------------------------------------
  alias nr_vxwindowbattle_update  update  unless $@
  def update(*args)
    nr_vxwindowbattle_update(*args)
    pwx = swx = awx = 0
    @party_command_window.visible = @actor_command_window.visible = true
    case @phase
    when 1, 2
      @status_window.index = -1
      pwx = 0
      swx = @party_command_window.width
      awx = 640
    when 3
      @status_window.index = @active_battler.index unless @active_battler.nil?
      # Set the position for the party command window
      pwx = -@party_command_window.width
      swx = 0
      awx = 640 - @actor_command_window.width
      @actor_command_window.visible = @status_window.visible
    else
      @status_window.index = -1
      pwx = -@party_command_window.width
      swx = ( 640 - @status_window.width ) / 2
      awx = 640
    end
    winds = [ [@party_command_window, pwx],
              [@actor_command_window, awx],
              [@status_window,        swx] ]
    for wind in winds
      window , dest = wind[0], wind[1]
      speed = [(window.x - dest).abs / 4, 2].max
      if window.x < dest - speed
        window.x += speed
      elsif window.x > dest + speed
        window.x -= speed
      else
        window.x = dest
      end
    end
  end
  #--------------------------------------------------------------------------
  alias nr_VXWindowBattle_phase3_setup_command_wind phase3_setup_command_window
  def phase3_setup_command_window(*args)
    backup_actor_x = @actor_command_window.x
    # Run the original phase3...
    nr_VXWindowBattle_phase3_setup_command_wind(*args)
    @actor_command_window.y = 480 - @actor_command_window.height
    @actor_command_window.x = backup_actor_x
  end
end


#==============================================================================
# ■ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
  #--------------------------------------------------------------------------
  def initialize
    super(160, 320, 480, 160)
    self.contents = Bitmap.new(width - 32, height - 32)
    @level_up_flags = []
    $game_party.actors.size.times { @level_up_flags << false }
    self.back_opacity = 160
    self.z = 900
    @index = -1
    refresh
  end
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      actor_x = 0
      actor_y = i * 32
      draw_actor_name(actor, actor_x, actor_y)
      draw_actor_hp(actor, actor_x + self.contents.width / 3, actor_y)
      draw_actor_sp(actor, actor_x + self.contents.width * 2 / 3, actor_y)
      dx = self.contents.text_size(actor.name).width + 10
      if @level_up_flags[i] and Lvl_UP_FLAG
        self.contents.font.color = normal_color
        self.contents.draw_text(actor_x + dx, actor_y, 64, 32, Lvl_Up_Msg )
      else
        draw_actor_state(actor, actor_x + dx, actor_y)
      end
    end
  end
  #--------------------------------------------------------------------------
  def update
    super
  end
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # If cursor position is less than 0
    if @index < 0
      self.cursor_rect.empty
      return
    end
    # Update cursor rectangle
    self.cursor_rect.set(0, @index * 32, self.contents.width, 32)
  end
  #--------------------------------------------------------------------------
  def index=(num)
    @index = num
    update_cursor_rect
  end
end


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
Logan110
post Jul 29 2011, 02:52 PM
Post #3


Level 15
Group Icon

Group: Revolutionary
Posts: 271
Type: Event Designer
RM Skill: Advanced




Works great. One more thing. Would it be possible to take the hp/mp bar from VX as well? I was looking through the RTP to find the bars but couldn't find it. Im going to guess it uses the System / Window.png file?


__________________________
Fishing Tutorial - Twitch Skill

[Show/Hide] Picture

Waiting for that event sub forum...

Go to the top of the page
 
+Quote Post
   
Night_Runner
post Jul 29 2011, 03:40 PM
Post #4


Level 50
Group Icon

Group: +Gold Member
Posts: 1,523
Type: Scripter
RM Skill: Undisclosed




Sephiroth Spawn made a script that allows you to have slanted bars (link).
The only thing is that you'll probably need to edit the colours if you wanted to get the exact colours, you just need to look for the lines like this:
CODE
draw_slant_bar(x, y + 18, actor.hp, actor.maxhp, bar_width, 6, bar_color = Color.new(100, 0, 0, 255), end_color = Color.new(255, 0, 0, 255))

Those last two arguments, Color.new(100, 0, 0, 255), end_color = Color.new(255, 0, 0, 255), specify the red, green and blue of the colours at the start and end of the bar respectively smile.gif


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
Logan110
post Jul 29 2011, 04:42 PM
Post #5


Level 15
Group Icon

Group: Revolutionary
Posts: 271
Type: Event Designer
RM Skill: Advanced




Thanks a lot smile.gif . Exactly what i wanted. Sorry this is in script support guess it shoulda been in the request forum. I had originally thought the sbs script edited the entire battle.


__________________________
Fishing Tutorial - Twitch Skill

[Show/Hide] Picture

Waiting for that event sub forum...

Go to the top of the page
 
+Quote Post
   
sapphireluna
post Sep 7 2011, 05:44 PM
Post #6


Level 2
Group Icon

Group: Member
Posts: 25
Type: Artist
RM Skill: Intermediate




Sorry, where would I paste this script for it to work?
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Sep 8 2011, 09:25 PM
Post #7


Level 50
Group Icon

Group: +Gold Member
Posts: 1,523
Type: Scripter
RM Skill: Undisclosed




It should work if you go in to the Script Editor, along the left look for 'Main', and if you right click on Main and select 'Insert' it should make a blank window on the right, and along the left it will be ABOVE MAIN, it should work if you paste it in there (so long as you have Tankentai's Sideview Battle System (there may be a newer version, but from memory I think that's the version I made this for) installed as well)


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
sapphireluna
post Sep 10 2011, 01:27 PM
Post #8


Level 2
Group Icon

Group: Member
Posts: 25
Type: Artist
RM Skill: Intermediate




Got it. Thanks!

Is there a way to display the character's level as well?

One more thing, is there a way to make it scroll so it shows the info of the 5th character, if there is one?

This post has been edited by sapphireluna: Sep 12 2011, 10:51 AM
Go to the top of the page
 
+Quote Post
   
Atoa
post Sep 11 2011, 09:01 PM
Post #9


Level 11
Group Icon

Group: Revolutionary
Posts: 192
Type: Scripter
RM Skill: Masterful




Just a question... why you're using an custom script, when the tanketai itself have an add on that allows COMPLETE customization of status window?

The tankentai itself have the add-on battle window, that allows you to change the position of every information in the status screen, and show things like level, face and character graphics. With it you can even set the font individually for each info.


__________________________
Go to the top of the page
 
+Quote Post
   
sapphireluna
post Sep 12 2011, 10:49 AM
Post #10


Level 2
Group Icon

Group: Member
Posts: 25
Type: Artist
RM Skill: Intermediate




I saw that. It's just that when switching to the horizontal display, all items appear on top of each other and you have to manually move them. That sounds time-consuming because of the trial and error you have to do until you've placed it exactly where you want it.
Go to the top of the page
 
+Quote Post
   
bluesuicidal
post Oct 11 2011, 06:41 AM
Post #11



Group Icon

Group: Member
Posts: 4
Type: Developer
RM Skill: Intermediate




QUOTE
Just a question... why you're using an custom script, when the tanketai itself have an add on that allows COMPLETE customization of status window?

The tankentai itself have the add-on battle window, that allows you to change the position of every information in the status screen, and show things like level, face and character graphics. With it you can even set the font individually for each info.


Um.. I'd like to humbly ask.. what add on is that? I can't seem to find it.. I'm sorry.. I'm new to this.. biggrin.gif
Go to the top of the page
 
+Quote Post
   
Atoa
post Oct 11 2011, 11:43 AM
Post #12


Level 11
Group Icon

Group: Revolutionary
Posts: 192
Type: Scripter
RM Skill: Masterful




QUOTE (bluesuicidal @ Oct 11 2011, 11:41 AM) *
Um.. I'd like to humbly ask.. what add on is that? I can't seem to find it.. I'm sorry.. I'm new to this.. biggrin.gif

Did you really searched for it?

If you don't saw that, you should see a doctor... you might need to use glasses.


__________________________
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd May 2013 - 11:46 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker