Main Menu
  • Welcome to The RPG Maker Resource Kit.

YEM Item Overhaul opacity.

Started by heisenman, November 11, 2010, 04:10:36 AM

0 Members and 1 Guest are viewing this topic.

heisenman

Hello people I'd like to request your help for something hopefully simple; I've modified mutilated YEM Item Overhaul script but I can't seem to set the opacity of the command and help window.
I've also tried to change values in Window_Item and Scene_Item, but it didn't work.

Here's my abomination http://pastebin.com/gt4kec25.

Also, I havent encountered any error so far using it, but if you find one please post.
Thanks in advance.


modern algebra

Yeah, there shouldn't be any problem with setting the opacity in Scene_Item.

At line 1190, you could put:

@help_window.opacity = x

At line 1245, you could put:


@command_window.opacity = x


The only reason I can see that that wouldn't work is if the Help and Command window classes themselves modify opacity somewhere else, like in update. Anyway, if it isn't working, take a peek into those classes and see what they're up to

heisenman

#3
It worked!

Now, I wanted to modify the opacity because I intended to use a picture as background, so I put
    @target_window.opacity = 255
    @itemback= Sprite.new(@viewport)
    @itemback.bitmap = Cache.system("Gameover")
    @itemback.x = 0
    @itemback.y = 0
    @itemback.z = 0

In line 1198 or so (most certainly this isn't the correct method).
EDIT: The problem now is that I can't see the background picture below the target window.







Oh, I forgot to say, that for some reason YEM Item Overhaul now only works in conjunction with Centered Command Window.
[spoiler]class Window_Command_Centered < Window_Command
 
  #--------------------------------------------------------------------------
  # new method: draw_item
  #--------------------------------------------------------------------------
  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(rect, @commands[index],1)
  end
 
end # Window_Command_Centered
[/spoiler]
It's in the new Melody demo, along with some unfinished scripts. It's still named "1.00m", but it's different from the old 1.00m version.

modern algebra

Set the target window opacity to less than 255 then in the first line you quoted there. Just put it to 0 or something.

heisenman

#5
I set it to 255 because I actually want it to show, but I fear that's not the problem. The background is still not visible.





EDIT: I've solved the problem.
Thanks for your help modern algebra.