Help - Search - Members - Calendar
Full Version: YEA Battle Engine small edit?
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Ace Discussion
ZODIAK
Basically, I want to remove the window behind the character's HP/MP/TP, leaving only the command window on the right. It seems pretty simple, but I'm not too knowledgeable in Ruby as of yet. How would I go about doing that? Thanks for any help in advance.

Click to view attachment
Resource Dragon
Welp, you can't just remove the window behind it, because the bars and the images are built into the window itself. You would need to create a duplicate window class with no opacity.

Can you post an open demo with the scripts?
(Or, if you prefer, PM the download link to the open demo so it isn't there for everybody.)
ZODIAK
I feel kind of dumb for not knowing how to make an open demo, but I can provide the scripts I used. All default scripts, minus one line that resizes the battle window to force the character faces to be smaller, as well as the following (all unedited from the originals):

Ace Core Engine
Ace Message System
Ace Battle Engine

And a few other Yanfly scripts that I think aren't relative.
Resource Dragon
An open demo basically means sending me your project folder un-encrypted.

(I would open it, make the necessary changes, and send it back to you. It's just easier over all that way.)

It would just be so much easier doing it that way since I have to edit multiple different scripts.
ZODIAK
PM'd.
Pacman
CODE
class Window_BattleStatus < Window_Selectable
  alias no_opacity_wndbs_init initialize
  def initialize(*args)
    no_opacity_wndbs_init(*args)
    self.opacity = 0
  end
end


Stick this near the bottom of your script list. Is that what you wanted?
ZODIAK
QUOTE (Pacman @ Mar 22 2012, 03:32 AM) *
CODE
class Window_BattleStatus < Window_Selectable
  alias no_opacity_wndbs_init initialize
  def initialize(*args)
    no_opacity_wndbs_init(*args)
    self.opacity = 0
  end
end


Stick this near the bottom of your script list. Is that what you wanted?


Awesome! Only issue, if it could even be called one, when you go into items or skills or whatever, the box behind the face on the right is gone as well. Not an issue for me, just something I noticed. Thanks so much!
Pacman
Ah, right. Hope this works.
Replace your snippet with this:
CODE
class Window_BattleStatus < Window_Selectable
  alias no_opacity_wndbs_init initialize
  def initialize(*args)
    no_opacity_wndbs_init(*args)
    @old_opacity = self.opacity
    self.opacity = 0
  end
end

class Window_BattleStatusAid < Window_BattleStatus
  alias no_opacity_wndbsa_init initialize
  def initialize(*args)
    no_opacity_wndbsa_init(*args)
    self.opacity = @old_opacity
  end
end

Sorry for the issue.
ZODIAK
QUOTE (Pacman @ Mar 22 2012, 05:22 AM) *
Ah, right. Hope this works.
Replace your snippet with this:
CODE
class Window_BattleStatus < Window_Selectable
  alias no_opacity_wndbs_init initialize
  def initialize(*args)
    no_opacity_wndbs_init(*args)
    @old_opacity = self.opacity
    self.opacity = 0
  end
end

class Window_BattleStatusAid < Window_BattleStatus
  alias no_opacity_wndbsa_init initialize
  def initialize(*args)
    no_opacity_wndbsa_init(*args)
    self.opacity = @old_opacity
  end
end

Sorry for the issue.


That didn't work, but I fiddled around with it and it looks like you left out a line?


class Window_BattleStatus < Window_Selectable
alias no_opacity_wndbs_init initialize
def initialize(*args)
no_opacity_wndbs_init(*args)
@old_opacity = self.opacity
self.opacity = 0
end
end

class Window_BattleStatusAid < Window_BattleStatus
alias no_opacity_wndbsa_init initialize
def initialize(*args)
no_opacity_wndbsa_init(*args)
@old_opacity = self.opacity
self.opacity = @old_opacity
end
end


This seems to work fine, unless that's the wrong approach? Like I said, I'm not too skilled at RGSS3, but it looks like it tried to call a variable that wasn't declared?
Resource Dragon
Sorry I didn't get your problem fixed, i'm still not quite used to the way Ace works. Looks like Pacman has got most of it done though. thumbsup.gif
ZODIAK
QUOTE (Resource Dragon @ Mar 22 2012, 03:13 PM) *
Sorry I didn't get your problem fixed, i'm still not quite used to the way Ace works. Looks like Pacman has got most of it done though. thumbsup.gif


It's quite alright. I appreciate the replies. biggrin.gif
Pacman
It worked fine for me... The variable should be defined in Window_BatteStatus, as Window_BattleStatusAid inherits from there. Hell, you could pretty much just replace
CODE
    self.opacity = @old_opacity
with
CODE
    self.opacity = 255

That would make the snippet thus:
CODE
class Window_BattleStatus < Window_Selectable
  alias no_opacity_wndbs_init initialize
  def initialize(*args)
    no_opacity_wndbs_init(*args)
    self.opacity = 0
  end
end

class Window_BattleStatusAid < Window_BattleStatus
  alias no_opacity_wndbsa_init initialize
  def initialize(*args)
    no_opacity_wndbsa_init(*args)
    self.opacity = 255
  end
end
ZODIAK
QUOTE (Pacman @ Mar 22 2012, 04:09 PM) *
It worked fine for me... The variable should be defined in Window_BatteStatus, as Window_BattleStatusAid inherits from there. Hell, you could pretty much just replace
CODE
    self.opacity = @old_opacity
with
CODE
    self.opacity = 255

That would make the snippet thus:
CODE
class Window_BattleStatus < Window_Selectable
  alias no_opacity_wndbs_init initialize
  def initialize(*args)
    no_opacity_wndbs_init(*args)
    self.opacity = 0
  end
end

class Window_BattleStatusAid < Window_BattleStatus
  alias no_opacity_wndbsa_init initialize
  def initialize(*args)
    no_opacity_wndbsa_init(*args)
    self.opacity = 255
  end
end


It's very odd... that one doesn't want to erase the second window either? I see the logic behind it, but it doesn't seem to want to do it when coded that way. It's really not an issue, but now I'm curious.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.