设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 111|回复: 0

[转载发布] N.A.S.T.Y Replace Window with Picture

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-2 13:41:52 | 显示全部楼层 |阅读模式
    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



    Same pictures, with opacity taken down in Photoshop








    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[0]] = i[1]    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[1] == nil #In case in game is changed.  Goes back to default      if self.instance_of?(i[0]) ###Where all the magic happens!###        @nelwinpic = ::Sprite.new(self.viewport)        @nelwinpic.visible = false        @nelwinpic.bitmap = Cache.picture(i[1])        @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[Window_Message] != nil        @nelwinpic.visible = $game_message.visible        self.opacity = 0      end    end  endend  class Game_Interpreter  def change_nelwinpic(window, pic)    $game_system.nelpicwindow[window] = 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/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 11:36 , Processed in 0.124895 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表