じ☆ve冰风 发表于 2026-8-2 13:41:52

N.A.S.T.Y Replace Window with Picture

N.A.S.T.Y. Replace Window with Picture
By: Nelderson

Introduction
This script uses pictures instead of windows you specify.  While this looks very simple, for the Photoshop nerds this will be invaluable. 

Features
- Have a picture instead of the default window.
- Use pictures on only the windows you want

- Should be compatible with most custom scripts and windows

Screenshots

Spoiler
http://i58.tinypic.com/ilwv9y.png


Same pictures, with opacity taken down in Photoshop


http://i61.tinypic.com/8ysx0x.png





How to Use

-Configure the PICWINDOW Hash. It should work with not only default windows, but custom windows from other scripts as well.

 

-If you want to know how big your window is to make a picture, the best way is to look at the initialize method on each window class.  It is usually in the format (x, y, width, height).  So the picture you need to make should be the same width and height.  Or another way is to find out the dimensions is to take a screenshot of your game window.  And then with photoshop, or something similar, select the box and look at how big the dimensions are in the select window.

 

 

Demo
I'll make one if you guys want one!

Script

Spoiler#===============================================================================#            N.A.S.T.Y. Replace Window with Picture#              Nelderson's Awesome Scripts To You# By: Nelderson# Made On: 3/11/2015# Last Updated: 3/12/2015#===============================================================================# Update History:# - Version 0.5 - Initial Release - Technically BETA/Tesing Stage# - Version 1.0 - Fixed issues with the Message window and added#                 feature to change picture to a window with a script call#===============================================================================# *Notes:#  -This script uses pictures instead of windows you specify.#===============================================================================# Credits:# -Nelderson#===============================================================================#  Instructions:##  -Configure the PICWINDOW Hash below. It should work with not only #   default windows, but custom windows from other scripts as well.##  -If you want to know how big your window is to make a picture,#   the best way is to look at the initialize method on each window#   class.  It is usually in the format (x, y, width, height).#   So the picture you need to make should be the same width and height.##  -You can change the pic of the window you want by using the script call:#     change_nelwinpic(window, "pic") #        Where window is the class and pic is the name in the pictures folder.#        Ex. change_nelwinpic(Window_Gold, "Gold")#===============================================================================# Take the Window Class name => Name of the "picture" in the Pictures folder # Example:# Window_Gold => "Gold",module NEL    PICWINDOW ={   # <=== Do Not Remove      Window_Message => "BlueMessage",  Window_Gold => "BlueGold",  Window_MenuStatus => "BlueStatus",  Window_MenuCommand => "BlueCommand",  Window_NameInput => "pic4",  Window_NameEdit => "blah",          }# <=== Do Not Removeend#==============================================================================##                            END OF CUSTOMIZATION                              ##==============================================================================#class Game_System  attr_accessor :nelpicwindow  alias nel_winpic_sysinit initialize  def initialize    nel_winpic_sysinit    @nelpicwindow = {}    for i in NEL:
ICWINDOW      @nelpicwindow] = i    end  endendclass Window_Base < Window  attr_accessor :nelwinpic  alias nel_winpic_scrpt_init initialize  def initialize(*args)    nel_winpic_scrpt_init(*args)    create_nelpicture  end    def create_nelpicture    for i in $game_system.nelpicwindow    #Stupid Gold Window....    next if SceneManager.scene_is?(Scene_Map) && self.instance_of?(Window_Gold)    next if SceneManager.scene_is?(Scene_Battle) && self.instance_of?(Window_Gold)    next if i == nil #In case in game is changed.  Goes back to default      if self.instance_of?(i) ###Where all the magic happens!###        @nelwinpic = ::Sprite.new(self.viewport)        @nelwinpic.visible = false        @nelwinpic.bitmap = Cache.picture(i)        @nelwinpic.x = self.x        @nelwinpic.y = self.y        @nelwinpic.opacity = self.opacity        self.opacity = 0      end    end  end    alias nel_winpic_scrpt_dispose dispose  def dispose    if @nelwinpic != nil      @nelwinpic.bitmap.dispose      @nelwinpic = nil    end    nel_winpic_scrpt_dispose  end    alias nel_winpic_srpt_update update  def update    nel_winpic_srpt_update    if @nelwinpic != nil      @nelwinpic.x = self.x      @nelwinpic.y = self.y      @nelwinpic.viewport = self.viewport      @nelwinpic.visible = self.visible      if self.instance_of?(Window_Message) && $game_system.nelpicwindow != nil        @nelwinpic.visible = $game_message.visible        self.opacity = 0      end    end  endend  class Game_Interpreter  def change_nelwinpic(window, pic)    $game_system.nelpicwindow = pic    if SceneManager.scene_is?(Scene_Map)       SceneManager.goto(Scene_Map) if window == Window_Message    end  endend




FAQ

Q: What does N.A.S.T.Y. stand for?
A: Nelderson's Awesome Scripts To You!

Credit and Thanks
- Nelderson

Terms of Use: 

Free to use for non-commercial use.  Any commercial use is fine as long as you credit and throw me a copy of your completed game if it ever gets finished 



本贴来自国际rpgmaker官方论坛作者:Nelderson处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/n-a-s-t-y-replace-window-with-picture.37699/
页: [1]
查看完整版本: N.A.S.T.Y Replace Window with Picture