collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: +[Quick Face Border]+  (Gelesen 2595 mal)

woratana

  • Gast
+[Quick Face Border]+
« am: Februar 22, 2008, 16:58:39 »
Quick Face Border
Version 1.5
by Woratana
Release Date: 22/02/2008


Introduction
 This script will add the border on Face,

The border will create from window skin you choose  ;)


Features
Version 1.5
- Edited Window_Message Bug
- You can use custom image for border

Version 1.0
- Add border on face
- Choose window skin you want for face's border
- Choose the window you want to use face border


Screenshot
Version 1.5
Spoiler for Hiden:

Custom image border!

The border image I use in screenshot~
Version 1.0
Spoiler for Hiden:









Yep, Yatzumo's edited windowskin  :lol:


Script
Place it above main.
Spoiler for Hiden:
#============================================================
# ? [VX] ? Quick Face Border ?
#------------------------------------------------------------
# ? by Woratana [woratana@hotmail.com]
# ? Thaiware RPG Maker Community
# ? Released Date: 23/02/2008
#------------------------------------------------------------
# Version 1.5
# - Edited Window_Message Bug
# - You can use custom image for border
#------------------------------------------------------------
class Window_Base < Window
  #------------------------------
  # START SETUP SCRIPT
  #---------------------------
  BORDER_MODE = 0 # Choose Border Mode (0: Use Windowskin, 1:Use Image)
  BORDER_SKIN = "Window" # Name of Window Skin for Border (Mode 0)
  BORDER_IMAGE = "borderpic" # Custom Image for Border (Mode 1)
  # Custom image must be in folder "Graphics/Pictures" and size 96 x 96 pixel
  
  BORDER_OPACITY = 255 # Face Border's Opacity (0 - 255)
  
  # (true/false)
  USE_BORDER_IN_MENU = true
  USE_BORDER_IN_MESSAGE = true
  USE_BORDER_IN_STATUS_WINDOW = true
  USE_BORDER_IN_NAME_WINDOW = true
  #------------------------------
  # END SETUP SCRIPT
  #---------------------------
  alias wor_facbor_winbas_ini initialize
  alias wor_facbor_winbas_dis dispose
  alias wor_facbor_winbas_draf draw_face
  
  def initialize(x, y, width, height)
    wor_facbor_winbas_ini(x, y, width, height)
    @border = Array.new
  end

  def dispose
    delete_border if @border != []
    wor_facbor_winbas_dis
  end
  
  def draw_face(face_name, face_index, x, y, size = 96)
    if ($scene.is_a?(Scene_Menu) and USE_BORDER_IN_MENU) or ($scene.is_a?(Scene_Map) and USE_BORDER_IN_MESSAGE) or ($scene.is_a?(Scene_Status) and USE_BORDER_IN_STATUS_WINDOW) or ($scene.is_a?(Scene_Name) and USE_BORDER_IN_NAME_WINDOW)
      if BORDER_MODE == 0
        @border.push Window_Border.new(self.x + x + 16,self.y + y + 16,96,96)
      elsif BORDER_MODE == 1
        id = @border.size
        @border[id] = Sprite.new
        @border[id].bitmap = Cache.picture(BORDER_IMAGE)
        @border[id].x = self.x + x + 16
        @border[id].y = self.y + y + 16
        @border[id].z = 500
    end
    end
    wor_facbor_winbas_draf(face_name, face_index, x, y, size)
  end
  
  def delete_border
      for i in 0..(@border.size - 1)
        if BORDER_MODE == 0 and !@border[i].nil?
          @border[i].dispose
        elsif BORDER_MODE == 1 and !@border[i].nil?
          @border[i].bitmap.dispose
          @border[i].dispose
        end
      end
      @border = []
  end
  
end

  $worale = {} if !$worale
  $worale["FaceBorder"] = true
  
class Window_Border < Window_Base
  
  def initialize(x,y,width,height)
    super(x,y,width,height)
    self.windowskin = Cache.system(BORDER_SKIN)
    self.opacity = BORDER_OPACITY
    self.back_opacity = 0
    self.z = 500
  end
  
end

class Window_Message < Window_Selectable
  alias wor_facbot_winmsg_upd update
  def update
    wor_facbot_winmsg_upd
  if @closing and @border != []
    delete_border
  end
  end
end

Instruction

Setup script here:

  #------------------------------
  # START SETUP SCRIPT
  #---------------------------
  BORDER_MODE = 0 # Choose Border Mode (0: Use Windowskin, 1:Use Image)
  BORDER_SKIN = "Window" # Name of Window Skin for Border (Mode 0)
  BORDER_IMAGE = "borderpic" # Custom Image for Border (Mode 1)
  # Custom image must be in folder "Graphics/Pictures" and size 96 x 96 pixel
  
  BORDER_OPACITY = 255 # Face Border's Opacity (0 - 255)
  
  # (true/false)
  USE_BORDER_IN_MENU = true
  USE_BORDER_IN_MESSAGE = true
  USE_BORDER_IN_STATUS_WINDOW = true
  USE_BORDER_IN_NAME_WINDOW = true
  #------------------------------
  # END SETUP SCRIPT
  #---------------------------

Author's Notes
Free for use in your non-commercial work if credit included. If your project is commercial, please contact me.

Please do not redistribute this script without permission. If you want to post it on any forum, please link to this topic.
« Letzte Änderung: Februar 22, 2008, 19:49:36 von woratana »

+[Quick Face Border]+

