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

[转载发布] Hammy - FF9 Popup Window

[复制链接]
累计送礼:
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-3 15:19:26 | 显示全部楼层 |阅读模式
    Hammy - FF9 Popup Window v1.02
    Authentic Final Fantasy IX popup notifications with text formatting and reward displays




    Introduction

    This script provides an authentic Final Fantasy IX popup window system for RPG Maker VX Ace. It displays temporary popup windows with text content that can be closed by user input, perfect for notifications and item rewards.

    The system supports escape codes for text formatting, per-line text alignment, custom positioning, configurable sound effect, integration with the Hammy FF9 Windowskin System for type-based window appearance, and specialized helper methods for common popup types like item and gold rewards.

    AI Disclaimer: Generative AI was used to refine the documentation and presentation of this script, as I am not a native English speaker. Additionally, AI was used for naming conventions in some places and for general beautification of the script.



    Features

    Core Popup Features

    • Key-controlled popup windows (C/B to close when fully open)
    • Custom window positioning with optional x/y coordinate override
    • Per-line text alignment (left, center, right) with mixed format support
    • Window type override support via Hammy FF9 Windowskin System integration

    Helper Methods

    • Default popup display with custom text arrays
    • Item reward popups with automatic inventory management
    • Gold reward popups with automatic currency addition

    Technical Features

    • Player movement blocking during popup display
    • Dynamic window sizing based on text content
    • RGSS3-compliant escape code processing and rendering
    • Compact spacing mode for empty lines (half-height rendering)



    Screenshots













    Configuration

    Popup Window Display Settings

    LINE_HEIGHT
    Height of each text line in pixels for popup windows. Uses default font size by default, can be set to any integer value.
    - Valid values: Any integer value
    - Default:Font.default_size

    Example
                    Ruby:       
    1. LINE_HEIGHT = 20
    复制代码


    STANDARD_PADDING
    Window padding size in pixels for popup windows. Controls the internal spacing between window borders and content.
    - Valid values: Any integer value
    - Default:12

    Example
                    Ruby:       
    1. STANDARD_PADDING = 12
    复制代码


    MAX_WIDTH
    Maximum allowed width for popup windows in pixels. Prevents windows from exceeding screen boundaries.
    - Valid values: Any integer value
    - Default:Graphics.width - 40

    Example
                    Ruby:       
    1. MAX_WIDTH = Graphics.width - 40
    复制代码


    DEFAULT_ALIGN
    Default text alignment within popup windows. Applied when no specific alignment is provided in the popup call. 0 = Left align 1 = Center align 2 = Right align
    - Valid values: 0, 1, or 2
    - Default:1

    Example
                    Ruby:       
    1. DEFAULT_ALIGN = 1
    复制代码


    OFFSET_X
    X-coordinate offset for popup windows. Fine-tunes horizontal positioning.
    - Valid values: Any integer value
    - Default:0

    Example
                    Ruby:       
    1. OFFSET_X = 0
    复制代码


    OFFSET_Y
    Y-coordinate offset for popup windows. Fine-tunes vertical positioning.
    - Valid values: Any integer value
    - Default:-64

    Example
                    Ruby:       
    1. OFFSET_Y = -64
    复制代码


    DEFAULT_TYPE
    Default windowskin type to use for popups. Used when no specific type is provided in the popup call.
    - Valid values: :default, :frame, :topbar, :help
    - Default::frame

    Example
                    Ruby:       
    1. DEFAULT_TYPE = :frame
    复制代码


    FADE_IN_DURATION
    Animation duration in frames for window fade-in. Controls how quickly the popup window becomes fully opaque.
    - Valid values: Any integer value
    - Default:16

    Example
                    Ruby:       
    1. FADE_IN_DURATION = 16
    复制代码


    WAIT_DURATION
    Duration in frames the popup remains fully visible before fading out. This is the base reading time before auto-close begins.
    - Valid values: Any integer value
    - Default:180

    Example
                    Ruby:       
    1. WAIT_DURATION = 180
    复制代码


    FADE_OUT_DURATION
    Animation duration in frames for window fade-out. Controls how quickly the popup window disappears.
    - Valid values: Any integer value
    - Default:16

    Example
                    Ruby:       
    1. FADE_OUT_DURATION = 16
    复制代码


    FLOAT_DISTANCE
    Y-axis movement distance during fade animations. Controls the "floating" effect height. Set to 0 to disable movement.
    - Valid values: Any integer value
    - Default:32

    Example
                    Ruby:       
    1. FLOAT_DISTANCE = 32
    复制代码


    Sound Effect Settings

    PLAY_SOUND
    Enable automatic sound effect playback when popup appears.
    - Valid values: true or false
    - Default:true

    Example
                    Ruby:       
    1. PLAY_SOUND = true
    复制代码


    SOUND_NAME
    Filename of the sound effect to play. Must exist in the Audio/SE folder.
    - Valid values: String filename without extension
    - Default:"Chime2"

    Example
                    Ruby:       
    1. SOUND_NAME = "Chime2"
    复制代码


    SOUND_VOLUME
    Volume level for the sound effect (0-100).
    - Valid values: Integer between 0 and 100
    - Default:80

    Example
                    Ruby:       
    1. SOUND_VOLUME = 80
    复制代码


    SOUND_PITCH
    Pitch adjustment for the sound effect (50-150).
    - Valid values: Integer between 50 and 150
    - Default:100

    Example
                    Ruby:       
    1. SOUND_PITCH = 100
    复制代码




    Script Calls

    Basic Popup Display
    default_popup(['text line 1', 'text line 2'], x, y, type)
    Displays a popup window with custom text content.
    - text: Array of strings or hashes for each line of popup text. String format: "Text content" (left-aligned by default). Hash format: {text: "Text content", align: :center/:left/:right}
    - x: Optional horizontal position (nil for center)
    - y: Optional vertical position (nil for center)
    - type: Optional windowskin type (:default, :frame, :topbar, :help)
    - Returns: Nil

    Examples
                    Ruby:       
    1. # Basic popup with single line and icon
    2. default_popup(['\i[5] Mage class unlocked!'])
    3. # Two lines with custom position x=50, y=50
    4. default_popup(['\c[16]Class Change:\c[0]',
    5. 'Speak to any hermit!'], 50, 50)
    6. # Mixed alignment: centered title with left-aligned text
    7. default_popup([{text: 'Centered Title', align: :center}, 'Left text'])
    8. # Right-aligned text
    9. default_popup([{text: 'Right Text', align: :right}])
    10. # Frame windowskin type (requires Hammy FF9 Windowskin System)
    11. default_popup(['Special message!'], nil, nil, :frame)
    复制代码


    Gold Reward Popups
    gold_popup(amount, x, y, type)
    Displays gold reward popup and adds gold to party.
    - amount: Amount of gold to add to party funds
    - x: Optional horizontal position (nil for center)
    - y: Optional vertical position (nil for center)
    - type: Optional windowskin type (:default, :frame, :topbar, :help)
    - Returns: Nil

    Examples
                    Ruby:       
    1. # Add 100 gold
    2. gold_popup(100)
    3. # Add 9999 gold at position x=200, y=100
    4. gold_popup(9999, 200, 100)
    复制代码


    Item Reward Popups
    item_popup(item_id, quantity, x, y, type)
    Displays item reward popup and adds items to inventory.
    - item_id: Database ID of the item to reward
    - quantity: Number of items to add (default: 1)
    - x: Optional horizontal position (nil for center)
    - y: Optional vertical position (nil for center)
    - type: Optional windowskin type (:default, :frame, :topbar, :help)
    - Returns: Nil

    Examples
                    Ruby:       
    1. # Add 1 of item ID 1
    2. item_popup(1)
    3. # Add 3 of item ID 5 at position x=50, y=50
    4. item_popup(5, 3, 50, 50)
    复制代码




    Installation




    Compatibility

    This script is made strictly for RPG Maker VX Ace. It is highly unlikely that it will run with RPG Maker VX without adjusting.



    License

    MIT License - Free for commercial and non-commercial use.



    Credits

    This script is based on Vlue's Popup Window script.



    Why VX Ace?

    You might wonder why I'm still making scripts for VX Ace instead of MV/MZ. The answer is simple: Ruby is pure beauty, while JavaScript is a terrible language. Ruby's elegant syntax, intuitive design, and expressive power make scripting a joy. JavaScript, on the other hand, is a chaotic mess of inconsistencies and quirks that I simply despise.

    I work with RPG Maker VX Ace for my own game project, and I share the scripts I create with the community. If you're still using VX Ace, you're in good company!



    Download

    Script:Download from GitHub
    Demo:Download from GitHub





    本贴来自国际rpgmaker官方论坛作者:buddysievers处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/hammy-ff9-popup-window.180709/

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 06:17 , Processed in 0.121431 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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