Offline Snake

  • Moderator
  • VX-Kenner
  • ***
  • Beiträge: 538
  • Blubb, der Mod den keiner kennt! XD
+[Quick Face Border]+
« Antwort #1 am: Februar 22, 2008, 17:36:33 »
Yay thats a very useful script^^
It saves so much time xD
Thx^^
Zitat
Snake 23:50

ich lads schnell


Silvanus 23:50

bist ne geile sau
:)

+[Quick Face Border]+

ERZENGEL

  • Gast
+[Quick Face Border]+
« Antwort #2 am: Februar 22, 2008, 17:42:59 »
That's a cool effect. When I start my project I will use it!

+[Quick Face Border]+

woratana

  • Gast
+[Quick Face Border]+
« Antwort #3 am: Februar 22, 2008, 19:51:46 »
Thanks for telling me the bug! :)

UPDATED to version 1.5!

- Edited Window_Message Bug
- You can use custom image for border

Screenshot:
Spoiler for Hiden:



Script is in first post :)

+[Quick Face Border]+

Yatzumo

  • Gast
+[Quick Face Border]+
« Antwort #4 am: Februar 22, 2008, 21:44:35 »
Very Very NICE woratana!
I like it so much. :D
And again: small but very good. :D

Thanks for it, I'll use it to!

MFG Yatzumo

+[Quick Face Border]+

Offline Goldenboss

  • Mr. MACK-Tile
  • ***
  • Beiträge: 251
    • http://www.goldenboss.de
+[Quick Face Border]+
« Antwort #5 am: Februar 22, 2008, 22:11:47 »
Hi woratana,

i am sure, that this will be a great script.
When I found a nice border i'll use it of course.

Sincerely, Markus.

+[Quick Face Border]+

Dainreth

  • Gast
+[Quick Face Border]+
« Antwort #6 am: Februar 23, 2008, 11:43:17 »
Nice, I like this script. I haven't test it yet, but looks really nice. Thanks!

+[Quick Face Border]+

$@$uk€

  • Gast
+[Quick Face Border]+
« Antwort #7 am: März 02, 2008, 15:24:42 »
I like this Script... But the position of the border isn't the best.

Your position uses this coordinates
        @border.push Window_Border.new(self.x + x + 16,self.y + y + 16,96,96)
      elsif BORDER_MODE == 1
        id = @border.size
        @border[id] = Sprite.new
        @border[id].bitmap = Cache.picture(BORDER_IMAGE)
        @border[id].x = self.x + x + 16
        @border[id].y = self.y + y + 16

But this here are much better for the face pictures, because it takes the whole picture in
        @border.push Window_Border.new(self.x + x + 14,self.y + y + 14,100,100)
      elsif BORDER_MODE == 1
        id = @border.size
        @border[id] = Sprite.new
        @border[id].bitmap = Cache.picture(BORDER_IMAGE)
        @border[id].x = self.x + x + 14
        @border[id].y = self.y + y + 14


(my english isn't very good, but i hope you know what i wanna say^^)

+[Quick Face Border]+

woratana

  • Gast
+[Quick Face Border]+
« Antwort #8 am: März 02, 2008, 20:04:44 »
That's what I'm working on! lol

I use this though,

        @border.push Window_Border.new(self.x + x + 15,self.y + y + 14,98,98)
      elsif BORDER_MODE == 1
        id = @border.size
        @border[id] = Sprite.new
        @border[id].bitmap = Cache.picture(BORDER_IMAGE)
        @border[id].x = self.x + x + 15
        @border[id].y = self.y + y + 15

Save 2 px :)

Thanks for suggestion~ :PYou English is not bad
« Letzte Änderung: März 02, 2008, 20:05:29 von woratana »

+[Quick Face Border]+

Offline Evil95

  • Aktuelles Projekt: Demon - Beginning of Chaos VX
  • Mr. MACK-Tile
  • ***
  • Beiträge: 289
    • http://demonvx-online.de.vu
+[Quick Face Border]+
« Antwort #9 am: April 26, 2008, 17:29:01 »
if I open the menu the border come a few seconds earlier. also you can see the border before the menu is open. can you fix it?

PS: sry for my bad englisch^^

+[Quick Face Border]+

woratana

  • Gast
+[Quick Face Border]+
« Antwort #10 am: April 26, 2008, 18:46:32 »
I can do that if I know exactly how long is delay :)

+[Quick Face Border]+

Offline Evil95

  • Aktuelles Projekt: Demon - Beginning of Chaos VX
  • Mr. MACK-Tile
  • ***
  • Beiträge: 289
    • http://demonvx-online.de.vu
+[Quick Face Border]+
« Antwort #11 am: April 26, 2008, 18:48:52 »
what is delay? PS: i use the MOG Menu Plus script.

EDIT: I've found a bug. look at the picture
« Letzte Änderung: April 27, 2008, 23:55:40 von Evil95 »

 


 Bild des Monats

rooftop party

Views: 3583
By: papilion

 Umfrage

  • Wer soll das BdM gewinnen?
  • Dot Kandidat 1
  • 3 (25%)
  • Dot Kandidat 2
  • 1 (8%)
  • Dot Kandidat 3
  • 2 (16%)
  • Dot Kandidat 4
  • 0 (0%)
  • Dot Kandidat 5
  • 6 (50%)
  • Stimmen insgesamt: 12
  • View Topic

 Schnellsuche





SimplePortal 2.3.3 © 2008-2010, SimplePortal